Class SyliusOidcIntegration
- All Implemented Interfaces:
OidcIntegration
Sylius (Symfony-based) supports OIDC through the Symfony Security Bundle with a KnpU OAuth2 provider. Authentication is primarily handled at the ALB layer via Cognito for simplicity.
- Since:
- 3.2.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns environment variables needed for OIDC configuration.Returns the OIDC integration method for this application.Returns the OIDC callback path for this application.getUserDataCommands(OidcConfiguration config, Ec2Context context) Returns UserData commands for setting up OIDC integration.booleanReturns whether this application supports OIDC integration.booleanReturns whether this application supports ALB-level OIDC authentication.booleanReturns whether this application supports application-level OIDC.booleanReturns whether this application supports Cognito as an identity provider.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface OidcIntegration
getAuthenticationType, getConfigurationFile, getConfigurationFilePath, getContainerStartupCommand, getPostDeploymentInstructions, getSamlCertificateEnvVar, getSamlCertificateFilePath, getSamlCertificateMountPath, isDistroless, needsSamlCertificate, supportsIdentityCenterSaml
-
Constructor Details
-
SyliusOidcIntegration
public SyliusOidcIntegration()
-
-
Method Details
-
isSupported
public boolean isSupported()Description copied from interface:OidcIntegrationReturns whether this application supports OIDC integration.- Specified by:
isSupportedin interfaceOidcIntegration- Returns:
- true if application has OIDC support
-
getIntegrationMethod
Description copied from interface:OidcIntegrationReturns the OIDC integration method for this application.Examples:
- jenkins: OIDC Plugin
- gitlab: Built-in OmniAuth
- grafana: Built-in generic_oauth
- sonarqube: OIDC Plugin
- Specified by:
getIntegrationMethodin interfaceOidcIntegration- Returns:
- integration method description
-
getEnvironmentVariables
Description copied from interface:OidcIntegrationReturns environment variables needed for OIDC configuration.These are passed to the container or EC2 userdata script.
Example for Grafana:
GF_AUTH_GENERIC_OAUTH_ENABLED=true GF_AUTH_GENERIC_OAUTH_NAME=Cognito GF_AUTH_GENERIC_OAUTH_CLIENT_ID=${clientId} GF_AUTH_GENERIC_OAUTH_AUTH_URL=${authUrl}- Specified by:
getEnvironmentVariablesin interfaceOidcIntegration- Parameters:
config- OIDC configuration from provider- Returns:
- map of environment variable name to value
-
getUserDataCommands
Description copied from interface:OidcIntegrationReturns UserData commands for setting up OIDC integration.These commands are added to the EC2 userdata script to configure OIDC integration during instance initialization.
- Specified by:
getUserDataCommandsin interfaceOidcIntegration- Parameters:
config- OIDC configuration from providercontext- EC2 context with stack information- Returns:
- list of shell commands
-
getOidcCallbackPath
Description copied from interface:OidcIntegrationReturns the OIDC callback path for this application.This is the path where the OIDC provider redirects after authentication. Each application has a different callback path based on its OIDC implementation.
Examples:
- Jenkins: /securityRealm/finishLogin
- Mattermost: /signup/gitlab/complete (uses GitLab OAuth provider for OIDC)
- GitLab: /users/auth/openid_connect/callback
- Grafana: /login/generic_oauth
- Specified by:
getOidcCallbackPathin interfaceOidcIntegration- Returns:
- callback path (e.g., "/securityRealm/finishLogin")
-
supportsAlbOidc
public boolean supportsAlbOidc()Description copied from interface:OidcIntegrationReturns whether this application supports ALB-level OIDC authentication.ALB-level auth means authentication is handled by the ALB before traffic reaches the application. The application sees already-authenticated users via headers (X-Amzn-Oidc-*).
Most applications support this as it's transparent to the application.
- Specified by:
supportsAlbOidcin interfaceOidcIntegration- Returns:
- true if ALB-level OIDC is supported (default: true)
-
supportsCognito
public boolean supportsCognito()Description copied from interface:OidcIntegrationReturns whether this application supports Cognito as an identity provider.Cognito provides:
- User pool with email/password authentication
- MFA support (TOTP, SMS)
- OAuth 2.0 / OIDC endpoints
- Hosted UI for login
- Specified by:
supportsCognitoin interfaceOidcIntegration- Returns:
- true if Cognito OIDC is supported (default: true)
-
supportsApplicationOidc
public boolean supportsApplicationOidc()Description copied from interface:OidcIntegrationReturns whether this application supports application-level OIDC.Application-level OIDC means the application handles authentication itself using its built-in OIDC/OAuth support. The application needs:
- Client ID and secret
- OIDC endpoints (issuer, auth, token, userinfo)
- Redirect URL configuration
Examples: Jenkins OIDC plugin, GitLab OmniAuth, Grafana generic_oauth
- Specified by:
supportsApplicationOidcin interfaceOidcIntegration- Returns:
- true if application-level OIDC is supported (default: true if integration exists)
-