Agents
Agent identity & delegated access
Who is the agent acting as, with which permissions, and how is that proven?
What it is and why it exists
An agent acting for a user should carry that user’s identity and only their permissions — via OAuth delegated tokens with narrow scopes, short lifetimes and audit trails — not a shared super-user service account. Identity and privilege abuse is a top agentic risk.
Quick prototype
One API key with full access.
In production, at scale
Per-user OAuth tokens with minimal scopes, token exchange for downstream calls, no token passthrough to third parties, credentials kept out of the model context, and logs tying every action to user + agent + run.
Vendors and tools
| OAuth 2.0 / token exchange | Delegated access |
|---|---|
| Auth0 / Okta / Entra agent identity features | Identity for agents |
| MCP authorization (OAuth) | Per-server auth |
On AWS: Bedrock AgentCore Identity for agent credentials and OAuth flows; IAM roles with session policies.
How it fails
- Agent can do anything the service account can
- Tokens in prompts or logs
- No way to tell which user an action was for
What the interviewer asks next
Why not one service account for the agent?
Then every user effectively gets its permissions, and an injected instruction can act far beyond what the requesting user could do — a confused deputy.