Re: [OAUTH-WG] WGLC Review of PAR

Takahiko Kawasaki <taka@authlete.com> Wed, 02 September 2020 03:06 UTC

Return-Path: <taka@authlete.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 42DAE3A0802 for <oauth@ietfa.amsl.com>; Tue, 1 Sep 2020 20:06:06 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.896
X-Spam-Level:
X-Spam-Status: No, score=-1.896 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=0.001, SPF_HELO_NONE=0.001, SPF_NONE=0.001, URIBL_BLOCKED=0.001] autolearn=unavailable autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=authlete-com.20150623.gappssmtp.com
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id dI3mJUNGjeEW for <oauth@ietfa.amsl.com>; Tue, 1 Sep 2020 20:06:03 -0700 (PDT)
Received: from mail-wm1-x32d.google.com (mail-wm1-x32d.google.com [IPv6:2a00:1450:4864:20::32d]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id E113A3A0AA8 for <oauth@ietf.org>; Tue, 1 Sep 2020 20:06:02 -0700 (PDT)
Received: by mail-wm1-x32d.google.com with SMTP id w2so2943479wmi.1 for <oauth@ietf.org>; Tue, 01 Sep 2020 20:06:02 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=authlete-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=irjM7ev6prfFuS7fwH+bY0tUC7B5IkYpulIvRFN5jBw=; b=MiI75H+iseZyVhFA2EJG+IuTSPNtnHQcI4neoxHNNEqMo3D7LinUersdIULKIflqwI 5vb/WqqXXtwv04TT7X8JEorJDg5Mzpmc/qaubJbmBRnfDi0arH3HJp9ZnMp5xFaFx38D SqWaoZj/Vv2NN0xH578SUHwp8rjXyp2idQtiV9RIiTyiI2LeBtpUwpr3y3S3XOuJIaDS 9Ouy7KxMD5vxdopvC+jTRdhfPVV6lz0ums9Lc+cMm+24T2wEbeID8jybFmA2v7LE+rth dTy7UTHKLSouSc2WIkSUnKuRRyzApgR7DF+OQAy5w0ndHZYTXF/Xo7+UgmzhEseu6VrR w10g==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=irjM7ev6prfFuS7fwH+bY0tUC7B5IkYpulIvRFN5jBw=; b=UEdDLfQW4V6wzqlwQqtIAkKjuMA5BW9NUIsSXKiBnYGDCtTZZ3IqDTnsOldZuPtSaw FqppmdBaqulInNzravTkOEG/xJeWyvVqoYqJtWSu9JF7mUVpdjpfdU7WvlJt7fa0UDJa U8WiKZq5bj4F6PmB7dMZv8c6oRSKcayIub38piyjO0TLPn2Uj509hVTg8RJZxzhrsmts Vc5WScDe77a8LEIE8aJfgWf77amQKNGqU8Elnbbtg740gEA/LltfgvK+Sm4ACJNBG8o7 9QJv2Huw7HLsot2reNryJDgHGm9E/5SzRTMyRO2oRdY5Sy1x8B8PY5v6w7ek66YXgs1D qVMQ==
X-Gm-Message-State: AOAM530/zO2syOlV099pVPM3ufJdg9CFGnS/zNJrCWeawyp7owkKO/8W AMXhRKHMOAJI3LBgCGSxGxaChFidG6fGH68u571Ly2TISuevjEBh
X-Google-Smtp-Source: ABdhPJy39Z+OkNMbLLcANxvnCGDFb2/wuV6b7s2o1BGL5xKJ/N+5r/wbAvluWRVmqS6qmb0c9iqQ//OL0g8MqoAFzTc=
X-Received: by 2002:a7b:ce96:: with SMTP id q22mr4246965wmj.132.1599015960940; Tue, 01 Sep 2020 20:06:00 -0700 (PDT)
MIME-Version: 1.0
References: <7C0FD285-F677-4501-B2FB-9431A59855F6@mit.edu> <CA+k3eCRsBTvdhyzBOETxWLd6PJ61B2W4yY5QHv196amDFq7gnQ@mail.gmail.com> <B86967B1-3FA1-4ADA-BF9B-D34C693617C7@lodderstedt.net> <03845E0A-3563-4FF5-A3F9-318A1C928B89@mit.edu> <61CD8CC7-D16F-4D2A-A43E-2C80DC5B565A@lodderstedt.net>
In-Reply-To: <61CD8CC7-D16F-4D2A-A43E-2C80DC5B565A@lodderstedt.net>
From: Takahiko Kawasaki <taka@authlete.com>
Date: Wed, 02 Sep 2020 12:05:49 +0900
Message-ID: <CAHdPCmMxxXx-sc2wRSV4JXG4m6zqGwK+J_UgWdBh7jipqXA5fQ@mail.gmail.com>
To: Torsten Lodderstedt <torsten=40lodderstedt.net@dmarc.ietf.org>
Cc: Justin Richer <jricher@mit.edu>, Brian Campbell <bcampbell=40pingidentity.com@dmarc.ietf.org>, oauth <oauth@ietf.org>
Content-Type: multipart/alternative; boundary="00000000000057ad9c05ae4bea3a"
Archived-At: <https://mailarchive.ietf.org/arch/msg/oauth/-Llc334lUL13LEFb8xb4p9O30bw>
Subject: Re: [OAUTH-WG] WGLC Review of PAR
X-BeenThere: oauth@ietf.org
X-Mailman-Version: 2.1.29
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: Wed, 02 Sep 2020 03:06:06 -0000

Under existing specifications (RFC 6749, OIDC Core 1.0 and FAPI), a client
can choose an arbitrary redirect_uri without registering it only when all
the following conditions are satisfied.

1. The client type of the client is "confidential". (RFC 6749 Section
3.1.2.2 requires that public clients register redirect URIs.)
2. The flow is not "implicit". (RFC 6749 Section 3.1.2.2 requires that
confidential clients utilizing the implicit grant type register redirect
URIs.)
3. The authorization request is not an OIDC request. (OIDC Core 1.0 Section
3.1.2.1 requires that redirect_uri match a pre-registered one.)
4. The authorization request is not a FAPI request. (FAPI Part 1 Section
5.2.2 Clause 8 requires that redirect URIs be pre-registered.)

In short, under existing specifications, pure RFC-6749
authorization-code-flow requests from confidential clients can choose an
arbitrary redirect_uri without registering it. Once OIDC or FAPI is used,
existing specifications require pre-registration of redirect URIs. I'm not
sure but if PAR's "redirect_uri Management" is going to introduce rules
that conflict with existing specifications, it is better to list the
conflicts explicitly in the section.

Best Regards,
Takahiko Kawasaki


On Wed, Sep 2, 2020 at 3:48 AM Torsten Lodderstedt <torsten=
40lodderstedt.net@dmarc.ietf.org> wrote:

> Here is my proposal for the new section:
>
> 2.4. redirect_uri Management
>
> The OAuth Security BCP [I-D.ietf-oauth-security-topics] as well as OAuth
> 2.1 [I-D.ietf-oauth-v2-1] require an AS to excactly match the redirect_uri
> parameter against the set of redirect URIs previously established for a
> particular client. This is a means to early detect attempts to impersonate
> a client and prevent token leakage and open redirection. As a downside, it
> makes client management more complex since the redirect URI is typically
> the most volatile part of a client policy.
>
> This requirement MAY be relaxed by the AS, if a confidential client uses
> pushed authorization requests since the AS authenticates the client before
> the authorization process starts and that way ensures it interacts with the
> legit client. The AS MAY allow such clients to specify redirect_uri values
> not previously registered with the AS. This will give the client more
> flexibility (e.g. to mint AS-specific redirect URIs on the fly) and makes
> client management much easier. It is at the discretion of the AS to apply
> restriction on redirect_uri values, e.g. the AS MAY require a certain URI
> prefix or allow only a query parameter to vary at runtime.
>
> Note: The aibility to set up transaction specific redirect URIs is also
> useful in situations where client ids and correspoding credentials and
> policies are managed by a trusted 3rd party, e.g. via client certifiates
> containing client permissions. Such an externally managed client could
> interact with an AS trusting the respective 3rd party without the need for
> an additional registration step.
>
> > On 29. Aug 2020, at 17:22, Justin Richer <jricher@mit.edu> wrote:
> >
> > I completely agree with the utility of the function in question here and
> it needs to be included. I’m in favor of creating a dedicated section for
> redirect_uri management, so that we can explain exactly how and why to
> relax the requirement from core OAuth. In addition, I think we want to
> discuss that the AS might have its own restrictions on which redirect URIs
> an authenticated client might be able to use. For example, registering a
> client with a Redirect URI prefix, or allowing only a query parameter to
> vary at runtime. All of these can be enforced in PAR because the client is
> presenting its authentication, as you point out, so the AS can determine
> which policies should apply.
> >
> > — Justin
> >
> >> On Aug 29, 2020, at 7:52 AM, Torsten Lodderstedt <
> torsten@lodderstedt.net> wrote:
> >>
> >>
> >>>
> >>>
> >>>   ¶6: Does the AS really have "the ability to authenticate and
> authorize clients”? I think what we mean here is "the ability to
> authenticate clients and validate client requests”, but I’m not positive of
> the intent.
> >>>
> >>> I think the intent is that the AS can check whether a client is
> authorized to make a particular authorization request (specific scopes,
> response type, etc.). But checking authorization to request authorization
> is confusing wording. I think your working is less confusing and still
> allows for the intent.
> >>>
> >>> I'll let Torsten interject if he feels differently as I think he
> originally wrote the text in question.
> >>
> >> that was the original intent. I think “validate" is fine.
> >>
> >>>
> >>>
> >>>
> >>>   ¶7: I’m not sure I buy this example. Even if the clientID is managed
> externally, the association with a set or pattern of allowed redirect URIs
> is still important, and the AS will need to know what that is. I think this
> example could lead an AS developer to (erroneously and dangerously)
> conclude that they don’t have to check any other values in a request,
> including scope and redirect URI. It’s important that DynReg doesn’t
> alleviate that issue, but removal of DynReg doesn’t really change things in
> that regard. Suggest removing example or reworking paragraph.
> >>>
> >>> I'm going to have to defer to Torsten on this because, to be honest,
> I'm not too sure about it myself. I tend to lean towards thinking the draft
> would be better off without it.
> >>>
> >>
> >> In the traditional authorization flow, the redirect_uri serves as way
> to make sure the AS is really talking to the legit client and the allowed
> redirect_uri values are determined by the legit client at registration time
> (might be manually).
> >>
> >> With PAR, we have a much stronger means to ensure the AS is talking to
> the legit client. That’s why I don’t see an issue with letting the client
> set a per transaction redirect_uri. This will give the client more
> flexibility (mint AS-specific redirect URIs on the fly) and makes client
> management much easier since redirect URIs are the most volatile part of a
> client policy.
> >>
> >> It also makes use of OAuth much easier in deployments where client
> identities are managed by external entities (even without any idea of
> OAuth). A prominent example is open banking in the EU (aka PSD2). The
> (technical) identity of any PSD2-licensed client is asserted by an eIDAS
> compliant CA in a special X.509 certificate. Those certificates contain the
> permissions (access to account information and/or payment initiation
> allowed) and the identity (member state specific). But they don’t contain
> OAuth policy values. Nevertheless, the regulation requires any financial
> institution in the EU to at runtime, without any registration, to accept
> and process calls from any licensed PSD2 clients.
> >>
> >> There are two ways to cope with it in OAuth context:
> >> a) use dynamic client registration with the X.509 cert as credential.
> Unfortunately, RFC 7591 does not support other client authentication means
> then an initial access token. Beside that, it would violate the text of the
> regulation.
> >> b) establish a redirect URL with every transaction. This is the
> recommended approach in at least one of the PSD2 specs.
> >>
> >> PAR is a clean way to solve that problem.
> >>
> >> I don’t want this text to cause confusing. On the other hand this
> potential of PAR is way too important to not mention it at all. What about
> moving it into a special section "redirect_uri management”?
> >>
> >>>
> >>
> >
>
> _______________________________________________
> OAuth mailing list
> OAuth@ietf.org
> https://www.ietf.org/mailman/listinfo/oauth
>