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
About

About this site and its sources

What this site is and is not, the standards and documentation it was checked against and when, the sister sites, the label convention for standards, products and patterns, and what is original.

This site teaches how software proves who is calling, how it decides what that caller may do to which record, how it makes that decision stick on every path, and how it records what happened. It starts with one broker asking to read one insurance quote and ends with AI agents that call models, MCP servers and retrieval services while acting for people. It is written for software engineers, architects and technical leads who build or review such systems.

What this site is#

A progressive guide in 32 chapters, each with one problem, one running example, a diagram, runnable code or a raw protocol exchange, a failure mode, a design choice, a test you can apply, and folded notes for experienced readers. Fourteen interactive labs let you change one input and watch a decision change. The labs and the example run without a network, a key, a model or an identity provider.

The running example is a synthetic commercial property insurer: brokers ask for quotes, an underwriting agent gathers evidence and writes a recommendation, and a human underwriter decides. The model recommends; a person decides. No page, lab or line of code lets an agent approve, decline or bind anything.

What this site is not#

How statements are labelled#

The spec for this site asks that standards, protocols, token formats, products, libraries and architectural patterns never blur into each other. Pages use these lead-ins where the difference matters:

LabelMeaningExample
StandardWhat a standard or specification requires, with the document and the date it was readRFC 9700 says the implicit grant SHOULD NOT be used
Token formatA way to encode claims, not a way to log inJWT, JWS, JWE
GuidelineGuidance from a standards or security bodyNIST SP 800-63-4, OWASP cheat sheets
Product or libraryWhat one product or library does, as documented on a dateKeycloak's token exchange, Spring Security's resource server
PatternA common architecture or organizational practice, mandated by no standardbackend for frontend, PEP and PDP split, a self-service certificate portal
This site's recommendationThe author's design advicekeep the object-level decision in the service that owns the record

The example and the code#

The example lives in the repository under examples/uw-auth/: standard-library Python, a scripted stand-in where a model would act, a simulated clock, and tests. The negative tests that prove the main claims of this site are in test_negative.py: no broker, underwriter, agent, retrieval call or MCP tool reads another tenant's quote; no hidden or revoked tool executes; no agent writes an underwriting decision, even with a misgranted scope or an injected instruction. Framework demonstrations that were really installed and run (in a throwaway location, with the exact versions) are in examples/frameworks/; each page says when something is "documented shape; not run here" instead.

Because the agent is a scripted stand-in, results on this site show how access controls work, not how good any model is.

Sources and when they were read#

Every claim about a standard, protocol or product was read on its official page on 2026-11-18. The repository keeps a fact log per page (docs/facts/) with the claim, the exact URL, the date and the label, and a source pack (docs/facts/_sources/). Items that looked surprising (a deprecation, a rename, a moved page, a changed default) were fetched a second time by a different reader before they were published. Where a page did not say something, this site says "the documentation read here does not say".

Standards and guidelines#

SourceWhy read it
NIST SP 800-63-4, Digital Identity GuidelinesIdentity proofing (IAL), authentication (AAL) and federation (FAL) levels, passwords, phishing resistance, syncable authenticators, recovery
NIST SP 800-207, Zero Trust ArchitectureThe tenets and the policy engine, administrator and enforcement point components
RFC 9700, OAuth 2.0 Security Best Current PracticeWhich grants to retire, PKCE, exact redirect matching, audience restriction, sender-constrained tokens
RFC 6749, 6750, 7636, 8628, 7662, 7009, 8693, 8705, 9449, 9470, 8707, 9728OAuth roles and grants, bearer use, PKCE, device flow, introspection, revocation, token exchange, certificate-bound tokens, DPoP, step-up, resource indicators, protected resource metadata
RFC 10017, OAuth 2.0 for Browser-Based ApplicationsThe backend for frontend and the other browser patterns
RFC 7519, 7515, 7516, 7517, 7518, 8725, 9068JWT claims, JWS, JWE, JWK sets, algorithms, JWT best practices, the access token profile
OpenID Connect specificationsCore, Discovery, Back-Channel Logout, the AuthZEN Authorization API
SAML 2.0 technical overview (OASIS)Assertions, identity and service providers, bindings
W3C Web Authentication Level 3 and FIDO Alliance passkeysPasskeys, relying parties, user verification, synced and device-bound credentials
RFC 7643 and RFC 7644 (SCIM)Users, groups, the provisioning protocol
OWASP Cheat Sheet Series and OWASP API Security Top 10 2023Authorization, authentication, sessions, password storage, CSRF, MFA, JWT; BOLA and BFLA
SPIFFE standardsSPIFFE IDs, X.509 and JWT SVIDs, the Workload API, federation
Model Context Protocol, revision 2026-07-28Authorization for remote MCP servers, audience validation, no token passthrough
A2A protocol specificationAgent Cards and security schemes

Products, libraries and engines (as documented on 2026-11-18)#

SourceWhy read it
Apache Kafka securityTLS and SASL client authentication, the authorizer and ACLs
AWS IAM, Google Cloud Workload Identity Federation, Azure managed identities, HashiCorp VaultRoles, temporary credentials, federation, managed identities, dynamic secrets
GitHub Actions OIDC, GitHub Apps, rulesets, SLSACoding agents and CI identity
Open Policy Agent, Cedar, OpenFGA, PostgreSQL row-level securityPolicy as code and relationship authorization
Keycloak, Okta, Auth0, Microsoft Entra ID, Amazon CognitoIdentity providers, described neutrally
Spring Security, FastAPI security, PyJWT, Next.js authenticationLibraries and frameworks used in the framework demonstrations
Amazon Bedrock, Vertex AI access control, Azure OpenAI RBAC, Claude API authenticationHow managed model access is authorized

Sister sites#

This site is one of a series on AI-native engineering by the same author. Each owns one subject and links the others where they meet, instead of repeating them.

SiteWhat it owns
prompt.sammuthu.comInstructions: how they are written, composed and defended
context.sammuthu.comWhat the model can see now: selection, retrieval, budget
memory.sammuthu.comDurable information and saved execution state
a2a.sammuthu.comMessages between agents; A2A versus MCP
auth.sammuthu.com (this site)Identity, delegation, enforcement and audit for every caller and every hop
guardrails.sammuthu.comEnforceable checks around a probabilistic agent
observe.sammuthu.comLogs, metrics, traces, audit events, replay
tools.sammuthu.comCallable capabilities: schema, execution, MCP tools
mcp.sammuthu.comShared capabilities across teams: when MCP is justified, identity, authorization, governance
rag.sammuthu.comRetrieval from SQL rows to production: embeddings, vector indexes, hybrid search, reranking
schema.sammuthu.comTyped contracts: shape, validation, repair, evolution
orchestrate.sammuthu.comThe control plane: what runs next
reliable.sammuthu.comAcceptable outcomes despite failures and load
harness.sammuthu.comThe runtime around a model call
eval.sammuthu.comMeasurement: graders, golden sets, release gates
diff-to-deploy.sammuthu.comShipping a change with coding agents

Two neighbours share the most ground with this site. mcp.sammuthu.com explains the MCP protocol and its authorization in depth; the MCP chapter here gives the auth-centred version and links there. rag.sammuthu.com explains how retrieval works; the RAG chapter here owns who may retrieve what.

What is original#

The chapter order, the running example, the diagrams, the labs, the example code and the explanations are original to this site. Standards and product documentation are cited, not copied. Exam material for any certification is not used.