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#
- Not a standard. It is a map to adapt. Where a standard says MUST, the page says so and links it. Everything else is labelled as a product behaviour, a common pattern, or this site's recommendation.
- Not production code. The example signs demo tokens with HMAC from the Python standard library, using keys whose text says they are not secrets. That is teaching code. In production, use a maintained JWT, OAuth or TLS library and a real identity provider.
- Not a product comparison. Products are described from their own documentation, neutrally. There is no ranking, no "best", and no price.
- Not an attack manual. Attacks are explained only as far as needed to motivate a control. Nothing here targets a real system.
- Not about a real company. The insurer, the brokerages
brk-northandbrk-south, the people (who appear only as roles), the rules, the keys, the tokens, the certificates and every number are invented. The example follows the shape of a real project by the author, but nothing here reports the behaviour or quality of a real system or model.
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:
| Label | Meaning | Example |
|---|---|---|
| Standard | What a standard or specification requires, with the document and the date it was read | RFC 9700 says the implicit grant SHOULD NOT be used |
| Token format | A way to encode claims, not a way to log in | JWT, JWS, JWE |
| Guideline | Guidance from a standards or security body | NIST SP 800-63-4, OWASP cheat sheets |
| Product or library | What one product or library does, as documented on a date | Keycloak's token exchange, Spring Security's resource server |
| Pattern | A common architecture or organizational practice, mandated by no standard | backend for frontend, PEP and PDP split, a self-service certificate portal |
| This site's recommendation | The author's design advice | keep 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#
| Source | Why read it |
|---|---|
| NIST SP 800-63-4, Digital Identity Guidelines | Identity proofing (IAL), authentication (AAL) and federation (FAL) levels, passwords, phishing resistance, syncable authenticators, recovery |
| NIST SP 800-207, Zero Trust Architecture | The tenets and the policy engine, administrator and enforcement point components |
| RFC 9700, OAuth 2.0 Security Best Current Practice | Which grants to retire, PKCE, exact redirect matching, audience restriction, sender-constrained tokens |
| RFC 6749, 6750, 7636, 8628, 7662, 7009, 8693, 8705, 9449, 9470, 8707, 9728 | OAuth 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 Applications | The backend for frontend and the other browser patterns |
| RFC 7519, 7515, 7516, 7517, 7518, 8725, 9068 | JWT claims, JWS, JWE, JWK sets, algorithms, JWT best practices, the access token profile |
| OpenID Connect specifications | Core, 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 passkeys | Passkeys, 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 2023 | Authorization, authentication, sessions, password storage, CSRF, MFA, JWT; BOLA and BFLA |
| SPIFFE standards | SPIFFE IDs, X.509 and JWT SVIDs, the Workload API, federation |
| Model Context Protocol, revision 2026-07-28 | Authorization for remote MCP servers, audience validation, no token passthrough |
| A2A protocol specification | Agent Cards and security schemes |
Products, libraries and engines (as documented on 2026-11-18)#
| Source | Why read it |
|---|---|
| Apache Kafka security | TLS and SASL client authentication, the authorizer and ACLs |
| AWS IAM, Google Cloud Workload Identity Federation, Azure managed identities, HashiCorp Vault | Roles, temporary credentials, federation, managed identities, dynamic secrets |
| GitHub Actions OIDC, GitHub Apps, rulesets, SLSA | Coding agents and CI identity |
| Open Policy Agent, Cedar, OpenFGA, PostgreSQL row-level security | Policy as code and relationship authorization |
| Keycloak, Okta, Auth0, Microsoft Entra ID, Amazon Cognito | Identity providers, described neutrally |
| Spring Security, FastAPI security, PyJWT, Next.js authentication | Libraries and frameworks used in the framework demonstrations |
| Amazon Bedrock, Vertex AI access control, Azure OpenAI RBAC, Claude API authentication | How 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.
| Site | What it owns |
|---|---|
| prompt.sammuthu.com | Instructions: how they are written, composed and defended |
| context.sammuthu.com | What the model can see now: selection, retrieval, budget |
| memory.sammuthu.com | Durable information and saved execution state |
| a2a.sammuthu.com | Messages between agents; A2A versus MCP |
| auth.sammuthu.com (this site) | Identity, delegation, enforcement and audit for every caller and every hop |
| guardrails.sammuthu.com | Enforceable checks around a probabilistic agent |
| observe.sammuthu.com | Logs, metrics, traces, audit events, replay |
| tools.sammuthu.com | Callable capabilities: schema, execution, MCP tools |
| mcp.sammuthu.com | Shared capabilities across teams: when MCP is justified, identity, authorization, governance |
| rag.sammuthu.com | Retrieval from SQL rows to production: embeddings, vector indexes, hybrid search, reranking |
| schema.sammuthu.com | Typed contracts: shape, validation, repair, evolution |
| orchestrate.sammuthu.com | The control plane: what runs next |
| reliable.sammuthu.com | Acceptable outcomes despite failures and load |
| harness.sammuthu.com | The runtime around a model call |
| eval.sammuthu.com | Measurement: graders, golden sets, release gates |
| diff-to-deploy.sammuthu.com | Shipping 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.