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
Workloads · 17

API gateways and zero trust: the edge checks, the service decides

What an ingress gateway, a WAF and a service mesh each verify, what they cannot know, defense in depth at every service boundary, and the NIST SP 800-207 zero trust tenets applied to one request.

You will sort
The edge, WAF, API gateway and service mesh by what each one can see, and what none of them can.
You will apply
The seven NIST SP 800-207 tenets to one request, naming who acts at each step.
You will place
The resource-specific check at every service boundary, and give the outer layers the jobs they do well.

A security review asks a short question about the underwriting platform: "Where does zero trust happen?" The platform team has a good slide. Traffic enters through an edge network that terminates TLS and absorbs floods. A web application firewall inspects every request. An API gateway validates every access token, checks its audience and maps routes to scopes. Inside, a service mesh enforces mutual TLS between every pair of services, and the whole cluster sits in a private network.

The reviewer picks one request and asks the team to follow it. The peer underwriter u-uw-w2, assigned to SUB-1007, opens SUB-1004 in the underwriter cockpit and records a decision on it. SUB-1004 belongs to the colleague u-uw-w1.

The edge sees well-formed HTTPS from a known client and passes it. The firewall sees a JSON body with no attack pattern and passes it. The gateway sees a genuine token for the quote API with the scope uw.decide and passes it. The mesh sees the cockpit BFF calling the quote service with a valid workload certificate, on an allowed path, and passes it. Every layer on the slide says yes, and each one is right about what it checked.

Only one component says no: the policy decision point, asked by the quote service, compares the record's assigned underwriter with the caller and answers 403 (rule R-AZ-09). This site's own case UW-A09 records that answer, and it records something worse about the previous authorization policy, authz-2026.10.3, which lacked the assignment check: under it the decision would have gone through every layer of the slide. Zero trust did not live in any box the team drew. It lived in the one check that could see the record.

Four layers at the front door, in plain words#

Each layer is worth having; trouble starts when one is credited with a job it cannot do. Here is each one as a pattern (a common architecture, not a standard), and what it sees.

The edge is the first network hop the internet reaches: a content delivery network, a load balancer, a flood-protection service. It terminates the public TLS connection, absorbs volume and routes. It sees addresses, hostnames and request rates.

A web application firewall (WAF) inspects HTTP requests for known attack shapes: malformed headers, injection payloads, oversized bodies, abusive clients. It sees the request's bytes. It does not know your business rules, so it cannot tell a legitimate decision from an illegitimate one when both are well formed.

An API gateway is the single entry point for API calls. It routes to services and applies cross-cutting checks: validate the access token (signature, issuer, audience, expiry), require a scope per route, enforce rate limits and quotas, add a request id. It sees the token and the route. It does not load the record the route names.

A service mesh puts a proxy beside every workload and runs mutual TLS between them. It knows which workload calls which, and can enforce coarse rules about that: the cockpit BFF may call the quote service's decision path; nothing else may. It sees workload identities and HTTP paths, not records.

Plain English. The edge checks that traffic is traffic. The firewall checks that a request is not an obvious attack. The gateway checks that the caller holds a genuine token for this API and route. The mesh checks which program is calling which. Nobody in that list has read row SUB-1004.
Before AI. The same stack existed around Java services years ago: a hardware load balancer, a rule-based web application firewall in front of the web server, a reverse proxy that validated a session cookie, and a Spring application behind it. The lesson then was the lesson now: the proxy can reject strangers, but only the application, which loads the order or the account, can decide whether this customer may touch this one.

The smallest primitive: what a gateway check actually decides#

The example's API gateway is services.py Platform.gateway, whose docstring is its contract: "Token valid, audience, route scope. Never the record." The snippet sends five tokens to it, then the broker's token through the full path for two quotes. It shows which questions the gateway can answer; it does not demonstrate any gateway product.

The tokens are HMAC-signed demo tokens with keys that say they are not secrets; use a maintained library and a real identity provider in production.

import services
import tokens
from clock import START_EPOCH_S as NOW

p = services.Platform(NOW)
broker = tokens.issue_for("u-broker-n1", aud=tokens.API_AUD, now=NOW)
wrong_aud = tokens.issue_for("u-broker-n1", aud=tokens.ASSESSMENT_AUD, now=NOW)
underwriter = tokens.issue_for("u-uw-w1", aud=tokens.API_AUD, now=NOW)

print("What the gateway can decide (token, audience, route scope):")
for label, tok, route in [("broker token", broker, "GET /quotes/{id}"),
                          ("assessment-audience token", wrong_aud, "GET /quotes/{id}"),
                          ("broker token, decision route", broker, "POST /submissions/{id}/decision"),
                          ("underwriter token, decision route", underwriter, "POST /submissions/{id}/decision"),
                          ("peer underwriter, decision route", tokens.issue_for("u-uw-w2", aud=tokens.API_AUD, now=NOW),
                           "POST /submissions/{id}/decision")]:
    g = p.gateway(tok, route, "req-gw")
    print(f"  {label:<34} {route:<32} valid={g['valid']!s:<5} first_failed={g['first_failed']}")

print("What only the quote service can decide (the record):")
for rid in ("Q-5531", "Q-6620"):
    r = p.read_quote(broker, rid, "req-" + rid)
    print(f"  broker reads {rid}: gateway valid={r['gateway']['valid']}  service -> {r['status']} {r['decision']['rule']}")

Run in a scratch copy of examples/uw-auth on 2026-11-18 (the agent here is a scripted stand-in, so these results show how the access controls work, not how good any model is):

What the gateway can decide (token, audience, route scope):
  broker token                       GET /quotes/{id}                 valid=True  first_failed=None
  assessment-audience token          GET /quotes/{id}                 valid=False first_failed=aud
  broker token, decision route       POST /submissions/{id}/decision  valid=False first_failed=scope
  underwriter token, decision route  POST /submissions/{id}/decision  valid=True  first_failed=None
  peer underwriter, decision route   POST /submissions/{id}/decision  valid=True  first_failed=None
What only the quote service can decide (the record):
  broker reads Q-5531: gateway valid=True  service -> 200 R-AZ-03
  broker reads Q-6620: gateway valid=True  service -> 404 R-AZ-03

The gateway did useful work: it cheaply refused a token minted for the assessment service (UW-A05, wrong audience) and a broker's token on the decision route (no uw.decide). But the assigned and the peer underwriter pass identically, because both hold uw.decide. That is the opening review in one table.

The last two lines make the same point for reads: the broker's token passes the gateway for both quotes, and only the quote service, after loading the record, answers 200 for Q-5531 (her tenant) and 404 for Q-6620 (tenant brk-south), without revealing it exists. The broker sees quote Q-5531; the insurer works the same record as submission SUB-1004; the decision is made on the record both ids point to.

What each layer can see, and what it cannot#

Read the last column first.

LayerWho runs itWhat it verifies wellWhat it cannot know
edgenetwork or platform teamTLS to the client, volume, routingwho the caller is beyond an address
WAFsecurity operationsknown attack shapes in the byteswhether a well-formed request is allowed
API gatewayplatform teamtoken signature, issuer, audience, expiry, route scope, rate limitsthe record: tenant, unit, assignment
service meshplatform teamwhich workload calls which, by mTLS identity; coarse path rulesthe person behind the call, and the record
the service (with the policy decision point)the team that owns the datathis subject, this action, this record, nownothing it needs: it loads the record
the repositorythe team that owns the dataa tenant predicate from the verified subjectper-person intent beyond the predicate

Diagram: The peer underwriter's decision on SUB-1004 · every layer passes except the one that sees the record

Rows are the layers the request crosses, from the internet edge to the quote service. Columns are what each layer sees, what it decides, and what it cannot know. Read down the middle column: edge, WAF, API gateway and mesh all pass, correctly, because nothing they can see is wrong. Only the quote service, asking the policy decision point with the record loaded, refuses: u-uw-w2 is not assigned to SUB-1004, 403, rule R-AZ-09 (UW-A09).

  1. Edge
    1. HTTPS from a known address: The public TLS connection, the hostname and the request rate.
    2. pass: Normal traffic at a normal rate.
    3. who the person is: An address is not an identity.
  2. WAF
    1. request bytes: Headers and a JSON body.
    2. pass: No injection or malformed content.
    3. business rules: A legitimate and an illegitimate decision look identical in bytes.
  3. API gateway
    1. access token + route: Signature, issuer, audience, expiry, scope and the route template.
    2. pass: The token is genuine and the route scope is present.
    3. the record's assigned underwriter: Both underwriters of the unit hold uw.decide; the gateway cannot tell them apart.
  4. Service mesh
    1. workload identity + path: The cockpit BFF's verified workload certificate and the HTTP path.
    2. pass: The cockpit BFF is the allowed caller for decisions.
    3. the person and the record: The mesh knows which program calls, not which underwriter, and never reads the submission.
  5. Quote service + PDP
    1. subject + record: The verified person, client, step-up and the record's assignment.
    2. deny 403: R-AZ-09 requires the assigned underwriter. Nothing is written.
    3. nothing it needs: It loads the record it decides on. Under authz-2026.10.3, which lacked this rule, nothing would have stopped the decision.

Every row of the diagram ends in "pass" except the one that sees the record. A layer's "pass" means "nothing I can see is wrong", never "this action is allowed".

Common confusion. "Authorization at the gateway" can mean a coarse scope per route, a fine gateway job, or a decision on the record, which the gateway cannot make without loading the record. Enforcement owns that placement argument.

Zero trust, from NIST SP 800-207#

Zero trust is easiest to understand through the assumption it rejects. Old network design treated the inside of the network as safe: once past the firewall, a request was trusted. Guideline (NIST SP 800-207, "Zero Trust Architecture", August 2020, final, read 2026-11-18): "Zero trust assumes there is no implicit trust granted to assets or user accounts" based on network location or ownership, and "an enterprise should not rely on implied trustworthiness wherein if the subject has met a base authentication level (e.g., logging into an asset), all subsequent resource requests are assumed to be equally valid."

Zero trust is therefore not a product or a layer. It is a set of rules for every access: decide per request, from verified identity and current context, as close to the resource as possible. NIST states seven tenets. Here they are, quoted exactly, each applied to the peer underwriter's request:

Tenet (NIST SP 800-207 §2.1, exact)Applied to the decision on SUB-1004Who acts
1. "All data sources and computing services are considered resources."Submission SUB-1004 is a resource, and so is the quote service's decision endpoint.the quote service owns both
2. "All communication is secured regardless of network location."The cockpit BFF reaches the quote service over mTLS, although both are inside the private network.the mesh or the services' own TLS
3. "Access to individual enterprise resources is granted on a per-session basis."The decision on SUB-1004 is one access; access to SUB-1007 grants nothing here.the policy decision point, per request
4. "Access to resources is determined by dynamic policy", "including the observable state of client identity, application/service, and the requesting asset", and "may include other behavioral and environmental attributes."Identity u-uw-w2, client svc-cockpit-bff, a phishing-resistant login within 300 seconds, and the record's assignment all feed R-AZ-09.the policy decision point, with the directory and identity provider as information sources
5. "The enterprise monitors and measures the integrity and security posture of all owned and associated assets."The underwriter's laptop and the cockpit BFF's workload are known, managed and current.security operations, the platform team
6. "All resource authentication and authorization are dynamic and strictly enforced before access is allowed."Nothing is written until the quote service has the decision: 403, nothing written.the quote service as enforcement point
7. "The enterprise collects as much information as possible about the current state of assets, network infrastructure and communications and uses it to improve its security posture."The denial is an audit record with rule and policy version; repeated denials feed alerts.the quote service writes; security operations reads

(Tenet 4 is quoted in three parts.)

Two things stand out. Tenets 3, 4 and 6 are about the record-level decision, which none of the outer layers can make. And tenet 2 says communication is secured "regardless of network location", which is why the private network in the opening slide adds no trust of its own. Guideline (NIST SP 800-207 §2.2): "The entire enterprise private network is not considered an implicit trust zone."

The tenets apply inside an organization or with partners, "not to anonymous public or consumer-facing business processes", and SP 800-207 does not define application-level business authorization. The record rule R-AZ-09 is this site's example of what fills that space.

PE, PA and PEP on the same request#

NIST names three logical components. The policy engine (PE) is "responsible for the ultimate decision to grant access to a resource for a given subject". The policy administrator (PA) is "responsible for establishing and/or shutting down the communication path between a subject and a resource (via commands to relevant PEPs)". The policy enforcement point (PEP) is "responsible for enabling, monitoring, and eventually terminating connections". Together, the PE and PA form NIST's policy decision point.

Diagram: NIST SP 800-207 roles on one request · PEP asks, PE decides, PA opens or closes the path

Read left to right. The peer underwriter, through the cockpit BFF, is the subject. Information sources feed the decision: the directory with assignments, the identity provider with the login's strength, posture signals about the device and workload. The quote service is the policy enforcement point: it holds the request and asks. pdp.decide plays the policy engine and returns deny with rule R-AZ-09. The policy administrator role, opening or shutting paths, is shared by the mesh and the identity provider's session control. Nothing reaches the submission until the decision arrives.

  1. Subject and signals
    1. subject: The person and the client, both verified: token for the person, mTLS for the BFF.
    2. information sources: Assignments, unit, login strength and time, device and workload state.
  2. Decide
    1. PEP: Holds the request, asks, obeys. NIST: enables, monitors and terminates connections.
    2. PE: Makes the decision for this subject and this resource, and logs it.
    3. PA: Opens or shuts the communication path through enforcement points.
  3. Resource
    1. SUB-1004: Reached only after an allow. Here nothing is written, and the denial is an audit record.

The diagram maps those roles onto the example. The quote service is the PEP for the decision; pdp.decide plays the PE; and the PA's job, opening or closing a path, is shared between the mesh (which connections may exist) and the identity provider (which sessions remain valid). Note the vocabulary trap that Enforcement explains: NIST's policy administrator opens sessions at run time, while XACML's policy administration point authors rules.

Posture and context: signals that inform the decision#

Tenets 4 and 5 add a word that is new to many application teams. Device posture is the measured state of the machine making a request: managed or not, disk encrypted, operating system patched, security agent running. Guideline (NIST SP 800-207 §2.2): "Subject credentials alone are insufficient for device authentication to an enterprise resource." A stolen password on an unknown laptop is a different request from the same password on the underwriter's managed laptop.

In the example the closest signal is authentication context: decision.record requires acr phishing-resistant within 300 seconds. A deployment could add a managed-device claim at sign-in and, for workloads, an image digest that passed review. Each signal arrives from a verified source, becomes an attribute of the subject, and the policy reads it.

Posture is an input, never the decision. A perfectly patched, managed laptop does not make the peer underwriter assigned to SUB-1004. This site's recommendation: use posture to refuse or step up risky requests early (an unmanaged device cannot reach the cockpit at all; a stale login must step up), and leave the record decision to the policy, where posture is one attribute among several.

Production pitfall. Posture signals go stale like any other cached fact. A device that was compliant at 08:00 and had its security agent stopped at 09:00 is still "compliant" in a token issued at 08:00. Keep posture-bearing tokens short-lived, and re-evaluate at sensitive actions, as tenet 6 expects with "possible reauthentication and reauthorization" throughout transactions.

Service mesh: identity yes, business authorization no#

A service mesh gives every workload an identity and encrypts every hop without changing application code: a large gain for tenet 2, and the end of forged headers on hops it covers (Workload identity). How far does its authorization reach?

Product (Istio, as documented on 2026-11-18): "Istio securely provisions strong identities to every workload with X.509 certificates." Peer authentication modes are PERMISSIVE ("Workloads accept both mutual TLS and plain text traffic"), STRICT ("Workloads only accept mutual TLS traffic") and DISABLE; "Mesh-wide peer authentication policies with an unset mode use the PERMISSIVE mode by default." Authorization policies provide "mesh-, namespace-, and workload-wide access control"; rules can match source principals and namespaces, operation methods and paths, and conditions such as request.auth.claims[iss]. And: "For workloads without authorization policies applied, Istio allows all requests." The page read does not mention SPIFFE; its example principal is cluster.local/ns/default/sa/curl.

Two facts deserve attention. The default mesh-wide mode accepts plain text, so "we have a mesh" does not mean "every hop is mTLS" until someone sets STRICT. And a workload with no authorization policy accepts every caller. Then look at what a rule can match: caller, path, method, token claim. Nothing there is the assigned underwriter of SUB-1004; the mesh never reads the submission.

This site's recommendation: use the mesh for identity and coarse caller rules (the cockpit BFF alone may reach the decision path), set STRICT deliberately, and keep the record decision in the service. Mesh rules and service checks are two layers of defense, not one check written twice.

Private networks: a smaller blast radius, not an identity#

The private network keeps the quote service off the internet. It cannot say who is calling. Guideline (NIST SP 800-207): an implicit trust zone is "an area where all the entities are trusted to at least the level of the last PDP/PEP gateway", and it "must be as small as possible."

The four-hop lab's private preset puts a caller inside the network with no credential. The quote service still answers 401, from rule R-AZ-01, because being inside adds no identity. Primitives showed what happens when a service does trust the network (UW-A04); Private environments owns the full design of private networks with their residual risks.

BOLA through the layers: the lab#

The failure the opening review was worried about has a name. Guideline (OWASP API Security Top 10 2023, read 2026-11-18): API1 is Broken Object Level Authorization (BOLA): "Object level authorization is an access control mechanism that is usually implemented at the code level." Guideline (OWASP Microservices Security Cheat Sheet, read 2026-11-18): "Gateway checks complement these controls; they do not establish that a downstream operation is authorized." and "Each service must enforce access to its protected operations, including internal calls."

The lab starts on the gateway-only preset for the other tenant's quote: the broker u-broker-n1 asks for Q-6620, the gateway passes her valid token, and the quote service, trusting the gateway, returns the row. Switch the gateway-only toggle off to watch the quote service ask the policy decision point; switch on "private network" to see a caller with no credential refused. Enforcement walks the same preset hop by hop; here, notice that every outer layer of the opening slide would sit in hop 2 and change nothing in hop 3.

PresetOwn quote Q-5531Other tenant's Q-6620What it shows
default200 (PDP rule R-AZ-03)404 (PDP rule R-AZ-03)A valid token is not a permission: the service asked the PDP about this quote and answered 404, without revealing it exists.
bola200 (nobody checked the record)200, leaked (nobody checked the record)BOLA: the gateway passed a valid token with the right scope, and nobody checked the record.
private401 (PDP rule R-AZ-01)401 (PDP rule R-AZ-01)Being inside the network adds no identity: the service still needs a credential and a decision on the record.
forged200, returned to an unauthenticated script (nobody decided)200, leaked (nobody decided)A plain x-app-id header is metadata, not proof: the service that trusted it returned the quote.

Defense in depth at every service boundary#

Defense in depth means independent layers, each able to stop a failure the others miss. The word that matters is independent: two layers that both check the token's scope are one layer twice. In the example, the layers check different things.

BoundaryCheckStops
edge and WAFTLS, volume, attack shapesfloods, malformed and plainly hostile requests
API gatewaytoken signature, issuer, audience, expiry, route scope, rate limitstrangers, tokens for another API (UW-A05), wrong route scope
mesh or service mTLSverified workload identity, caller allowlistforged callers (UW-A04), workloads calling paths they never should
service and policy decision pointsubject, action, record, context; deny by default; fail closedBOLA (UW-A03), the peer underwriter (UW-A09), cross-tenant reads (UW-A02)
repositorytenant predicate from the verified subjecta forgotten service check returning a foreign row
auditdurable record of every decision, without secretssilent abuse, and the week-long investigation in Primitives

Every service boundary carries its own row, including internal ones. When the assessment service is called by the tool server, it validates its own audience, verifies its caller and asks the policy decision point about the submission, exactly as the quote service does for the cockpit. "The gateway already checked" is never a reason for a service to skip its check, because the gateway did not check the record and may not be on the path at all.

Choosing what each layer does#

The recurring question of this site applies: what is the simplest credible design, and what would make it grow?

SituationSimplest credible designGrow when
one public API, one servicemanaged edge with TLS, an API gateway validating tokens and route scopes, record checks in the servicemore services: add per-service checks before adding layers
several internal services, one teamthe above, plus mTLS between services and a caller allowlist at each receiverseveral teams or clusters: a mesh or workload identity system for identity, a shared policy decision point for rules
enterprise platform with regulated dataedge, WAF, gateway, mesh in STRICT mode, private networking, posture at sign-in, per-service record checks, decision logs to security operationspartners and agents: token exchange per hop, certificate-bound tokens
agent tools behind a gatewaythe tool gateway checks the agent's identity and task token; each downstream service still decides on the recordmany hosts share the tools: see MCP
What this is not. This page does not teach rate limiting, flood protection or firewall rule writing; those keep systems available and belong with platform operations (reliable.sammuthu.com). Enforceable checks around model inputs and outputs, including prompt injection defenses, belong to guardrails.sammuthu.com. This page asks only what each layer proves about identity and authority.
In a coding agent. The same layering applies to a coding agent's path to production. The repository's branch protection is the gateway: it requires a review and passing checks for every pull request. The deployment pipeline is the service: it federates to the cloud with OIDC and a narrowly scoped role, and only for the reviewed commit. The agent's sandbox sits outside both and holds no production credential. Coding agents owns the details.

Security notes#

Monday checklist#

  1. Pick one sensitive request and write, for each layer it crosses, what that layer checks and what it cannot know. If no layer loads the record, that is the finding.
  2. Confirm every service validates the token's audience and asks the policy decision point on the record, even for calls that came through the gateway.
  3. Check your mesh's mTLS mode and list workloads with no authorization policy; under Istio's documented default, those accept every caller.
  4. From inside the private network, send a request with no credential to one service. Expect 401 and an audit record that names the caller as unknown.
  5. Search for services that read identity from gateway-set headers, and check that the service verifies the gateway's own identity on the connection.

Exercises#

1. A team proposes moving the assignment check for decision.record into an API gateway plugin "so all authorization is in one place". The plugin sees the token and the URL. What will it decide for the peer underwriter on SUB-1004?

AnswerIt cannot see the assignment

It will pass the peer underwriter, because the token carries uw.decide and the URL names SUB-1004, but the assignment lives on the record. Unless the plugin loads the record's attributes, it is the coarse check again. Centralize the rules; keep the enforcement with the service.

2. The mesh is in STRICT mode and only the cockpit BFF may call the decision path. Which tenant-isolation or assignment failure can still happen?

AnswerAny person using the cockpit

Any underwriter who can use the cockpit can send a decision for any submission through it. The mesh proves the cockpit BFF is calling; only the policy decision point checks that the person is assigned (UW-A09).

3. Which NIST SP 800-207 tenet does the private-network caller in the lab's private preset illustrate, and what does the quote service answer?

AnswerTenet 2; 401

Tenet 2, "All communication is secured regardless of network location", together with §2.2, which says the private network is not an implicit trust zone. The quote service answers 401 (rule R-AZ-01): no credential, no identity.

Advanced perspective#

Identity headers from the gateway to the serviceThe gateway validated the token; what does the service receive?

Many gateways validate a token and then forward identity to the service as headers (x-user-id, x-tenant), so services do not repeat the work. This recreates UW-A04 unless three conditions hold: the service accepts those headers only from a connection it has authenticated as the gateway (mTLS identity), the gateway removes any incoming header of the same name before adding its own, and no other path reaches the service. Even then, the service trusts the gateway completely for identity. This site's recommendation: forward the original token, or a token exchanged for the service's audience, and let the service validate it locally; validation is cheap with cached keys. If headers are unavoidable, sign them with a short life and an audience, and treat the gateway's signing key as a credential to protect and rotate.

Moving a mesh from permissive to strictThe default is a migration aid, not a security setting

A permissive mode exists so teams can enable a mesh without breaking callers that do not yet speak mTLS. It is the right starting point and the wrong resting point: while it is on, a caller outside the mesh can still reach the workload in plain text, without a verified identity, and any allowlist keyed on mesh identity has nothing to match. Plan the move per workload: observe which callers arrive without mTLS, fix or retire them, switch that workload to strict, and alert if plain-text connections reappear. Pair the switch with the workload's first authorization policy, because under Istio's documented behaviour a workload without one allows all requests. Record which workloads are strict in the same inventory that lists certificate expiry dates.

Zero trust for agents: the tool gateway is a PEP, not the decisionModel output never reaches past a policy check

An agent platform usually adds one more layer: a tool gateway (or MCP server) between the agent application and the services. It is an enforcement point in NIST's sense. It authenticates the agent's workload, validates the delegated task token, checks that the requested tool is in the task, and refuses widening. In the example it refuses the injected record_underwriter_decision at the scope check (UW-A10). It cannot replace the services' own record checks, for the same reason the API gateway cannot: when it lets get_roof_assessment through, the assessment service still asks whether this agent, acting for this underwriter, may read this submission. Tenet 6 applies literally: authorization is "strictly enforced before access is allowed", at every resource, and the model's output is a request, never a decision. Agents and MCP own those designs.

When a layer is down: fail closed without failing everythingWhich layers may degrade, and which may not

Each layer needs a defined answer for its own outage. An edge or WAF outage is an availability event: traffic stops or reroutes. A gateway that cannot fetch signing keys should reject tokens it cannot validate, and keep serving with cached keys for their cache life. A policy decision point that is unreachable must not turn into "allow": in the example, with the policy decision point down, writes get 503 and nothing is written; with the identity provider down, writes get 401, while reads with an already valid token continue (UW-A23). The dangerous pattern is the outer layer that "fails open" to keep traffic flowing, then becomes the only check because the service trusted it. Write the outage behaviour of each layer into its runbook and test it; Operations and reliable.sammuthu.com own the recovery side.

In one breath#

The edge, the firewall, the API gateway and the service mesh each verify something real: traffic, request shape, token and route, workload identity. None of them sees the record, so none of them can decide whether this caller may act on this submission. Zero trust, in NIST's words, means no implicit trust from network location and a dynamic, strictly enforced decision per access, which in practice is the check each service makes on its own records, with the outer layers refusing early what they can see is wrong. Defense in depth works only when the layers check different things.

So far every caller in this story made a synchronous request and waited for an answer. The insurer's platform also publishes events: a submission was created, a recommendation was recorded. Producers and consumers of those events are principals too, the messages outlive the request that caused them, and a replay hours later must still be authorized. Kafka applies everything so far to an event stream.