Web Authorization Protocol D. Brossard Internet-Draft Axiomatics Intended status: Standards Track O. Gazitt Expires: 9 January 2025 Aserto A. Babeanu 3Edges 8 July 2024 AuthZEN Request/Response Profile for OAuth 2.0 Rich Authorization Requests draft-brossard-oauth-rar-authzen-03 Abstract This specification defines a profile of OAuth 2.0 Rich Authorization Requests leveraging the OpenID AuthZEN authorization request/response formats within the authorization_details JSON object. Authorization servers and resource servers from different vendors can leverage this profile to request and receive relevant authorization decisions from an AuthZEN-compatible PDP in an interoperable manner. About This Document This note is to be removed before publishing as an RFC. The latest revision of this draft can be found at https://davidjbrossard.github.io/authzen-rar-profile/draft-brossard- oauth-rar-authzen.html. Status information for this document may be found at https://datatracker.ietf.org/doc/draft-brossard-oauth-rar- authzen/. 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/davidjbrossard/authzen-rar-profile. Status of This Memo This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79. Brossard, et al. Expires 9 January 2025 [Page 1] Internet-Draft AuthZEN RAR Profile July 2024 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 9 January 2025. Copyright Notice Copyright (c) 2024 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. Table of Contents 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 2. Conventions and Definitions . . . . . . . . . . . . . . . . . 4 3. Request Parameter authorization_details . . . . . . . . . . . 5 3.1. authorization_details Structure . . . . . . . . . . . . . 5 3.2. Authorization Details Types . . . . . . . . . . . . . . . 6 3.3. Common Data Fields . . . . . . . . . . . . . . . . . . . 6 4. Authorization Request . . . . . . . . . . . . . . . . . . . . 6 4.1. Example (non-normative) . . . . . . . . . . . . . . . . . 6 5. Support for Multiple Authorization Requests . . . . . . . . . 7 5.1. Example (non-normative) . . . . . . . . . . . . . . . . . 7 6. Authorization Responses . . . . . . . . . . . . . . . . . . . 9 6.1. Single-response Example (non-normative) . . . . . . . . . 10 6.2. Boxcarred-response Example (non-normative) . . . . . . . 10 7. Security Considerations . . . . . . . . . . . . . . . . . . . 12 8. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 12 9. References . . . . . . . . . . . . . . . . . . . . . . . . . 12 9.1. Normative References . . . . . . . . . . . . . . . . . . 12 9.2. Informative References . . . . . . . . . . . . . . . . . 13 Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . . 13 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 13 Brossard, et al. Expires 9 January 2025 [Page 2] Internet-Draft AuthZEN RAR Profile July 2024 1. Introduction OpenID AuthZEN is a Working Group under the OpenID Foundation which aims to increase interoperability and standardization in the authorization realm. In particular, AuthZEN aims to: * build standards-based authorization APIs * define standard design patterns for authorization * produce educational material to help raise awareness of externalized authorization. The aim of this profile is to define an AuthZEN-conformant profile of the OAuth 2.0 Rich Authorization Requests [RFC9396]. [RFC9396] introduces a new parameter authorization_details that allows clients to specify their fine-grained authorization requirements using the expressiveness of JSON [RFC8259] data structures. This specification introduces a more structured format for the authorization_details parameter. The new format is also JSON [RFC8259] as a result of which this specification is conformant with [RFC9396] and is merely a stricter profile. For example the authorization request for a credit transfer mentioned in [RFC9396] would now be structured as follows Brossard, et al. Expires 9 January 2025 [Page 3] Internet-Draft AuthZEN RAR Profile July 2024 { "subject": { "type": "user", "id": "Alice" }, "resource": { "type": "payment_initiation", "id": "123", "recipient": { "creditorName": "Merchant A", "creditorAccount": { "bic": "ABCIDEFFXXX", "iban": "DE02100100109307118603" } } }, "action": { "name": "transfer", "instructedAmount": { "currency": "EUR", "amount": "123.50" } }, "context": { "remittance": "Ref Number Merchant" } } Figure 1: Source Authorization Request Using AuthZEN as a format for authorization_details will increase the usability and the interoperability of [RFC9396]. In particular, it will be possible for the AS to forward the contents of the authorization_details parameter to an AuthZEN-conformant Policy Decision Point (PDP). 2. Conventions and Definitions 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. This specification uses the terms "access token", "refresh token", "authorization server" (AS), "resource server" (RS), "authorization endpoint", "authorization request", "authorization response", "token endpoint", "grant type", "access token request", "access token Brossard, et al. Expires 9 January 2025 [Page 4] Internet-Draft AuthZEN RAR Profile July 2024 response", and "client" defined by "The OAuth 2.0 Authorization Framework" [RFC6749]. This specification uses the terms "PDP" and "PEP" defined by [ABAC] and [XACML]. 3. Request Parameter authorization_details In [RFC9396], the request parameter authorization_details contains, in JSON notation, an array of objects. Each JSON object contains the data to specify the authorization requirements for a certain type of resource. This specification defines the format for each one of these objects such that it conforms to [AUTHZEN] and [RFC9396]. [AUTHZEN] groups JSON datastructures into 4 JSON objects: * subject: A Subject is the user or robotic principal about whom the Authorization API is being invoked. The Subject may be requesting access at the time the Authorization API is invoked. * resource: A Resource is the target of an access request. It is a JSON ([RFC8259]) object that is constructed similar to a Subject entity. * action: An Action is the type of access that the requester intends to perform. Action is a JSON ([RFC8259]) object that contains at least a name field. * context: The Context object is a set of attributes that represent environmental or contextual data about the request such as time of day. It is a JSON ([RFC8259]) object. Note: the aforementioned is indicative only. Always refer to [AUTHZEN] for the formal definition of each element. 3.1. authorization_details Structure Because *type* is REQUIRED, the new _authorization_details_ structure is as follows: * type: An identifier for the authorization details type as a string. The value for this profile is "authzen_evaluation" or "authzen_evaluations", corresponding to the AuthZEN API being invoked. The value is case-insensitive. This field is REQUIRED. * request: this field contains the entire AuthZEN-conformant authorization request. This field is REQUIRED. Brossard, et al. Expires 9 January 2025 [Page 5] Internet-Draft AuthZEN RAR Profile July 2024 3.2. Authorization Details Types This profile declares a new value for the _type_ field as stated in the previous section. The value for this profile is "authzen_evaluation" or "authzen_evaluations". This indicates there will be another field called request and its value will be an AuthZEN-conformant authorization request. The "authzen_evaluation" or "authzen_evaluations" types also indicate that the authorization response should contain a _response_ field containing the authorization response matching the request or requests. The _response_ field will be an AuthZEN-conformant authorization response (see below). AuthZEN also defines a _type_ field in the Subject and Resource categories. This field is meant to describe the type of user and/or resource required. 3.3. Common Data Fields No field other than type and request shall be allowed in authorization_details when the type is authzen_evaluation or authzen_evaluations. All other fields such as the ones mentioned in [RFC9396] shall be inserted inside the AuthZEN request in the relevant object (Subject, Resource, Action, or Context). 4. Authorization Request Conformant to [RFC9396], the authorization_details authorization request parameter can be used to specify authorization requirements in all places where the scope parameter is used for the same purpose, examples include: * authorization requests as specified in [RFC6749] * device authorization requests as specified in [RFC8628] * backchannel authentication requests as defined in [OID-CIBA] Parameter encoding follows the exact same rules as [RFC9396]. 4.1. Example (non-normative) Brossard, et al. Expires 9 January 2025 [Page 6] Internet-Draft AuthZEN RAR Profile July 2024 { "type": "authzen_evaluation", "request": { "subject": { "type": "user", "id": "Alice" }, "resource": { "type": "payment_initiation", "id": "123", "recipient": { "creditorName": "Merchant A", "creditorAccount": { "bic": "ABCIDEFFXXX", "iban": "DE02100100109307118603" } } }, "action": { "name": "transfer", "instructedAmount": { "currency": "EUR", "amount": "123.50" } }, "context": { "remittance": "Ref Number Merchant" } } } Figure 2: Source Authorization Request 5. Support for Multiple Authorization Requests [AUTHZEN] supports a profile that allows the expression of multiple authorization requests in a single JSON object. As a result, this profile recommends the use of a single authorization_details object containing _boxcarred_ requests as described in [BOXCAR] when possible and the use of the authorization_details array otherwise. 5.1. Example (non-normative) This example is based on the one in [RFC9396] under section 3. Authorization Request. Brossard, et al. Expires 9 January 2025 [Page 7] Internet-Draft AuthZEN RAR Profile July 2024 [ { "type": "authzen_evaluations", "request": { "subject": { "id": "alice@acmecorp.com", "type": "user" }, "resource":{ "id": "123", "type": "account_information", "location": "https://example.com/accounts" }, "evaluations": { "eval-1": { "action": { "name": "list_accounts" } }, "eval-2": { "action": { "name": "read_balances" } }, "eval-3": { "action": { "name": "read_transactions" } } } } }, { "type": "authzen_evaluations", "request": { "subject": { "id": "alice@acmecorp.com", "type": "user" }, "resource":{ "id": "123", "type": "payment_initiation", "location": "https://example.com/payments", "recipient": { "creditorName": "Merchant A", "creditorAccount": { Brossard, et al. Expires 9 January 2025 [Page 8] Internet-Draft AuthZEN RAR Profile July 2024 "bic": "ABCIDEFFXXX", "iban": "NL02RABO2228161411" } } }, "context":{ "remittance": "Ref Number Merchant" }, "evaluations": { "eval-1": { "action": { "name": "initiate", "instructedAmount": { "currency": "EUR", "amount": "123.50" } } }, "eval-2": { "action": { "name": "status" } }, "eval-3": { "action": { "name": "cancel" } } } } } ] 6. Authorization Responses Whereas [RFC9396] doesn't specify any extensions for authorization_details responses, [AUTHZEN] standardizes the responses expected from the PDP. An AuthZEN response is therefore expected for all AuthZEN requests. This response can be used by authorization clients directly or by the AS during token creation. In particular, authorization response can be used in conjunction with any user- consent flow. The new _authorization_details_ response structure is as follows: Brossard, et al. Expires 9 January 2025 [Page 9] Internet-Draft AuthZEN RAR Profile July 2024 * type: The value of this field is expected to be "authzen_evaluation" for a single authorization request, or "authzen_evaluations" for multiple (Boxcarred) evalution requests. This field is *REQUIRED*. * response: This field contains the entire AuthZEN-conformant authorization response. This field is *REQUIRED*. 6.1. Single-response Example (non-normative) [ { "type": "authzen_evaluation", "response": { "decision": true } } ] Figure 3: Source Authorization Response 6.2. Boxcarred-response Example (non-normative) Using responses as described in [BOXCAR], a response to the boxcarred example of the multi-authorization requests section above could be: Brossard, et al. Expires 9 January 2025 [Page 10] Internet-Draft AuthZEN RAR Profile July 2024 [ { "type": "authzen_evaluations", "response": { "evaluations": { "eval-1": { "decision": true }, "eval-2": { "decision": false, "context": { "reason": "resource not found" } }, "eval-3": { "decision": false, "context": { "reason": "Subject is a viewer of the resource" } } } } }, { "type": "authzen_evaluations", "response": { "evaluations": { "eval-1": { "decision": true }, "eval-2": { "decision": false, }, "eval-3": { "decision": false, "context": { "error": { "status": 404, "message": "Resource not found" } } } } } } ] Figure 4: Source Authorization Response Brossard, et al. Expires 9 January 2025 [Page 11] Internet-Draft AuthZEN RAR Profile July 2024 7. Security Considerations The Security Considerations of [RFC9396], [RFC6749], [RFC7662], and [RFC8414] all apply. 8. IANA Considerations This document has no IANA actions. 9. References 9.1. Normative References [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/RFC2119, March 1997, . [RFC6749] Hardt, D., Ed., "The OAuth 2.0 Authorization Framework", RFC 6749, DOI 10.17487/RFC6749, October 2012, . [RFC7662] Richer, J., Ed., "OAuth 2.0 Token Introspection", RFC 7662, DOI 10.17487/RFC7662, October 2015, . [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, May 2017, . [RFC8259] Bray, T., Ed., "The JavaScript Object Notation (JSON) Data Interchange Format", STD 90, RFC 8259, DOI 10.17487/RFC8259, December 2017, . [RFC8414] Jones, M., Sakimura, N., and J. Bradley, "OAuth 2.0 Authorization Server Metadata", RFC 8414, DOI 10.17487/RFC8414, June 2018, . [RFC8628] Denniss, W., Bradley, J., Jones, M., and H. Tschofenig, "OAuth 2.0 Device Authorization Grant", RFC 8628, DOI 10.17487/RFC8628, August 2019, . Brossard, et al. Expires 9 January 2025 [Page 12] Internet-Draft AuthZEN RAR Profile July 2024 [RFC9396] Lodderstedt, T., Richer, J., and B. Campbell, "OAuth 2.0 Rich Authorization Requests", RFC 9396, DOI 10.17487/RFC9396, May 2023, . [AUTHZEN] Gazitt, O., Brossard, D., and A. Tulshibagwale, "OpenID AuthZEN Authorization API", July 2024, . [BOXCAR] Gazitt, O., Brossard, D., and A. Tulshibagwale, "OpenID AuthZEN Authorization API", July 2024, . [OID-CIBA] Fernandez, G., Walter, F., Nennker, A., Tonge, D., and B. Campbell, "OpenID Connect Client-Initiated Backchannel Authentication Flow - Core 1.0", September 2021, . 9.2. Informative References [XACML] Rissanen, E., "eXtensible Access Control Markup Language (XACML) Version 3.0, OASIS Standard", January 2013, . [ABAC] Hu, V. and D. Ferraiolo, "Guide to Attribute Based Access Control (ABAC) Definition and Considerations - NIST Special Publication 800-162", January 2014, . Acknowledgments We would like to thank members of the OpenID AuthZEN Working Group for their valuable feedback during the preparation of this specification. In particular our thanks go to Gerry Gebel and Allan Foster. We would also like to thank Justin Richer and Pieter Kasselman for their guidance on this spec and the overall IETF process. Authors' Addresses David Brossard Axiomatics Canada Email: david.brossard@axiomatics.com Brossard, et al. Expires 9 January 2025 [Page 13] Internet-Draft AuthZEN RAR Profile July 2024 Omri Gazitt Aserto United States of America Email: omri@aserto.com Alexandre Babeanu 3Edges Canada Email: alex@3edges.com Brossard, et al. Expires 9 January 2025 [Page 14]