Identity Overview

Identity system overview and explanation of common call flows.

3 min read ·

Substrate identity is designed to easily integrate with external systems. IdP-issued identities for humans are recognized by Substrate, and Substrate-issued identities for actors are recognized by external APIs. In this document we explain the core identity flows. More advanced identity systems such as On-Behalf-Of (#3715) and ID-JAG (#3714) are being designed.

FlowCredentialIssued by
User → ActorThe user’s SSO tokenYour human IdP
SRE / dev → SubstrateShort-lived OIDC tokenThe same human IdP
Actor → ActorActor JWT, injected at egressSubstrate
Actor → CloudActor JWT, federated via OIDCSubstrate, trusted by the cloud’s Security Token Service (STS)
Actor → SaaSOAuth access token, injected at egressThe SaaS OAuth server

User → Actor

User to actor flow

  1. Alice signs in to your app through your SSO. Your app frontend will make any necessary connections to Substrate on her behalf.
  2. The frontend calls the ingress router (atenet-router) over mTLS. The router only accepts the SPIFFE IDs listed in ingressAllowedSPIFFEIDs.
  3. The router routes the request to Actor A.

Substrate does not see Alice’s SSO token.

SRE / dev → Substrate

SRE debugging flow

  1. The engineer gets a short-lived token from your SSO.
  2. The engineer calls ate-api-server with the token. The server trusts your SSO issuer as a JWT provider, and roles are granted per atespace.
  3. The engineer can inspect, suspend, and delete actors.

Actor → Actor

Actor to actor flow

  1. Actor A calls Actor B through the egress gateway (atenet-egress).
  2. The gateway injects an actor JWT for A and sends the request to your app frontend.
  3. The frontend verifies the JWT and checks whether A may call B.
  4. The frontend calls the ingress router, which routes the request to Actor B.

Actors can’t reach each other directly. Your frontend authorizes every call. The router authorizes ingress per allowlisted client today, so an allowlisted frontend can reach every actor. Per-atespace ingress authorization will remove the need for the hop through the app frontend and is tracked in #3589.

Actor → Cloud

Actor to cloud flow

  1. Actor A sends a request with a placeholder header.
  2. The egress gateway asks a token exchange credential provider for a credential.
  3. The provider exchanges A’s actor JWT at the cloud STS, which trusts Substrate’s issuer through OIDC federation.
  4. The gateway injects the cloud token.

Substrate will support native token exchange soon (#1661). In the meantime, you can write a token exchange credential provider using the credential provider API. The provider gets the actor JWT by calling MintActorJwt with its own SPIFFE ID, which needs the egress_gateway role (--egress-gateway-spiffe-id).

Actor → SaaS with OAuth

Actor to SaaS flow

  1. Actor A sends a request with a placeholder header.
  2. The egress gateway fetches the access token from a credential provider. The provider gets it from an OAuth token broker, which holds each user’s refresh token. You can implement the broker yourself, or use one provided by a cloud provider.
  3. The gateway injects the token.
Was this page helpful?