| Internet-Draft | OAuth Scope Metadata Document | October 2026 |
| Lee | Expires 19 April 2027 | [Page] |
This document describes how an OAuth scope value that is an HTTPS URI can be dereferenced to obtain a JSON document describing that scope. The document is descriptive only and does not change the authorization meaning of the scope. Dereferencing follows the pattern and security rules of the OAuth Client ID Metadata Document.¶
This note is to be removed before publishing as an RFC.¶
Discussion of this document takes place on the Web Authorization Protocol Working Group mailing list (mailto:oauth@ietf.org), which is archived at https://mailarchive.ietf.org/arch/browse/oauth/.¶
This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79.¶
Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet-Drafts is at https://datatracker.ietf.org/drafts/current/.¶
Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress."¶
This Internet-Draft will expire on 19 April 2027.¶
Copyright (c) 2026 IETF Trust and the persons identified as the document authors. All rights reserved.¶
This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Revised BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Revised BSD License.¶
Scope values are opaque strings (Section 3.3 of [RFC6749]). A client or authorization server that receives a scope from a protected resource it has not seen before has no way to learn what the scope means.¶
The problem is most visible when a single authorization server serves many protected resources behind a gateway. From the scope string alone, the authorization server cannot tell which resource defined it, and scope names may collide across resources. An AI agent acting as a client without prior arrangement has no basis for choosing which scope to request.¶
This document lets the scope value itself be an HTTPS URI from which a description can be obtained. Because the value is the location of its description, no separate discovery and no mapping between scopes and resources is needed.¶
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here.¶
A Scope Metadata URI is a scope value that adopts the constraints [CIMD] places on a client_id URL:¶
The entire scope-token (Section 3.3 of [RFC6749]) MUST be a single URI meeting these constraints. A scope value that does not is not a Scope Metadata URI and is processed as an opaque string as in [RFC6749]. In a space-delimited list of scopes, each scope-token is evaluated separately.¶
A Scope Metadata Document is a JSON object [RFC8259], served with a 200 status code and the media type "application/json". It has the following members, whose names and meanings are aligned with the type metadata of [I-D.ietf-oauth-rar-metadata-remediation].¶
Recipients MUST ignore members they do not understand. The document does not carry information used for authorization decisions, such as permitted ranges or inclusion relationships with other scopes.¶
Example request and response:¶
A dereferencing party (an authorization server or a client) MUST dereference only Scope Metadata URIs that start with a trusted prefix. How trusted prefixes are configured is a matter of deployment policy.¶
The dereferencing party sends an HTTP GET to the URI. As in [CIMD]:¶
In addition to [CIMD], the dereferencing party MUST apply the special-purpose address check to the address it actually connects to, not only to the result of an earlier DNS lookup, and SHOULD limit retrieval time.¶
If retrieval fails or the document does not conform to Section 3, then, unlike [CIMD], which aborts the authorization request in that case, the dereferencing party MUST retain the scope value as received and MUST NOT reject an authorization request solely because dereferencing failed; the scope value continues to be processed as an opaque string as in [RFC6749]. It SHOULD cache the failure for a period to avoid repeated retrieval.¶
The document is descriptive only. An authorization server MAY use it in a consent screen, and a client MAY use it when choosing scopes to request. The authorization server and the protected resource MUST NOT use it as the basis for granting or enforcing access.¶
SSRF: The dereferencing party retrieves a URI it received from elsewhere. The trusted prefix restriction and the special-purpose address prohibition (Section 4) apply together, and the SSRF considerations of [CIMD] apply in full. A check made only at an initial DNS lookup can be bypassed by DNS rebinding, which is why the address check applies to each connection.¶
Forged descriptions: An attacker could publish a misleading description to induce user consent. Trusted prefixes reduce this risk, but the party controlling documents under a prefix still has to be trusted.¶
Prompt injection: A client based on a large language model MUST treat the description as data, not as instructions.¶
The party hosting documents can observe from retrieval requests which client or authorization server handles which scope, and when. Dereferencing parties use caching to reduce retrieval frequency and MUST NOT include user-identifying information in requests.¶
This document has no IANA actions.¶
This section is to be removed before publishing as an RFC.¶