All chapters
  1. Start hereA valid token is not a permission
  2. Foundations · 1Identity and trust primitives: who is calling, and who checks
  3. Foundations · 2People and identity proofing: accounts, passwords and recovery
  4. Foundations · 3Sessions and browser security: cookies, CSRF, XSS and the BFF
  5. Foundations · 4Authenticators and MFA: passwords, passkeys and phishing resistance
  6. Foundations · 5API keys and application credentials: what a key proves
  7. Foundations · 6Tokens: bearer, JWT anatomy, validation and revocation
  8. Foundations · 7OAuth, OpenID Connect and federation: delegation and login
  9. Authorization · 8Authorization from first principles: subject, action, resource, context
  10. Authorization · 9Access control models: RBAC, ABAC, ReBAC and ownership
  11. Authorization · 10The enforcement architecture: PEP, PDP, PIP and PAP
  12. Authorization · 11Policy as code: versions, tests, engines and decision logs
  13. Authorization · 12Tenant and data isolation: one platform, many brokerages
  14. Authorization · 13Identity governance and lifecycle: joiner, mover, leaver
  15. Authorization · 14Privileged access: standing rights, just-in-time elevation and break-glass
  16. Workloads · 15TLS, PKI and certificates: proving a host, and a client
  17. Workloads · 16Workload and service identity: SPIFFE, mTLS and caller allowlists
  18. Workloads · 17API gateways and zero trust: the edge checks, the service decides
  19. Workloads · 18Event-driven identity: Kafka principals, ACLs and replay
  20. Workloads · 19Cloud IAM and secretless deployment: roles, federation and no stored keys
  21. Workloads · 20External SaaS, webhooks and trust: calls that cross company lines
  22. Workloads · 21Private controlled environments: what private networking does and does not secure
  23. AI-native · 22Authenticating to model providers: keys, gateways and cloud IAM
  24. AI-native · 23MCP identity and authorization: discovery is not permission
  25. AI-native · 24RAG and retrieval authorization: only what this caller may read
  26. AI-native · 25Agents as principals and delegates: whose authority is this?
  27. AI-native · 26Agent-to-agent trust: identity, capabilities and forwarded authority
  28. AI-native · 27Coding agents and CI: repository scopes, OIDC and no production keys
  29. Operations · 28Auditing and observability of access: decisions you can prove later
  30. Operations · 29Threat modeling and testing: the negative tests that prove access control
  31. Operations · 30Operational lifecycles: rotation, revocation and outages
  32. Reference · 31Standards, frameworks and products: what each one is, and what it is not
  33. Reference · 32Architecture decision playbooks: choosing an auth strategy
  34. ReferenceGlossary
  35. AboutAbout this site and its sources
Reference · 31

Standards, frameworks and products: what each one is, and what it is not

Protocols, token formats and standards kept apart from libraries, products and patterns. OAuth, OIDC, SAML, JWT, mTLS, SPIFFE, SCIM, WebAuthn; Spring Security, FastAPI, Next.js, Keycloak, Okta, Auth0, Entra ID, Cognito, cloud IAM, OPA, Cedar and OpenFGA, each read on its own documentation.

You will separate
Seven kinds of thing that all get called "auth": protocol, token format, guideline, library, product, engine, pattern.
You will look up
About thirty names, each with what it decides and what stays in your code, read on its own documentation on 2026-11-18.
You will trust
Six of them that really ran on the example's rule: FastAPI with PyJWT, Spring Security, OPA, Cedar, OpenFGA, PostgreSQL RLS.

The design review for the broker portal's new quote API is on slide four. The slide titled "Auth" says three words: OAuth, JWT, Okta. Every word is true, and the reviewer still has no design to review. OAuth is a protocol: it says how a client obtains a token. JWT is a token format: it says how claims are packed and signed. Okta is a product: an identity provider the insurer would rent, which implements those standards. Not one of the three says whether broker u-broker-n1 (tenant brk-north) may read quote Q-6620, which belongs to brk-south. That decision is made in the quote service, on the record, and the slide has no word for it.

So the reviewer asks the question this page asks of every name: what kind of thing is it, what does it decide, and what stays in your code? A valid token is not a permission, and no product name is an authorization design.

Seven kinds of thing#

A standard is a published document that says what implementations must do: OAuth 2.0 is RFC 6749. A token format is a standard for one artifact: a JWT is a signed JSON object. A guideline advises without a wire format: NIST SP 800-63-4 says how strong authentication should be. A library is code you link into your service: Spring Security. A product is software or a service you run or rent: Keycloak, AWS IAM. An engine evaluates policy you write: OPA evaluates Rego. A pattern is an architecture choice no standard mandates: the backend for frontend (BFF).

Before AI. In 2010 the same slide said "LDAP and Spring Security". LDAP is a directory protocol, Spring Security a library; neither said which branch manager could approve which loan. The confusion is old. What is new is the number of names, and that an AI agent now calls the same APIs.
NameKindWhat it decidesWhat stays in your code
OAuth 2.0protocolHow a client gets and presents a tokenWhich record it may touch
OpenID ConnectprotocolWho logged in (ID token)Sessions, authorization
SAML 2.0protocolSigned assertions for federated loginAttributes to entitlements
SCIM 2.0protocolAccount and group create and removeEnforcing active
TLS, mTLSprotocolThe peer holds its certificate's keyWhat that peer may call
WebAuthnAPI standardPhishing-resistant proof of a keyRecovery, step-up
MCP authorizationprotocolToken discovery, audience bindingTool and argument policy
A2A security schemesprotocolCredentials an agent acceptsWhat a caller may ask
JWT, JWS, JWE, JWKtoken formatSigning, encryption, keysWhich claims you accept
NIST SP 800-63-4, 800-207guidelineAssurance levels; zero-trust rolesEvery control
OWASP, RFC 9700guideline, BCPKnown failures and fixesApplying them
Spring Security, FastAPI + PyJWTlibraryToken validation, coarse checksThe object-level rule
Next.js BFF, Auth.jspattern, libraryWhere sessions and tokens liveChecks near the data
Keycloak, Okta, Auth0, Entra ID, Cognitoproduct: identity providerLogin, tokens, coarse rolesRecord-level decisions
AWS IAM, Google Cloud IAM, Azure managed identitiesproduct: cloud identityWhich workload calls which cloud APIYour records
API gateway authorizersproduct featureCoarse token checks at the edgeObject-level checks
OPA, Cedar, OpenFGAengineAllow or deny on the facts sentFacts, HTTP answer, error = deny
PostgreSQL RLSdatabase featureRows a database role seesSetting the tenant
AuthZEN Authorization APIAPI standardPEP-to-PDP request shapeThe policy
SPIFFE, SPIREstandard, productAn identity per workloadWhat it may do

Diagram: Seven kinds of thing called auth · what each one decides, from the wire to the record

Read the lanes from top to bottom. Standards and token formats say what must happen on the wire. Guidelines say how strong it should be. Libraries and products implement the standards. Engines evaluate a policy you wrote. The last lane is your code, and it is the only lane that knows whether broker u-broker-n1 may read Q-6620. Every name on a design slide belongs in exactly one lane; a slide with nothing in the last lane has no authorization design.

  1. Standards and token formats
    1. OAuth 2.0, OIDC, SAML, SCIM: Documents that say what implementations MUST do on the wire: how tokens are obtained, how logins and accounts move.
    2. TLS, WebAuthn, MCP, A2A, SPIFFE: Standards that prove possession of a key, or bind tokens to one server or agent.
    3. JWT, JWS, JWE, JWK: How claims are signed, encrypted and keyed; never what the holder may do.
  2. Guidelines
    1. NIST SP 800-63-4, SP 800-207: Advice with SHALL and SHOULD, no wire format: how sure, how strict.
    2. OWASP, RFC 9700: Lists of mistakes and the controls against them.
  3. Libraries and products
    1. Spring Security, FastAPI + PyJWT: Code in your process that validates tokens and runs your checks.
    2. Keycloak, Okta, Auth0, Entra ID, Cognito: Products that authenticate principals and issue tokens implementing OAuth and OIDC.
    3. Cloud IAM, gateway authorizers: Decide which workload may call which cloud API, and check tokens at the edge.
  4. Engines
    1. OPA, Cedar, OpenFGA: Evaluate the rule you wrote against the facts you send; none authenticates the caller.
    2. PostgreSQL RLS, AuthZEN API: Row filtering under every query; a standard request shape between PEP and PDP.
  5. Your code
    1. facts for the decision: Loads the record and sends tenant, unit and assignment to the PDP; no product knows them.
    2. the answer on every path: Turns allow or deny into the HTTP answer and treats an engine error as deny.
Common confusion. "We log in with OAuth." OAuth 2.0 issues access tokens to clients; it defines no login. Login is OpenID Connect, which adds the ID token. An access token used as proof of login, or an ID token sent to an API, crosses a boundary its standard never promised.
In our insurance example. The example's identity provider and demo tokens are stand-ins (HMAC-signed, JWS-shaped; use a maintained library in production). The six demos in examples/frameworks/ ran real libraries and engines on one rule: a broker reads only their tenant's quote; decision.record on SUB-1004 needs the assigned underwriter with strong acr; the agent is always denied. The agent is a scripted stand-in, so these results show how the access controls work, not how good any model is.

Each section below gives a bold label (kind, version, date read), a one-sentence definition, and a table: what it solves, the minimum implementation ("ran here" or "documented shape; not run here"), responsibility, failure modes, strengths, limits, trust, version and docs. No ranking, no prices.

Standards and protocols. Documents that say what implementations MUST do on the wire. You use them through a library or product.

OAuth 2.0#

Standard (protocol, RFC 6749, read 2026-11-18). An authorization server issues access tokens to a client, which calls a resource server for a resource owner or for itself.

FieldDetail
SolvesCalling an API without holding the person's password
MinimumAuthorization code + PKCE for people, client credentials for services; not run here (OAuth and OIDC)
ResponsibilityDecides: which client gets which scopes for which audience. Yours: whether the caller may touch Q-5531
Fails whenAudience unchecked; open redirect; deprecated grants kept
StrengthsClients never handle user passwords
LimitsNo login, no object-level authorization
TrustThe authorization server's keys and client registrations
VerifiedUpdated by RFC 8252, 8996, 9700. OAuth 2.1 is still a draft: -17, 31 October 2026, "Obsoletes: 6749, 6750 (if approved)"; PKCE required, implicit and password grants gone. MCP cites -13
DocsRFC 6749, OAuth 2.1 draft

OpenID Connect#

Standard (protocol, OpenID Connect Core 1.0, read 2026-11-18). An identity layer on OAuth 2.0: the provider returns an ID token saying who authenticated, how and when.

FieldDetail
SolvesFederated login with a verifiable statement
MinimumCode flow, openid scope; check iss, aud = your client_id, exp, nonce; not run here
ResponsibilityDecides: who the user is (acr, amr, auth_time on request). Yours: session and every authorization
Fails whenID token sent to an API; email_verified read as real-world identity
StrengthsDiscovery and JWKS automate configuration
LimitsSays nothing about permissions
TrustThe issuer string (must match exactly) and its keys
VerifiedCore 1.0 errata set 2, 15 December 2023
DocsCore, Discovery

SAML 2.0#

Standard (protocol, OASIS SAML 2.0, read 2026-11-18). An identity provider (asserting party) sends signed XML assertions about a principal to a service provider (relying party).

FieldDetail
SolvesSingle sign-on across organizations
MinimumWeb Browser SSO, SP-initiated, HTTP POST binding; not run here
ResponsibilityDecides: authentication and attribute statements. Yours: attributes to roles and records
Fails whenUnsigned or misaddressed assertions accepted; groups trusted as entitlements
StrengthsRoles, bindings, profiles and single logout specified
LimitsBrowser redirects and POSTed XML forms
TrustThe IdP signing certificate from metadata
VerifiedOverview Committee Draft 02 (2008, non-normative); core March 2005
DocsTechnical overview

SCIM 2.0#

Standard (protocol, RFC 7643 and 7644, read 2026-11-18). A REST schema and protocol for creating, changing and removing users and groups in a target system.

FieldDetail
SolvesJoiners get accounts and leavers lose them, without tickets
Minimum/Users, /Groups, PATCH; active false on leave; not run here (Governance)
ResponsibilityDecides: the account data the target holds. Yours: honouring active and groups on every request
Fails whenAccount disabled, sessions and tokens still valid
StrengthsOne push from the identity source to every app
LimitsDefines no authentication or authorization scheme of its own
TrustThe SCIM endpoint needs strong client authentication
VerifiedSeptember 2015; updated by RFC 9865 (cursor pagination) and RFC 9967 (events as SETs, May 2026)
DocsRFC 7643, RFC 7644

TLS and mTLS#

Standard (protocol, RFC 9846, read 2026-11-18). TLS 1.3 authenticates the server and optionally the client; in mutual TLS the server requests a certificate and the client proves its key with CertificateVerify.

FieldDetail
SolvesConfidential transport; proof of key possession at each end
MinimumServer TLS everywhere; mTLS between services from a private CA; not run here (TLS and PKI)
ResponsibilityDecides: the peer holds a trusted certificate's key. Yours: which identity may call which operation
Fails whenAny certificate from the CA accepted; expiry outage
StrengthsNo bearer secret to replay
LimitsRotation, revocation; a certificate is not business authorization
TrustEvery CA in your trust store
VerifiedRFC 9846 (July 2026) obsoletes RFC 8446, still version 1.3. Let's Encrypt stopped client-authentication certificates on 8 July 2026 and points to private CAs
DocsRFC 9846

WebAuthn#

Standard (W3C API, WebAuthn Level 3, read 2026-11-18). A browser API for registering and authenticating with public-key credentials bound to the relying party's domain; passkeys are discoverable credentials.

FieldDetail
SolvesPhishing: the credential works only for its RP ID
MinimumA server library; userVerification required for MFA; not run here (Authenticators)
ResponsibilityDecides: the credential holder completed the ceremony (UV flag when verified). Yours: recovery, step-up, session
Fails whenPresence-only touch counted as MFA; email recovery undoes it
StrengthsPhishing-resistant by verifier name binding (NIST SP 800-63B-4)
LimitsSynced passkeys qualify up to AAL2, not AAL3
TrustThe authenticator and any sync fabric
VerifiedLevel 3 is a W3C Recommendation, 25 August 2026; the undated URL shows a Level 4 draft, so cite webauthn-3
DocsWebAuthn Level 3

MCP authorization#

Standard (protocol, MCP revision 2026-07-28, read 2026-11-18). OAuth-based authorization for MCP over HTTP: the MCP server is a resource server that publishes Protected Resource Metadata and accepts only tokens issued for itself.

FieldDetail
SolvesAn AI client finds the authorization server and gets a token bound to one server
MinimumRFC 9728 metadata, resource on every request, audience check; not run here (MCP)
ResponsibilityDecides: discovery, audience, scope challenges. Yours: tool, arguments, record, user
Fails whenToken passed through upstream ("MUST NOT pass through"); foreign tokens accepted
StrengthsReuses OAuth; scope step-up defined
LimitsAuthorization is OPTIONAL; stdio SHOULD NOT use it
TrustThe authorization servers your metadata lists
VerifiedCurrent revision 2026-07-28
DocsAuthorization, depth on mcp.sammuthu.com

A2A security schemes#

Standard (protocol, A2A specification 1.0.0, read 2026-11-18). An Agent Card declares securitySchemes (API key, HTTP auth, OAuth 2.0, OpenID Connect, mutual TLS); servers authenticate every request.

FieldDetail
SolvesA calling agent learns how to authenticate before sending a task
MinimumSchemes on the card; reject missing credentials; not run here (A2A)
ResponsibilityDecides: accepted credential types. Yours: authorization, which "MUST occur before any database queries"
Fails whenTASK_STATE_AUTH_REQUIRED treated as authorization (forbidden)
StrengthsReuses OAuth, OIDC, mTLS; cards may carry JWS signatures
LimitsNo signature or replay window for push notifications
TrustThe card's origin, or its signature
VerifiedSpecification 1.0.0
DocsA2A specification, protocol on a2a.sammuthu.com

Token formats. A format says how to check that a token is genuine; never what its holder may do.

JWT, JWS, JWE and JWK#

Token format (RFC 7519, 7515, 7516, 7517, 7518, read 2026-11-18). A JWT is a set of claims in a JWS (signed or MACed) or JWE (encrypted); a JWK is a key in JSON, a JWK Set publishes several.

FieldDetail
SolvesLocal validation without calling the issuer
MinimumA maintained library with fixed algorithms, issuer, audience, expiry; ran here in both library demos (Tokens)
ResponsibilityDecides: integrity, and for JWE confidentiality. Yours: issuers, audiences, algorithms, claims
Fails whenalg: none; algorithm read from the header; aud unchecked
StrengthsSelf-contained; key rotation by kid
LimitsRevocation before exp needs more; signed claims are not secret
TrustWhoever holds the signing key
VerifiedRFC 7518 updated by RFC 9864: EdDSA deprecated for Ed25519, Ed448. RFC 8725 is the BCP. RFC 9068 access tokens: typ at+jwt; iss, exp, aud, sub, client_id, iat, jti required
DocsRFC 7519, RFC 8725, RFC 9068, RFC 9864

Guidelines. Advice with SHALL and SHOULD, but no wire format. Not software, so nothing to host.

NIST SP 800-63-4#

Guideline (Digital Identity Guidelines, read 2026-11-18). Volumes defining assurance levels for proofing (IAL), authentication (AAL) and federation (FAL).

FieldDetail
SolvesA shared answer to "how sure are we about this person?"
MinimumPick an AAL per user group by risk (Authenticators)
ResponsibilityDecides: what each level requires. Yours: choosing and enforcing it
Fails whenOld 63-3 rules kept; email used for out-of-band authentication ("SHALL NOT")
StrengthsConcrete SHALL statements, risk-based tailoring
LimitsWritten for government services; no record-level authorization
TrustYour own conformance claim
VerifiedFinal, July 2025, supersedes 63-3; single-factor passwords at least 15 characters; AAL2 SHALL offer a phishing-resistant option
DocsSP 800-63-4

NIST SP 800-207#

Guideline (Zero Trust Architecture, read 2026-11-18). Seven tenets and a model in which a subject reaches a resource through a PDP and PEP, with no implicit trust from network location.

FieldDetail
Solves"Inside the network" treated as trusted
MinimumPer-request authentication and authorization at a PEP (Gateways and zero trust)
ResponsibilityDecides: vocabulary (policy engine, policy administrator, PEP). Yours: every control
Fails whenA "zero trust" product bought, the flat network kept
StrengthsTechnology-agnostic
LimitsNot for anonymous consumer processes; no business authorization
TrustNot applicable
VerifiedFinal, August 2020; no withdrawal notice
DocsSP 800-207

OWASP cheat sheets and API Security Top 10#

Guideline (OWASP, read 2026-11-18). Community guidance on common weaknesses; the 2023 API list puts Broken Object Level Authorization first.

FieldDetail
SolvesRepeated mistakes, named with fixes
MinimumAPI1 (BOLA) and API5 (BFLA) as negative tests (Threat testing)
ResponsibilityDecides: nothing; advises "Deny by Default". Yours: all of it
Fails whenCiting moved pages; the Java JWT sheet now returns 404
StrengthsHeadings that turn into tests
LimitsLiving pages without versions: the read date is the version
TrustNot applicable
VerifiedAPI pages moved to api-security.owasp.org. Microservices sheet: "Gateway checks complement these controls; they do not establish that a downstream operation is authorized."
DocsCheat sheets, API Top 10 2023

RFC 9700 (OAuth Security BCP)#

Standard (best current practice, BCP 240, read 2026-11-18). IETF security advice updating RFC 6749, 6750 and 6819.

FieldDetail
SolvesOAuth built on 2012 assumptions
MinimumExact redirect matching; PKCE with S256; no implicit or password grant
ResponsibilityDecides: MUST and SHOULD for servers and clients. Yours: audience and minimal scopes per token
Fails whenA password grant kept "for one client" ("MUST NOT be used")
StrengthsOne current rule list
LimitsOAuth only
TrustNot applicable
VerifiedJanuary 2025; RFC 10017 (August 2026) ranks browser patterns, BFF first
DocsRFC 9700, RFC 10017

Libraries and frameworks. Code in your own process. They make validation correct where configured; they cannot know your records.

Spring Security#

Library (Java, Spring Security 7.1.2, ran here). Spring's security framework: a filter chain, an OAuth 2.0 resource server for JWTs, and method security through AuthorizationManager.

FieldDetail
SolvesStandard authentication and authorization in Spring apps
MinimumRan here: examples/frameworks/spring-security/, 17 tests, 0 failures, Spring Boot 4.1.2
ResponsibilityDecides: signature, iss, exp, nbf, scope authorities, @PreAuthorize. Yours: the UwAuthz bean, assignments, a 401 step-up
Fails whenaud is not validated by default; jwt() tests skip the decoder
StrengthsRS256-only default; denied reads become 404 via @HandleAuthorizationDenied
LimitsMethod security off until @EnableMethodSecurity
TrustIn-process; the configured issuer keys
Verified7.1.2 reference; clock skew 60 s
DocsResource server JWT, Method security

The audience check the demo had to add, verbatim from SecurityConfig.java (jwtDecoder), compiled and run by Maven:

OAuth2TokenValidator<Jwt> audience =
    new JwtClaimValidator<List<String>>(JwtClaimNames.AUD, aud -> aud != null && aud.contains(AUDIENCE));
decoder.setJwtValidator(new DelegatingOAuth2TokenValidator<>(JwtValidators.createDefaultWithIssuer(ISSUER), audience));

FastAPI and PyJWT#

Library (Python: FastAPI 0.165.0, PyJWT 2.15.1, ran here). FastAPI's security helpers are dependencies; PyJWT validates JWTs.

FieldDetail
SolvesToken validation as a reusable dependency
MinimumRan here: examples/frameworks/fastapi-jwt/, 19 passed, ES256
ResponsibilityDecides: signature, algorithm list, iss, aud, exp, required claims. Yours: tenant, unit, assignment, acr, 404 or 403
Fails whenCopying the tutorial: it checks neither aud nor iss
StrengthsExplicit algorithms; one exception per failure
Limitsoptions.require checks presence only
TrustIn-process
VerifiedTutorial uses PyJWT and pwdlib (Argon2), not python-jose
DocsFastAPI OAuth2 with JWT, PyJWT API

The demo's decode call, from app.py (current_subject), dedented, and lines of its real output:

claims = jwt.decode(
    creds.credentials,
    public_key,
    algorithms=ALGORITHMS,
    audience=AUDIENCE,
    issuer=ISSUER,
    options={"require": ["exp", "iss", "aud", "sub"]},
)
test_app.py::test_alg_mismatch_rs256_401 PASSED
test_app.py::test_alg_none_401 PASSED
test_app.py::test_other_tenant_and_missing_look_the_same PASSED
test_app.py::test_peer_underwriter_403 PASSED
test_app.py::test_agent_with_uw_decide_scope_403 PASSED
======================== 19 passed, 1 warning in 0.34s =========================

Next.js BFF pattern#

Pattern with a library (Next.js, documented shape; not run here). The backend for frontend keeps tokens on the server and gives the browser a session cookie; Next.js documents a Data Access Layer that checks the session next to the data.

FieldDetail
SolvesTokens stolen from browser JavaScript
MinimumHttpOnly, Secure, SameSite cookie; verifySession() in a Data Access Layer; checks in each Server Action (Sessions)
ResponsibilityDecides: where the session lives. Yours: every check near the data
Fails whenProxy is the only check; a skipped matcher path also skips its Server Functions
StrengthsRFC 10017 ranks BFF the most secure browser pattern
LimitsProxy is for optimistic checks only
TrustServer holds tokens; browser holds a cookie
VerifiedNext.js 16 renamed middleware to proxy; no current release number on the pages read
DocsAuthentication guide, Proxy

Auth.js#

Library (JavaScript, read 2026-11-18). An authentication library, formerly NextAuth.js.

FieldDetail
SolvesSign-in from a library instead of hand-written flows
MinimumDocumented shape; not run here
ResponsibilityDecides: sign-in and sessions. Yours: all authorization
Fails whenA new project starts on it without knowing its status
StrengthsSecurity patches continue
LimitsMaintainer changed (next row)
TrustIn-process
Verifiedauthjs.dev: "now part of Better Auth"; the Better Auth blog (22 September 2025) recommends Better Auth for new projects
Docsauthjs.dev, Better Auth post
What this is not. This page does not compare policy code line by line. Policy as code writes the same rule in six engines that ran, with tests and decision logs.

Identity providers (products). They authenticate principals and issue OAuth and OIDC tokens. None knows that SUB-1004 is assigned to u-uw-w1 unless you put it there. Capability facts as documented on 2026-11-18.

Keycloak#

Product (open-source identity provider, 26.8.2). A server you host that manages realms of users, clients, roles and groups and issues OIDC and SAML tokens.

FieldDetail
SolvesA self-hosted identity provider with federation
MinimumA realm per environment, a client per app; not run here
ResponsibilityDecides: login, realm and client roles, token contents. Yours: record checks, unless you adopt its Authorization Services
Fails whenLegacy token exchange V1 enabled ("a very loose implementation")
StrengthsBrokering to OIDC or SAML providers; LDAP and Active Directory federation; RFC 8693 exchange on by default
LimitsStandard exchange works within one realm only
TrustYou run, patch and guard its signing keys
VerifiedAdmin guide 26.8.2; Authorization Services: central PDP, default strategy "Unanimous"
DocsServer admin, Token exchange

Okta#

Product (hosted identity provider). A service whose authorization servers issue OAuth 2.0 and OIDC tokens.

FieldDetail
SolvesA hosted provider that protects your own APIs
MinimumA custom authorization server per API; not run here
ResponsibilityDecides: scopes, claims, access policies per custom server. Yours: record decisions
Fails whenThe built-in org server is used for your API: its audience, claims, policies and scopes cannot be customized
StrengthsCustom servers define their own scopes, claims and policies
LimitsThe default custom server has no access policy until you add one
TrustThe vendor's keys and availability
VerifiedNo product version on the page read
DocsAuthorization servers

Auth0#

Product (hosted identity provider). A service organized in tenants holding applications, connections and user profiles.

FieldDetail
SolvesLogin for your applications, including business customers
MinimumA tenant per environment; Organizations for B2B; not run here
ResponsibilityDecides: login, per-organization connections, member roles. Yours: which brokerage's quote a member reads
Fails whenOrganization membership treated as record access
StrengthsUsers can belong to several organizations
LimitsThe overview read does not describe token claims
TrustVendor-hosted; region in the tenant domain
VerifiedNo product version on the pages read
DocsOrganizations, Tenants

Microsoft Entra ID#

Product (hosted identity provider). Microsoft's identity platform: app registrations, tokens with scp and roles, on-behalf-of exchange, Conditional Access.

FieldDetail
SolvesTokens for users and apps in an Entra tenant
MinimumApp roles for stable categories; check aud, scp or roles; not run here
ResponsibilityDecides: delegated scopes, app roles, Conditional Access. Yours: Entra says "Keep finer-grained resource permissions in your application's authorization data"
Fails whenAuthorizing on mutable preferred_username; no groups claim above 200 groups
StrengthsImmutable oid; OBO keeps the user downstream
LimitsOBO only for user principals; Conditional Access after the first factor
TrustVendor-hosted; combine tid with other claims
VerifiedNo product version on the pages read
DocsAccess token claims, App roles

Amazon Cognito#

Product (hosted identity provider). User pools authenticate and issue JWTs; identity pools exchange tokens for temporary AWS credentials; "Neither component requires the other."

FieldDetail
SolvesApp sign-in, and AWS credentials for those users
MinimumA user pool with a resource server and custom scopes; not run here
ResponsibilityDecides: who the user is; machine tokens carry custom scopes only. Yours: signature and expiry checks ("must verify"), record decisions
Fails whenExpecting aud binding on machine tokens: not for client credentials
StrengthsLogin and AWS credentials in one service
LimitsOne resource per binding request
TrustVendor-hosted in your AWS account
VerifiedNo product version on the pages read
DocsWhat is Cognito, Resource servers

Cloud identity (products). Which workload may call which cloud API. None knows your quotes. As documented on 2026-11-18.

AWS IAM and STS#

Product (cloud identity). A role has a trust policy (who may assume it) and a permissions policy (what it may do); STS returns temporary credentials.

FieldDetail
SolvesWorkloads reach AWS without long-term keys
MinimumA role per workload; AssumeRoleWithWebIdentity from outside AWS (Cloud IAM)
ResponsibilityDecides: AWS actions on AWS resources. Yours: your application's data
Fails whenLong-term access keys; IMDSv1 left on (both allowed by default)
StrengthsSession policies only narrow; SCPs and boundaries grant nothing
LimitsRole chaining caps a session at one hour
TrustAWS and every identity provider a role trusts
VerifiedAWS prefers "temporary credentials instead of creating long-term credentials"
DocsIAM best practices, AssumeRole

Google Cloud IAM and Workload Identity Federation#

Product (cloud identity). Service accounts and roles, plus federation that exchanges an external token for a Google token through the Security Token Service.

FieldDetail
SolvesOutside workloads use Google Cloud without service account keys
MinimumA pool, a provider, an attribute condition; not run here
ResponsibilityDecides: which external identity maps to which principal. Yours: your authorization
Fails whenNo attribute condition on a shared issuer (GitHub, GitLab SaaS, HCP Terraform)
StrengthsKey creation off by default for organizations created from 3 May 2024
LimitsLeaked-key detection is best-effort
TrustGoogle and the external issuer
VerifiedDocs moved to docs.cloud.google.com (301)
DocsWorkload Identity Federation, Service account keys
In a coding agent. The coding agent's CI job reaches the cloud through OIDC federation, not stored keys. GitHub documents an immutable default sub for repositories created after 15 July 2026 (repo:OWNER@OWNER-ID/REPO@REPO-ID:...), so a renamed repository cannot inherit cloud access. The trust condition decides which job gets a role, never what the agent's pull request may change. See Coding agents.

Azure managed identities#

Product (cloud identity). Entra service principals tied to an Azure resource (system-assigned) or standalone (user-assigned) that get tokens without secrets.

FieldDetail
SolvesAzure workloads call Entra-protected APIs without stored credentials
MinimumA user-assigned identity; MSAL or Azure.Identity; not run here
ResponsibilityDecides: which workload gets a token. Yours: what it may do to records
Fails whenOne identity shared by unrelated workloads
Strengths"doesn't require any secrets"
LimitsFederated credentials match issuer, subject, audience case-sensitively
TrustEntra and any federated issuer
VerifiedUser-assigned is Microsoft's recommended type
DocsManaged identities, Workload identity federation

API gateway authorizers#

Product (gateway features). Gateways validate tokens before your service: AWS API Gateway JWT and Lambda authorizers, Azure API Management validate-jwt, Google Cloud API Gateway.

FieldDetail
SolvesUnauthenticated traffic stopped at the edge
MinimumIssuer, audience, keys per API; not run here (Enforcement)
ResponsibilityDecides: token validity, at most a scope or claim per route. Yours: the object check that stops BOLA
Fails whenAWS: ID and access tokens look alike, so require scopes. A cached Lambda policy must fit "all resources and methods"
StrengthsAWS JWT authorizer checks kid, iss, aud, exp, nbf, iat, scopes. Azure requires signature and exp by default; fails with 401
LimitsAWS JWT authorizer: RSA only, keys cached up to two hours. Azure: the audiences element is marked not required (its description says at least one audience must be specified when used); clock-skew defaults to 0
TrustServices trust forwarded claims (Google: X-Apigateway-Api-Userinfo) and must refuse bypass traffic
VerifiedGoogle: "you don't have to add any code in your API to process the authentication" (authentication only)
DocsAWS JWT, AWS Lambda, Azure, Google

Policy engines. They evaluate your rule on facts you send; none authenticates the caller. Code side by side: Policy as code.

OPA and Rego#

Engine (Open Policy Agent 1.22.4, ran here). A general-purpose engine that evaluates Rego policies against JSON input and data.

FieldDetail
SolvesOne engine "across the stack"; enforcing code holds no policy
MinimumRan here: examples/frameworks/opa/, opa test 10/10 PASS
ResponsibilityDecides: the decision document you design. Yours: token validation, the record, assignment as input, enforcement
Fails whenA fact is missing: OPA cannot know an assignment you did not send
StrengthsSigned bundles; decision logs with masking
LimitsRego is one more language for the team to learn and review
TrustIts bundle source
Verifiedv1.22.4, 12 November 2026; Rego v1 default; CNCF Graduated
DocsOPA docs, Releases

Cedar#

Engine (Cedar, via cedarpy 4.12.2, ran here). permit and forbid policies over typed entities, validated against a schema.

FieldDetail
SolvesReadable policies with default deny
MinimumRan here: examples/frameworks/cedar/, 9/9 answers as expected
ResponsibilityDecides: Allow or Deny; forbid overrides permit. Yours: entities from your data, context, Deny to 404, 403 or step-up
Fails whenA policy with an evaluation error is skipped
StrengthsValidation caught an attribute typo before any request
LimitsVersions differ by source (next row)
TrustIn-process, or Amazon Verified Permissions as hosted PDP
VerifiedReference guide: Cedar 4.6; Verified Permissions: Cedar 4.12; cedarpy 4.12.2 maps to engine 4.12.0
DocsCedar docs, Verified Permissions

OpenFGA#

Engine (relationship-based, OpenFGA v1.22.1, ran here). A Zanzibar-style engine that stores relationship tuples and answers Check: does this user have this relation to this object?

FieldDetail
SolvesMembership, assignment, hierarchy (ReBAC)
MinimumRan here: examples/frameworks/openfga/, 8/8 Checks as expected
ResponsibilityDecides: allowed from tuples and conditions. Yours: writing and deleting tuples, passing acr
Fails whenMissing condition context returned HTTP 400, not allowed: false: treat errors as deny
StrengthsType restrictions refused an agent tuple at write time
LimitsDefaults are for trying it: --authn-method none, datastore memory
TrustYou run it; its API holds every relationship
VerifiedCNCF incubating; conditions in CEL
DocsConcepts, Conditions

PostgreSQL row-level security#

Product (database feature, PostgreSQL 18.7, ran here). Table policies that filter which rows a database role may read or write; no policy means deny.

FieldDetail
SolvesA forgotten WHERE tenant = ? no longer leaks rows
MinimumRan here: examples/frameworks/postgres-rls/, six steps as expected (Tenants)
ResponsibilityDecides: row visibility, WITH CHECK on writes. Yours: the tenant per transaction from the verified token
Fails whenOwner without FORCE ROW LEVEL SECURITY; superusers and BYPASSRLS always bypass
StrengthsLast line of defense under every query
LimitsNot the API's authorization
TrustThe session variable your app sets
VerifiedCurrent docs: PostgreSQL 18
DocsRow security policies

AuthZEN Authorization API 1.0#

Standard (API, OpenID AuthZEN, read 2026-11-18). A standard PEP-to-PDP exchange: subject, action, resource, optional context in; boolean decision out.

FieldDetail
SolvesEvery PDP speaking its own format
Minimum/access/v1/evaluation; metadata at /.well-known/authzen-configuration; not run here
ResponsibilityDecides: the wire shape. Yours: the policy and the facts
Fails whenTwo AuthZEN PDPs assumed to decide alike
StrengthsSwap PDPs without rewriting PEPs
LimitsNo policy language
TrustThe PDP you call
VerifiedFinal, 11 January 2026
DocsAuthorization API 1.0

Workload identity. A standard for naming workloads, and a product that issues their credentials.

SPIFFE and SPIRE#

Standard and product (SPIFFE; SPIRE v1.16.0, read 2026-11-18). SPIFFE gives each workload an ID such as spiffe://insurer.example/ns/uw/sa/underwriting-agent in an X.509-SVID or JWT-SVID; SPIRE attests workloads and issues SVIDs.

FieldDetail
SolvesServices prove identity without shipped secrets
MinimumSPIRE server and agents; X.509-SVIDs for mTLS; not run here (Workload identity)
ResponsibilityDecides: which workload holds which ID. Yours: the receiver's allowlist or policy
Fails whenMany-audience JWT-SVIDs (replayable); x-app-id trusted instead
StrengthsNo secret in the workload; federation across trust domains
LimitsNo page read says an ID authorizes anything
TrustThe SPIRE server as CA and its attestors
VerifiedSPIRE v1.16.0 (5 November 2026); CNCF Graduated
DocsSPIFFE concepts, SPIRE releases

Which kind of thing answers which question#

The five questions of this site do not map one-to-one to products. In one quote read, each kind acts once, and only the service and the engine see the quote's tenant.

Diagram: One quote read · which kind of thing acts at each step

Time runs down the page. The identity provider, a product, issues a token by OAuth and OIDC, which are standards. The gateway authorizer, a product feature, checks the token coarsely. The quote service validates it again with a library and asks a policy engine about the record, sending facts only it knows. The database applies row-level security beneath the query. Only the service and the engine ever see Q-6620's tenant; that is where the broker's cross-tenant read is refused.

  1. Broker portal BFF to IdP (product): authorization code + PKCE. The standard flow for a person; the product runs it.
  2. IdP (product) to Broker portal BFF: access token (JWT). A signed token: proves who and for which audience, not which quote.
  3. Broker portal BFF to Gateway authorizer: GET Q-6620 with bearer token. The broker asks for another brokerage's quote.
  4. Gateway authorizer to Quote service + library: token valid, scope ok: forward. Coarse check passes; the gateway cannot see the quote's tenant.
  5. Quote service + library to Policy engine: subject brk-north, resource tenant brk-south. The service sends facts from the verified token and the loaded record.
  6. Policy engine to Quote service + library: deny: other tenant. The engine decides on the facts it was given.
  7. Quote service + library to Broker portal BFF: 404 not found. Your code chooses 404 so the quote's existence is not revealed.

Check a design slide against this table: each question needs a named answer, and the authorization row always names your code.

QuestionAnswered byExamplesNever by
Identificationprotocol + identity providerOIDC sub, client_id, SPIFFE IDa caller-set header
Authenticationprotocol + library + guidelineWebAuthn, mTLS, JWT validation, AALa token format alone
Authorizationyour code, often with an engineOPA, Cedar, OpenFGA, a @PreAuthorize beanan IdP, a gateway, a scope
Enforcementlibrary + database + gatewayfilter chain, RLS, a PEP per servicea guideline
Audityour code + engine logsOPA decision logs, audit recordstoken claims

Security notes#

Monday checklist#

Exercises#

Exercise 1. A slide says "Authorization: Entra ID app roles." Brokers have role Broker. What question is left open, and where does Entra's own documentation say to answer it?

AnswerWhich quote: in the application's own data

Broker says the person may read quotes in general, not that u-broker-n1 may read Q-6620. Entra's app-role guidance says to keep finer-grained resource permissions in the application's authorization data and enforce them in the application: the quote service checks the tenant on the record.

Exercise 2. The team adds an AWS HTTP API JWT authorizer with issuer and audience. Which token could still pass that the quote API should refuse, and what does AWS recommend?

AnswerAn ID token with the right audience; require scopes

AWS notes there is no standard way to tell access tokens from ID tokens, so an ID token with a matching aud or client_id may pass. AWS recommends requiring authorization scopes on routes. RFC 9068's typ at+jwt check in the service is a further guard where your identity provider issues that profile.

Exercise 3. A colleague says "we are on OAuth 2.1". What do you check?

AnswerIt is a draft; check the practices, not the label

OAuth 2.1 is still an Internet-Draft (-17 on 2026-11-18). Ask what they implement: PKCE on every authorization code flow, exact redirect URI matching, no implicit or password grant. Those are RFC 9700 requirements today, whatever the label.

Advanced perspective#

A product default is not a designFour defaults from this page that a review must catch

Every default is the vendor's guess about the common case, and none was made for your records. Spring Security's resource server validates iss, exp and nbf but not aud, so a token issued for the assessment service is accepted by the quote API unless someone adds a validator. OpenFGA's run command starts with --authn-method none and an in-memory datastore, which is right for a laptop and wrong for anything reachable. PostgreSQL applies RLS to every role except the table owner, superusers and BYPASSRLS roles; an application that connects as the owner sees every row. Okta's default custom authorization server has no access policy until you write one. The review question is the same each time: what does this product do when nobody configures it, and does that match the design doc? Write the answer next to the configuration, with the documentation URL and the date read, so the next upgrade can be checked against it.

Standards move: how to re-verifyStatus banners, version history, and the undated URL trap

In the year before this page was written, TLS 1.3 got a new RFC number, WebAuthn Level 3 became a Recommendation while its undated URL moved on to a Level 4 draft, SCIM gained two updating RFCs, RFC 7518 was updated to deprecate EdDSA, Next.js renamed middleware, and Auth.js changed maintainers. None of this broke running systems, but each makes a citation wrong. Re-verify from the authority's own status line: the RFC Editor "Obsoleted by" and "Updated by" banners, the W3C history page, the datatracker revision list for drafts, a product's version history or release page. Cite dated URLs (webauthn-3, a numbered draft) instead of "latest". Record claim, URL, date and label in a log, as this site does, and have a second reader re-fetch anything surprising. Cloud documentation also moves host (Google Cloud to docs.cloud.google.com, OWASP API pages to api-security.owasp.org), so a 404 is a reason to search, not a reason to conclude the feature is gone.

Where libraries silently skip checksAudience, test helpers, presence-only claims

Three quiet gaps showed up in the runs. First, audience: Spring does not check aud by default, and the FastAPI tutorial validates neither aud nor iss; the demos add both, and their wrong-audience tests prove it. Second, test helpers: Spring's SecurityMockMvcRequestPostProcessors.jwt() builds a mock Jwt and passes it through the authentication APIs without running the JwtDecoder. The Spring demo has a test named jwtPostProcessor_skipsTheDecoder_soWrongAudienceStillPasses: a token with the wrong audience got 200. That is fine for authorization tests and dangerous if it is your only token test; keep at least one test that signs a real token and expects 401. Third, presence versus validity: PyJWT's options.require checks that claims exist, not what they contain, so a present aud still needs the audience argument. In each case the library behaves as documented. The gap is between what the documentation says and what the team assumed.

A standard between PEP and PDPWhat AuthZEN fixes, and what it leaves to you

Before AuthZEN, moving from one PDP to another meant rewriting every enforcement point, because each engine had its own request shape. The Authorization API 1.0 (Final, 11 January 2026) fixes the question: subject, action, resource, optional context, and a boolean decision. It does not fix the policy language, the facts each PDP needs, or what happens on an error. Two PDPs behind the same API can still disagree about the peer underwriter if one lacks the assignment fact. The useful design is an internal PEP library that speaks AuthZEN, fills the request from validated claims and the loaded record, treats any non-200 answer as deny, and records the PDP's policy version in the audit record. That keeps the swap cheap without pretending the engines are interchangeable.

In one breath#

OAuth is a protocol, JWT a token format, NIST and OWASP guidelines, Spring Security and PyJWT libraries, Keycloak and Entra products, OPA, Cedar and OpenFGA engines, and the BFF a pattern; a design names each by its kind. Every one of them answers a part of identification, authentication or enforcement, and none of them knows that SUB-1004 is assigned to u-uw-w1. The record-level decision stays in your code, with or without an engine. Defaults and versions move, so each claim carries its URL and the date it was read.

You can now name every part of a design slide. Playbooks puts the parts together: for a script, a public SaaS, a B2B multi-tenant SaaS, a private enterprise, an event platform and an autonomous agent, the simplest credible design, the trigger to grow it, and the checklist before production.