Package com.cloudforgeci.api.security
Class ApplicationOidcFactory
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
com.cloudforgeci.api.core.annotation.BaseFactory
com.cloudforgeci.api.security.ApplicationOidcFactory
- All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct,software.constructs.IDependable
Application-level OIDC Authentication Factory.
This factory configures OIDC authentication WITHIN the application itself (e.g., Jenkins OIDC plugin, GitLab OmniAuth, Grafana OAuth), as opposed to ALB-level authentication which handles auth before requests reach the application.
Authentication Modes Comparison:
- alb-oidc: Authentication at ALB - users auth before reaching app
- + Works with any application
- + No application configuration needed
- - Requires HTTPS
- - All requests authenticated (can't have public pages)
- application-oidc: Authentication within application - app handles auth
- + Application controls auth (can have public pages)
- + Works over HTTP or HTTPS
- + Application-specific features (role mapping, etc.)
- - Requires application OIDC support
- - Application-specific configuration
Supported Applications:
Only applications that implement ApplicationSpec.supportsOidcIntegration()
and provide an OidcIntegration implementation can use application-level OIDC:
- Jenkins (via oic-auth plugin)
- GitLab (via built-in OmniAuth)
- Grafana (via built-in generic_oauth)
- More applications coming soon
Configuration:
Option 1: Amazon Cognito (Recommended)
{
"authMode": "application-oidc",
"cognitoAutoProvision": true,
"cognitoMfaEnabled": true
}
Option 2: IAM Identity Center
{
"authMode": "application-oidc",
"oidcIssuer": "https://portal.sso.us-east-1.amazonaws.com/saml/assertion/...",
"oidcAuthorizationEndpoint": "https://...",
"oidcTokenEndpoint": "https://...",
"oidcUserInfoEndpoint": "https://...",
"oidcClientId": "client-id-from-identity-center"
}
Option 3: External OIDC Provider (Okta, Auth0, etc.)
{
"authMode": "application-oidc",
"oidcIssuer": "https://your-domain.okta.com",
"oidcAuthorizationEndpoint": "https://your-domain.okta.com/oauth2/v1/authorize",
"oidcTokenEndpoint": "https://your-domain.okta.com/oauth2/v1/token",
"oidcUserInfoEndpoint": "https://your-domain.okta.com/oauth2/v1/userinfo",
"oidcClientId": "client-id-from-provider"
}
Post-Deployment Steps:
- Update the OIDC client secret in AWS Secrets Manager
- For Cognito: Secret is auto-populated
- For IAM Identity Center / External: Run:
aws secretsmanager put-secret-value --secret-id STACK_NAME/APP_ID/oidc/client-secret --secret-string "YOUR_SECRET" - Application-specific setup (see application logs for instructions)
- Since:
- 3.0.0
-
Nested Class Summary
Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$Default, software.constructs.IConstruct.Jsii$Proxy -
Field Summary
Fields inherited from class com.cloudforgeci.api.core.annotation.BaseFactory
cfc, config, ctx -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcreate()Abstract method that must be implemented by all factory subclasses.Methods inherited from class com.cloudforgeci.api.core.annotation.BaseFactory
getDeploymentContext, getSecurityProfileConfiguration, getSystemContextMethods inherited from class software.constructs.Construct
getNode, isConstruct, toStringMethods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Constructor Details
-
ApplicationOidcFactory
-
-
Method Details
-
create
public void create()Description copied from class:BaseFactoryAbstract method that must be implemented by all factory subclasses. This method should contain the actual infrastructure creation logic.- Specified by:
createin classBaseFactory
-