Skip to content
Blog

Identity Provisioning for Agent Workloads

Agents are not users and not quite services. How to design identity, credentials, and authorization for LLM agents, MCP servers, and tool-calling workloads in production.

Published on • October 28, 2026

AI Assistant

Every team building production agents eventually hits the same question: what identity does the agent actually run as? The options on the table — a shared API key, a human service account, a per-app token — all leak human-shaped assumptions into a workload that doesn’t fit them. Agents are bursty, frequently recreated, often running untrusted third-party tool code, and (critically) regularly processing attacker-influenced input via prompt injection.

Getting identity provisioning right for agent workloads is less about new cryptography and more about admitting what an agent is: a long-running, semi-autonomous workload with a delegation chain, not a user with a very fast keyboard.

Why human identity models break

Consider what actually happens when an agent runs. The end user delegates to the agent; the agent (perhaps via an MCP server) delegates to a dozen tool APIs; some of those tools call further services. The credential question at each hop is: what is the minimum authority this step needs, and how do we know the delegation is still legitimate?

Pinning one long-lived credential to “the agent” fails on three counts:

  1. Blast radius. If the agent’s key leaks — via a log, a memory dump, or a tool server compromised through injected instructions — everything that key could reach is now attacker territory.
  2. Attribution. A shared key can’t tell you which run, initiated by which user, performed an action. Your audit trail collapses into “the agent did it.”
  3. Confused deputy. An agent holding broad credentials while following instructions from untrusted content (web pages, user uploads, retrieved documents) is a textbook confused-deputy target. Prompt injection doesn’t need to steal a credential — it just needs to borrow the one you already gave the agent.

The core pattern: short-lived, per-run, delegated credentials

The proven shape is a hierarchy of identities, each minted fresh for a run and scoped to its step:

1. The human principal stays the root of trust. The user authenticates (SSO, OAuth/OIDC) and delegates to the agent — explicitly, with scope. The agent never holds the user’s credentials; it holds a token that represents “acting on behalf of user X, within bounds Y.”

2. The agent runtime gets a workload identity. Like any service, the agent process authenticates as itself to get its delegation capability — SPIFFE-style workload identities or cloud workload identity federation are the mature patterns here. This identity proves what is running; the delegation token proves who it’s acting for.

3. Every run mints fresh, narrow tokens. Per-run (or even per-tool-call) credentials with short TTLs — minutes, not days. If a token leaks mid-run, the window is tiny; if a run goes rogue, revoking its tokens stops it without collateral damage to other runs.

4. Tools verify the delegation chain, not just the token. A well-designed tool server checks: is this a valid agent workload? Does its current delegation cover this action? Is this action consistent with the run’s stated task? That last check is what makes injection resistance architectural rather than prompt-based.

Practical implementation with modern primitives

OAuth 2.0’s token exchange (RFC 8693) is purpose-built for this: the agent presents its workload identity plus the user’s delegation grant, and receives a downstream token scoped to exactly the tool and action. MCP servers, as the emerging standard surface for agent tools, slot naturally into this — each server can require its own audience-scoped token rather than trusting a generic bearer.

For teams not yet on token exchange, the pragmatic v1 looks like:

  • An internal credential broker: the only component allowed to mint tool tokens. Agents call it with their run ID and declared task; the broker enforces policy (allow-lists, rate limits, data-class caps) and returns short-lived, per-audience tokens.
  • Default-deny tool authorization. New tool integrations start with no agent access; granting it is a policy change with an owner, not a code change.
  • Separate credentials for read vs. write. Almost every agent failure is worse when it can write. Read-scoped agent identities cover the bulk of real workloads.

Operational hygiene

Identity provisioning for agents is continuous, not set-and-forget:

  • Rotate aggressively. Short TTLs mean rotation is automatic; treat any credential measured in days as a bug.
  • Constrain on the data path too. Identity gates actions, but injected instructions also target retrieval. Scope what documents and datasets a run’s credentials can read, not just what they can write.
  • Replay the identity story in audits. Your audit log should let a reviewer reconstruct: user → delegation grant → agent workload → run → tool token → action. If any link is implicit, fix the log before you need it.
  • Test the revoke path. Quarterly, kill a live agent’s credentials mid-run and verify the blast radius matches your design — not your hopes.

The bottom line

Agents don’t need a new identity theory; they need the identity discipline we already apply to microservices — workload identity, short-lived credentials, least privilege — plus one addition humans rarely deal with: explicit, verifiable delegation chains, because the instructions driving the workload can never be fully trusted. Provision identity the way you’d provision authority in a bureaucracy: every action traceable to a grant, every grant narrow, and every grant revocable in seconds.