Join our Newsletter — 33% off our NHI Course
Home› Guides› Agent Identity and Access Guide: Identities, Credentials and…
Guide Agent Identity & Access

Agent Identity and Access Guide: Identities, Credentials and Authorisation for AI Agents

PDF for newsletter subscribers · free to read online

← All guides
By NHI Mgmt Group, edited by Lalit Choda Updated 26 October 2026 16 min read
On this page

Most AI agents in production today run on borrowed identity: a developer's token, a shared service account or a long-lived API key pasted into configuration, so nobody can say which agent did what, for whom, or with how much authority. Agent identity and access is the discipline of giving each agent its own verifiable identity, short-lived credentials it never sees in plain text, and authorisation that is decided per action rather than granted once. This pillar page is the overview for the whole category: what it covers, the concepts you need, the threats, the controls in maturity order, who owns what and which standards apply. It is written for IAM, platform and security architects who are bringing agents into an existing identity programme, and it links to every NHI Mgmt Group guide in the category for the depth.

Key takeaways

  • An agent is a non-human identity with extra problems. It authenticates like a workload, but it chooses its own actions at runtime, often acts for a human, and can be steered by the content it reads.
  • Two identities travel together. The agent's own workload identity and the user or system it acts for should be separate, verifiable claims, for example a workload credential plus an exchanged OAuth token carrying an act claim (RFC 8693).
  • Credentials belong outside the model. Keep secrets out of prompts, code and agent memory; issue short-lived, audience-restricted, ideally sender-constrained tokens through a broker or vault.
  • Authorise the action, not the agent. Decide at each tool call using the agent, the principal, the resource, the action and context, with human approval reserved for irreversible or high-value steps.
  • Ownership and lifecycle are the controls most often missing. Every agent needs a named owner, a registered purpose, a review cycle and a fast, tested revocation path.

What the field covers

Agent identity and access sits where non-human identity management, workload identity, OAuth delegation and authorisation policy meet. It answers five questions for every agent in the estate:

  • What is it? A registered, uniquely identified agent with an owner, a purpose and a risk rating, distinguishable from other agents and from the human who launched it. See the Agentic AI Identity Guide.
  • How does it prove that? Authentication of the agent as a workload, to tools, APIs, MCP servers and other agents. See the Agent-to-Agent Authentication Guide.
  • Whose authority is it using? Delegation from a user or system, expressed so that downstream services can see both the agent and the principal.
  • What may it do now? Authorisation at token issuance, at the tool gateway and at the resource. See the AI Agent Authorisation Guide.
  • Who answers for it? Governance: inventory, ownership, access reviews and decommissioning. See the Identity Governance for AI Agents Guide.

Out of scope here, and covered by sibling pillars: runtime guardrails and monitoring (the Agent Controls and Monitoring Guide), how agents are attacked (the Agent Threats and Attacks Guide) and policy and accountability (the Agent Governance and Risk Guide). If you are unsure what counts as an agent, start with AI Agents vs Agentic AI.

Core concepts

Identity models for agents

There are four ways an agent ends up with identity in practice. Only the last two scale safely.

ModelHow it worksAccountabilityWhen it is acceptable
Borrowed user credentialThe agent runs with the developer's or user's own token, session or API keyNone: logs show the human, not the agentLocal experimentation on non-production data only
Shared service account or API keySeveral agents, or an agent and other software, use one account or keyWeak: you cannot tell which agent actedNever for production; a common pilot shortcut that survives into production
Dedicated agent identityEach agent is registered as its own OAuth client, service principal or workload identityGood for the agent; principal is invisible unless delegation is addedAutonomous agents that do not act for a specific user
Agent identity plus delegationAgent workload identity, plus a token that names the user as subject and the agent as actorFull: both parties are visible in every callAssistants and copilots acting for users; multi-agent chains

The IETF individual draft on WIMSE applicability for AI agents describes the same target state: agents with their own identities, automated short-lived credentials, narrow task-specific tokens and a credential that binds the agent to an accountable owner. It is an individual draft, not a working group document, so treat it as direction rather than a standard.

Delegation versus impersonation

RFC 8693 (OAuth 2.0 Token Exchange) draws the line that matters most for agents. In impersonation the agent receives the user's rights and is indistinguishable from the user. In delegation the agent keeps its own identity while acting for the user, and the issued token records it in the act claim; nested act claims record earlier actors in a chain, and only the current actor should drive access decisions. The may_act claim lets an authorisation server check that a given agent is allowed to act for a given subject. Prefer delegation everywhere: impersonation destroys the audit trail. See the OAuth Token Exchange and Delegation Guide.

Choosing a credential

CredentialReplay resistanceTypical lifetimeBest fit for agents
Static API keyNoneUntil someone rotates itAvoid; if a vendor offers nothing else, vault it and broker access
OAuth client credentials with client secretLow (bearer)Minutes to an hour per tokenSimple internal agent-to-API calls
OAuth with private_key_jwtBearer unless constrainedMinutesAgents registered with another organisation's authorisation server
mTLS certificate-bound tokens (RFC 8705) or DPoP (RFC 9449)High: token bound to a keyMinutesProduction agents; DPoP where TLS terminates at a proxy
Workload identity (SPIFFE SVID, cloud workload identity federation)High at transport layerShort, rotated by the platformAgents running as workloads on platforms you control

RFC 9700 (OAuth 2.0 Security Best Current Practice) recommends sender-constrained tokens through mTLS or DPoP and audience-restricted access tokens, and requires PKCE for public clients. For workload options see the Cloud Workload Identity Guide, the SPIFFE and SPIRE Guide and the Workload Identity Federation Guide.

Identity in MCP

The Model Context Protocol authorisation specification (revision 2025-06-18) makes authorisation optional, but where an HTTP-based MCP server implements it the rules are specific: the MCP server is an OAuth 2.1 resource server, it must publish OAuth 2.0 Protected Resource Metadata (RFC 9728) and answer unauthenticated calls with 401 and a WWW-Authenticate header, clients must send the RFC 8707 resource parameter naming the server's canonical URI, and servers must reject tokens not issued for them. The server must not pass through the token it received to upstream APIs: it obtains its own token as a client. STDIO servers should take credentials from the environment instead, which is exactly why local MCP configuration files become secret stores. See the MCP Security Guide.

Authorisation concepts

  • Least agency: OWASP's extension of least privilege to autonomy itself: do not give an agent tools or decisions it does not need.
  • Intersection rule: an agent acting for a user gets at most what the user may do, what the agent may do and what the task requires, whichever is smallest.
  • Per-action decisions: evaluate each tool call against policy outside the model; prompts express intent, enforcement points stop actions.
  • Fine-grained grants: OAuth Rich Authorization Requests (RFC 9396) expresses "this account, this amount" rather than a broad scope. See the OAuth Rich Authorization Requests (RAR) Guide.
  • Just-in-time access: grants exist for the task and expire with it. See the JIT Access Guide.

Main threats

Identity is where agent compromise turns into business impact. The threats below are identity threats specifically; the wider attack surface (goal hijacking, memory poisoning, tool misuse) is covered in the Agent Threats and Attacks Guide.

ThreatWhat happensFramework referencePrimary control
Credential harvesting from agent configurationKeys in MCP config files, environment variables or agent settings are read by malware or a hijacked agentATLAS AML.T0083 Credentials from AI Agent Configuration; ATT&CK T1552.001Brokered, short-lived credentials; no plaintext secrets on disk
Credential harvesting through toolsAn agent is induced to use its tools to retrieve secrets it can reachATLAS AML.T0098 AI Agent Tool Credential HarvestingScope tool access; secrets never returned into context
Token theft and replayA stolen bearer token is replayed from elsewhereATT&CK T1528, T1550.001Sender-constrained tokens, short lifetimes, audience checks
Over-privileged agent identityAn agent with broad standing permissions does far more damage when it errs or is steeredOWASP ASI03 Identity and Privilege Abuse; LLM06 Excessive AgencyTask-scoped, just-in-time grants; no admin roles
Confused deputy and token passthroughAn intermediary forwards a token or consent it should not, so downstream services trust the wrong partyMCP Security Best PracticesAudience validation, per-client consent, no passthrough
Agent impersonationPossession of a static key is the only proof of identity, so anyone holding it becomes the agentOWASP ASI07 Insecure Inter-Agent CommunicationAsymmetric credentials, signed agent metadata, mTLS
Orphaned agentsAgents outlive their project or owner and keep valid credentialsOWASP NHI Top 10 (improper offboarding)Registry, owner attestation, automated expiry

Common failure patterns

  • Tokens left where the agent can find them. In the PocketOS database deletion, a coding agent working on a staging task found an account-scoped Railway token in an unrelated file and used it to delete the production database and its backups. The token had been created only to manage custom domains.
  • A bearer key as the only proof of identity. The Moltbook database exposure leaked about 1.5 million agent API tokens; because each key was the agent's only credential, anyone who read the table could impersonate any agent.
  • Handing real credentials to unvetted tools. Users of the look-alike postmark-mcp server supplied their own Postmark credentials, so the malicious version blind-copied every email using the victim's own delegated access.
  • Pilot permissions promoted to production. Admin or owner roles granted "to avoid permission errors" during a proof of concept are never reduced.
  • Forwarding the user's token down an agent chain. Every agent that sees it can use it anywhere its audience allows, and the final service cannot tell which agent called.
  • Authorisation written into the prompt. "Never delete anything" with no enforcement point behind it is guidance, not a control.

Key controls by maturity

The levels below follow the shape of the Agentic AI Identity Maturity Model. Most organisations should reach the second level before scaling agents beyond pilots.

LevelIdentityCredentialsAuthorisationGovernance
1. FoundationalInventory of agents, including unsanctioned ones; one identity per agentSecrets moved out of code and prompts into a vaultAdmin and wildcard permissions removedNamed owner and purpose for every agent
2. ManagedAgents registered as OAuth clients or workload identitiesShort-lived tokens; audience restriction; automated rotationRole per agent function; human approval for destructive actionsAgent identities included in access reviews
3. DelegatedAgent and principal both carried in tokensToken exchange per hop; sender-constrained tokens (mTLS or DPoP)Task-scoped, just-in-time grants; RAR for high-value actionsDelegation policy (may_act) reviewed with business owners
4. AdaptiveAttested workload identity bound to a verified buildNo standing secrets anywhere in the agent pathExternalised policy engine decides every tool call with risk signalsContinuous posture checks; automatic revocation on anomaly

How to implement

  1. Discover (weeks 1 to 3): list every agent, its runtime, the credentials it holds, where they are stored and who owns it. Include developer tools, low-code agents and MCP servers. See the Shadow AI Discovery Guide.
  2. Separate identities: give each production agent its own identity. Retire shared keys one agent at a time, running old and new credentials in parallel for a fixed window so you can roll back by re-enabling the old credential without reissuing it.
  3. Vault and broker: move secrets into a vault and have the runtime inject or exchange them, never the model. See the Credential Vaulting for AI Agents Guide.
  4. Constrain tokens: shorten lifetimes to minutes, set audiences per resource, then enable certificate-bound or DPoP-bound tokens. Start resource servers in a log-only mode that records which calls would fail before enforcing.
  5. Add delegation: introduce token exchange for user-context calls, reduce scopes at each hop and enforce may_act policy.
  6. Gate actions: put a policy check in the tool gateway, pilot it on one agent in monitor mode, then enforce, with human approval for irreversible actions. See the Zero Trust for AI Agents Guide.
  7. Govern: add agents to access certification, set expiry on registrations and rehearse revocation.

Decision guidance

  • Autonomous agent with no user: dedicated workload identity and client credentials; no delegation needed, but scope tightly because nobody's entitlements bound it.
  • Assistant acting for users: delegation is mandatory; the agent must never exceed the user's access, and usually needs much less.
  • Agents crossing organisations: register with the receiving organisation's authorisation server using asymmetric client authentication; verify the agent before trusting it. See the Know Your Agent (KYA) Guide.
  • Small organisations: a vault, one OAuth client per agent, token lifetimes in minutes and a gateway that checks audience cover most of the risk. Large estates should invest in a workload identity platform so no agent holds a long-lived secret.
  • Buying rather than building: use the AI Agent Identity Security Buyer's Guide to frame requirements.

Detection and measurement

Log, for every agent action, the agent identity (client ID or SPIFFE ID), the principal, the full act chain, the token's jti, the tool, the target and the decision. Alert on tokens presented to the wrong audience, a token or proof jti seen twice, an agent credential used from a new location, bursts of 401 and 403 responses, and scope elevation requests the MCP security guidance says servers should log.

MetricSuggested target
Production agents with a dedicated identity and named owner100%
Agents still using static API keys or shared accountsZero, each tracked to a retirement date
Median access token lifetime for agent callsMinutes, not hours
User-context calls carrying delegation rather than a forwarded token100%
Agent identities certified in the last review cycle100% of production agents
Time to revoke all credentials of one agent in an exerciseUnder 15 minutes

Roles and ownership

RoleOwns
Agent owner (business or product)Purpose, risk acceptance, delegation scope, periodic attestation that the agent is still needed
IAM teamIdentity issuance, authorisation server configuration, token policy, access reviews, offboarding
Platform or AI engineeringRuntime, workload identity integration, vault injection, tool gateway, logging
Security architectureReference patterns, approval of credential types, exceptions
Security operationsDetection rules, investigation, emergency revocation
Risk, audit and complianceEvidence that agents are inventoried, owned and reviewed

The common gap is the agent owner. When agents are created by developers or business users in low-code tools, IAM often learns of them only at an incident. Make registration a precondition for receiving any production credential. Agents can also help run IAM itself; the Agentic AI in IAM Operations Guide covers the controls that need. For board framing, use the Board and CISO Briefing.

Standards and frameworks

Agent identity is still settling. The OAuth family is stable and usable now; agent-specific work at the IETF is mostly individual drafts, and NIST's NCCoE project on software and AI agent identity and authorisation is at the concept paper stage. Track status in the Agent Identity Standards Tracker.

AreaNIST SP 800-53 Rev. 5NIST CSF 2.0ISO/IEC 27001:2022 Annex AOther
Agent inventory and ownershipAC-2, IA-4ID.AM-02, GV.RR-02A.5.16OWASP ASI10 Rogue Agents
Agent authenticationIA-9, IA-5PR.AA-01, PR.AA-03A.5.17, A.8.5RFC 8705, RFC 9449, MCP authorisation
Delegation and binding to principalSC-23, IA-5PR.AA-02A.5.18RFC 8693
Least privilege and per-action authorisationAC-3, AC-6PR.AA-05A.5.15, A.8.2OWASP ASI03; LLM06; RFC 9396
Credential protectionIA-5PR.AA-01A.5.17ATLAS AML.T0083, AML.T0098; ATT&CK T1528
Logging of agent actionsAU-2, AU-12, AC-6(9)PR.PS-04A.8.15, A.8.16ATLAS AML.M0029 for approvals

For the risk lists, see the OWASP Top 10 for Agentic Applications Guide and the Top 10 Agentic AI Identity Issues.

Where to go next

New to Agent Identity and Access? These are the foundational guides to read first.

Start here

Browse all Agent Identity & Access guides

Practitioner checklist

  • Build an inventory of every agent, MCP server and agent platform, with owner, purpose and credentials held.
  • Give each production agent its own identity; ban shared accounts and borrowed user credentials outside sandboxes.
  • Move every agent secret into a vault or broker and confirm none appear in prompts, config files, repositories or memory.
  • Set agent token lifetimes in minutes, enforce audience checks and plan sender-constrained tokens.
  • Use token exchange with an act claim for user-context calls; never forward the user's original token.
  • For MCP servers over HTTP, confirm RFC 9728 metadata, RFC 8707 resource indicators, PKCE and no token passthrough.
  • Remove admin, owner and wildcard permissions from all agents, and gate destructive actions with human approval.
  • Add agent identities to access certification and set expiry on every registration.
  • Rehearse revoking all credentials of one agent and measure how long it takes.

Standards and references

Related NHI Mgmt Group resources: Non-Human Identity (NHI) Guide · Agent Threats and Attacks Guide · Agent Controls and Monitoring Guide · OAuth Token Exchange and Delegation Guide · MCP Security Guide

PDF for subscribers

Take this guide with you

Every section, table and checklist in one PDF, with links to the sources and related guides. Subscribe to our weekly NHI & AI Identity Journal and we’ll email you a download link.

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.

NHIMG Editorial Note
Researched and written by the NHI Mgmt Group editorial team using AI tools, under the editorial direction of Lalit Choda. Facts are drawn from the sources listed on this page and checked by our automated quality process. Last updated 26 October 2026. Spotted an error? Use our contact page.
NHI Mgmt Group, the independent authority on Non-Human Identity, IAM and Agentic AI security. nhimg.org

PDF Downloads for Newsletter Subscribers

Get the guide

Enter your details and we’ll email you a download link.

The full guide is free to read online. The PDF is a thank you for subscribing.

Fill in all fields marked * and tick the PDF box to continue.