AWS Security·
Delegate user access to AI agents with Amazon Cognito token exchange
TL;DR
When AI agents call downstream APIs for users, forwarding user tokens hides the acting service, while service-only tokens lose the user’s identity. Amazon Cognito token exchange lets agents or intermediaries obtain narrowly scoped tokens that identify both the user and the service acting for them. This enables delegated access without expanding permissions and gives APIs clearer authorization checks and audit trails.
Relevant links
- Amazon Cognitoaws.amazon.com
- Artificial Intelligenceaws.amazon.com
- Generative AIaws.amazon.com
- Security, Identity, & Complianceaws.amazon.com
- OAuth 2.0www.rfc-editor.org
- RFC 8693www.rfc-editor.org
- Model Context Protocol (MCP) servermodelcontextprotocol.io
- OAuth token exchange featureaws.amazon.com
- Amazon Cognitoaws.amazon.com
- Amazon Bedrock AgentCore Identitydocs.aws.amazon.com
- backend for frontend (BFF)aws.amazon.com
- GetDerivedTokendocs.aws.amazon.com