| Internet-Draft | OAuth 2.0 RAR Metadata and Error Signali | February 2026 |
| Zehavi | Expires 26 August 2026 | [Page] |
OAuth 2.0 Rich Authorization Requests (RAR), as defined in [RFC9396], enables fine-grained authorization requests, using structured JSON objects.¶
While RAR [RFC9396] standardizes the exchange and processing of authorization details, it does not specify metadata describing authorization details types.¶
This document defines a machine-readable metadata format for authorization servers to provide authorization details type documentation including JSON Schema [JSON.Schema] definitions, as well as interoperable discovery via OAuth Resource Server Metadata [RFC9728].¶
It also defines a new WWW-Authenticate normative OAuth error code, insufficient_authorization_details, enabling resource servers to indicate inadequate authorization details as the cause of failure, as well as an OPTIONAL response body which MAY be returned alongside the insufficient_authorization_details error, providing an informative yet actionable authorization details object, which can be used directly in a subsequent OAuth request.¶
This note is to be removed before publishing as an RFC.¶
The latest revision of this draft can be found at https://yaron-zehavi.github.io/oauth-rich-authorization-requests-metadata/draft-zehavi-oauth-rar-metadata.html. Status information for this document may be found at https://datatracker.ietf.org/doc/draft-zehavi-oauth-rar-metadata/.¶
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/. Subscribe at https://www.ietf.org/mailman/listinfo/oauth/.¶
Source for this draft and an issue tracker can be found at https://github.com/yaron-zehavi/oauth-rich-authorization-requests-metadata.¶
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 26 August 2026.¶
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.¶
OAuth 2.0 Rich Authorization Requests (RAR) [RFC9396] allows OAuth clients to request structured, fine-grained authorization, which has enabled advanced authorization models across many domains, such as Banking & Healthcare.¶
However, RAR [RFC9396] does not specify how clients obtain metadata describing valid authorization details objects. Clients must therefore rely on out-of-band documentation or static ecosystem profiles.¶
This document addresses this gap by:¶
Defining a new authorization server endpoint: authorization_details_types_metadata_endpoint, providing metadata for authorization details types, including human-readable documentation as well as embedded JSON Schema definitions [JSON.Schema].¶
Adding supported / required authorization details types to OAuth 2.0 Protected Resource Metadata [RFC9728] response.¶
Defining a standardized error signaling mechanism using the WWW-Authenticate response header, allowing resource servers to specify insufficient_authorization_details as the cause of error.¶
Defining an OPTIONAL response body, included with an insufficient_authorization_details error, providing an informative authorization details object, whose inclusion in a new OAuth request shall result, if approved, in an access token satisfying the endpoint's requirements.¶
The OPTIONAL providing of actionable authorization details objects by resource servers enables:¶
Higher interoperability and simplification by relieving clients from having to figure out how to construct valid authorization details objects, instead providing them with ready-to-use authorization_details objects, to be included in a subsequent OAuth request.¶
Support for ephemeral, interaction-specific claims provided by the resource domain in the authorization details object, such as for example a risk score, a risk profile or an internal interaction identifier. Resource servers MAY use this to guide authorization servers as to the required authentication strength and consent flow.¶
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.¶
There are two main proposed flows:¶
This document specifies a new OPTIONAL metadata attribute: authorization_details_types_supported, to be included in the response of OAuth Protected Resource Metadata [RFC9728].¶
OPTIONAL. a JSON object that conforms to the syntax described in Section 4.1 for a required types expression.¶
The following is a non-normative example response with the added authorization_details_types_supported attribute:¶
HTTP/1.1 200 OK
Content-Type: application/json
{
"resource":
"https://resource.example.com/payments",
"authorization_servers":
["https://as1.example.com",
"https://as2.example.net"],
"bearer_methods_supported": ["header"],
"scopes_supported": ["payment"],
"resource_documentation":
"https://resource.example.com/docs/payments.html",
"authorization_details_types_supported": {
"oneOf": ["payment_initiation", "payment_approval",
"beneficiary_designation"]
}
}
¶
Note: When resource servers accept access tokens from several authorization servers, interoperability is maintained and confusion is prevented, because clients can discover which authorization details types each authorization server supports.¶
The following JSON syntax defines a required types expression to declaratively describe permitted combinations of required authorization_details types. This expression allows selection operators (oneOf, allOf, constraints) and boolean composition (and, or) to be combined in a predictable manner.¶
A required types expression is a JSON object that MUST contain exactly one of the following attributes:¶
Attributes definition:¶
OPTIONAL. a non-empty JSON array of required types expressions. When and is specified, the expression is satisfied if all contained expressions are satisfied.¶
OPTIONAL. a non-empty JSON array of required types expressions. When or is specified, the expression is satisfied if at least one contained expression is satisfied.¶
OPTIONAL. a non-empty JSON array of strings identifying authorization_details types. When oneOf is specified, the expression is satisfied if exactly one of the listed types is present.¶
OPTIONAL. a non-empty JSON array of strings identifying authorization_details types. When allOf is specified, the expression is satisfied if all of the listed types are present.¶
OPTIONAL. a JSON object defining cardinality and exclusion constraints over a set of authorization_details types. The object MUST contain the types attribute and MAY contain the attributes min, max, exact, and forbidden. Constraints attributes definition:¶
REQUIRED. a non-empty JSON array of strings identifying the authorization_details types to which the constraints apply.¶
OPTIONAL. a non-negative integer indicating
the minimum number of authorization_details
types from types that MUST be present.
This attribute MUST NOT be used together
with the exact attribute.¶
OPTIONAL. a non-negative integer indicating
the maximum number of authorization_details
types from types that MAY be present.
This attribute MUST NOT be used together
with the exact attribute.¶
OPTIONAL. a non-negative integer indicating
the exact number of authorization_details
types from types that MUST be present.
This attribute MUST NOT be used together
with the min or max attributes.¶
OPTIONAL. a non-empty JSON array, whose each element is an array of authorization_details types identifiers, representing a combination that MUST NOT be present together.¶
Specifies that the selection MUST include a and b, and one of c or d.¶
{
"required_types": {
"and": [
{ "allOf": ["a", "b"] },
{ "oneOf": ["c", "d"] }
]
}
}
¶
Specifies that the selection MUST include one of a or b, and exactly two of [c,d,e], but the combination of d and e together is forbidden.¶
{
"required_types": {
"and": [
{ "oneOf": ["a", "b"] },
{
"constraints": {
"types": ["c", "d", "e"],
"exact": 2,
"forbidden": [["d", "e"]]
}
}
]
}
}
¶
Specifies that the selection MUST include either c and d, or one of a or b.¶
{
"required_types": {
"or": [
{ "allOf": ["c", "d"] },
{ "oneOf": ["a", "b"] }
]
}
}
¶
Specifies that at least two of {a,b,c} MUST be present, but the combination of a and c together is forbidden.¶
{
"required_types": {
"constraints": {
"types": ["a","b","c"],
"min": 2,
"forbidden": [ ["a","c"] ]
}
}
}
¶
Specifies that exactly two of {a,b,c} MUST be present.¶
{
"required_types": {
"constraints": {
"types": ["a","b","c"],
"exact": 2
}
}
}
¶
If encountering error insufficient_authorization_details, check if body.authorization_details exists and if provided MAY include in subsequent OAuth request.¶
Otherwise consult metadata:¶
Fetch resource metadata to discover accepted authorization servers and supported authorization_details types.¶
Fetch authorization server metadata to discover authorization_details_types_supported.¶
Fetch authorization server's authorization_details_types_metadata_endpoint to obtain metadata and schema¶
Locate schema or retrieve schema_uri.¶
Construct authorization details conforming to the schema and include in subsequent OAuth request.¶
Advertise in resource metadata authorization_details_types_supported, where relevant.¶
Verify access tokens against required authorization details.¶
If insufficient, return HTTP 403 with WWW-Authenticate: Bearer error="insufficient_authorization_details".¶
OPTIONALLY provide also an HTTP body with an informative actionable authorization_details object.¶
HTTP 403 responses with response bodies may be cached or replayed in unexpected contexts.
Recommended mitigation is resource servers SHALL use Cache-Control: no-store response header.¶
| Error Code | Description |
|---|---|
| insufficient_authorization_details | The request is missing required authorization details or the provided authorization details are insufficient. |
The metadata attribute authorization_details_types_metadata_endpoint is defined for OAuth 2.0 authorization server metadata as a URL.
The metadata attribute authorization_details_types_supported is defined for OAuth 2.0 protected resource metadata.¶
This section provides non-normative examples of how this specification may be used to support specific use cases.¶
HTTP/1.1 200 OK
Content-Type: application/json
{
"resource": "https://resource.example.com/payments",
"authorization_servers":
["https://as1.example.com",
"https://as2.example.net"],
"bearer_methods_supported": ["header"],
"scopes_supported": ["payment"],
"resource_documentation":
"https://resource.example.com/docs/payments.html",
"authorization_details_types_supported": {
"oneOf": ["payment_initiation", "payment_approval",
"beneficiary_designation"]
}
}
¶
HTTP/1.1 200 OK
Content-Type: application/json
{
"resource": "https://health-api.nhn.no/health-information",
"authorization_servers": ["https://helseid-sts.nhn.no"],
"bearer_methods_supported": ["header"],
"scopes_supported":
["nhn:health-api/read", "nhn:health-api/write"],
"resource_documentation": "https://utviklerportal.nhn.no",
"authorization_details_types_supported": {
"allOf": ["helseid_authorization",
"nhn:tillitsrammeverk:parameters"]
}
}
¶
Client uses access token obtained at login to call payment initiation API¶
POST /payments HTTP/1.1
Host: resource.example.com
Content-Type: application/json
Authorization: Bearer eyj... (access token from login)
{
"type": "payment_initiation",
"locations": [
"https://resource.example.com/payments"
],
"instructedAmount": {
"currency": "EUR",
"amount": "123.50"
},
"creditorName": "Merchant A",
"creditorAccount": {
"bic": "ABCIDEFFXXX",
"iban": "DE02100100109307118603"
}
}
¶
POST /payments HTTP/1.1
Host: resource.example.com
Content-Type: application/json
Authorization: Bearer eyj... (payment approval access token)
{
"type": "payment_initiation",
"locations": [
"https://resource.example.com/payments"
],
"instructedAmount": {
"currency": "EUR",
"amount": "123.50"
},
"creditorName": "Merchant A",
"creditorAccount": {
"bic": "ABCIDEFFXXX",
"iban": "DE02100100109307118603"
}
}
¶
-02¶
-01¶
Authorization details moved to HTTP body and made OPTIONAL¶
Metadata pointer from resource metadata url, full authorization details types metadata on authorization server new endpoint¶
-00¶
Document creation¶
The authors would like to thank the following individuals who contributed ideas, feedback, and wording that shaped and formed the final specification: Rune Grimstad.¶