AI agent authorization
How an AI agent gets and proves permission to act for a user: delegated, scoped, short-lived tokens checked by the API it calls, never by the model.
An agent that books meetings or reads a CRM acts on behalf of a person, so it needs credentials. The weak pattern is a shared API key with full access sitting in the agent’s config. The better pattern is delegation: the user grants the agent a token through OAuth, limited to certain scopes and one service, expiring soon, and every call is checked by the API, never by the model.
The MCP authorization spec follows this model. It builds on OAuth 2.1, requires PKCE, requires clients to name the target server with RFC 8707 resource indicators, and forbids an MCP server from passing the user’s token through to other APIs, a common path to the confused deputy problem. OWASP files failures here under ASI03 Identity and Privilege Abuse. Each agent should also have its own non-human identity, so logs show which agent did what.
Sources
- Model Context Protocol: Specification 2025-11-25, Authorization modelcontextprotocol.io
- OWASP GenAI Security Project: ASI03 Identity and Privilege Abuse genai.owasp.org
Related terms
- OAuth: A standard that lets an app act on a user’s account elsewhere (mail, calendar, files) without ever seeing the password.
- Non-human identity (agent identity): Accounts, keys and tokens used by software rather than people: service accounts, API keys, CI tokens and, more and more, AI agents.
- Confused deputy (AI agents): A program with broad permissions is tricked into using them for someone who should not have them; agents with shared service accounts are a common case.
- MCP (Model Context Protocol): An open protocol for plugging tools and data into AI apps: write a server once, use it from any client.
- Principle of least privilege: Every person, service and AI agent gets only the access needed for its task, for only as long as needed, so a stolen account can do little harm.
- Authentication vs authorization (authn vs authz): Authentication proves who you are; authorization decides what you may do. Most access bugs live in the second, after a perfectly good login.
