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

Brian Campbell <bcampbell@pingidentity.com> Fri, 23 February 2024 21:14 UTC

Return-Path: <bcampbell@pingidentity.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 26786C14F6A0 for <oauth@ietfa.amsl.com>; Fri, 23 Feb 2024 13:14:42 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.102
X-Spam-Level:
X-Spam-Status: No, score=-2.102 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, 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_NONE=-0.0001, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, SPF_NONE=0.001, T_SCC_BODY_TEXT_LINE=-0.01, 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 (2048-bit key) header.d=pingidentity.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 No9-iFkPVYnB for <oauth@ietfa.amsl.com>; Fri, 23 Feb 2024 13:14:38 -0800 (PST)
Received: from mail-il1-x135.google.com (mail-il1-x135.google.com [IPv6:2607:f8b0:4864:20::135]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 1CA99C14F69B for <oauth@ietf.org>; Fri, 23 Feb 2024 13:14:38 -0800 (PST)
Received: by mail-il1-x135.google.com with SMTP id e9e14a558f8ab-365145ef32fso2106865ab.1 for <oauth@ietf.org>; Fri, 23 Feb 2024 13:14:38 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pingidentity.com; s=google; t=1708722877; x=1709327677; darn=ietf.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=iRm5W8BA5mqybkqpgUD9y9Yh38Q+VrtAIaZyb87w13k=; b=JIua+PftsMQ0+mx8/+dVXevt423MGXulRtYR25///KvihVOd24QRKRgmM3qz9H3qvw i07gMResb9u0+VZqx1mTcj24+8gzonDG/5gPDzyss/a0BnLgIYT3izAgPEx72UlY4j70 KWnIBXx9UWi3xavFtH6kUQ5iLHmk9msxGidfpQfc9isOCOqP+c3V4+XZQsAMjdtfMVu/ 4OnIkqEA8tgHeDWkUOng1tlfBh2lnahUJvtVRrDvKS5FLSY77Ip6lcZWiQ/KG2eVsNg3 DFqZU+xG1H0YwPHIhLLiwvjfCw4JCgqCSIZb6BZRPG05fXyse+1EksS7Pw64VznCXU/n vCLg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708722877; x=1709327677; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=iRm5W8BA5mqybkqpgUD9y9Yh38Q+VrtAIaZyb87w13k=; b=bEgqSqOpe7MaiHw0KrQ7V4xWJD3R2ZvZUA+YLObVey82lYVYm36/nwitxXOr3Oy9Zr jiEXTN5Hq/JNgnY3oOp1Q52Cov8IUvCJ2FdYrr3NSyUx85lnmHpLqE8eLog24KLhN7BJ cxJKjFtHQlk6dTXtLeZEIjDBd6lkW/wUTqjMx5lcFfQRaIyYLBg/zvBddqi9u3LGTzBm vFLXlF6q8uvwk37P6W4PUJyvd7u0g2iTIUHE4WqCkhfvPGBFV1/FnaLN+Ckz9MOZ9TRD YMjpCgmjITB5+Vu3jQfSZntsIEiXUVMIprLdREDJyGB1Z5Yyb9iIMzOdhZhX/15J3KhO xuUg==
X-Forwarded-Encrypted: i=1; AJvYcCXapM04nInuuN8BrTDxVywuTXuGIURPOQd+l73crK6VYKWl5caq6drztva9sdj1NefwKE0SUtq6kvRQDrIv1g==
X-Gm-Message-State: AOJu0YyV3OLeVe9N3+8AHell1F9any+6+oN4HPk3YWA5x74e8ehWgQ8K ryOmsjcJAGAXrUsj/imbOKVYZ89JCSSLi/8ip5vLpLA5ZXn++nULXu37iOfOVMITEIlfvt+4JRd MxlCAWU3hndSAjUpmr1/Qs0B/myikfIxVMOYZVhtQ1PnLCrYIzicdJMU66TzPRa3zApYbMH6LPT L3M+XbRZTMsA==
X-Google-Smtp-Source: AGHT+IGMJ+a/iu4x0OAywqb4AUU8QV1cDB/lmDQndez5o2lL+SwFwfNZz3V53voKq1e3aYWC5DPuEAY73D9pxryKG7o=
X-Received: by 2002:a92:3647:0:b0:365:33a7:8d2 with SMTP id d7-20020a923647000000b0036533a708d2mr1061784ilf.19.1708722877151; Fri, 23 Feb 2024 13:14:37 -0800 (PST)
MIME-Version: 1.0
References: <05d124f46a7f400195076ec95686b794@amazon.com> <775BA7EF-7254-46D9-B936-A7862FCE95BD@mit.edu> <CA+k3eCQxG8ZYXU1kCWJba3esv2B9cLvwrfQQ0E5PpFhRAYRgWg@mail.gmail.com> <68b84b5ae8854610ad34186e2193fe9f@amazon.com>
In-Reply-To: <68b84b5ae8854610ad34186e2193fe9f@amazon.com>
From: Brian Campbell <bcampbell@pingidentity.com>
Date: Fri, 23 Feb 2024 14:14:07 -0700
Message-ID: <CA+k3eCTRak_VRUeA0t5-57XPp29xqeF2o-6VbN6i_bwjvOuW6A@mail.gmail.com>
To: "Cecchetti, Sarah" <sarahcec=40amazon.com@dmarc.ietf.org>
Cc: Justin Richer <jricher@mit.edu>, oauth <oauth@ietf.org>
Content-Type: multipart/alternative; boundary="0000000000001cdc970612130c78"
Archived-At: <https://mailarchive.ietf.org/arch/msg/oauth/Z7b-9BNI9rnzXZ-pKNcJsQPAja0>
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 21:14:42 -0000

Yeah, communication of intent was not supposed to be the purpose of the
type parameter value. Although I do (now) see how many of the examples in
RAR/RFC9396 kinda read that way. The
https://www.rfc-editor.org/rfc/rfc9396.html#section-2-2.2 definition of
type tries to convey what it is intended to do, which is that it
"determines the allowable contents of the object that contains it." Shortly
after at https://www.rfc-editor.org/rfc/rfc9396.html#section-2.1-2 it talks
about using a collision-resistant value for applications expected to be
widely deployed (e.g., beyond a single AS), which seems appropriate for
Cedar, and is followed by an example that uses a URL as the type value.




On Fri, Feb 23, 2024 at 1:38 PM Cecchetti, Sarah <sarahcec=
40amazon.com@dmarc.ietf.org> wrote:

> 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\"
>         )
>         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> 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> 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
>> https://www.ietf.org/mailman/listinfo/oauth
>>
>>
>> _______________________________________________
>> OAuth mailing list
>> 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.*
>

-- 
_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._