Issue 09 · Control & Guardrails
Identity for AI Agents: Who Is Acting, and on Whose Authority?
Agents act for people, for themselves and for other agents, often with long-lived keys. How delegation, MCP authorization, agent identities and short-lived credentials keep an agent from becoming a confused deputy.
ASI03MCPOAuthEntra Agent IDConfused deputy
In this issue
In August 2025 an attacker “systematically exported large volumes of data from numerous corporate Salesforce instances,” in the words of Google’s threat intelligence team, without guessing a single Salesforce password. Google tracked the group as UNC6395. It used OAuth tokens that belonged to Drift, an “AI Chat agent” that Salesloft sells for company websites, and that customers had connected to Salesforce. Then it searched the exported records for more secrets: cloud access keys, Snowflake tokens and passwords.
Nothing about that attack needed a clever prompt. The agent’s integration held long-lived tokens with broad access, the tokens sat in a vendor’s cloud, and whoever held them was, as far as Salesforce could tell, the agent. As agents multiply, identity becomes the question underneath every other control in this series: who is this agent, whose authority is it using, and what exactly may it do right now?
Key takeaways
- An agent needs its own identity, distinct from the human it serves and from a generic service account, so its actions can be scoped, audited and revoked.
- Prefer delegation over impersonation: tokens that say “agent X acting for user Y” (the OAuth
actclaim) rather than an agent holding the user’s full power. - The MCP authorization spec (2025-11-25) requires audience-bound tokens and forbids token passthrough, the classic confused-deputy path.
- Static API keys are an anti-pattern for agents. Use short-lived, narrowly scoped credentials minted outside the model, and never put secrets in the model’s context.
- Vendors now ship agent identity products, such as Microsoft Entra Agent ID and Okta Cross App Access, and the IETF is drafting agent-specific guidance.
Why agents break the identity model
Enterprise identity has two familiar shapes. Human users sign in with passwords, passkeys and multi-factor authentication. Workloads (services, scripts, CI jobs) use service accounts, certificates or API keys. Agents fit neither.
Microsoft’s documentation for its agent identity product describes the difference well: agents “might exist for minutes during a specific task, or might be created and destroyed thousands of times per day.” They also switch roles within one task. A coding agent reads a repository with the developer’s permissions, calls a model API with the company’s key and spawns a sub-agent that needs its own access.
| Question | Human user | Traditional workload | AI agent |
|---|---|---|---|
| Lifetime | Years | Months to years | Minutes to months |
| Who decides its next action? | The person | Fixed code | A model reading untrusted text |
| Whose authority? | Its own | Its own | Its own, a user’s, or both |
| Typical credential | Password plus MFA, passkey | Key, certificate, managed identity | Often a copied user token or static API key |
| Accountable owner | The person | The service team | Often unclear |
The fourth row is where most real risk lives. When a team wires an agent to Salesforce, GitHub or a mailbox by pasting in an API key or a long-lived refresh token, the agent silently inherits everything that credential can do, for as long as it lives. OWASP’s Top 10 for Agentic Applications lists this as ASI03 Identity and Privilege Abuse.
The confused deputy, with an OAuth token
The term confused deputy comes from a 1988 paper by Norm Hardy. A compiler had permission to write to a billing file; a user who could not write that file asked the compiler to put its debug output there, and the compiler did. The deputy held real authority and used it on behalf of someone who lacked it.
An agent is a deputy that takes instructions from any text it reads (Issue 02 maps the risks). Identity design decides how much damage a confused agent can do. Three designs are common:
- Shared service account. Every user’s requests run with the agent’s own broad credential. One injected instruction can reach every user’s data. This is the worst case.
- Impersonation. The agent holds the user’s token and becomes indistinguishable from the user. OAuth’s token exchange standard, RFC 8693 (2020), defines this: when A impersonates B, “A is given all the rights that B has.” Logs cannot tell what the human did from what the agent did.
- Delegation. The agent keeps its own identity while acting for the user. RFC 8693’s
act(actor) claim gives “a means within a JWT to express that delegation has occurred and identify the acting party to whom authority has been delegated,” and nestedactclaims record chains, such as a user, then an agent, then a sub-agent.
Delegation lets a resource server apply the intersection of both sides: what the user may do and what this agent is allowed to do on anyone’s behalf. It also makes the audit log answer the question every incident responder asks first.
MCP authorization in practice
The Model Context Protocol (MCP) is the most common way to connect agents to tools (Issue 10 covers its wider security). Its authorization specification, version 2025-11-25, builds on OAuth 2.1. The MCP server is an OAuth resource server; the agent’s MCP client is an OAuth client. The rules that matter most for defenders:
- Tokens are bound to one server. Clients “MUST implement Resource Indicators” (RFC 8707) and name the target server in every authorization and token request. Servers “MUST validate that access tokens were issued specifically for them.”
- No token passthrough. Servers “MUST NOT accept or transit any other tokens.” If an MCP server calls an upstream API, it uses a separate token from that API’s authorization server and “MUST NOT pass through the token it received from the MCP client.”
- Least privilege by default. Clients should request only the scopes the server challenges for, and ask for more later through step-up authorization when a call fails with
insufficient_scope. - Short lifetimes. Authorization servers “SHOULD issue short-lived access tokens,” and must rotate refresh tokens for public clients. PKCE with
S256is mandatory. - Consent for proxies. MCP proxy servers that use a static client ID “MUST obtain user consent for each dynamically registered client,” which closes a known confused-deputy path through proxies.
Two caveats. Authorization is optional in MCP, and local servers that talk over standard input and output “SHOULD NOT” use it and instead “retrieve credentials from the environment.” Most local MCP servers therefore still run on API keys in environment variables, which any code in that process, including a compromised dependency, can read.
For companies, MCP now has a stable Enterprise-Managed Authorization extension. It builds on an IETF OAuth draft led by Aaron Parecki of Okta, the Identity Assertion JWT Authorization Grant (ID-JAG), in which an application gets a token for a third-party API “by coordinating through an identity provider that the downstream Resource Authorization Server already trusts for single sign-on.” Okta markets its implementation, Cross App Access, as “the recommended way to connect to MCP servers in the enterprise.” The point for defenders is control: the company’s identity provider, not each user clicking “Allow,” decides which agents may reach which apps.
Agent identities from vendors and standards bodies
Microsoft Entra Agent ID gives each agent an identity in the Entra directory. Agent identities “don’t use human authentication mechanisms.” They can act autonomously with rights granted to the agent, or on behalf of a user with rights the user delegates. Two features stand out for security teams. When someone creates an agent in Copilot Studio, “the user who created the agent is recorded as its sponsor,” which gives every agent an accountable owner. And agents are created from blueprints that hold shared configuration, including credentials; “Disabling an agent identity blueprint prevents all its agent identities from authenticating,” a fleet-wide off switch (Issue 07).
Standards. The OpenID Foundation’s October 2025 whitepaper, Identity Management for Agentic AI, found that today’s standards cover agents inside a single organization, but not sub-agents and cross-domain delegation at scale, and warned that “The window for establishing robust, interoperable standards is now.” In the IETF, the WIMSE working group (Workload Identity in Multi-System Environments) adopted an AI Identity Management System draft in September 2026. It assembles existing standards, from SPIFFE-style identifiers to OAuth delegation and transaction tokens, and states three rules plainly:
- “The Large Language Model MUST NOT have access to an agent’s credentials or to credentials that may be needed to access tools and services.”
- “Static API keys are an antipattern for agent identity.”
- “Agent credentials SHOULD be short-lived … MUST include an explicit expiration time.”
Short-lived credentials, minted outside the model
Those rules point to one design: a credential broker that sits between the agent’s runtime and its tools. Figure 2 shows it.
In practice:
- One identity per agent, with a named human sponsor and an expiry date for the agent itself.
- Task-scoped, short-lived tokens. Mint per task or per call with minutes-long lifetimes, not per deployment with year-long ones.
- Audience binding everywhere. A token for the calendar API should fail at the mail API.
- No secrets in context. Keep keys out of prompts, tool descriptions, memory and environment variables the agent’s code tools can print.
- Attribution in logs. Record the human, the agent identity and version, the delegation chain, the tool and the token ID for every action.
- Revocation you have tested. Know how to disable one agent, one blueprint or all agents, and how fast downstream services notice.
Case file: Salesloft Drift OAuth token theft (August 2025)
What happened. Between August 8 and 18, 2025, the group Google tracks as UNC6395 used OAuth access and refresh tokens from the Salesloft Drift integration to export data from customers’ Salesforce instances, then searched it for AWS access keys, Snowflake tokens and passwords. Google later found that Drift Email tokens had been used to read email from “a very small number of Google Workspace accounts.”
Why it worked. According to Salesloft’s update on Mandiant’s investigation, the attacker had accessed Salesloft’s GitHub account from March through June 2025, moved into Drift’s AWS environment and obtained customers’ OAuth tokens there. The tokens were bearer credentials held centrally by the agent vendor, with scopes broad enough for bulk export. Whoever presented them was treated as Drift.
What fixed it. On August 20, Salesloft revoked all active Drift access and refresh tokens and Salesforce removed Drift from its AppExchange. Google advised customers to “treat any and all authentication tokens stored in or connected to the Drift platform as potentially compromised,” to rotate credentials, and to restrict connected-app scopes and source IP addresses. Each of those steps is an identity control that could have been in place before the breach.
Try it yourself: delegation tokens and a passthrough trap
Allow about 40 minutes. You need Python and the pyjwt package. Everything runs locally with made-up keys.
-
Write a tiny “authorization server” function that signs JWTs with a local HMAC key. Include
sub(the user),aud(the target server),scope,expfive minutes out and anactclaim naming the agent.token = jwt.encode({"sub": "alice", "aud": "https://calendar.local", "scope": "calendar.read", "act": {"sub": "agent:scheduler-v3"}, "exp": int(time.time()) + 300}, KEY, algorithm="HS256") -
Write two toy “resource servers,”
calendar.localandmail.local. Each decodes the token withaudience=set to its own URL and rejects anything else. - Simulate token passthrough: have the calendar server forward the token it received to the mail server. Confirm that the mail server rejects it.
- Add a policy on the calendar server that allows writes only if both the user’s scope and an allowlist for the agent in
act.subpermit them. Test a token for an unknown agent. - Log every decision with the user, the agent and the token’s
jti. Read the log and check that you could explain every action to an auditor. - List the credentials a real agent you use holds today. For each, note its lifetime, its scope and who would notice if it were stolen.
What’s next
Identity tells a server who is calling. Next week we look at what happens when the caller is another agent: multi-agent and protocol security, covering MCP and Google’s A2A, tool poisoning and rug pulls, agent impersonation, and failures that cascade from one agent to the next.
Sources
- A. Larsen, M. Lin, T. McLellan and O. ElAhdan (Google Threat Intelligence Group and Mandiant), “Widespread Data Theft Targets Salesforce Instances via Salesloft Drift,” August 26, 2025 (updated August 28, 2025). https://cloud.google.com/blog/topics/threat-intelligence/data-theft-salesforce-instances-via-salesloft-drift
- Salesloft, “Drift/Salesforce Security Update,” Salesloft Trust Center, 2025. https://trust.salesloft.com/?uid=Drift%2FSalesforce+Security+Update
- Salesloft, “Drift” product page. https://www.salesloft.com/platform/drift
- OWASP GenAI Security Project, “OWASP Top 10 for Agentic Applications,” December 9, 2025. https://genai.owasp.org/2025/12/09/owasp-top-10-for-agentic-applications-the-benchmark-for-agentic-security-in-the-age-of-autonomous-ai/
- N. Hardy, “The Confused Deputy (or why capabilities might have been invented),” ACM SIGOPS Operating Systems Review 22(4), October 1988 (summary). https://en.wikipedia.org/wiki/Confused_deputy_problem
- IETF, RFC 8693, “OAuth 2.0 Token Exchange,” January 2020. https://www.rfc-editor.org/rfc/rfc8693.html
- Model Context Protocol, “Authorization,” specification version 2025-11-25. https://modelcontextprotocol.io/specification/2025-11-25/basic/authorization
- Model Context Protocol, “Security Best Practices,” specification. https://modelcontextprotocol.io/specification/2025-06-18/basic/security_best_practices
- Model Context Protocol, MCP Authorization Extensions repository. https://github.com/modelcontextprotocol/ext-auth
- A. Parecki, K. McGuinness and B. Campbell, “Identity Assertion JWT Authorization Grant,” draft-ietf-oauth-identity-assertion-authz-grant-04, May 21, 2026. https://datatracker.ietf.org/doc/draft-ietf-oauth-identity-assertion-authz-grant/
- Okta, “Cross App Access.” https://www.okta.com/integrations/cross-app-access/
- Microsoft Learn, “What is Microsoft Entra Agent ID?” https://learn.microsoft.com/en-us/entra/agent-id/identity-platform/what-is-agent-id
- Microsoft Learn, “Agent identity blueprints in Microsoft Entra Agent ID.” https://learn.microsoft.com/en-us/entra/agent-id/identity-platform/agent-blueprint
- OpenID Foundation, “Identity Management for Agentic AI,” October 7, 2025. https://openid.net/new-whitepaper-tackles-ai-agent-identity-challenges/
- P. Kasselman et al., “AI Identity Management System,” draft-ietf-wimse-aims-00, September 15, 2026. https://datatracker.ietf.org/doc/draft-ietf-wimse-aims/