Identity and Access Management
One OIDC provider issues every token; every service validates the signature against its JWKS, checks audience and expiry, and scopes every query to the org in the owner claim — so no service keeps a user database of its own
Abstract
One OIDC provider — Hanzo IAM at hanzo.id — issues every token. Every
authenticated service validates the JWTs IAM issued; the owner claim in the
token scopes all data queries to the organization. No service maintains a user
database of its own, and no service builds its own authentication.
Specification
Architecture
Client -> Hanzo IAM (hanzo.id) -> JWT (id_token + access_token)
Client -> Service API (Bearer token) -> Validate JWT -> Extract org from owner claim
Token format
Access tokens are JWTs signed with RS256.
| Claim | Type | Description |
|---|---|---|
sub | string | User ID |
owner | string | Organization ID; scopes all queries |
aud | string | Target service audience |
scope | string | Space-separated scopes |
iat | uint64 | Issued-at timestamp |
exp | uint64 | Expiration timestamp |
Authorization flows
| Flow | Use case |
|---|---|
| Authorization Code with PKCE | Web and mobile apps |
| Client Credentials | Service to service (LP-7110) |
| Device Authorization | CLI tools, IoT |
Service integration
Every service MUST:
- validate the JWT signature against IAM's JWKS endpoint
(
hanzo.id/.well-known/jwks.json); - check the
expandaudclaims; - extract
ownerfrom the JWT and scope every database query to that organization; - reject tokens with a missing or empty
owner.
Gateway integration
The API gateway validates tokens at the edge and injects X-Hanzo-User and
X-Hanzo-Org headers. Services behind the gateway may trust those headers
without re-validating the JWT, because the gateway is the only path in.
Security Considerations
- Tokens are short-lived — 15 minutes. Refresh tokens rotate on each use.
- All secrets — client IDs, signing keys — live in KMS (LP-7330).
- PKCE is mandatory for every public client. There is no implicit flow.
- Token revocation is supported through the revocation endpoint.
Reference
| Resource | Location |
|---|---|
| IAM | https://hanzo.id |
| JWKS endpoint | https://hanzo.id/.well-known/jwks.json |
| IAM implementation | github.com/hanzoai/iam |
| Gateway | github.com/hanzoai/gateway |
References
- RFC 6749 — The OAuth 2.0 Authorization Framework
- RFC 9126 — OAuth 2.0 Pushed Authorization Requests
- OpenID Connect Core 1.0
- LP-10093 — the on-chain identity standard IAM identities can bind to.
Copyright
Copyright and related rights waived via CC0.