Identity Overview
Identity system overview and explanation of common call flows.
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.
| Flow | Credential | Issued by |
|---|---|---|
| User → Actor | The user’s SSO token | Your human IdP |
| SRE / dev → Substrate | Short-lived OIDC token | The same human IdP |
| Actor → Actor | Actor JWT, injected at egress | Substrate |
| Actor → Cloud | Actor JWT, federated via OIDC | Substrate, trusted by the cloud’s Security Token Service (STS) |
| Actor → SaaS | OAuth access token, injected at egress | The SaaS OAuth server |
User → Actor
- Alice signs in to your app through your SSO. Your app frontend will make any necessary connections to Substrate on her behalf.
- The frontend calls the ingress router (
atenet-router) over mTLS. The router only accepts the SPIFFE IDs listed iningressAllowedSPIFFEIDs. - The router routes the request to Actor A.
Substrate does not see Alice’s SSO token.
SRE / dev → Substrate
- The engineer gets a short-lived token from your SSO.
- The engineer calls
ate-api-serverwith the token. The server trusts your SSO issuer as a JWT provider, and roles are granted per atespace. - The engineer can inspect, suspend, and delete actors.
Actor → Actor
- Actor A calls Actor B through the egress gateway (
atenet-egress). - The gateway injects an actor JWT for A and sends the request to your app frontend.
- The frontend verifies the JWT and checks whether A may call B.
- 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 A sends a request with a placeholder header.
- The egress gateway asks a token exchange credential provider for a credential.
- The provider exchanges A’s actor JWT at the cloud STS, which trusts Substrate’s issuer through OIDC federation.
- 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 A sends a request with a placeholder header.
- 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.
- The gateway injects the token.