Skip to content
IAM Insights

Briefing · Draft · source · updated · Boston Identity

A WSO2 draft puts the AI agent in OAuth consent and the access token, but not how the agent gets its credential

Thilina Shashimal Senarath and Ayesha Dissanayaka of WSO2 proposed naming the agent inside OAuth's authorization code grant. The client asks consent for a named agent, the agent's token is checked against that consent when the code is exchanged, and the access token records the agent in an act claim. How the agent gets that token, they write, is outside the draft's scope, and the consent screen itself is only a MAY.

IETF Datatracker · Thilina Shashimal Senarath, Ayesha Dissanayaka · August 26, 2025 · read

share
2 findings4 sectionsAgentic identityStandards
4,024 words. With Thilina Shashimal Senarath, author, WSO2; Ayesha Dissanayaka, author, WSO2.
01

What's happening

Finding2
BI-FIND-2025-0127Lead finding

Senarath and Dissanayaka name the agent in both requests of OAuth's authorization code grant and put its sub in the access token's act claim.

Senarath and Dissanayaka write the agent into both requests of OAuth's authorization code grant and into the token that comes out. The authorization request must carry a requested_actor parameter naming the agent. The token request must carry an actor_token, a token issued to the agent that includes a sub claim, and the authorization server must check that sub against the agent the user consented to, with the code bound to the user, the client and that agent. The access token must then carry an act claim holding the agent's sub, so a resource server reads the user from sub and the agent from act.sub. The flow can start from a resource server's 401 or 403 challenge, and that server can be an MCP server or another agent.

high confidencebest source: vendor, technicalobserved Aug 2025EvidenceAuthorization and token requestsSection 4Protocol overview
flag a problem with BI-FIND-2025-0127
BI-FIND-2025-0128

The draft leaves out of scope how an agent obtains and secures its actor token, and its normative text makes a consent screen optional.

The draft leaves open the parts that decide how much the agent check proves. How an agent obtains and secures its actor token is, in the authors' words, "outside the scope of this specification, but MUST be implemented securely"; the checks it states are that the token is valid, unexpired and carries a sub matching the consented agent. The abstract says the extension ensures "secure delegation with explicit user consent", yet the normative text says the authorization server "MAY display a consent screen". It also says in one place that the access token goes to the client and in another that it goes to the actor. We read this as a design that records which agent acted without fixing how that agent proves who it is.

medium confidencebest source: vendor, technicalobserved Aug 2025EvidenceSection 4Authorization and token requests
flag a problem with BI-FIND-2025-0128
02

Section by section

4

showing 4 of 4

[1]

Introduction: the gap in OAuth and Token Exchange

Thilina Shashimal Senarath, WSO2 · Ayesha Dissanayaka, WSO2

Agentic identityStandards

The authors argue that the authorization code and client credentials grants have no way to get a user's explicit consent for a specific agent, or to treat the agent as an identity of its own. Token exchange (RFC 8693), in their reading, is built for server-side calls and impersonation and does not say how the subject token is obtained. They assert this; they offer no data.

technical artifactfrom published text

[2]

Protocol overview: resource-server-challenged consent flow

Thilina Shashimal Senarath, WSO2 · Ayesha Dissanayaka, WSO2

Agentic identityStandards

The flow runs in sixteen steps. The agent hands the client its identifier, the client calls the resource server and gets a 401 or 403 challenge, and the client sends the user to the authorization server with requested_actor. After the user consents, the client exchanges the code together with the agent's actor_token and receives a JWT. The resource server can be an MCP server, another agent or any protected resource.

technical artifactfrom published text

[3]

Authorization and token requests: requested_actor and actor_token

Thilina Shashimal Senarath, WSO2 · Ayesha Dissanayaka, WSO2

Agentic identityStandards

requested_actor is REQUIRED on the authorization request, and the authorization server MUST check that it names a recognized actor; showing a consent screen is a MAY. At the token endpoint actor_token is REQUIRED and MUST carry a sub claim, which the server matches against the agent the user approved for that code.

technical artifactfrom published text

[4]

Access token claims, resource server challenge, security considerations

Thilina Shashimal Senarath, WSO2 · Ayesha Dissanayaka, WSO2

Agentic identityStandards

The access token SHOULD follow the JWT profile of RFC 9068 and MUST carry an act claim with the agent's sub, beside the user in sub; the example puts the client in azp. Resource servers MUST validate the token and challenge when it falls short. The security section requires PKCE and single-use, short-lived codes bound to user, client and agent, and puts actor-token issuance outside the draft's scope.

technical artifactfrom published text

Terms used

OAuth
The web's standard framework for delegated authorization — letting one application act at another on a user's (or machine's) behalf without sharing passwords.
Authorization Code grant
The OAuth flow in which an app sends the user to sign in, receives a one-time authorization code, and exchanges it at the token endpoint for an access token.
Access token
An OAuth 2.0 credential, usually an opaque string, representing a specific scope and lifetime of access that the resource server enforces when a client presents it.
act claim
The OAuth token-exchange claim that names who is acting for the token's subject; nested act claims record earlier actors.
Resource server
In OAuth, the API that holds the protected data and accepts access tokens.
MCP server
The tool-providing side of the Model Context Protocol (MCP): exposes tools, resources and prompts to an MCP client, often running locally with the user's privileges.
OAuth consent
The step where a user or an admin lets an application have the permissions it asks for. In Microsoft Entra, whether ordinary users may do this on their own is a tenant setting.
Client credentials grant
An OAuth 2.0 grant in which a confidential client authenticates with its own credentials and gets an access token for resources it controls or has pre-arranged, with no resource owner involved.

Read next

Was this briefing useful?

Share this briefing

Every finding, forecast and open question on this site has a permanent ID. If we reword one, its ID stays the same, so a citation keeps pointing to the same claim.

Follow us on LinkedInRSS feed

Working on an identity problem this research touches? Talk to Boston Identity