Different Callers Need Different Proof
A browser user opening an admin UI is not the same as a job service writing data, and neither is the same as a dashboard service reading governed tables. Central auth works best when it names the caller type and validates the right credential for that caller.
Token Decision Table
| Credential | Used by | Good for | Watch out for |
|---|---|---|---|
| Access token | User-facing clients and APIs | Calling APIs on behalf of a user or client | Audience, scope, expiry, replay |
| Service token | Workloads and jobs | Machine-to-machine calls | Sharing tokens across services |
| Federated credential | Trusted service exchanging identity | Temporary cloud or data-platform access | Overbroad permissions and weak trust mapping |
Federated Credentials Example
Imagine a data explorer product behind Envoy. The user is authenticated through SSO. The product asks the central auth service whether the user can access a dataset. If allowed, the platform may exchange that trusted identity for a short-lived credential that can access a cloud data service. AWS Lake Formation style governed data access is a useful example: the platform should not hand every product a broad static secret. It should map identity to scoped, auditable data access.
Route-Level Policy Shape
/ui/*: browser session or OIDC login required./api/*: JWT access token required with correct audience./internal/*: service token or workload identity required./data/*: user identity plus dataset authorization and optional federated credential exchange.
Do Not Treat Tokens as Passwords
Tokens should be short-lived, scoped, auditable, and rotated. A token is proof for a purpose, not a permanent identity. If every product stores the same long-lived token, central auth has not improved security.