| Internet-Draft | OAuth 2.0 RAR Metadata and Error Remedia | August 2026 |
| Zehavi | Expires 10 February 2027 | [Page] |
OAuth 2.0 Rich Authorization Requests (RAR) [RFC9396] standardizes the exchange and processing of authorization details but does not define metadata for describing authorization details types.¶
In addition, no interoperable guidance is offered to clients, to remediate failures by resource servers due to insufficient authorization details.¶
This document addresses this interoperability challenge, allowing clients to dynamically discover metadata instead of relying on out-of-band agreements, as well as standardizes failure signaling including interoperable remediation when insufficient authorization details are the cause of failure.¶
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 10 February 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.¶
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 authorization details type metadata, including documentation and JSON Schema definitions [JSON.Schema].¶
A new normative OAuth 2.0 WWW-Authenticate Error Code, for resource servers to indicate insufficient_authorization as the cause of the error.¶
A new OAuth 2.0 WWW-Authenticate response parameter, authorization_remediation, providing actionable authorization details objects, to be used directly for remediation in a follow-up OAuth request.¶
Authorization server considerations for when RAR authorization details objects should perhaps be omitted from JWT access tokens and provided instead through token instrospection.¶
Providing clients with actionable authorization details objects enables:¶
Interoperability benefit as clients can simply and directly proceed to remediate, without first learning how to construct valid authorization details objects.¶
Support for ephemeral, interaction-specific attributes included by the resource server, such as a risk profile or an internal interaction identifier, guiding authorization servers on the 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.¶
Client remediates using actionable authorization details objects provided by resource server:¶
+--------------------+
+----------+ (B) API Request | |
| |---------------------->| Resource |
(A) User +---| | | Server |
Starts| | |<----------------------| |
Flow +-->| Client | (C) 401 Unauthorized +--------------------+
| | WWW-Authenticate: Bearer
| | error="insufficient_authorization",
| | error_description=[human readable message],
| | authorization_remediation=[required
| | authorization_details]
| | :
| | : +--------------------+
| | : | Authorization |
| | (D) Authorization | Server |
| | Request + RAR |+------------------+|
| |---------------------->|| ||
| | || Authorization ||
| |<----------------------|| Endpoint ||
| | (E) Authorization Code|| ||
| | : |+------------------+|
| | : | |
| | (F) Token Request |+------------------+|
| |---------------------->|| ||
| | || Token Endpoint ||
| |<----------------------|| ||
| | (G) Access Token |+------------------+|
| | : +--------------------+
| | :
| | :
| | (H) Retry API Call +--------------------+
| | with Token | |
| |---------------------->| Resource |
| | | Server |
| |<----------------------| |
| | (I) 200 OK + Resource +--------------------+
| |
+----------+
¶
Figure: Client remediates using actionable authorization details objects provided by resource server¶
(A) The user starts the flow.¶
(B) The client calls an API with an access token.¶
(C) Resource server returns HTTP 401 with a WWW-Authenticate header with error code insufficient_authorization and in authorization_remediation the required authorization details objects.¶
(D) The client uses the provided authorization details objects in a new OAuth + RAR [RFC9396] request.¶
(E) Authorization server returns authorization code.¶
(F-G) The client exchanges authorization code for access token.¶
(H) The client makes an API request with the (RAR) access token.¶
(I) Resource server validates access token and returns successful response.¶
Pursuant with RAR [RFC9396] section 9, 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.¶
There may however be cases, where due to various considerations such as token size or information privacy, including approved RAR objects in JWT access tokens would be advised against.¶
It is RECOMMENDED that when an authorization server issues JWT access tokens, it should consider the size, sensitivity, and privacy implications of including the authorization_details attribute. Where appropriate, the authorization server SHOULD omit this attribute from JWT tokens and instead provide the approved RAR objects to resource servers via the token introspection endpoint. This endpoint SHOULD use appropriate client authentication methods to prevent unauthorized access, in case of token leakage.¶
General:¶
Client MAY attempt calling resource server, either on first attempt or as a remediation step, using any valid tokens which were obtained following a remediation challenge from same resource server origin, which included an authorization_reference, as such tokens are not limited for single-use.¶
Existing tokens whose authority is inclusive may permit resource calls requiring lower authority, despite their authorization_reference value differs from value obtained in other remediation challenges. For example, a recurring direct debit token permitting up to 100$ can authorize a 80$ debit, although the remediation challenges returned when attempting 80$ or 100$ debits with insufficient authority, will differ in their authorization_details and authorization_reference values.¶
Therefore attempting a 80$ debit with an existing token permitting 100$ debits may succeed.¶
Handling an HTTP 401 failure response:¶
When a client receives an HTTP 401 response with WWW-Authenticate error code insufficient_authorization and an authorization_remediation parameter, it SHOULD process it as follows.¶
The client decodes the base64url-encoded authorization_remediation JSON object and extracts:¶
The client proceeds to this step if: (a) no authorization_reference was present, (b) no matching token in client's possession was found, (c) a matched token was rejected by the resource server (Step 2, item 4), or (d) the client elects to skip an existing token lookup and use authorization_details directly.¶
The client uses the authorization_details from the authorization_remediation response in a new OAuth authorization request per [RFC9396]. The client MAY use any grant type or extension that supports RAR (such as PAR [RFC9126], JAR [RFC9101], etc).¶
Upon successful token issuance, if the triggering resource server response included an authorization_reference, the client SHOULD persist the newly obtained token associated with that reference value and the resource server origin in its in-session token storage. This token-to-reference association enables future lookups in Step 2 when the same authorization_reference is encountered again.¶
The client retries the failing request with the newly obtained token.¶
If after obtaining a new token and retrying, the resource server still returns insufficient_authorization:¶
If the new response contains a different authorization_reference, the client MAY attempt remediation again (subject to implementation-defined retry limits).¶
If the new response contains the same authorization_reference, the client MUST NOT loop — it SHOULD treat the failure as non-remediable and report an error to the user or calling application.¶
Clients MAY ignore authorization_reference entirely if they do not implement token caching or reuse. In that case, each insufficient_authorization response triggers a fresh authorization request using the provided authorization_details.¶
If the client's current authorization server does not support the required authorization details types (as indicated by its metadata), the client MAY use Protected Resource Metadata [RFC9728] to discover alternative authorization servers for the resource.¶
The token storage MUST be scoped per end-user session. Concurrent users operating through the same client instance MUST maintain separate token storage instances.¶
When a resource server receives a request with an OAuth token:¶
Verify token validity following [RFC6750] or [RFC9068] if JWT profiled. If the token is invalid for reasons other than insufficient authorization details, return the appropriate existing error code (e.g., invalid_token).¶
| Error Code | Error Usage Location | Change Controller | Specification Document |
|---|---|---|---|
| insufficient_authorization | Resource access error response | IETF | RFC XXXX, Section X |
This section provides non-normative examples of how this specification may be used to support specific use cases.¶
-06¶
Expanded processing rules to be more explicit, using Jeff Lombardo's feedback.¶
Explained how potential reuse of existing tokens is possible despite authorization_reference mismatches.¶
-05¶
Removed required authorization details types.¶
Changed from HTTP 403 to 401.¶
Moved resource servers response from body to WWW-Authenticate header.¶
Renamed authorization_hint to authorization_reference and clarified its usage.¶
Clarified authorization server broader considerations on omitting RAR from JWT access tokens.¶
Clarified document's interoperability with any OAuth rfc and any grant that supports RAR.¶
-04¶
Moved required authorization details types from resource metadata to resource server's response.¶
Adapted resource server processing rules to reflect error signaling and handling of large RAR payloads.¶
-03¶
Added authorization_reference 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, Justin Richer, Jeff Lombardo, Judith Kahrer, Pieter Kasselman.¶