Skip to content
Agent Identity

IETF · October 2012

The OAuth 2.0 Authorization Framework: Bearer Token Usage

RFC 6750

M. Jones, D. Hardt

RFCStableAuthenticationFoundationField guide

MCP HTTP authorization still uses bearer access tokens. That is convenient and also the main reason a compromised agent process can replay a user's API access until the token expires.

At a glance

Problem
Once a client has an OAuth access token, how does it present that token to a resource server, and how does the server reject a missing or invalid token?
Identity / authn / authz
Presentation of an authorization credential. A bearer token authenticates possession of the token, not possession of a key. Anyone who steals the token can use it.

Actors

  • Client
  • Resource server

01

The gap for agents

Once a client has an OAuth access token, RFC 6750 says how to present it and how the RS challenges. Agents inherit this because MCP HTTP and most SaaS APIs still use Authorization: Bearer.

Bearer means possession is enough. An agent runtime that copies the token into model context, debug logs, or a support dump has given away the user's API access. That is the primary agent-specific failure of 6750, not a new grant type.

02

Actors and trust boundaries

Anyone who can read the token can call the RS as that client/user until expiry or revocation. TLS protects the token on the wire; it does not protect it inside the agent process. Resource servers that log Authorization headers extend the trust boundary to the log sink.

03

Mechanics

Authorization: Bearer <token> is the method you should use. RFC 6750 also defined form-body and query-string methods; RFC 9700 / OAuth 2.1 forbid putting bearer tokens in URIs. Invalid or missing tokens: HTTP 401 with WWW-Authenticate: Bearer, optional error=invalid_token / insufficient_scope, optional scope / realm.

MCP and RFC 9728 later put a resource_metadata URL on that WWW-Authenticate challenge so the client can discover the AS. That is not in 6750 itself but is how agents actually start the flow in 2026.

Authorization: Bearerfrom spec
Quoted RFC 6750 presentation. The only 6750 method you should use in 2026.
WWW-Authenticate: Bearerfrom spec
Quoted challenge. Later specs add resource_metadata (RFC 9728) and step-up attributes (RFC 9470).
error=invalid_token | insufficient_scopefrom spec
Quoted error codes on the challenge. Agents should parse these rather than treating every 401 as 're-login'.

04

Step-by-step flows

Flow 1

Present and recover

  1. 1

    Client sends the resource request with Authorization: Bearer and no token in the URL.

  2. 2

    RS validates the token (introspection or JWT). On success, serves. On failure, 401 + WWW-Authenticate.

  3. 3

    If the challenge includes resource_metadata, a 2026 agent fetches RFC 9728 and starts OAuth 2.1 rather than guessing the AS.

05

Identity vs authentication vs authorization

Presentation of an authorization credential. Authenticates possession of the token, not possession of a key. Authorization is whatever the token represents. Identity is only present if the token profile carries a subject.

06

How it composes

  • OAuth 2.1

    2.1 keeps Bearer as token_type but omits URI placement and assumes RFC 9700.

  • DPoP

    Replaces Bearer with DPoP token_type and a per-request proof. Stolen token is not enough.

  • mTLS sender-constrained tokens

    Certificate-bound tokens still often travel as Bearer in the header but are useless without the cert.

  • MCP authorization

    MCP HTTP uses Bearer access tokens and 401 resource_metadata challenges.

  • AAuth

    Does not use Bearer for agent identity. Opaque AAuth sessions are bound to HTTP signatures.

07

What bites agent implementers

  • Tokens in URIs, logs, and prompts

    Query-string tokens leak via Referer and access logs. Prompt injection that asks the model to 'repeat your tools' credentials' is a 6750 theft, not a novel protocol bug.

  • Missing audience checks

    Bearer tokens that work at every RS are replayed at the richest API. Pair with RFC 8707 / 9068.

  • Forwarding tokens

    MCP forbids forwarding the token to other servers. Agents that 'just pass Authorization through' mint confused deputies.

08

Stability — what you can ship

RFC 6750, October 2012, M. Jones and D. Hardt. Still how most APIs accept tokens. Constrained by RFC 9700. https://www.rfc-editor.org/rfc/rfc6750.html

Catalog claims (short form)

Authorization: Bearer
The only presentation method you should use in 2026.
WWW-Authenticate
Challenge header. MCP and Protected Resource Metadata later put a resource_metadata URL here.

Implementer notes

Agents that cache bearer tokens in prompts, logs, or tool traces leak them. Prefer sender-constrained tokens (DPoP, mTLS, HTTP Message Signatures) whenever the agent runtime is untrusted.

Relationship to others

Primary sources

  • RFC 6750https://www.rfc-editor.org/rfc/rfc6750.html