Problem Statement: The Trust Broker of Modern APIs
Frames the OAuth 2.0 Authorization Server as the cryptographic trust anchor that decouples user identity from API access, not merely a password store.
Problem statement
Design an OAuth 2.0 Authorization Server (AS) that registers client applications, authenticates resource owners and clients, issues access tokens and refresh tokens across the Authorization Code, Client Credentials, and Refresh flows, enforces scope-based authorization, exposes introspection and JWKS validation endpoints, and optionally layers OpenID Connect (OIDC) for identity claims. It must do all of this under high concurrency, with low latency, cryptographic integrity, and a complete compliance audit trail.
The single most important framing: an Authorization Server is a trust broker. It converts a user's authenticated session into a short-lived, self-contained, verifiable assertion (a token) that a resource server can trust without ever seeing the user's password. Every design decision below flows from that one idea.
Why this is not 'store user passwords'
A naive answer treats this as a credentials database. That misses the actual problem. Passwords are long-lived secrets bound to a single user; OAuth tokens are short-lived, scoped, audience-bound, revocable bearer instruments. The AS must answer four questions that a password store never faces:
- Who is asking? (client authentication: client_id + secret, or PKCE for public clients)
- What may they do? (scope grants, consent, resource-server audience)
- How do we prove it cryptographically? (JWT signature via JWKS, or opaque token + introspection)
- How do we take it back? (revocation, refresh rotation, key rotation)
The distinctive engineering tension
An Authorization Server sits at the intersection of three conflicting demands:
- Latency vs. consistency. Token issuance must be fast (sub-50ms p99) but refresh-token rotation must be strictly consistent or it becomes a replay attack surface.
- Statelessness vs. revocability. JWTs let resource servers validate offline (great for scale), but then you cannot revoke them instantly. Opaque tokens are revocable but require a network introspection call on every API request.
- Openness vs. lock-down. OAuth is a delegation protocol; the AS must support arbitrary third-party clients while preventing exactly those clients from abusing the system.
Microsoft has publicly described Entra ID (Azure AD) as processing well over 100 billion authentications per month, and Okta/Auth0 operate multi-tenant identity platforms serving tens of thousands of customer tenants. These are cited public figures that establish the category is operationally real at massive scale. For capacity planning this answer explicitly assumes a mature mid-size deployment; every uncited number is a stated design assumption, not a claim about any company's private architecture.
The five architectural planes
- Protocol plane — the OAuth 2.0 / OIDC endpoints:
/authorize,/token,/introspect,/revoke,/jwks,/userinfo. This is the public contract. - Cryptographic plane — signing keys, JWKS publication, key rotation, PKCE verification, client-secret hashing. This is the trust foundation.
- Grant & consent plane — authorization codes, scopes, consent records, refresh-token lineage. This is the stateful core.
- Data & audit plane — client registry, token metadata, immutable compliance logs.
- Operational plane — rate limiting, anomaly detection, key ceremonies, incident response.
A strong answer keeps these planes separate. It allows the operational plane to degrade (dashboards go stale) without weakening the cryptographic plane, and it lets the cryptographic plane rotate keys without silently invalidating in-flight grants.
Public baseline vs. design assumptions
Public evidence establishes the category. Okta reports serving 19,000+ customers and billions of authentications; Auth0 reports billions of logins monthly across its tenant base; Keycloak (Red Hat) is the reference open-source implementation supporting all OAuth 2.0/OIDC flows including token exchange. These are cited company-reported figures and are context, not our targets.
For capacity planning, this answer assumes a mature platform with 10 million monthly active users, 50,000 registered client applications, 2 million token requests per day, and a 5x event peak. Unless a number is tied to a citation, it is a stated design assumption, target, budget, or illustrative threshold.
Key Highlights
- •An Authorization Server is a trust broker that converts authenticated sessions into short-lived, scoped, revocable bearer tokens — never a password store.
- •The core tension is stateless JWT scale vs. revocability, and fast issuance vs. strictly-consistent refresh rotation.
- •Public figures (Microsoft 100B+ auths/month, Okta/Auth0 multi-tenant billions) establish category scale; every uncited number here is an explicit assumption.
- •Five planes: protocol, cryptographic, grant/consent, data/audit, operational.
- •JWTs enable offline validation but resist instant revocation; opaque tokens are revocable but add a network hop to every API call.
Section Rescue Kit
Buzzwords to use:
Safe statements:
- "Let me separate what the AS issues from what resource servers validate, because that split drives the whole architecture."
- "Before picking JWT vs opaque tokens, I want to establish how revocation and scale are weighted in this system."