Skip to main content

Flow: Authentication and Identity Propagation

This flow separates the external user's credential from the identity of each internal workload. Status: user JWT validation and workload tokens are Implemented/Partially implemented; full request-bound subject assertions are Planned.

authentication · user, workload, subject assertion01 / 07
The user signs in with Keycloak and sends an OIDC token to the gateway. The gateway validates it against JWKS, obtains its own audience-bound workload token, and sends separate subject and actor context. The service verifies workload caller and subject-asserter authority before authorization.OIDC + PKCEuser access tokenHTTPS + bearerJWKS validatedestination tokenworkload JWT + subject / actorverified principal contextUserbrowser · applicationKeycloakidentity + token issuerIMPLEMENTEDGatewayvalidate · normalizePARTIALDestination servicecaller + subject asserterPARTIALAuthorization followsidentity is not permissionCOMPOSITE TARGET
external credentialidentity validationworkload credentialverified service context

Application and agent credentials

Machine clients use their own principal and scopes rather than borrowing a human password. Agent execution uses RFC 8693 token exchange: sub remains the user, act.sub identifies the agent, and the service workloads remain separately authenticated. See Agent Delegation.

Failure and recovery

  • Unknown signing key triggers a bounded JWKS refresh; it does not bypass validation.
  • A wrong issuer, audience, caller, or subject asserter fails immediately.
  • Identity-provider outage may be masked only by still-valid cached keys/tokens. New token minting eventually fails closed.
  • Request/trace IDs, principal type, caller workload, audience, result, and failure class are emitted without logging the credential.

See Security Architecture for claim ownership and Authorization Decision for what happens after identity is established.