| Internet-Draft | OAuth 2.0 RAR Metadata and Error Signali | June 2026 |
| Zehavi | Expires 5 December 2026 | [Page] |
OAuth 2.0 Rich Authorization Requests (RAR) [RFC9396], standardizes the exchange and processing of authorization details but does not define metadata to describe authorization details types.¶
The document addresses a practical interoperability challenge regarding metadata of authorization details types, allowing clients tp dynamically discover metadata instead of relying on out-of-band agreements. It also standardizes error signaling, in case insufficient RAR was provided and offers structured ways of remediation.¶
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 5 December 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 detailed and structured authorization, enabling advanced authorization models across domains such as banking and healthcare.¶
However, RAR [RFC9396] does not specify how clients discover metadata describing valid authorization details objects. Such metadata and documentation are obtained out-of-band.¶
This document defines:¶
A new authorization server endpoint: authorization_details_types_metadata_endpoint, providing metadata for authorization details types, including documentation and JSON Schema definitions [JSON.Schema].¶
Adds required authorization details types to OAuth 2.0 Protected Resource Metadata [RFC9728] response.¶
A new normative OAuth 2.0 WWW-Authenticate Error Code, for resource servers to indicate insufficient_authorization_details as the cause of error.¶
An OPTIONAL response body that MAY accompany the insufficient_authorization_details error, providing an informative and actionable authorization details object. This object can be used directly in a follow-up OAuth request.¶
RECOMMENDED handling of large RAR [RFC9396] authorization details objects when issuing JWT access tokens, to avoid failures due to token sizes exceeding header size restrictions.¶
The optional providing of actionable authorization details objects by resource servers enables:¶
Simplification for clients who can directly remediate without learning to construct valid authorization details objects.¶
Support for ephemeral, interaction-specific claims from resource server, such as for example a risk profile or an internal interaction identifier, guiding authorization servers on required authentication strength and consent flows.¶
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_required, to be included in the response of OAuth Protected Resource Metadata [RFC9728].¶
RECOMMENDED. 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 new authorization_details_types_required 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_required": {
"oneOf": ["payment_initiation", "payment_approval",
"beneficiary_designation"]
}
}
¶
Note: When resource servers accept access tokens from several authorization servers, clients can discover which authorization details types each authorization server supports.¶
The following JSON syntax defines a required types expression that describes permitted combinations of required authorization_details types. This expression allows selection operators (oneOf, allOf) and boolean composition (and, or) to be combined in a predictable manner.¶
A required types expression is a JSON object whose top-level claims 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.¶
Specifies that the selection MUST include a and b, and one of c or d.¶
{
"and": [
{ "allOf": ["a", "b"] },
{ "oneOf": ["c", "d"] }
]
}
¶
Specifies that the selection MUST include either c and d, or one of a or b.¶
{
"or": [
{ "allOf": ["c", "d"] },
{ "oneOf": ["a", "b"] }
]
}
¶
RAR [RFC9396] section 9 instructs that authorization servers MUST provide approved RAR objects to resource servers for enforcement. The authorization server MAY add the authorization_details attribute to access tokens in JSON Web Token (JWT) format or to token introspection responses.¶
Including large RAR objects in JWT access tokens may cause interoperability loss due to token sizes exceeding header size restrictions.¶
Authorization servers SHOULD support a configurable maximum approved RAR objects size threshold (in bytes). If the size exceeds this threshold, JWT access tokens SHALL NOT include the authorization_details claim; instead, approved authorization details will be accessed via token introspection [RFC7662].¶
When receiving error insufficient_authorization_details, if response body contains an authorization_hint claim that matches a valid token in client's possession, client SHOULD retry calling the failing endpoint using the matching token.¶
If the response body contains an authorization_details claim, the client MAY include it in a subsequent OAuth request to obtain a token, which it MAY then use to retry the failing endpoint.¶
Otherwise, the client MAY consult metadata:¶
Fetch resource metadata to discover accepted authorization servers and required authorization_details types.¶
Fetch authorization server metadata to discover authorization_details_types_supported.¶
Fetch authorization server's authorization_details_types_metadata_endpoint to
obtain authorization details type metadata and schemas.¶
Locate schema or retrieve schema_uri.¶
Construct authorization details conforming to the schema and include in subsequent OAuth request to obtain a token with which it MAY retry calling the failing endpoint.¶
Advertise in resource metadata authorization_details_types_required, where relevant.¶
Verify access tokens against required authorization details.¶
If insufficient, the resource server MUST 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_required is defined for OAuth 2.0 protected resource metadata [RFC9728].¶
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_required": {
"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_required": {
"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"
],
"instructed_amount": {
"currency": "EUR",
"amount": "123.50"
},
"creditor_name": "Merchant A",
"creditor_account": {
"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"
],
"instructed_amount": {
"currency": "EUR",
"amount": "123.50"
},
"creditor_name": "Merchant A",
"creditor_account": {
"bic": "ABCIDEFFXXX",
"iban": "DE02100100109307118603"
}
}
¶
-03¶
Added authorization_hint to guide client on token selection and updated client processing rules accordingly¶
Added security consideration on confidentiality of RS-provided authorization_details¶
Added authorization server considerations for handling large RAR objects in JWT access tokens¶
-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 helped shape the final specification: Rune Grimstad.¶