Re: [OAUTH-WG] For review/discussion: Cedar profile of OAuth Rich Authorization Requests

"Cecchetti, Sarah" <sarahcec@amazon.com> Fri, 23 February 2024 20:38 UTC

Return-Path: <prvs=776e60276=sarahcec@amazon.com>
X-Original-To: oauth@ietfa.amsl.com
Delivered-To: oauth@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id B2C4FC14F68C for <oauth@ietfa.amsl.com>; Fri, 23 Feb 2024 12:38:20 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.099
X-Spam-Level:
X-Spam-Status: No, score=-2.099 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_FONT_FACE_BAD=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_BLOCKED=0.001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, SPF_NONE=0.001, T_SCC_BODY_TEXT_LINE=-0.01, UNPARSEABLE_RELAY=0.001, URIBL_BLOCKED=0.001, URIBL_DBL_BLOCKED_OPENDNS=0.001, URIBL_ZEN_BLOCKED_OPENDNS=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=amazon.com
Received: from mail.ietf.org ([50.223.129.194]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id VCUM4zuHUSuM for <oauth@ietfa.amsl.com>; Fri, 23 Feb 2024 12:38:16 -0800 (PST)
Received: from smtp-fw-80008.amazon.com (smtp-fw-80008.amazon.com [99.78.197.219]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id B8286C14F615 for <oauth@ietf.org>; Fri, 23 Feb 2024 12:38:16 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1708720696; x=1740256696; h=from:to:cc:date:message-id:references:in-reply-to: mime-version:subject; bh=Cay3fuu/DoQ8fozU3I0MxKFEfnHd8i55x2rqMAk6Y9k=; b=EPkxfPzuVnBIral3yIw0cYHExVlHHK5KDGCKRlcIFOd7fpMs2/i94rcs tnSpeyUr7uorqvpAZMzW9VDMJWtWmLQD17xUSLJdzYh+KE3tRJpuwyA8j yqwYYEGTVUY9p5+BCoFkF8aCir/hiA3RNveO0BZc2LA0AIIhfM/lxj2AG Y=;
X-IronPort-AV: E=Sophos;i="6.06,180,1705363200"; d="scan'208,217";a="68365396"
Thread-Topic: [OAUTH-WG] For review/discussion: Cedar profile of OAuth Rich Authorization Requests
Received: from pdx4-co-svc-p1-lb2-vlan3.amazon.com (HELO smtpout.prod.us-west-2.prod.farcaster.email.amazon.dev) ([10.25.36.214]) by smtp-border-fw-80008.pdx80.corp.amazon.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Feb 2024 20:38:16 +0000
Received: from EX19MTAUWA001.ant.amazon.com [10.0.21.151:16309] by smtpin.naws.us-west-2.prod.farcaster.email.amazon.dev [10.0.9.241:2525] with esmtp (Farcaster) id 9927b662-8711-459c-9ae9-55cf4fa3a7a3; Fri, 23 Feb 2024 20:38:15 +0000 (UTC)
X-Farcaster-Flow-ID: 9927b662-8711-459c-9ae9-55cf4fa3a7a3
Received: from EX19D024UWB001.ant.amazon.com (10.13.138.14) by EX19MTAUWA001.ant.amazon.com (10.250.64.204) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.40; Fri, 23 Feb 2024 20:38:14 +0000
Received: from EX19D024UWB002.ant.amazon.com (10.13.138.19) by EX19D024UWB001.ant.amazon.com (10.13.138.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.40; Fri, 23 Feb 2024 20:38:14 +0000
Received: from EX19D024UWB002.ant.amazon.com ([fe80::5515:c4cc:a1c7:ac5f]) by EX19D024UWB002.ant.amazon.com ([fe80::5515:c4cc:a1c7:ac5f%6]) with mapi id 15.02.1118.040; Fri, 23 Feb 2024 20:38:14 +0000
From: "Cecchetti, Sarah" <sarahcec@amazon.com>
To: Brian Campbell <bcampbell=40pingidentity.com@dmarc.ietf.org>, Justin Richer <jricher@mit.edu>
CC: oauth <oauth@ietf.org>
Thread-Index: AQHaZQ4cW3N0LiMaZkuc+tmme/CzyLEWq/2AgAGmJQCAABIFdg==
Date: Fri, 23 Feb 2024 20:38:14 +0000
Message-ID: <68b84b5ae8854610ad34186e2193fe9f@amazon.com>
References: <05d124f46a7f400195076ec95686b794@amazon.com> <775BA7EF-7254-46D9-B936-A7862FCE95BD@mit.edu>, <CA+k3eCQxG8ZYXU1kCWJba3esv2B9cLvwrfQQ0E5PpFhRAYRgWg@mail.gmail.com>
In-Reply-To: <CA+k3eCQxG8ZYXU1kCWJba3esv2B9cLvwrfQQ0E5PpFhRAYRgWg@mail.gmail.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-originating-ip: [10.13.139.52]
Content-Type: multipart/alternative; boundary="_000_68b84b5ae8854610ad34186e2193fe9famazoncom_"
MIME-Version: 1.0
Archived-At: <https://mailarchive.ietf.org/arch/msg/oauth/0kyvn5fVt6y1u5qx5RgxFU__ZzI>
Subject: Re: [OAUTH-WG] For review/discussion: Cedar profile of OAuth Rich Authorization Requests
X-BeenThere: oauth@ietf.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: OAUTH WG <oauth.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/oauth>, <mailto:oauth-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/oauth/>
List-Post: <mailto:oauth@ietf.org>
List-Help: <mailto:oauth-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/oauth>, <mailto:oauth-request@ietf.org?subject=subscribe>
X-List-Received-Date: Fri, 23 Feb 2024 20:38:20 -0000

Interesting. We considered using the type parameter, but decided against it. In the examples in the spec, the spirit of type seems to be an indication of the intent of the request (for example "customer_information" or "payment_initiation.") We were concerned about breaking existing open banking implementations if we took away the ability for the client to include an intent in the request and substitute the format of the request. We would like for existing open banking implementations to simply use a consistent format for their requests, not to override the intent of the request if that's something that's important for them to communicate.

If communication of intent is not important, we're happy to just specify the content the type parameter and define a new policySet parameter, or possibly just give guidance to put a policy set within "privileges."


Sarah Cecchetti


________________________________
From: Brian Campbell <bcampbell=40pingidentity.com@dmarc.ietf.org>
Sent: Friday, February 23, 2024 11:25:56 AM
To: Justin Richer
Cc: Cecchetti, Sarah; oauth
Subject: RE: [EXTERNAL] [OAUTH-WG] For review/discussion: Cedar profile of OAuth Rich Authorization Requests


CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you can confirm the sender and know the content is safe.


I'm inferring some intent (apologies if I've got it wrong!) but I think it'd make the most sense for this work to start with defining a RAR type value (something like "https://cedarpolicy.com") and define that type as having the "policySet"  parameter. An updated example figure 1 from the draft would look like the below.  As Justin said, RAR intends the “type” field as the extensibility point that defines the semantics of all other parts in the typed object. So it would be saying this is a Cedar type authorization_details element and it contains this "policySet" parameter that has the actual Cedar policy in it.



{
"type": "https://cedarpolicy.com"
"policySet": "
  permit (
        principal == BankA::User::\"696d28c8-8912-41d2-b182-aa7087323318\",
        action == BankA::Action::\"initiate\",
    resource == Creditor::\"https://example.com/payments\<https://example.com/payments%5C>"
        )
        when { context.instructedAmount.currency == \"EUR\" &&
    context.instructedAmount.amount == decimal(\"123.50\") &&
    resource.creditorName == \"Merchant A\" &&
    resource.creditorAccount.bic == \"ABCIDEFFXXX\" &&
    resource.creditorAccount.iban == \"DE02100100109307118603\" &&
    context.remittanceInformationUnstructured == \"Ref Number Merchant\"
        };
"
}

On Thu, Feb 22, 2024 at 11:15 AM Justin Richer <jricher@mit.edu<mailto:jricher@mit.edu>> wrote:
Hi Sarah,

Thanks for putting that draft together. As one of the authors of RAR, I wanted to chime in.

First, I do think that this is a great use of RAR. The whole idea behind RAR was to give people structures that they could use beyond what scopes allow, and tying this to a computable policy language like Cedar makes a lot of sense to a lot of use cases. In particular, as with any other RAR object, this could show up in the client’s request to the AS, the AS’s response to the client, or the token’s resulting metadata (basically AS message to the RS via the token), and having an explicit policy in each of those places deserves discussion.

Next, I wanted to provide some specific feedback about the implementation proposed in the draft, because I think there are a few ways it could go and each might make sense.

One of the benefits to RAR is that it’s the “type” field that defines the semantics of all other parts in the typed object — which also makes interoperable definitions a bit trickier. With that in mind, what is the intended target of the “rarFormat” and “policySet” fields?

Is the goal of this draft to define another set of “Common Data Fields” to be used across different types, as is done in RAR section 2.2? (https://www.rfc-editor.org/rfc/rfc9396.html#name-common-data-fields) If so, that should be called out explicitly, as is done in RFC9396. Are there intended interactions with other common data fields, such as filtering the policy based on location or action, for example?

Or is the goal that these be defined in a specific set of “type” values that would comply to this format? If so, what are the conditions for using and extending this format? The way the “rarFormat” text is currently written, it seems to put constraints on the rest of the object defined by the “type”, so is the intent that you’d have rar-cedar-compliant types that follow this pattern?

Or is the goal to define a generic and extensible field set that can be re-used by other policy languages? That seems to be hinted at with the separate format and data fields, but as written only one is defined so it’s difficult to tell, at this stage, what the intended abstraction points are. If only one is defined, then would it make sense to just define a single “cedarPolicy” parameter instead of the two? And if there’s another format that comes along, it can follow Cedar’s example and do something similar. The “type” would define how to handle having different policy formats in a single object, to avoid overlaps.

And if the answer to all of this is “I don’t know”, that’s also reasonable at this stage as these are great questions for the WG to answer. :)

Finally, since RAR is based on JSON data types, and Cedar uses multi-line strings (at least for display in the examples), the intent of this value translation is going to have to be spelled out. As in, a real example on the wire would need to have all the newlines encoded as \n and the like, in order to be JSON. This is almost certainly me reading too much into the hand-crafted examples on a new drafts, but I wanted to raise this as something that’ll need to be solved for Cedar and, depending on the answers above, other languages. In other words, can we always assume that a policy is always encoded as a single string, or is there other structure that might work better? This is not my area of expertise and I have no opinions on the answer, so if strings are good enough that’s fine by me. :)

Thank you, and I hope to see this work continue!

 — Justin

On Feb 21, 2024, at 5:06 PM, Cecchetti, Sarah <sarahcec=40amazon.com@dmarc.ietf.org<mailto:40amazon.com@dmarc.ietf.org>> wrote:

I have submitted a new draft:

https://datatracker.ietf.org/doc/html/draft-cecchetti-oauth-rar-cedar

This is intended to be a profile of RFC 9396 OAuth 2.0 Rich Authorization Requests (OAuth RAR). OAuth RAR defines an authorization_details parameter, but leaves the format of the parameter open. This profile defines a rarFormat parameter to further constrain authorization_details to use a specific format called "cedar."

The use case for this draft is the same as the OAuth RAR use case - i.e. open banking specifically, and fine-grained authorization generally. The intent is to make the standard more interoperable by specifying the policy language which will be used to communicate the authorization request and response. The language used in these examples is Cedar, an open-source policy language - https://www.cedarpolicy.com/en. Putting Cedar policy sets within an OAuth token enables the client and RS to conduct transactions which conform to specific fine-grained policies which have been blessed(signed) by the AS.

Open Questions:

  1.  Should we create a separate informational draft defining the Cedar language itself within the universe of the IETF? Or is it fine to leave that undefined?
  2.  Is rarFormat the right name for this parameter?
  3.  Should policySet be required?
  4.  I tried to keep this draft fairly simple and duplicate examples in the OAuth RAR RFC without redundantly stating what is already defined there. Did I include too little? Too much?

This is my first draft submission, so any and all feedback is welcome, and apologies if my xml is incorrectly formatted. I'm ignorant about many things in the standards process. :)

Sarah Cecchetti

_______________________________________________
OAuth mailing list
OAuth@ietf.org<mailto:OAuth@ietf.org>
https://www.ietf.org/mailman/listinfo/oauth

_______________________________________________
OAuth mailing list
OAuth@ietf.org<mailto:OAuth@ietf.org>
https://www.ietf.org/mailman/listinfo/oauth

CONFIDENTIALITY NOTICE: This email may contain confidential and privileged material for the sole use of the intended recipient(s). Any review, use, distribution or disclosure by others is strictly prohibited.  If you have received this communication in error, please notify the sender immediately by e-mail and delete the message and any file attachments from your computer. Thank you.