Skip to content
Agent Identity

IETF · January 2025

Best Current Practice for OAuth 2.0 Security

RFC 9700 (BCP 240)

T. Lodderstedt, J. Bradley, A. Labunets, D. Fett

RFCStableIdentity + Authn + AuthzFoundationField guide

Agent runtimes leak tokens through logs, traces, and model context. RFC 9700's push toward sender-constrained, audience-restricted, short-lived tokens is the cheapest security upgrade you can make before AAuth or WIMSE.

At a glance

Problem
RFC 6749's original threat model is incomplete. Mix-up attacks, authorization-code injection, token leakage via URLs, and unsafe grants showed up in production. This BCP updates 6749/6750/6819 with what actually works.
Identity / authn / authz
Security profile sitting across authentication of the client and authorization of the request. It is why OAuth 2.1 exists.

Actors

  • Clients
  • Authorization servers
  • Resource servers

01

The gap for agents

RFC 6749's original threat model did not include mix-up, authorization-code injection at confidential clients, or token leakage via URLs at internet scale. RFC 9700 (BCP 240, January 2025) is the update that makes 2.0 safe enough to build agents on.

Agent runtimes add leakage paths (prompts, traces, shared tool hosts) that make 9700's push toward sender-constrained, audience-restricted, short-lived tokens the cheapest upgrade before AAuth or WIMSE.

02

Actors and trust boundaries

Assumes attackers on the network, in the browser, and who can steal tokens from clients. Authorization servers, clients, and resource servers all have MUST/SHOULD mitigations. An agent host is a client in this document — usually a confidential web app or a public native/browser app, not a new role.

03

Mechanics

Not a new protocol. It mandates authorization code + PKCE, exact redirect matching, sender-constrained or rotating refresh tokens for public clients, audience-restricted access tokens when multiple resources exist, and deprecates implicit and password grants. Mix-up mitigation includes the iss authorization-response parameter (RFC 9207). Tokens must not be placed in URIs.

An update draft (draft-ietf-oauth-security-topics-update) was an active WG document in July 2026. Read RFC 9700 first; treat the update as pending deltas.

iss in authorization responsefrom spec
Quoted mix-up mitigation; see RFC 9207, required by this BCP's direction and by MCP.
PKCE for all authorization-code clientsfrom spec
Quoted direction of RFC 9700, folded into OAuth 2.1.

04

Step-by-step flows

Flow 1

9700-shaped authorization code

  1. 1

    Register exact redirect URIs. Use HTTPS except native loopback.

  2. 2

    Authorization code + PKCE S256. Include resource indicators if talking to a specific API.

  3. 3

    Validate iss on the response against the AS you intended.

  4. 4

    Token request on the back channel. Store tokens outside model context. Prefer DPoP or mTLS.

  5. 5

    RS checks audience. No tokens in query strings.

05

Identity vs authentication vs authorization

Security profile sitting across client authentication and request authorization. It is why OAuth 2.1 exists. It is not an identity protocol.

06

How it composes

  • OAuth 2.1

    2.1 is this BCP consolidated into the core document.

  • FAPI 2.0

    FAPI 2.0 Security Profile is explicitly built on RFC 9700 and then tightens further (PAR, confidential-only, sender-constrained access tokens).

  • DPoP

    Recommended sender-constraint mechanism when mTLS is impractical.

  • AS issuer identification

    RFC 9207 is the concrete mix-up fix 9700 relies on.

07

What bites agent implementers

  • Implementing 6749 without 9700

    The most common agent-SDK failure. If your library still offers implicit, it is not BCP-compliant.

  • Audience-unrestricted tokens

    9700 requires restricting tokens when multiple RSes exist. MCP makes this a MUST even if the AS currently ignores resource.

  • Refresh tokens in agent homedirs

    Public-client refresh tokens must be sender-constrained or one-time-use. A stolen refresh token is a standing session.

08

Stability — what you can ship

RFC 9700 (BCP 240), January 2025, T. Lodderstedt, J. Bradley, A. Labunets, D. Fett. Stable BCP. Ship it today. https://www.rfc-editor.org/rfc/rfc9700.html

Catalog claims (short form)

iss in authorization response
Mix-up mitigation; see RFC 9207.

Implementer notes

An update draft (draft-ietf-oauth-security-topics-update) was an active WG document in July 2026. Read RFC 9700 first; treat the update as pending deltas. FAPI 2.0 Security Profile is explicitly built on this BCP.

Relationship to others

Primary sources

  • RFC 9700https://www.rfc-editor.org/rfc/rfc9700.html