Amazon Cognito Adds Delegated OAuth Token Exchange for AI Agents

· Original article ↗

Summary

Amazon Cognito token exchange lets services and AI agents obtain downstream tokens that preserve user identity, identify the acting service, and restrict access by audience and scope.

Key points

  • Cognito supports OAuth 2.0 Token Exchange (RFC 8693), letting a service exchange a user's access or ID token for a token intended for a downstream resource server.
  • Delegation adds an act claim identifying the service acting for the user; impersonation represents the user without identifying the service.
  • Exchanged tokens are limited to scopes allowed by both the subject token and app client, can be bound to an audience, and do not outlive the subject token or include a refresh token.
  • Cognito checks the subject token's signature, expiry, revocation status, and user status; resource servers should also validate JWT claims and, for delegated requests, the act claim.
  • Examples show exchanges performed by an MCP server, AgentCore Gateway through AgentCore Identity, or an agent running on AgentCore Runtime.
  • The feature can be enabled in Cognito app-client authentication flows and used through the /oauth2/token endpoint or the GetDerivedToken API.

Article Details

Event Type
Amazon Cognito feature announcement: OAuth 2.0 token exchange for impersonation and delegation
Impact
The feature lets services and AI agents exchange a user token for a resource-bound token with only permitted scopes. Delegated tokens can identify both the user and the acting service in the act claim, supporting downstream authorization and audit logging. Cognito validates the exchange and does not allow it to add permissions beyond those available in the subject token.

Vendors

Products

Related Articles