Securing AI Agents: Zero-Trust Identity and Authorization for MCP and A2A
What stops an agent that passes every zero-trust check from working for an attacker?
Contents
An agent that calls an API on someone’s behalf brings back a question OAuth answered for web apps fifteen years ago: whose authority is being exercised? For web apps, a registered client acted for a signed-in user, one hop from the API. An agent’s request is a chain. A person delegates to an agent product, a running instance of it decides to call a tool, the tool’s server calls an API, and the agent may hand part of the job to another agent that does the same. At every hop the receiver has to establish four things from what arrives: which software sent it, which instance, on whose behalf, and with how much of that party’s authority. Agents change one thing: all four must survive every hop, for a caller that chooses its own next action and reads untrusted text while it does.
Four failures follow from getting it wrong. Norm Hardy named the first in 1988: a confused deputy uses its own authority for someone who shouldn’t have it.1 The second is a stolen or replayed token, used by someone it wasn’t issued to. In the third, authority grows as it moves, and a sub-agent, a tool server or a gateway ends up able to do more than the person at the top of the chain could. The fourth is the oldest: an insider, a person or now an agent, misusing access they legitimately hold. Zero trust’s answer, deciding every request as if the network were compromised, catches much of the first three. It doesn’t catch an agent that passes every check while doing an attacker’s work, or a person who controls the checks.
Who is calling
Which software? Registration answers this, and for agents it has settled quickly. MCP first adopted Dynamic Client Registration (RFC 7591) because a client meets servers it has never seen,2 and it went badly at scale: clients registered a new client_id at every login, and servers needed rate limiting against unbounded growth.3 The MCP revision of 28 July 2026 deprecated DCR in favour of Client ID Metadata Documents.4 With them, the client_id is an HTTPS URL, the authorization server fetches the client’s metadata from it, and trust in the client becomes trust in whoever controls that DNS name.
Most identity providers now accept metadata documents.5 Microsoft Entra ID added them in public preview in October 2026, representing each such client as an agent identity in the tenant, with narrow limits: user-present delegated flows only, no client credentials grant, no confidential-client authentication, and narrow default scopes, with pre-registration still the recommended path.6 A confidential agent on Entra is pre-registered or sits behind a broker that acts as the authorization server for MCP, which quietly moves part of identity into whatever that broker is.
Doesn’t the metadata document already give the client a key? It can. The document is public, so the draft that defines it forbids shared secrets but allows public keys, inline as jwks or by reference as jwks_uri, for private_key_jwt.7 That proves the caller holds a key the publisher vouched for, and says nothing about which running copy holds it. In the simplest deployment every instance shares one private key, readable by anything that can read the deployment’s secrets, an agent talked into printing its environment included.
Which instance? One product runs as many workloads, each serving many sessions. Workload identity tells the workloads apart, as it already does for services, and tokens carry the session. SPIFFE gives each workload an identity document, an SVID, as an X.509 certificate for mutual TLS or as a signed JWT. SPIRE, its reference implementation, issues one only after checking where the workload runs, its node, pod or process, and by default a certificate is valid for an hour and a JWT for five minutes, renewed automatically, so there’s no long-lived key to copy.8
How do the two fit together? An OAuth working-group draft composes them: a metadata document can declare a spiffe_id pattern for the workloads that may authenticate as the client and a spiffe_bundle_endpoint for the keys that verify them.9 What that proves depends on where the bundle comes from. Fetched from the document, it proves only that whoever controls the client_id URL vouches for the key; the SVID proves which instance is calling only to a server that trusts the SPIFFE trust domain out of band. And a JWT-SVID works for anyone who copies it until it expires, while an X.509 SVID over mutual TLS proves possession of a key that instance alone holds.
Most agents in production use neither. A local MCP server launched over standard input and output takes its credentials from the environment instead of running OAuth, which in practice means an API key in a variable.10 Agents on a hyperscaler get their instance identity from the cloud’s own workload identity, which does SPIFFE’s job inside one provider.11 Agents that drive a browser are only starting to sign their requests, and then only to say which operator’s bot is calling.12 The further an estate is from an OAuth-speaking client, the more of the work falls to the traffic plane.
On whose behalf? Services never had to track this party: the user. A user delegates to an agent through the authorization code flow with PKCE, and the resulting token’s subject is the user and its client is the agent. In an enterprise, asking every user to consent to every MCP server is unworkable, so the identity provider exchanges the user’s single sign-on token for an identity assertion that the downstream authorization server accepts instead. The draft, informally Cross-App Access, is in the OAuth working group, MCP carries it as an extension, and Okta’s Agent SSO implements it.1314 Delegation itself is data. OAuth Token Exchange (RFC 8693) records in an act claim that one party is acting for another, nests act claims to express a chain, and uses may_act to say in advance which parties may act for a subject,15 so a token can say “the user, via this agent, via this tool server”. Consumers decide on the top-level claims and the current actor, the nested chain is for audit, and any narrowing it implies has to be done by the authorization server that issued each token.
Tokens that only work where they’re meant to
An MCP server is an OAuth resource server. The client names the server it wants a token for with a resource indicator (RFC 8707), and the server rejects any token not issued for it.4 That audience binding is what stops a token issued for a low-risk tool being replayed against a high-risk one.
Why can’t a tool server pass the token along? Because it would become a confused deputy for every caller. An MCP server “MUST NOT pass through the token it received” to an upstream API; the upstream token is a separate one, from the upstream’s authorization server.16 How the server gets it depends on who runs that authorization server.
- Inside your own domain: token exchange, with the user as subject and the tool server as current actor. RFC 8693 doesn’t require the result to be narrower, so the authorization server has to refuse anything wider.
- Across domains that trust each other: identity chaining or an identity assertion grant.17
- Third-party SaaS with no trust relationship, the GitHub, Salesforce or Google APIs most tools wrap: a separate grant per user per upstream, which makes the tool server, or the gateway in front of it, a store of users’ upstream refresh tokens. Most deployments are here, and it’s where the confused deputy actually lives.
What stops a stolen token being used? Nothing, if it’s a bearer token, and agents are unusually good at leaking them. Certificate-bound tokens over mutual TLS (RFC 8705) and DPoP, which signs each request with a key whose thumbprint is in the token (RFC 9449), bind a token to a key the holder must prove it has.18 Both work only if the key lives outside the model, in the runtime or a sidecar that attaches credentials to outbound calls. The model chooses actions, and something it can’t read holds the keys. Binding stops theft and replay. It doesn’t stop an injected instruction from getting the runtime to make a correctly signed call, which is what authorizing the call’s arguments is for.
Lifetimes measured in minutes are what make theft survivable, and agent tasks run for hours. The runtime refreshes or re-exchanges on the agent’s behalf, which keeps the access token’s window short and makes the refresh token the long-lived credential in the system. Where one is issued, it should be sender-constrained or rotated on use, and it’s what revocation has to reach.
Authorization: from scopes to task-bounded authority
A scope can’t bound an agent as tightly as its task requires. A token without the scopes an operation requires gets a 403 with error="insufficient_scope", and the client can come back for more, a step-up.4 But orders:write can’t express “refunds up to $500, on this customer’s orders, while this support ticket is open”. Rich Authorization Requests (RFC 9396) can: an authorization_details parameter carries typed JSON objects naming actions, locations, data types and fields such as an amount or an identifier, and the authorization server returns what it granted.19 Payments got there first: the Agent Payments Protocol’s mandates are signed credentials recording a user’s constraints for a purchase,20 task-bounded authority with a merchant at the end of it. Outside payments, task-scoped authority is rarely used for agents yet.
Why must the server authorize arguments as well as callers? Because the arguments come from a model that may have just read a hostile web page, email or document. Prompt injection turns the agent itself into a confused deputy: it holds the user’s authority and acts on an attacker’s instructions. Authenticating the caller can’t detect that, since the caller is genuine. What limits it is checking each request against what the task needs, so an agent working a refund ticket can’t be talked into exporting the customer table even though the user could. An agent’s effective permission is the intersection of what the user may do, what the agent may do, and what the task requires. Tokens carry the first two as subject, client and scopes. The third is what Rich Authorization Requests and policy have to supply, and today it mostly lives in application code.
Each of the four access models in common use covers part of it:
| Model | Decides on | Fits agents for | Strains when |
|---|---|---|---|
| Role-based (RBAC) | Fixed roles mapped to permissions | Admission: which tools an agent can see at all | Roles multiply per agent, task and tenant |
| Attribute-based (ABAC) | Attributes of caller, resource, action and environment | Runtime facts: the delegating user, the task, the budget left, whether input came from an untrusted source | Policies get hard to audit without a language for them |
| Relationship-based (ReBAC) | Relationships in a graph, as in Google’s Zanzibar21 | Data access when the agent acts for a user who can see some documents and not others | The relationship graph has to stay current |
| Policy-based (PBAC) | Policies as code in a decision service, such as OPA’s Rego or Cedar22 | Managing all of the above: one policy, reviewed like code, evaluated everywhere | An operating model, usually over attributes; needs a team to own it |
Agents push toward attributes and policy because the facts that decide a request exist only at runtime, and the task, the most important of them, is native to none of the four. Roles can’t keep up. With an illustrative 50 agents, 20 task types and 30 tenants,
\[R = a \times t \times n = 50 \times 20 \times 30 = 30{,}000\]That’s thirty thousand role bindings to review, where a policy parameterised on agent, task and tenant is one rule. Policy-based control is how the other three are run at scale: as code in one repository, reviewed, tested and evaluated by a decision service. The choice of engine is still open. OPA is the established general-purpose one, and Cedar, already applied to chains of agents,23 was designed to be analysable, so a tool can prove what a policy forbids,24 which matters when the question is what an agent can’t do.
What should the tree of agents carry? An orchestrator that spawns sub-agents builds a tree, and the question is where a sub-agent’s authority comes from. Three answers are in use.
- The tree carries permissions. A child inherits its parent’s access, or, in the org-chart version, a supervising agent inherits everything its children can reach. It needs the least administration and matches how orchestrators work. It also gives every child everything whatever its sub-task and gathers privilege at the top: authority grows as it moves, by design.
- The tree carries ownership only. Each agent’s permissions come straight from policy, and the tree records who is accountable for whom. It’s simple and auditable, and a sub-agent can hold more authority than the agent that started it.
- The tree carries delegation and ownership. Central policy sets each agent’s ceiling, what that kind of agent could ever do. Delegation can only narrow it: a child’s authority is its own ceiling intersected with what its parent hands down for the sub-task, a subset of scopes, a smaller budget and a shorter lifetime at each level. It costs a token exchange per hop, an authorization server that refuses to widen, and a sub-task described well enough to narrow.
We take the third, and owning an agent then means controlling it without inheriting what it can reach. It’s the property capability systems were built on and macaroons made portable, where anyone holding a credential can add caveats and nobody can remove them.25 Token exchange delivers it if the authorization server enforces the intersection at every exchange. Each token’s top-level scopes and authorization details are then the intersection, so every consumer, the traffic plane included, enforces them like any other claim, and the nested act chain records how they got there.
Ownership is a different kind of authority: authority over an agent, to inspect it, pause it, cancel it or revoke it, held by its parent and its human owner. It also carries accountability, every agent traced to a person and a sponsoring team, and keeping it separate from delegation stops a supervising agent collecting everything below it. Agents with no parent, a scheduled job with no user behind it, get standing grants from policy, at the ceiling and no higher.
In the Agent2Agent protocol (version 1.0), an agent’s Agent Card declares the security schemes a caller must satisfy and can be signed. Authorization is left to the implementation, and an agent that needs more authority mid-task moves the task to TASK_STATE_AUTH_REQUIRED and receives it out of band.26 An A2A agent decides what to do, may delegate further and may run for hours, so the intersection of user, agent and task has to be re-evaluated at every hop, and the task description has to travel with the request.
Inside one trust domain, transaction tokens carry it: a signed JWT minted at the edge for one call chain, lasting minutes or less, never usable as an access token, whose scope captures the transaction’s purpose “as narrowly as possible” and whose context no replacement may expand.27 Across domains, what’s left is identity chaining and assertion grants between authorization servers that trust each other, which works where organisations have set it up and nowhere else.
Who governs the policy
An auditor’s first question about agents is which agents can reach this system, for whom, and under what conditions, and in most estates nobody can answer it, because the rules are written separately in each service. They cut across every service: which agents may reach which tools and APIs, how authority narrows as it’s delegated, what a task may touch, how much budget it may spend, which data may leave through a model call, and which actions need a human. Written by each team, the same rule exists a hundred times, a little different each time. Suppose each copy has a small chance \(p\) of being looser than intended, independently of the others. Across \(n\) services the chance that at least one is looser is
\[1 - (1-p)^{n} = 1 - 0.98^{100} \approx 0.87\]for an illustrative 2% per copy and a hundred services. An attacker needs only that one. A central policy fails differently: one wrong rule is wrong everywhere at once, so it has to be reviewable and testable in a way a hundred copies never are.
The case for leaving authorization in the services is real, and it’s why the last generation of systems was built that way. A service knows its data, its tenants and its edge cases; its team ships rule changes without waiting on anyone; and there’s no central gateway to fail, slow every call, or be compromised once for everyone. It’s more autonomous. It’s also notoriously more difficult to govern, and agents make it harder, because they’re new callers arriving at every service at once with authority that has to be narrowed consistently everywhere.
The alternative is enforcement in the traffic plane, the one place every model and tool call can be made to cross. A gateway there can authenticate, exchange tokens, hold the tool allowlist, evaluate policy against the token’s claims and the call’s arguments, meter budgets, filter data on the way out, and keep one audit log that covers third-party tools nobody can change. Where it also acts as the authorization server, it should still mint tokens whose audience is each upstream server, since a single gateway audience recreates the replay problem resource indicators solve.
That’s the architecture NIST’s zero-trust standard describes: a policy decision point, enforcement points in the path of every request, and least-privilege access decided per request “in the face of a network viewed as compromised”.28 Two parts of it matter for agents. An enforcement point can’t apply policy beyond its place in the flow, so zero trust moves enforcement as close to the resource as it can: the services behind the gateway trust only a gateway-minted token and check again against the same decision point. And zero trust decides whether a subject may make a request, a test a prompt-injected agent passes: it’s authenticated, authorized and inside policy while doing an attacker’s work. An attacker who can “induce or coerce” a software agent into a task the attacker isn’t privileged to perform is already in the standard’s threat model.28 Task-bounded authority is what agents add on top.
Central enforcement comes with a precondition. The traffic plane governs only traffic that crosses it, so services have to accept agent calls only through it, enforced by network policy and by rejecting tokens the gateway didn’t mint, or the central policy is advisory. The design starts with agents because that’s where authority multiplies fastest, and none of it depends on the caller being one: batch jobs, human front ends and service-to-service calls can cross the same plane under the same policy, so an estate that brings them over governs one system where it would otherwise run two. It also makes the gateway’s own credentials the most valuable in the estate, and if it fronts third-party APIs, the vault for users’ upstream refresh tokens too. Those need the narrowest scopes and shortest lifetimes of anything there, or the gateway becomes the confused deputy it exists to prevent.
That leaves the rules that depend on data. Whether this user’s agent may read invoice 123 depends on who owns invoice 123, and that used to settle the debate in the services’ favour. The price was authorization rules inside domain code, polluting the domain and repeated as boilerplate in every service. Agents change the trade-off, because a tool call is more legible to a gateway than a REST call ever was: it names the tool and carries typed arguments against a declared JSON Schema,29 so the action, and often the resource, is explicit in the request. Three models are in use for deciding on it centrally, and they differ in where the data lives.
- A central relationship store. Applications write relationships such as “user A owns invoice 123” into one authorization system, and any enforcement point asks it. That’s Zanzibar’s model,21 and AuthZed’s SpiceDB and the CNCF’s OpenFGA are open-source systems built on it; a gateway can consult one on every request, through Envoy’s external authorization filter for example.30 The cost is keeping the copy fresh. A check against stale relationships admits the user whose access was just removed, Zanzibar’s “new enemy” problem, and SpiceDB’s default check mode, for one, tolerates that window. Its fix, a consistency token stored with the resource, lives in the service’s database, where the gateway never sees it.31 The relationships are data, so a policy review and Cedar’s analysis, which reasons over policies for any data they might meet,24 cover the rules and not the grants. The store should let each service write relationships only for its own resource types, and audit every write.
- Central policy, data from the request. The policy decides from the token, the tool and its arguments, plus attributes fetched at request time. It’s what AWS ships for agents: AgentCore’s gateway evaluates Cedar on every tool call, with the principal from the token, an action per tool, and conditions on arguments such as an amount below a limit.32 It needs no copy of the data, and it can’t decide anything the request doesn’t reveal.
- Central policy, local data. The policy is written once and compiled against the service’s own database. OPA’s partial evaluation turns it into a SQL condition, and Oso’s local authorization generates the query from a schema without reading the data.33 Nothing is copied, and the cost moves into the service: someone maps the policy’s facts to its tables, and only some databases are supported.
All three keep one owner for the rules, as code, out of domain code. They differ in how much the gateway can decide. With a relationship store it can decide data-level rules for any resource a call names. With request data it decides what the arguments and fetched attributes show, an amount or a tenant, and no more. With local data, a decision about a record is made against the service’s database, so the gateway keeps the coarse rules and the service runs the rest through the platform library. In every model, a tool that picks its own target, “the latest order” or a search, acts on objects the gateway never saw, and its server has to check access regardless.29 Lists are the same case. A gateway can’t filter a database query without breaking pagination and counts, so the decision point returns the allowed identifiers, practical in SpiceDB below about ten thousand per user, or the service checks each page of candidates in bulk, or applies a compiled condition.33 Whether a tool names its target is partly a platform’s choice. It can require tools to name the resource they act on in typed arguments, an invoice_id where a free-text query would do, and treat generic tools such as run_sql, http_request or code execution as guardrail-only: admitted for a task and metered, never trusted to carry a data-level decision.
Rules about state are a different kind of rule. Take an agent acting for Alice, a support engineer, on a ticket about order 123, asking to refund $300. The gateway sees the token, the tool and its arguments, and decides who may attempt the refund: this agent may refund on Alice’s behalf, Alice may act on order 123, and $300 is inside the task’s $500. The service decides, when it acts, what only its data shows: the order hasn’t shipped, $300 is no more than the remaining balance, and the ticket hasn’t already had a refund. The first is authorization and belongs to the policy; the second is the domain’s invariants and stays in the domain. Neither check can do the other’s job. Where relationships are fed from events or change data capture, revocations go to the decision point directly and sensitive actions are checked at full consistency, at a cost in latency, because a pipeline’s lag is the window an attacker needs.
Five places end up enforcing something, and each is blind to something the others see:
| Enforcement point | Enforces | Can’t see |
|---|---|---|
| Traffic-plane gateway | Identity and token exchange; the tool allowlist; guardrail and domain policy on token claims and arguments, including data-level rules where the decision point holds the data; budgets and rate limits; data leaving through model calls; the audit log | Resources a tool resolves itself; which rows a list returns; anything that bypasses it |
| Agent runtime | Keys held outside the model; proof-of-possession on every call; the sandbox and its network egress; task context attached to outbound calls | Whether the next hop honours the task; another runtime’s behaviour |
| Tool server | Token audience and issuer; no passthrough; the right grant for the next hop; step-up when scopes fall short | The user’s wider intent; calls that don’t reach it |
| Service | The same policy, from the same decision point through the platform library, for every resource it touches, including those it resolves itself and lists; its own invariants; only gateway-minted tokens | The rest of the chain, except what tokens and transaction context carry |
| Receiving agent | Its own Agent Card schemes; authorization of the skill and task; pausing for credentials or a human | How the caller’s authority was obtained, beyond the tokens presented |
Where should a tool call’s arguments be checked? Two placements are defensible, and each buys something the other can’t.
- In the agent runtime, before the call leaves. The runtime has the full context, including which input was untrusted. It can stop a bad call before any credential is used and ask the user to confirm in place. But it runs beside the model it’s checking, so a compromised agent can skip it, and nobody outside the agent can prove it ran.
- In the traffic plane, as the call crosses. The gateway applies the same policy to every agent, records the decision in one audit log, and can’t be skipped by the agent it governs. It sees the token, the task carried with the call and the arguments, and none of the reasoning behind them, so its checks are only as good as the task context the runtime attaches.
From a platform-engineering point of view, the deciding check belongs in the traffic plane: the one whose denial is final and that the agent can’t skip. It isn’t the only check. Services ask the same decision point again through the platform library, for the resources a call names as well as the ones the gateway can’t see, so a call that slips past the gateway meets the same policy. What the gateway adds is one policy applied the same way to every agent, one audit log, and bad calls stopped before they reach anything. Security has never been a stronger cross-cutting concern than it is with agents, and cross-cutting concerns are best handled once, in the platform tier, where they’re uniform, auditable and outside the reach of the thing they constrain.
The arrangement is one policy repository and one decision point, offered as a self-service part of the platform. Security operations writes the guardrails as forbid policies. In Cedar a forbid overrides any permit, so a team’s policy can’t loosen one, but a policy that errors is skipped, so guardrails are validated against a schema before they land, which stops them failing on a missing attribute or a type mismatch.34 Domain teams write the policies for their own resources inside them, own the mapping from each tool’s arguments to the resources they name, versioned with the tool’s schema and checked against its inputSchema in CI so the two can’t drift, and choose a data model per domain: request data where the arguments say enough, a relationship store where access is a graph, local data where the service holds large result sets. Gateways built for model traffic and for tool traffic are converging on this role.35 We build agentic systems, platforms and the event pipelines behind them for customers, so we have a stake in where this layer ends up.
Insiders, detection and response
Zero trust treats the network as compromised. Agents ask for the same assumption about the people and software inside it, and insider risk takes four shapes.
- The agent as insider. An authorized agent acting on injected instructions is an insider with its user’s authority. Varonis showed a chain in Microsoft 365 Copilot’s enterprise search that turned the assistant into a way to exfiltrate data, fixed as CVE-2026-42824.36 Task-bounded authority and argument checks are the controls.
- A person with an agent. An employee who wants data out gets a fast, tireless helper. The intersection caps it, since an agent’s ceiling is narrower than its user’s, and the gateway meters and filters what leaves through model and tool calls. Shadow AI and AI agents now amplify insider risk, and adoption is outrunning visibility.37
- Agents nobody registered. A script with an API key or an assistant wired to a mailbox is shadow IT, and zero trust already requires cataloguing it.28 Inventory, and rejecting tokens the gateway didn’t mint, are the controls.
- The insider in the control plane. Centralising policy puts the most valuable access in the estate in a few hands: whoever can merge to the policy repository, write relationships to the decision point, operate the gateway or edit its audit log. One malicious change is wrong everywhere at once, and a grant written as a relationship is data, so it never passes policy review. The policy management tool should be reachable only from dedicated administrator accounts with the most restrictive access policies.28 For agents that extends to two-person review and signed commits for policy, relationship writes audited like policy changes, different people as policy authors, gateway operators and audit owners, an audit log the gateway’s administrators can’t alter, and break-glass access that pages someone.
Detection runs on shared context. Every call carries the user, agent, instance and task, so the gateway’s, runtime’s and services’ records join up, and an agent’s behaviour can be checked against what its task allows. Response has to reach every credential in the chain. Short lifetimes bound the damage but don’t stop a runtime that keeps refreshing, and it’s the refresh tokens, in runtimes and in gateways’ vaults, that have to die. The Shared Signals Framework and its Continuous Access Evaluation Profile, final OpenID specifications since 2025, let an identity provider push events such as a revoked session to the services that rely on it.38 Built for people’s sessions, they need every agent runtime that refreshes or exchanges tokens to subscribe and act, and nothing yet coordinates that across a chain.
Response is reaching the host as well. Shirudo, a pre-release open-source runtime from Cisco and OpenAI, lets an agent write signed eBPF or JVM shields that block a vulnerable code path until a patch lands, served from the operator’s own registry and pulled by every host about once a minute by default.39 An agent writing kernel code that a fleet loads within a minute is a control plane in its own right, and its failure mode is on record: a CrowdStrike content update interpreted by its kernel driver hit an estimated 8.5 million Windows machines in July 2024.40 Shields need the policy repository’s two-person review, staged rollout and audit. Where a workload can be air-gapped, the air-gap comes first, with shields inside it for what’s still reachable; agentic streaming has more on the trade.
Two controls bound the blast radius when detection is late. Irreversible actions need a fresh grant from the root principal, with the authorization server prompting a human; MCP’s step-up and A2A’s auth-required state give that a place in the protocol, and since step-up widens a token, it’s an approval only if someone is actually asked. Budgets come down the same tree as delegation, as quotas for the organisation, team, agent and task, metered by the gateway: authority expressed as a quantity, divided on the way down and never enlarged.
Where the design loses
The design assumes most agent traffic is yours to route and its control plane is yours to guard. It loses where that isn’t true:
- Agents live on someone else’s platform. If most agent work runs inside SaaS agent products, the calls never cross your traffic plane, and the vendor’s admin plane is the enforcement point whether you like it or not.
- Cross-domain calls dominate. Past the trust boundary the gateway enforces only what leaves; the rest is the other side’s policy and whatever grants the two authorization servers share.
- The gateway becomes the constraint. A hop on every call costs latency and availability. Where it can’t be made cheap and redundant, teams will route around it, and central policy becomes advisory.
- The control plane can’t be guarded. An estate that can’t separate and watch the duties around its policy has built a single point of compromise.
Two signals would show the position is wrong. One is freshness: if the lag between a revocation and the decision point seeing it regularly outlasts a token’s lifetime, the window short-lived tokens were meant to bound, and the audit log shows calls admitted after access was removed, data-level checks belong back where the data is. The other is the shape of the traffic: if most agent calls in the gateway’s audit log are searches and listings rather than actions on named resources, most real enforcement happens in the platform library inside services, and the gateway is left with the coarse guardrails.
Where to start
Most estates are at the shared-service-account stage. In this order, each step either removes the biggest risk left or is what the next one needs, and each costs something:
- Inventory agent identities. List every agent, the credentials it holds and the human who sponsors it. It costs a few weeks of reading configs and answers the auditor’s question.
- Stop token passthrough. Use token exchange inside the domain and separate grants for third-party APIs. The cost is a token vault that needs the same care as signing keys.
- Route agent and tool traffic through one gateway, and reject tokens it didn’t mint. This is the expensive step: network policy, a migration per service, and a component that has to be as available as the identity provider.
- Move cross-cutting rules into one policy repository. Allowlists, delegation limits, budgets and egress rules go there, as guardrails. It needs a team that owns it and a review queue every rule change waits in.
- Guard the control plane. Do it as soon as the repository exists: two-person review for policy, audited relationship writes, separated duties and an audit log its operators can’t edit. It costs reviewers and a slower path for every change.
- Put domain policy in the platform. Domain teams write policies for their own resources in the same repository, inside the guardrails, with a data model per domain. Require tools to name their target resource in typed arguments, and keep generic tools guardrail-only. It costs a mapping from tool arguments to resources kept in step with each tool’s schema, a platform library in every service that resolves its own targets, and for a relationship store, a pipeline that keeps it fresh.
- Give each instance its own identity and keep keys out of the model’s reach. Use SPIFFE where you run the infrastructure, the cloud’s workload identity where you don’t, and DPoP for clients that can’t hold a trusted key. SPIRE is the costly part: attestation, federation and a team that keeps it running.
ProTip: Start the inventory with the agents nobody launched on purpose: the scheduled jobs and the scripts with an API key in an environment variable. They hold standing authority, and no consent screen ever showed them to anyone.
Task scope has no standard yet. Nothing says how a task’s description becomes authorization_details, who writes it, or how it’s issued outside the agent runtime, which the gateway has to trust today.
Inside one estate, most of these questions come down to where the rules live, whether every agent call has to pass the place that enforces them, and who is allowed to change it. Between estates, they come down to what two authorization servers agree to trust, and that’s where the next round of standards work will be.
-
Norm Hardy, The Confused Deputy (or why capabilities might have been invented), ACM SIGOPS Operating Systems Review 22(4), October 1988. ↩
-
RFC 7591: OAuth 2.0 Dynamic Client Registration Protocol, July 2015. ↩
-
Aaron Parecki, Client registration and enterprise management in the November 2025 MCP authorization spec, 25 November 2025. ↩
-
Model Context Protocol: Authorization, specification version 2026-07-28; the 2025-11-25 version first preferred Client ID Metadata Documents. ↩ ↩2 ↩3
-
Okta, Auth0, WorkOS and Clerk accept them, and Keycloak behind an experimental flag: Okta: register AI agents with a CIMD; Auth0: register applications with CIMD; WorkOS changelog, 30 November 2025; Clerk changelog, September 2026; Keycloak: integrating with MCP. ↩
-
Microsoft, Client ID Metadata Documents in Microsoft Entra ID (public preview), 30 October 2026. ↩
-
draft-ietf-oauth-client-id-metadata-document, OAuth working group, revision 03, sections 4.1 and 10.3. MCP 2026-07-28 references revision 00, whose section 4.1 carries the same prohibition. ↩
-
SPIFFE overview; SPIRE server configuration (
default_x509_svid_ttlone hour,default_jwt_svid_ttlfive minutes). Attestation before issuance is SPIRE’s behaviour; the SPIFFE specifications don’t require it. ↩ -
draft-ietf-oauth-spiffe-client-auth, OAuth working group, revision 03, sections 3.1, 3.2.2, 5.1, 8.1 and 8.2; the example metadata document is from section 3.2.2. ↩
-
Model Context Protocol: Authorization, specification version 2026-07-28: implementations using the stdio transport “SHOULD NOT follow this specification, and instead retrieve credentials from the environment”. ↩
-
AWS: IAM roles for service accounts; Google Cloud: workload identity federation, which also accepts AWS and Azure identities; Microsoft: managed identities for Azure resources. ↩
-
IETF Web Bot Auth working group, formed 23 October 2025; draft-ietf-webbotauth-httpsig-protocol, revision 01, which signs requests with HTTP Message Signatures (RFC 9421). ↩
-
draft-ietf-oauth-identity-assertion-authz-grant, OAuth working group, revision 06, sections 4.3 and 4.4. ↩
-
Okta, Okta brings first-class identity to AI agents with Agent SSO, 24 August 2026. ↩
-
RFC 8693: OAuth 2.0 Token Exchange, January 2020, sections 4.1 (
act, including that prior actors are informational only) and 4.4 (may_act). ↩ -
Model Context Protocol: Authorization, Security Considerations, “Access Token Privilege Restriction”, specification version 2026-07-28. ↩
-
draft-ietf-oauth-identity-chaining: OAuth Identity and Authorization Chaining Across Domains, OAuth working group, revision 17. ↩
-
RFC 8705: OAuth 2.0 Mutual-TLS Client Authentication and Certificate-Bound Access Tokens, February 2020; RFC 9449: OAuth 2.0 Demonstrating Proof of Possession (DPoP), September 2023. ↩
-
RFC 9396: OAuth 2.0 Rich Authorization Requests, May 2023. ↩
-
Agent Payments Protocol, version 0.2, checkout and payment mandates as verifiable digital credentials; AP2 repository. ↩
-
Ruoming Pang et al., Zanzibar: Google’s Consistent, Global Authorization System, USENIX ATC 2019. ↩ ↩2
-
Open Policy Agent (Rego); Cedar policy language. ↩
-
Enforce least-privilege authorization in multi-agent AI chains using Cedar, AWS Security Blog. ↩
-
Joseph W. Cutler et al., Cedar: A New Language for Expressive, Fast, Safe, and Analyzable Authorization, OOPSLA 2024. ↩ ↩2
-
Arnar Birgisson, Joe Gibbs Politz, Úlfar Erlingsson, Ankur Taly, Michael Vrable and Mark Lentczner, Macaroons: Cookies with Contextual Caveats for Decentralized Authorization in the Cloud, NDSS 2014. ↩
-
Agent2Agent (A2A) Protocol Specification, version 1.0.0 (retrieved November 2026), sections 4.5, 7.5, 7.6 and 8.4. ↩
-
draft-ietf-oauth-transaction-tokens, OAuth working group, revision 11, sections 6, 9.2.1–9.2.3, 12.1, 13.1, 13.13 and 13.15. ↩
-
Scott Rose, Oliver Borchert, Stu Mitchell and Sean Connelly, Zero Trust Architecture, NIST SP 800-207, August 2020: the definition (section 2), the policy decision and enforcement points (section 2, figure 1), protecting the policy management tool (section 5.5), non-person entities (section 5.7) and cataloguing shadow IT (section 7.3.2). ↩ ↩2 ↩3 ↩4
-
Model Context Protocol: Tools, specification version 2026-07-28:
tools/callcarries anameandarguments, each tool declares aninputSchema, and servers must implement proper access controls. ↩ ↩2 -
SpiceDB; OpenFGA, a CNCF project; Envoy external authorization filter. ↩
-
SpiceDB, Consistency: checks default to
minimize_latency, which can leave a window for the New Enemy Problem; a ZedToken is stored alongside the updated content in the application database. ↩ -
AWS, Amazon Bedrock AgentCore: policy scope and example policies, which condition on tool input such as
context.input.amount. ↩ -
OPA: SQL data filtering with partial evaluation; Oso: local authorization; SpiceDB, Protecting a list endpoint, which recommends LookupResources below about 10,000 accessible resources and bulk checks or materialization above that. ↩ ↩2
-
Cedar, Authorization: an applicable
forbidoverrides anypermit, and a policy whose evaluation errors is skipped. ↩ -
LiteLLM; Palo Alto Networks, Announcing general availability of Prisma AIRS AI Gateway, July 2026; Cloudflare AI Gateway; Kong AI MCP Proxy plugin; agentgateway; Envoy AI Gateway; Azure API Management AI gateway. ↩
-
Varonis Threat Labs, SearchLeak, remediated by Microsoft as CVE-2026-42824. ↩
-
Ponemon Institute and DTEX, 2026 Cost of Insider Risks Global Report. ↩
-
OpenID Continuous Access Evaluation Profile 1.0, final; OpenID Shared Signals working group, final specifications approved September 2025. ↩
-
OpenAI, Introducing Shirudo, 23 November 2026; Shirudo documentation, pre-release (0.0.0-dev), read November 2026. ↩
-
CrowdStrike, Channel File 291 Incident: External Technical Root Cause Analysis, 6 August 2024; Microsoft, Helping our customers through the CrowdStrike outage, 20 July 2024. ↩
Thanks for reading The Write Ahead Log
Subscribe for free to receive new posts.