Dev News Daily ENDE

Amazon Cognito adds OAuth 2.0 token exchange, with an act claim for agents acting for users

Amazon Web Services announced on 12 November that Amazon Cognito now supports OAuth 2.0 token exchange as defined in RFC 8693. Cognito is AWS's managed service for sign-up, sign-in and access control in web and mobile applications, and the announcement adds AI agents to that list explicitly.

The feature addresses a common pattern in service chains. When one service calls another on behalf of a signed-in user, it has so far had two options in Cognito: pass the user's original token further down the chain, or write and run its own logic for minting tokens. With token exchange the calling service presents the user's token at the token endpoint and receives a new one meant for a specific downstream service.

AWS lists three properties of the exchanged token. It can carry a narrower scope than the original, it is bound to a single audience, and it is issued without a refresh token. A service that receives it therefore gets only the permission it needs, cannot replay it against a different API, and cannot keep extending its own access.

The second part concerns delegation. If the caller includes an actor token in the request, Cognito adds an act claim to the result that identifies the intermediary. Downstream services can then tell a request an agent made for a user apart from one the user made directly. AWS's own example is a Model Context Protocol server that trades the user's token for a tightly scoped token to reach a backend API, with the act claim naming the MCP server as the actor.

The exchange is available through the Cognito token endpoint, according to the announcement, which also points to the SDKs; pricing and Regional availability are listed on the service pages.

Amazon Cognito adds OAuth 2.0 token exchange, with an act claim for agents acting for users
Amazon Cognito adds OAuth 2.0 token exchange, with an act claim for agents acting for users — Dev News Daily

Why it matters

Forwarding a user's full token through several hops is the shortcut that turns one compromised service into access everywhere that token is accepted. RFC 8693 has been the standard answer for years, but teams on Cognito had to build it themselves. The act claim is the more interesting detail for agent systems: audit logs and policy checks can finally see that a call came from software acting for a person, not from the person.

Written by Victoria Shinder.