Package com.cloudforge.core.enums
Enum Class AuthMode
- All Implemented Interfaces:
Serializable,Comparable<AuthMode>,Constable
Authentication mode for application access control.
Configuration
Set via deployment context:
cfc.put("authMode", "none"); // No authentication
cfc.put("authMode", "alb-oidc"); // ALB handles OIDC (recommended)
cfc.put("authMode", "application-oidc"); // Application handles OIDC
Modes
- NONE - No authentication, application handles its own auth
- ALB_OIDC - ALB enforces OIDC before traffic reaches application
- APPLICATION_OIDC - Application handles OIDC internally
ALB-OIDC Benefits
- Zero code changes - authentication at infrastructure level
- Consistent auth across all applications
- Automatic token validation and refresh
- Works with Cognito, IAM Identity Center, Okta, Auth0, etc.
Requirements
- ALB-OIDC requires ALB load balancer (lbType=alb)
- Both OIDC modes require SSL enabled (enableSsl=true)
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionALB handles OIDC authentication.Application handles OIDC internally.No CloudForge-managed authentication. -
Method Summary
Modifier and TypeMethodDescriptionstatic AuthModefromString(String value) Parse auth mode from string (case-insensitive).getValue()Returns the JSON/string value for this auth mode.booleanCheck if authentication is handled at ALB level.booleanCheck if this mode requires ALB (not NLB).booleanCheck if this mode requires SSL.toString()Returns the string representation.booleanusesOidc()Check if this mode uses OIDC authentication.static AuthModeReturns the enum constant of this class with the specified name.static AuthMode[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
NONE
No CloudForge-managed authentication. Application may handle its own authentication internally. -
ALB_OIDC
ALB handles OIDC authentication. Unauthenticated requests are redirected to IdP login. Authenticated requests include user claims in headers. Requires ALB (not NLB) and SSL enabled. -
APPLICATION_OIDC
Application handles OIDC internally. ALB passes all traffic through, application validates tokens. Useful for applications with built-in OIDC support.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
getValue
Returns the JSON/string value for this auth mode. -
toString
Returns the string representation. -
fromString
Parse auth mode from string (case-insensitive).- Parameters:
value- String value from deployment context- Returns:
- AuthMode enum value
- Throws:
IllegalArgumentException- if value is not recognized
-
usesOidc
public boolean usesOidc()Check if this mode uses OIDC authentication. -
requiresAlb
public boolean requiresAlb()Check if this mode requires ALB (not NLB). -
requiresSsl
public boolean requiresSsl()Check if this mode requires SSL. -
isAlbAuthenticated
public boolean isAlbAuthenticated()Check if authentication is handled at ALB level.
-