Identity Configuration

Configuration for the OSS identity runtime. This page documents the actual spring.auth.* and contexa.identity.statemachine.* properties used by the current Contexa codebase and shows where runtime classes such as AuthUrlProvider, MfaFlowUrlRegistry, IdentityDslRegistry, MfaDslConfigurerImpl, and SessionStateConfigurer consume them.

Auth Context Properties

AuthContextProperties is bound to the spring.auth prefix. It controls authentication state selection, token transport, token issuer mode, URL groups, MFA runtime defaults, and token lifecycle.

Core Authentication Settings

PropertyTypeDefaultDescription
spring.auth.state-typeStateTypeOAUTH2Selects the default state mode. Current enum values are OAUTH2 and SESSION.
spring.auth.token-transport-typeTokenTransportTypeHEADERControls how tokens are transported. Current enum values are COOKIE, HEADER, and HEADER_COOKIE.
spring.auth.token-issuerTokenIssuerINTERNALSelects whether Contexa issues tokens itself or expects an external authorization server. Current enum values are INTERNAL and AUTHORIZATION_SERVER.
spring.auth.factor-selection-typeFactorSelectionTypeSELECTControls whether MFA factor choice is explicitly presented or automatically selected. Current enum values are AUTO and SELECT.
spring.auth.access-token-validitylong3600000Access token validity in milliseconds.
spring.auth.refresh-token-validitylong604800000Refresh token validity in milliseconds.
spring.auth.refresh-rotate-thresholdlong43200000Threshold after which refresh-token rotation is triggered on use.
spring.auth.enable-refresh-tokenbooleantrueEnables refresh token issuance.
spring.auth.allow-multiple-loginsbooleanfalseAllows multiple concurrent active logins for the same principal.
spring.auth.max-concurrent-loginsint3Concurrent login ceiling when multiple logins are allowed.
spring.auth.cookie-securebooleantrueMarks authentication cookies as secure by default.
spring.auth.token-persistenceStringmemoryFrontend token persistence mode passed to login and MFA pages. Current OSS client modes are memory, localstorage, and sessionstorage.
spring.auth.token-prefixStringBearer Authorization header prefix.
spring.auth.roles-claimStringrolesJWT claim name used for roles.
spring.auth.scopes-claimStringscopesJWT claim name used for scopes.
spring.auth.oauth2-csrfbooleanfalseToggles CSRF protection for OAuth2-oriented endpoints.
YAML
spring:
  auth:
    state-type: oauth2
    token-transport-type: header
    token-issuer: internal
    factor-selection-type: select
    access-token-validity: 3600000
    refresh-token-validity: 604800000
    refresh-rotate-threshold: 43200000
    enable-refresh-token: true
    allow-multiple-logins: false
    max-concurrent-logins: 3
    cookie-secure: true
    token-persistence: memory
    token-prefix: "Bearer "
    roles-claim: roles
    scopes-claim: scopes
    oauth2-csrf: false

Related runtime references: Authentication, Adaptive MFA, and State Management.

URL Configuration Groups

spring.auth.urls is consumed by AuthUrlProvider. For MFA flows, MfaFlowUrlRegistry creates per-flow providers so named flows can safely apply custom prefixes without mutating shared global state.

Single Authentication URLs

PropertyDefaultDescription
spring.auth.urls.single.form-login-processing/loginDefault processing endpoint for non-MFA form login.
spring.auth.urls.single.form-login-page/loginDefault page for non-MFA form login.
spring.auth.urls.single.rest-login-processing/api/loginDefault processing endpoint for non-MFA REST login.
spring.auth.urls.single.login-failure/login?errorFailure redirect for non-MFA flows.
spring.auth.urls.single.login-success/Success redirect for non-MFA flows.
spring.auth.urls.single.logout-page/logoutLogout page for single-factor flows.
spring.auth.urls.single.ott.request-email/login/ottSingle-factor OTT request page.
spring.auth.urls.single.ott.code-generation/ott/generateSingle-factor OTT code generation endpoint.
spring.auth.urls.single.ott.code-sent/login/ott/sentSingle-factor OTT sent page.
spring.auth.urls.single.ott.challenge/login/ott/verifySingle-factor OTT verification page.
spring.auth.urls.single.ott.login-processing/login/ottSingle-factor OTT verification endpoint.
spring.auth.urls.single.ott.login-failure/login/ott?errorSingle-factor OTT failure page.
spring.auth.urls.single.passkey.login-page/login/webauthnSingle-factor passkey login page.
spring.auth.urls.single.passkey.login-processing/login/webauthnSingle-factor passkey verification endpoint.
spring.auth.urls.single.passkey.login-failure/login/webauthn?errorSingle-factor passkey failure page.
spring.auth.urls.single.passkey.assertion-options/webauthn/authenticate/optionsPasskey assertion options endpoint.
spring.auth.urls.single.passkey.registration-options/webauthn/register/optionsPasskey registration options endpoint.
spring.auth.urls.single.passkey.registration-processing/webauthn/registerPasskey registration processing endpoint.

MFA URL Groups

PropertyDefaultDescription
spring.auth.urls.primary.form-login-processing/mfa/loginPrimary form-processing URL used inside MFA flows.
spring.auth.urls.primary.form-login-page/mfa/loginPrimary form page used inside MFA flows.
spring.auth.urls.primary.rest-login-processing/api/mfa/loginPrimary REST login endpoint used inside MFA flows.
spring.auth.urls.primary.login-failure/login?errorPrimary failure redirect.
spring.auth.urls.primary.login-success/Primary success redirect.
spring.auth.urls.primary.logout-page/logoutPrimary logout page.
spring.auth.urls.mfa.select-factor/mfa/select-factorMFA factor selection page.
spring.auth.urls.mfa.success/mfa/successMFA success page.
spring.auth.urls.mfa.failure/mfa/failureMFA failure page.
spring.auth.urls.mfa.cancel/mfa/cancelMFA cancellation endpoint/page.
spring.auth.urls.mfa.status/mfa/statusMFA status endpoint.
spring.auth.urls.mfa.request-ott-code/mfa/request-ott-codeOTT code request endpoint.
spring.auth.urls.mfa.config/api/mfa/configMFA config endpoint used by the page generator and client code.
spring.auth.urls.factors.ott.request-code-ui/mfa/ott/request-code-uiOTT request page.
spring.auth.urls.factors.ott.code-generation/mfa/ott/generate-codeOTT code generation endpoint.
spring.auth.urls.factors.ott.code-sent/mfa/ott/code-sentOTT code-sent page.
spring.auth.urls.factors.ott.challenge-ui/mfa/challenge/ottOTT challenge page.
spring.auth.urls.factors.ott.login-processing/login/mfa-ottOTT login-processing endpoint.
spring.auth.urls.factors.ott.default-failure/mfa/challenge/ott?error=trueDefault OTT failure redirect.
spring.auth.urls.factors.ott.single-ott-request-email/loginOttLegacy single-OTT request page path retained by OttUrls.
spring.auth.urls.factors.ott.single-ott-code-generation/login/ott/generateLegacy single-OTT generation path retained by OttUrls.
spring.auth.urls.factors.ott.single-ott-challenge/loginOttVerifyCodeLegacy single-OTT challenge path retained by OttUrls.
spring.auth.urls.factors.ott.single-ott-sent/ott/sentLegacy single-OTT sent page path retained by OttUrls.
spring.auth.urls.factors.passkey.rp-idlocalhostDefault passkey relying-party ID.
spring.auth.urls.factors.passkey.rp-namecontexa-identityDefault passkey relying-party name.
spring.auth.urls.factors.passkey.allowed-originsnullComma-separated allowed origins. When unset, the passkey builder falls back to http://localhost:{server.port}.
spring.auth.urls.factors.passkey.login-processing/login/mfa-webauthnPasskey authentication endpoint for MFA mode.
spring.auth.urls.factors.passkey.challenge-ui/mfa/challenge/passkeyPasskey challenge page.
spring.auth.urls.factors.passkey.registration-processing/webauthn/registerPasskey registration endpoint.
spring.auth.urls.factors.passkey.assertion-options/webauthn/authenticate/optionsPasskey assertion options endpoint.
spring.auth.urls.factors.passkey.registration-options/webauthn/register/optionsPasskey registration options endpoint.
spring.auth.urls.factors.recovery-code-login-processing/login/recovery/verifyRecovery-code verification endpoint.
spring.auth.urls.factors.recovery-code-challenge-ui/mfa/challenge/recoveryRecovery-code challenge page.

Runtime consumers: AuthUrlProvider resolves these paths, while MfaFlowUrlRegistry creates per-flow providers so named MFA flows can safely use different prefixes.

Token Issuer Settings

spring.auth.internal and spring.auth.oauth2 hold the two token-issuer configurations selected by spring.auth.token-issuer.

Internal JWT Endpoints

PropertyDefaultDescription
spring.auth.internal.login-uri/api/loginInternal JWT login endpoint.
spring.auth.internal.logout-uri/logoutInternal logout endpoint.
spring.auth.internal.refresh-uri/api/refreshInternal refresh endpoint.

OAuth2 / Authorization-Server Settings

PropertyDefaultDescription
spring.auth.oauth2.client-iddefault-clientOAuth2 client identifier.
spring.auth.oauth2.client-secret173f8245-5f7d-4623-a612-aa0c68f6da4aDefault client secret declared by OAuth2TokenSettings. Override it in real deployments.
spring.auth.oauth2.issuer-urihttp://localhost:9000Issuer base URI.
spring.auth.oauth2.token-endpoint/oauth2/tokenToken endpoint path.
spring.auth.oauth2.scopereadDefault scope requested by the runtime.
spring.auth.oauth2.redirect-urihttp://localhost:8080Post-authorization redirect URI.
spring.auth.oauth2.authorized-urinullOptional post-authorization redirect override.
spring.auth.oauth2.jwk-key-store-pathnullPath to the JWK keystore.
spring.auth.oauth2.jwk-key-store-passwordnullKeystore password.
spring.auth.oauth2.jwk-key-aliasnullKey alias inside the keystore.
spring.auth.oauth2.jwk-key-passwordnullKey password override.
YAML
spring:
  auth:
    token-issuer: authorization_server
    internal:
      login-uri: /api/login
      logout-uri: /logout
      refresh-uri: /api/refresh
    oauth2:
      client-id: default-client
      client-secret: replace-me
      issuer-uri: http://localhost:9000
      token-endpoint: /oauth2/token
      scope: read
      redirect-uri: http://localhost:8080

MFA Runtime Settings

spring.auth.mfa is bound to MfaSettings. It controls challenge lifecycles, retry policy, repository selection, factor delivery defaults, and diagnostics. These defaults are consumed by MFA filters, handlers, and state-machine-aware request handling code.

PropertyTypeDefaultDescription
spring.auth.mfa.session-timeout-mslong600000Overall MFA session timeout.
spring.auth.mfa.challenge-timeout-mslong300000Per-challenge timeout window.
spring.auth.mfa.inactivity-timeoutlong900000Idle-time cutoff for MFA state.
spring.auth.mfa.cache-ttllong300000TTL for MFA runtime cache entries.
spring.auth.mfa.session-refresh-interval-mslong30000Refresh cadence for active MFA sessions.
spring.auth.mfa.state-machine-timeout-mslong10000Timeout budget for state-machine-aware MFA handlers.
spring.auth.mfa.max-retry-attemptsint5Maximum verification retries before lockout logic applies.
spring.auth.mfa.account-lockout-duration-mslong900000Duration of MFA lockout after retry exhaustion.
spring.auth.mfa.minimum-delay-mslong500Minimum timing floor used to reduce response timing variance.
spring.auth.mfa.device-remember-duration-mslong2592000000Remember-device duration.
spring.auth.mfa.otp-token-validity-secondsint300OTP validity window.
spring.auth.mfa.otp-token-lengthint6OTP code length.
spring.auth.mfa.sms-resend-interval-secondsint60SMS resend throttle.
spring.auth.mfa.email-resend-interval-secondsint120Email resend throttle.
spring.auth.mfa.state-machine-pool-sizeint100Legacy MFA state-machine pool size setting preserved by MfaSettings.
spring.auth.mfa.state-machine-cache-ttl-mslong300000Legacy MFA state-machine cache TTL preserved by MfaSettings.
spring.auth.mfa.circuit-breaker-failure-thresholdint5Failure threshold before the MFA circuit breaker opens.
spring.auth.mfa.circuit-breaker-timeout-secondsint30Open-state timeout for the MFA circuit breaker.
spring.auth.mfa.detailed-logging-enabledbooleanfalseEnables verbose MFA diagnostics.
spring.auth.mfa.metrics-enabledbooleantrueEnables MFA metrics.
spring.auth.mfa.audit-logging-enabledbooleantrueEnables MFA audit logging.
spring.auth.mfa.session-storage-typeStringhttp-sessionPrimary MFA session repository label.
spring.auth.mfa.auto-select-repositorybooleanfalseEnables automatic repository selection.
spring.auth.mfa.repository-priorityStringredis,memory,http-sessionRepository priority order string.
spring.auth.mfa.fallback-repository-typeStringhttp-sessionFallback repository label.

MFA Repository Settings

PropertyDefaultDescription
spring.auth.mfa.http-session.enabledtrueEnables the HTTP-session-backed MFA repository.
spring.auth.mfa.http-session.create-session-if-not-existstrueCreates an HTTP session on demand.
spring.auth.mfa.http-session.session-attribute-nameMFA_SESSION_IDAttribute name used to store the MFA session identifier.
spring.auth.mfa.redis.enabledtrueEnables the Redis-backed MFA repository.
spring.auth.mfa.redis.key-prefixmfa:session:Redis key prefix for MFA sessions.
spring.auth.mfa.redis.cookie-nameMFA_SIDCookie carrying the Redis-backed MFA session identifier.
spring.auth.mfa.redis.secure-cookietrueMarks the MFA session cookie as secure.
spring.auth.mfa.redis.http-only-cookietrueMarks the MFA session cookie as HTTP-only.
spring.auth.mfa.redis.same-siteStrictSameSite cookie attribute.
spring.auth.mfa.redis.connection-timeout3000Redis connection timeout.
spring.auth.mfa.redis.max-retries3Redis retry limit.
spring.auth.mfa.memory.enabledtrueEnables the in-memory MFA repository.
spring.auth.mfa.memory.cleanup-interval-minutes5Cleanup interval for in-memory MFA sessions.
spring.auth.mfa.memory.max-sessions10000Maximum number of in-memory MFA sessions.
spring.auth.mfa.memory.enable-metricstrueEnables repository metrics for the in-memory backend.

MFA Factor Settings

PropertyDefaultDescription
spring.auth.mfa.sms-factor.providerdefaultSMS provider identifier.
spring.auth.mfa.sms-factor.template-idmfa_sms_templateSMS template identifier.
spring.auth.mfa.sms-factor.max-daily-attempts10Daily SMS delivery cap.
spring.auth.mfa.sms-factor.enabledtrueEnables SMS MFA factor support.
spring.auth.mfa.email-factor.from-addressnoreply@company.comSender address for email OTP messages.
spring.auth.mfa.email-factor.template-idmfa_email_templateEmail template identifier.
spring.auth.mfa.email-factor.max-daily-attempts5Daily email delivery cap.
spring.auth.mfa.email-factor.enabledtrueEnables email MFA factor support.
YAML
spring:
  auth:
    mfa:
      session-timeout-ms: 600000
      challenge-timeout-ms: 300000
      max-retry-attempts: 5
      repository-priority: redis,memory,http-session
      redis:
        enabled: true
        key-prefix: mfa:session:
        cookie-name: MFA_SID
      memory:
        enabled: true
        max-sessions: 10000
      sms-factor:
        enabled: true
        provider: default
      email-factor:
        enabled: true
        from-address: noreply@company.com

State Machine Properties

StateMachineProperties is bound to contexa.identity.statemachine. It controls the MFA state machine runtime used by the identity module and related filters and handlers.

Core State Machine Settings

PropertyTypeDefaultDescription
contexa.identity.statemachine.enabledbooleantrueMaster switch for the MFA state machine runtime.
contexa.identity.statemachine.operation-timeout-secondsint10Timeout budget for state machine operations.
contexa.identity.statemachine.circuit-breaker.failure-thresholdint5Failure threshold before the circuit breaker opens.
contexa.identity.statemachine.circuit-breaker.timeout-secondsint30Open-state timeout for the circuit breaker.
contexa.identity.statemachine.circuit-breaker.half-open-requestsint3Requests allowed while half-open.

Pool, Persistence, Cache, and Events

PropertyDefaultDescription
contexa.identity.statemachine.pool.core-size10Core state-machine executor size.
contexa.identity.statemachine.pool.max-size50Maximum state-machine executor size.
contexa.identity.statemachine.pool.keep-alive-time10Keep-alive time for pooled workers.
contexa.identity.statemachine.pool.expansion-threshold0.8Expansion threshold for worker scaling.
contexa.identity.statemachine.pool.shrink-threshold0.2Shrink threshold for worker scaling.
contexa.identity.statemachine.persistence.typememoryPersistence backend label.
contexa.identity.statemachine.persistence.enable-fallbacktrueEnables fallback persistence.
contexa.identity.statemachine.persistence.ttl-minutes30Persistence TTL in minutes.
contexa.identity.statemachine.persistence.enable-compressiontrueEnables compressed persistence payloads.
contexa.identity.statemachine.persistence.compression-threshold1024Compression threshold in bytes.
contexa.identity.statemachine.cache.max-size1000In-memory cache size for state-machine snapshots.
contexa.identity.statemachine.cache.ttl-minutes5Cache TTL in minutes.
contexa.identity.statemachine.cache.enable-warmupfalseEnables cache warmup on startup.
contexa.identity.statemachine.events.enabledtrueEnables state-machine event publishing.
contexa.identity.statemachine.events.typelocalEvent transport type.
contexa.identity.statemachine.events.batch-size100Event batch size.
contexa.identity.statemachine.events.batch-interval-ms100Event batch interval.
contexa.identity.statemachine.events.backpressure-threshold1000Backpressure threshold.

MFA, Redis, and Distributed Lock

PropertyDefaultDescription
contexa.identity.statemachine.mfa.enable-metricstrueEnables state-machine MFA metrics.
contexa.identity.statemachine.mfa.max-retries3Retry ceiling used by the state machine.
contexa.identity.statemachine.mfa.session-timeout-minutes30Session timeout in minutes.
contexa.identity.statemachine.mfa.max-concurrent-sessions1000Concurrent state-machine session ceiling.
contexa.identity.statemachine.mfa.transition-timeout-seconds30Transition timeout per state change.
contexa.identity.statemachine.redis.enabledfalseEnables Redis-backed state-machine storage.
contexa.identity.statemachine.redis.ttl-minutes30Redis TTL in minutes.
contexa.identity.statemachine.redis.key-prefixmfa:statemachine:Redis key prefix for state-machine entries.
contexa.identity.statemachine.redis.connection-timeout-ms2000Redis connection timeout.
contexa.identity.statemachine.redis.command-timeout-ms1000Redis command timeout.
contexa.identity.statemachine.distributed-lock.enabledtrueEnables distributed locking around state transitions.
contexa.identity.statemachine.distributed-lock.timeout-seconds10Distributed lock timeout.
contexa.identity.statemachine.distributed-lock.max-retry-attempts3Retry ceiling for lock acquisition.
contexa.identity.statemachine.distributed-lock.retry-interval-ms100Retry interval for lock acquisition.
contexa.identity.statemachine.distributed-lock.enable-deadlock-detectiontrueEnables deadlock detection for distributed locking.
YAML
contexa:
  identity:
    statemachine:
      enabled: true
      operation-timeout-seconds: 10
      pool:
        core-size: 10
        max-size: 50
      persistence:
        type: memory
        ttl-minutes: 30
      events:
        enabled: true
        type: local
      mfa:
        max-retries: 3
        session-timeout-minutes: 30
      distributed-lock:
        enabled: true
        timeout-seconds: 10

Related runtime references: Identity DSL, Authentication, Adaptive MFA, and State Management.

Bridge Properties

BridgeProperties is bound to contexa.bridge. It controls the bridge layer that maps user, authority, delegation, and session information bidirectionally between an external (legacy) authentication system and Contexa. The properties define SecurityContext extraction keys, session attribute candidates, request-attribute keys, HTTP header names, sync policy, and the trusted-proxy list.

Bridge Core Toggles

PropertyTypeDefaultDescription
contexa.bridge.enabledbooleantrueMaster switch for the entire bridge layer.
contexa.bridge.populate-security-contextbooleantrueWhether to populate Spring SecurityContext from the external principal.

Synchronization (Sync)

PropertyTypeDefaultDescription
contexa.bridge.sync.enabledbooleantrueEnables periodic synchronization of external user information.
contexa.bridge.sync.min-refresh-interval-secondslong60Minimum seconds between sync calls for the same principal — acts as a throttle.
contexa.bridge.sync.synthetic-email-domainStringshadow.contexa.localDomain suffix used to synthesize an email address when none is provided externally.

Trusted Proxies (Network)

PropertyTypeDefaultDescription
contexa.bridge.network.trusted-proxy-validation-enabledbooleantrueWhether to validate the reverse-proxy origin before trusting X-Forwarded-* headers.
contexa.bridge.network.trusted-proxiesList<String>[] (empty list)Trusted reverse-proxy IPs or CIDR ranges. When empty, headers are not trusted even if validation is enabled.

Authentication SecurityContext Keys

Properties under contexa.bridge.authentication.security-context, bound to Authentication.SecurityContext. Defines the candidate keys used to extract display name, principal type, authentication method, assurance level, MFA state, authentication time, and additional attributes from the external token's claims/attributes. The first matching key wins.

PropertyTypeDefaultDescription
contexa.bridge.authentication.security-context.enabledbooleantrueEnables SecurityContext extraction.
contexa.bridge.authentication.security-context.display-name-keysList<String>[displayName, name, fullName, userName, username, preferred_username]Candidate keys used to extract the display name.
contexa.bridge.authentication.security-context.principal-type-keysList<String>[principalType, userType, actorType, token_use]Candidate keys used to extract the principal type (user / service / agent, etc.).
contexa.bridge.authentication.security-context.authentication-type-keysList<String>[authenticationType, authMethod, loginMethod, method, factorType]Candidate keys used to extract the authentication method.
contexa.bridge.authentication.security-context.authentication-assurance-keysList<String>[authenticationAssurance, authLevel, loa, acr]Candidate keys used to extract the authentication assurance level (LoA/ACR).
contexa.bridge.authentication.security-context.mfa-keysList<String>[mfa, mfaVerified, mfaCompleted, secondFactorVerified, amr]Candidate keys used to extract MFA-completion state.
contexa.bridge.authentication.security-context.auth-time-keysList<String>[authenticationTime, authenticatedAt, loginTime, issuedAt, auth_time, iat]Candidate keys used to extract the authentication time.
contexa.bridge.authentication.security-context.attribute-keysList<String>[organizationId, orgId, tenantId, department, team, email, loginIp, authenticationType, authenticationAssurance, mfaVerified, mfaCompleted, authenticatedAt, loginTime, iss, aud, azp, scope, scp, amr, acr]Additional attribute keys preserved in the SecurityContext (20 entries by default).

Authentication Session Keys

Properties under contexa.bridge.authentication.session, bound to the shared Bridge.Session class. When an external system stores the authenticated user object as an HTTP session attribute, these keys define which attribute names to try and which keys to use to extract principal id, display name, authorities, authentication method, MFA state, authentication time, and additional attributes from that object.

PropertyTypeDefaultDescription
contexa.bridge.authentication.session.enabledbooleantrueEnables HTTP-session-based user extraction.
contexa.bridge.authentication.session.attributeString"" (empty)Explicit session-attribute name where the user object is stored. When empty and auto-discover is true, the candidate list is tried.
contexa.bridge.authentication.session.attribute-candidatesList<String>[currentUser, authenticatedUser, sessionUser, userSession, principal, user, securityUser, authenticatedPrincipal]Candidate attribute names tried in auto-discover mode.
contexa.bridge.authentication.session.auto-discoverbooleantrueWhether to walk the candidate-attribute list automatically.
contexa.bridge.authentication.session.object-type-nameString"" (empty)Optional fully-qualified class name the discovered object must match.
contexa.bridge.authentication.session.principal-id-keysList<String>[userId, username, id, loginId, email]Candidate keys used to extract the principal identifier from the session object.
contexa.bridge.authentication.session.display-name-keysList<String>[displayName, name, fullName, userName, preferred_username]Candidate keys used to extract the display name.
contexa.bridge.authentication.session.authorities-keysList<String>[roles, authorities, permissions, scopes]Candidate keys used to extract authorities, roles, or scopes.
contexa.bridge.authentication.session.authentication-type-keysList<String>[authenticationType, authMethod, loginMethod]Candidate keys used to extract the authentication method.
contexa.bridge.authentication.session.authentication-assurance-keysList<String>[authenticationAssurance, authLevel, loa]Candidate keys used to extract the authentication assurance level.
contexa.bridge.authentication.session.mfa-keysList<String>[mfa, mfaVerified, mfa_verified]Candidate keys used to extract MFA-completion state.
contexa.bridge.authentication.session.auth-time-keysList<String>[authenticationTime, authenticatedAt, loginTime]Candidate keys used to extract the authentication time.
contexa.bridge.authentication.session.attribute-keysList<String>[department, organizationId, orgId, authMethod, loginIp, loginTime]Additional attribute keys preserved in the SecurityContext.

Authentication RequestAttributes Keys

Properties under contexa.bridge.authentication.request-attributes, bound to the shared Bridge.RequestAttributes class. Defines which attribute candidates to try when an external filter stores the user object on HttpServletRequest, which keys to read from that object, and which flat key names Contexa uses when re-exposing values back as request attributes.

Discovery / Extraction (13 shared)

PropertyTypeDefaultDescription
contexa.bridge.authentication.request-attributes.enabledbooleantrueEnables request-attribute-based user extraction.
contexa.bridge.authentication.request-attributes.attributeString"" (empty)Explicit request-attribute name where the user object is stored.
contexa.bridge.authentication.request-attributes.attribute-candidatesList<String>[currentUser, authenticatedUser, requestUser, principal, user, authenticatedPrincipal, authUser]Candidate attribute names tried in auto-discover mode.
contexa.bridge.authentication.request-attributes.auto-discoverbooleantrueWhether to walk the candidate-attribute list automatically.
contexa.bridge.authentication.request-attributes.object-type-nameString"" (empty)Optional fully-qualified class name the discovered object must match.
contexa.bridge.authentication.request-attributes.principal-id-keysList<String>[userId, username, id, loginId, email]Candidate keys used to extract the principal identifier.
contexa.bridge.authentication.request-attributes.display-name-keysList<String>[displayName, name, fullName, userName, preferred_username]Candidate keys used to extract the display name.
contexa.bridge.authentication.request-attributes.authorities-keysList<String>[roles, authorities, permissions, scopes]Candidate keys used to extract authorities, roles, or scopes.
contexa.bridge.authentication.request-attributes.authentication-type-keysList<String>[authenticationType, authMethod, loginMethod]Candidate keys used to extract the authentication method.
contexa.bridge.authentication.request-attributes.authentication-assurance-keysList<String>[authenticationAssurance, authLevel, loa]Candidate keys used to extract the authentication assurance level.
contexa.bridge.authentication.request-attributes.mfa-keysList<String>[mfa, mfaVerified, mfa_verified]Candidate keys used to extract MFA-completion state.
contexa.bridge.authentication.request-attributes.auth-time-keysList<String>[authenticationTime, authenticatedAt, loginTime]Candidate keys used to extract the authentication time.
contexa.bridge.authentication.request-attributes.attribute-keysList<String>[department, organizationId, orgId, authMethod, loginIp, loginTime]Additional attribute keys preserved in the SecurityContext.

Flat authentication attribute keys (flat-*, 8)

Single key names Contexa uses when flattening values back onto request attributes so downstream components can read them directly.

PropertyDefaultDescription
contexa.bridge.authentication.request-attributes.flat-principal-idctxa.auth.principalIdPrincipal identifier.
contexa.bridge.authentication.request-attributes.flat-display-namectxa.auth.displayNameDisplay name.
contexa.bridge.authentication.request-attributes.flat-authenticatedctxa.auth.authenticatedAuthenticated boolean.
contexa.bridge.authentication.request-attributes.flat-authoritiesctxa.auth.authoritiesAuthorities collection.
contexa.bridge.authentication.request-attributes.flat-authentication-typectxa.auth.typeAuthentication method.
contexa.bridge.authentication.request-attributes.flat-authentication-assurancectxa.auth.assuranceAuthentication assurance level.
contexa.bridge.authentication.request-attributes.flat-mfa-completedctxa.auth.mfaCompletedMFA completion state.
contexa.bridge.authentication.request-attributes.flat-authentication-timectxa.auth.timeAuthentication time.

Authorization mapping keys (7)

PropertyDefaultDescription
contexa.bridge.authentication.request-attributes.authorization-effectctxa.authz.effectAuthorization decision effect (ALLOW/DENY).
contexa.bridge.authentication.request-attributes.privilegedctxa.authz.privilegedWhether this is a privileged flow.
contexa.bridge.authentication.request-attributes.policy-idctxa.authz.policyIdID of the matching policy.
contexa.bridge.authentication.request-attributes.policy-versionctxa.authz.policyVersionPolicy version.
contexa.bridge.authentication.request-attributes.scope-tagsctxa.authz.scopeTagsScope tags.
contexa.bridge.authentication.request-attributes.effective-rolesctxa.authz.rolesEffective role set.
contexa.bridge.authentication.request-attributes.effective-authoritiesctxa.authz.authoritiesEffective authority set.

Delegation mapping keys (11)

PropertyDefaultDescription
contexa.bridge.authentication.request-attributes.delegatedctxa.delegation.enabledWhether delegation is active.
contexa.bridge.authentication.request-attributes.agent-idctxa.delegation.agentIdDelegated agent ID.
contexa.bridge.authentication.request-attributes.objective-idctxa.delegation.objectiveIdDelegation objective ID.
contexa.bridge.authentication.request-attributes.objective-familyctxa.delegation.objectiveFamilyObjective family / type.
contexa.bridge.authentication.request-attributes.objective-summaryctxa.delegation.objectiveSummaryObjective summary.
contexa.bridge.authentication.request-attributes.allowed-operationsctxa.delegation.allowedOperationsPermitted operations list.
contexa.bridge.authentication.request-attributes.allowed-resourcesctxa.delegation.allowedResourcesPermitted resources list.
contexa.bridge.authentication.request-attributes.approval-requiredctxa.delegation.approvalRequiredWhether approval is required.
contexa.bridge.authentication.request-attributes.privileged-export-allowedctxa.delegation.privilegedExportAllowedWhether privileged export is allowed.
contexa.bridge.authentication.request-attributes.containment-onlyctxa.delegation.containmentOnlyContainment-only restriction flag.
contexa.bridge.authentication.request-attributes.expires-atctxa.delegation.expiresAtDelegation expiry instant.

Authentication HTTP Header Names

Properties under contexa.bridge.authentication.headers, bound to the shared Bridge.Headers class. Defines which header names Contexa reads from (and emits onto) HTTP traffic when a reverse proxy or gateway propagates authentication, authorization, or delegation context. All header names are configurable.

Toggle

PropertyTypeDefaultDescription
contexa.bridge.authentication.headers.enabledbooleantrueEnables HTTP-header-based extraction and emission.

Authentication headers (8)

PropertyDefaultDescription
contexa.bridge.authentication.headers.principal-idX-Contexa-Principal-IdPrincipal-identifier header.
contexa.bridge.authentication.headers.display-nameX-Contexa-Principal-NameDisplay-name header.
contexa.bridge.authentication.headers.authenticatedX-Contexa-AuthenticatedAuthenticated boolean header.
contexa.bridge.authentication.headers.authoritiesX-Contexa-AuthoritiesAuthorities collection header.
contexa.bridge.authentication.headers.authentication-typeX-Contexa-Authentication-TypeAuthentication-method header.
contexa.bridge.authentication.headers.authentication-assuranceX-Contexa-Authentication-AssuranceAuthentication-assurance header.
contexa.bridge.authentication.headers.mfa-completedX-Contexa-Mfa-CompletedMFA-completion header.
contexa.bridge.authentication.headers.authentication-timeX-Contexa-Authenticated-AtAuthentication-time header.

Authorization headers (7)

PropertyDefaultDescription
contexa.bridge.authentication.headers.authorization-effectX-Contexa-Authz-EffectAuthorization-effect header.
contexa.bridge.authentication.headers.privilegedX-Contexa-Authz-PrivilegedPrivileged-flow boolean header.
contexa.bridge.authentication.headers.policy-idX-Contexa-Authz-PolicyMatching-policy ID header.
contexa.bridge.authentication.headers.policy-versionX-Contexa-Authz-Policy-VersionPolicy-version header.
contexa.bridge.authentication.headers.scope-tagsX-Contexa-Authz-ScopeScope-tag header.
contexa.bridge.authentication.headers.effective-rolesX-Contexa-Authz-RolesEffective-roles header.
contexa.bridge.authentication.headers.effective-authoritiesX-Contexa-Authz-AuthoritiesEffective-authorities header.

Delegation headers (11)

PropertyDefaultDescription
contexa.bridge.authentication.headers.delegatedX-Contexa-DelegatedDelegation-active header.
contexa.bridge.authentication.headers.agent-idX-Contexa-Agent-IdDelegated-agent ID header.
contexa.bridge.authentication.headers.objective-idX-Contexa-Objective-IdObjective ID header.
contexa.bridge.authentication.headers.objective-familyX-Contexa-Objective-FamilyObjective family / type header.
contexa.bridge.authentication.headers.objective-summaryX-Contexa-Objective-SummaryObjective summary header.
contexa.bridge.authentication.headers.allowed-operationsX-Contexa-Allowed-OperationsPermitted-operations header.
contexa.bridge.authentication.headers.allowed-resourcesX-Contexa-Allowed-ResourcesPermitted-resources header.
contexa.bridge.authentication.headers.approval-requiredX-Contexa-Approval-RequiredApproval-required header.
contexa.bridge.authentication.headers.privileged-export-allowedX-Contexa-Privileged-Export-AllowedPrivileged-export-allowed header.
contexa.bridge.authentication.headers.containment-onlyX-Contexa-Containment-OnlyContainment-only header.
contexa.bridge.authentication.headers.expires-atX-Contexa-Delegation-Expires-AtDelegation-expiry header.

Authorization SecurityContext Keys

Properties under contexa.bridge.authorization.security-context, bound to Authorization.SecurityContext. When an external system stores authorization decisions (effect, policy ID, authorities, etc.) as attributes on the Spring SecurityContext Authentication, these keys define which candidate names Contexa tries to read that information. The first matching key wins.

PropertyTypeDefaultDescription
contexa.bridge.authorization.security-context.enabledbooleantrueEnables SecurityContext-based authorization extraction.
contexa.bridge.authorization.security-context.authorization-effect-keysList<String>[authorizationEffect, effect, decision, decisionEffect]Candidate keys used to extract the authorization effect (ALLOW/DENY).
contexa.bridge.authorization.security-context.privileged-keysList<String>[privileged, isPrivileged, privilegedFlow]Candidate keys used to extract the privileged-flow boolean.
contexa.bridge.authorization.security-context.policy-id-keysList<String>[policyId, policy, decisionPolicy]Candidate keys used to extract the matching policy ID.
contexa.bridge.authorization.security-context.policy-version-keysList<String>[policyVersion, version]Candidate keys used to extract the policy version.
contexa.bridge.authorization.security-context.scope-tag-keysList<String>[scopeTags, scopes, scope, permissionScopes, scp]Candidate keys used to extract scope tags.
contexa.bridge.authorization.security-context.role-keysList<String>[effectiveRoles, roles, roleSet, groups]Candidate keys used to extract the effective role set.
contexa.bridge.authorization.security-context.authority-keysList<String>[effectiveAuthorities, authorities, permissions, grantedAuthorities, scope, scp]Candidate keys used to extract the effective authority set.
contexa.bridge.authorization.security-context.attribute-keysList<String>[authorizationEffect, effect, privileged, policyId, policyVersion, scopeTags, scopes, scope, scp, roles, effectiveRoles, permissions, effectiveAuthorities]Additional attribute keys preserved in the authorization context (13 defaults).

Authorization Session Keys

Properties under contexa.bridge.authorization.session, bound to Authorization.Session. When an external system stores authorization decisions on a session-scoped user object, these keys define which attribute candidates to try and which keys to read for effect, policy, scope, role, and authority extraction.

PropertyTypeDefaultDescription
contexa.bridge.authorization.session.enabledbooleantrueEnables session-based authorization extraction.
contexa.bridge.authorization.session.attributeString"" (empty)Explicit session attribute name carrying the user object.
contexa.bridge.authorization.session.attribute-candidatesList<String>[currentUser, authenticatedUser, sessionUser, userSession, principal, user, securityUser, authenticatedPrincipal]Candidate attribute names tried in auto-discover mode.
contexa.bridge.authorization.session.auto-discoverbooleantrueWhether to walk the candidate-attribute list automatically.
contexa.bridge.authorization.session.object-type-nameString"" (empty)Optional fully-qualified class name the discovered object must match.
contexa.bridge.authorization.session.principal-id-keysList<String>[userId, username, id, loginId, email]Candidate keys used to extract the principal identifier.
contexa.bridge.authorization.session.authorization-effect-keysList<String>[authorizationEffect, effect, decision, decisionEffect]Candidate keys used to extract the authorization effect.
contexa.bridge.authorization.session.privileged-keysList<String>[privileged, isPrivileged, privilegedFlow]Candidate keys used to extract the privileged flag.
contexa.bridge.authorization.session.policy-id-keysList<String>[policyId, policy, decisionPolicy]Candidate keys used to extract the policy ID.
contexa.bridge.authorization.session.policy-version-keysList<String>[policyVersion, version]Candidate keys used to extract the policy version.
contexa.bridge.authorization.session.scope-tag-keysList<String>[scopeTags, scopes, scope, permissionScopes]Candidate keys used to extract scope tags (note: scp is not included here, unlike Authorization.SecurityContext).
contexa.bridge.authorization.session.role-keysList<String>[effectiveRoles, roles, roleSet]Candidate keys used to extract the effective role set (no groups).
contexa.bridge.authorization.session.authority-keysList<String>[effectiveAuthorities, authorities, permissions, grantedAuthorities]Candidate keys used to extract the effective authority set (no scope, scp).
contexa.bridge.authorization.session.attribute-keysList<String>[authorizationEffect, effect, privileged, policyId, policyVersion, scopeTags, scopes, roles, effectiveRoles, permissions, effectiveAuthorities, organizationId, orgId, tenantId, department, team]Additional attribute keys preserved in the authorization context (16 defaults).

Authorization RequestAttributes / Headers

Authorization reuses the same shared Bridge.RequestAttributes / Bridge.Headers classes. Key structure and defaults are identical to the Authentication RequestAttributes Keys and Authentication HTTP Header Names tables — only the prefix differs:

  • contexa.bridge.authorization.request-attributes.* — 39 fields, same table
  • contexa.bridge.authorization.headers.* — 27 fields, same table

The tables are not duplicated because BridgeProperties.java references a single class from three locations — keeping the documentation single-sourced.

Delegation Session Keys

Properties under contexa.bridge.delegation.session, bound to Delegation.Session. When an external system stores agent-delegation context — agent ID, objective, allowed operations/resources, approval requirement, expiry — on a session-scoped user object, these keys define which attribute candidates to try and which keys to read.

PropertyTypeDefaultDescription
contexa.bridge.delegation.session.enabledbooleantrueEnables session-based delegation extraction.
contexa.bridge.delegation.session.attributeString"" (empty)Explicit session attribute name carrying the user object.
contexa.bridge.delegation.session.attribute-candidatesList<String>[currentUser, authenticatedUser, sessionUser, userSession, principal, user, securityUser, authenticatedPrincipal]Candidate attribute names tried in auto-discover mode.
contexa.bridge.delegation.session.auto-discoverbooleantrueWhether to walk the candidate list automatically. (Note: Delegation.Session does not expose an object-type-name field.)
contexa.bridge.delegation.session.principal-id-keysList<String>[userId, username, id, loginId, email]Candidate keys used to extract the principal identifier.
contexa.bridge.delegation.session.delegated-keysList<String>[delegated, delegationEnabled, agentDelegated]Candidate keys used to extract the delegation-active flag.
contexa.bridge.delegation.session.agent-id-keysList<String>[agentId, delegateAgentId]Candidate keys used to extract the agent ID.
contexa.bridge.delegation.session.objective-id-keysList<String>[objectiveId, taskPurpose, delegationObjectiveId]Candidate keys used to extract the delegation objective ID.
contexa.bridge.delegation.session.objective-family-keysList<String>[objectiveFamily, objectiveType, delegationObjectiveFamily]Candidate keys used to extract the objective family / type.
contexa.bridge.delegation.session.objective-summary-keysList<String>[objectiveSummary, taskSummary, delegationObjectiveSummary]Candidate keys used to extract the objective summary.
contexa.bridge.delegation.session.allowed-operations-keysList<String>[allowedOperations, delegatedOperations, permittedOperations]Candidate keys used to extract the permitted operations list.
contexa.bridge.delegation.session.allowed-resources-keysList<String>[allowedResources, delegatedResources, permittedResources]Candidate keys used to extract the permitted resources list.
contexa.bridge.delegation.session.approval-required-keysList<String>[approvalRequired, requiresApproval]Candidate keys used to extract the approval-required flag.
contexa.bridge.delegation.session.privileged-export-allowed-keysList<String>[privilegedExportAllowed, allowPrivilegedExport]Candidate keys used to extract the privileged-export-allowed flag.
contexa.bridge.delegation.session.containment-only-keysList<String>[containmentOnly, restrictedContainment]Candidate keys used to extract the containment-only flag.
contexa.bridge.delegation.session.expires-at-keysList<String>[expiresAt, delegationExpiresAt]Candidate keys used to extract the delegation expiry instant.
contexa.bridge.delegation.session.attribute-keysList<String>[delegated, agentId, objectiveId, objectiveFamily, objectiveSummary, allowedOperations, allowedResources, approvalRequired, privilegedExportAllowed, containmentOnly, expiresAt, organizationId, orgId, tenantId, department, team]Additional attribute keys preserved in the delegation context (16 defaults).

Delegation RequestAttributes / Headers

Delegation reuses the same shared Bridge.RequestAttributes / Bridge.Headers classes. Key structure and defaults match the Authentication RequestAttributes Keys and Authentication HTTP Header Names tables — only the prefix differs:

  • contexa.bridge.delegation.request-attributes.* — 39 fields, same table
  • contexa.bridge.delegation.headers.* — 27 fields, same table