Internet-Draft AuthZEN RAR Profile July 2024
Brossard, et al. Expires 9 January 2025 [Page]
Workgroup:
Web Authorization Protocol
Internet-Draft:
draft-brossard-oauth-rar-authzen-03
Published:
Intended Status:
Standards Track
Expires:
Authors:
D. Brossard
Axiomatics
O. Gazitt
Aserto
A. Babeanu
3Edges

AuthZEN Request/Response Profile for OAuth 2.0 Rich Authorization Requests

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.

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.

Table of Contents

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:

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

{
    "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 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:

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.

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:

Parameter encoding follows the exact same rules as [RFC9396].

4.1. Example (non-normative)

{
  "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.

[
  {
    "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": {
                "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:

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:

[
  {
    "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

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, , <https://www.rfc-editor.org/info/rfc2119>.
[RFC6749]
Hardt, D., Ed., "The OAuth 2.0 Authorization Framework", RFC 6749, DOI 10.17487/RFC6749, , <https://www.rfc-editor.org/info/rfc6749>.
[RFC7662]
Richer, J., Ed., "OAuth 2.0 Token Introspection", RFC 7662, DOI 10.17487/RFC7662, , <https://www.rfc-editor.org/info/rfc7662>.
[RFC8174]
Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, , <https://www.rfc-editor.org/info/rfc8174>.
[RFC8259]
Bray, T., Ed., "The JavaScript Object Notation (JSON) Data Interchange Format", STD 90, RFC 8259, DOI 10.17487/RFC8259, , <https://www.rfc-editor.org/info/rfc8259>.
[RFC8414]
Jones, M., Sakimura, N., and J. Bradley, "OAuth 2.0 Authorization Server Metadata", RFC 8414, DOI 10.17487/RFC8414, , <https://www.rfc-editor.org/info/rfc8414>.
[RFC8628]
Denniss, W., Bradley, J., Jones, M., and H. Tschofenig, "OAuth 2.0 Device Authorization Grant", RFC 8628, DOI 10.17487/RFC8628, , <https://www.rfc-editor.org/info/rfc8628>.
[RFC9396]
Lodderstedt, T., Richer, J., and B. Campbell, "OAuth 2.0 Rich Authorization Requests", RFC 9396, DOI 10.17487/RFC9396, , <https://www.rfc-editor.org/info/rfc9396>.
[AUTHZEN]
Gazitt, O., Brossard, D., and A. Tulshibagwale, "OpenID AuthZEN Authorization API", , <https://openid.github.io/authzen/>.
[BOXCAR]
Gazitt, O., Brossard, D., and A. Tulshibagwale, "OpenID AuthZEN Authorization API", , <https://openid.github.io/authzen/authorization-api-1_1#name-access-evaluations-api>.
[OID-CIBA]
Fernandez, G., Walter, F., Nennker, A., Tonge, D., and B. Campbell, "OpenID Connect Client-Initiated Backchannel Authentication Flow - Core 1.0", , <https://openid.net/specs/openid-client-initiated-backchannel-authentication-core-1_0.html>.

9.2. Informative References

[XACML]
Rissanen, E., "eXtensible Access Control Markup Language (XACML) Version 3.0, OASIS Standard", , <https://docs.oasis-open.org/xacml/3.0/xacml-3.0-core-spec-os-en.html>.
[ABAC]
Hu, V. and D. Ferraiolo, "Guide to Attribute Based Access Control (ABAC) Definition and Considerations - NIST Special Publication 800-162", , <https://doi.org/10.6028/NIST.SP.800-162>.

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
Omri Gazitt
Aserto
United States of America
Alexandre Babeanu
3Edges
Canada