Re: [OAUTH-WG] New OAuth for Browser-Based Apps draft -02

Torsten Lodderstedt <torsten@lodderstedt.net> Mon, 22 July 2019 13:30 UTC

Return-Path: <torsten@lodderstedt.net>
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 83C5B120291 for <oauth@ietfa.amsl.com>; Mon, 22 Jul 2019 06:30:49 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.6
X-Spam-Level:
X-Spam-Status: No, score=-2.6 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
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 OSDI2oROrRrR for <oauth@ietfa.amsl.com>; Mon, 22 Jul 2019 06:30:46 -0700 (PDT)
Received: from smtprelay03.ispgateway.de (smtprelay03.ispgateway.de [80.67.29.28]) (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 2EAEE120286 for <oauth@ietf.org>; Mon, 22 Jul 2019 06:30:46 -0700 (PDT)
Received: from [84.158.229.114] (helo=[192.168.71.123]) by smtprelay03.ispgateway.de with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92) (envelope-from <torsten@lodderstedt.net>) id 1hpYOo-0007wt-J9; Mon, 22 Jul 2019 15:30:42 +0200
From: Torsten Lodderstedt <torsten@lodderstedt.net>
Message-Id: <0C094925-1429-46ED-8CF6-0D7B8DFB332F@lodderstedt.net>
Content-Type: multipart/signed; boundary="Apple-Mail=_7E7AD628-0AF1-4EEA-9F2C-C8358004B51B"; protocol="application/pkcs7-signature"; micalg="sha-256"
Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\))
Date: Mon, 22 Jul 2019 15:30:41 +0200
In-Reply-To: <CAGBSGjqVV3jJaXEX28N_fKbLSp3ijzb34N9NrZwZ+ZNXwXGKAg@mail.gmail.com>
Cc: OAuth WG <oauth@ietf.org>
To: Aaron Parecki <aaron@parecki.com>
References: <CAGBSGjqVV3jJaXEX28N_fKbLSp3ijzb34N9NrZwZ+ZNXwXGKAg@mail.gmail.com>
X-Mailer: Apple Mail (2.3445.104.11)
X-Df-Sender: dG9yc3RlbkBsb2RkZXJzdGVkdC5uZXQ=
Archived-At: <https://mailarchive.ietf.org/arch/msg/oauth/VLdQ1U7DKpp1xwphgSzAyKZcYFE>
Subject: Re: [OAUTH-WG] New OAuth for Browser-Based Apps draft -02
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: Mon, 22 Jul 2019 13:30:50 -0000

Hi Aaron, 

thanks for your continued work on the topic. 

Here are some general remarks on the current revision: 

1) This BCP should not be limited to public clients. Your BCP itself already describes an architecture where the OAuth client is a backend that may be a confidential client (see section 6.2 for an example). The text of the BCP generally seems to be inconsistent regarding oauth client types.

I suggest to remove the second part of the first paragraph of the abstract (“and should not be issued a client secret when registered.") and other statements limiting the BCP to public clients. 

2) Regarding architectures: I think this BCP should focus on recommendations for securely implementing OAuth in the different potential architecture. I don’t think we should get into the business of recommending and assessing other solutions (e.g. section 6.1.). Just to give you an example: Section 6.1. states 

"OAuth and OpenID Connect provide very little benefit in this deployment scenario, so it is recommended to reconsider whether you need OAuth or OpenID Connect at all in this case.”

Really? What experiences is this statement based on? In my experience, sharing the same domain == host name tells you nothing about the overall architecture of a certain deployment. There may be several reasons why OAuth could be good choice in such a scenario, e.g. security considerations (since your common domain is just a proxy server encapsulating a whole universe of systems) or even modularity as an architecture principle. 

I suggest to remove section 6.1. and to rephrase the second paragraph of the abstract.

3) The naming in section 6 focus on the ways the JS could be served. I personally think the more important aspect is the architecture of the overall application. 

I suggest the following changes: 
- 6.2. Apps Served from a Dynamic Application Server -> SPA with backend
- 6.3. Apps Served from a Static Web Server -> SPA without backend 

Note: even an SPA with a backend could use a static web server to serve the JS code.

4) I don’t understand why your BCP distinguishes 1st and 3rd party apps. Neither the Native apps BCP nor security BCP do so and need to.

5) Section 9.8 seems to duplicate portions of the Security BCP (while not giving the complete threat model) - what is the benefit of duplicating this text?

6) I think the BCP would benefit from a refactoring. One idea would be to first state the problem with implicit and give general recommendations (PKCE and so on). The latter part could get into details of access and refresh token protection in the context of different SPA architectures (mTLS, CORS for CSRF prevention, …).

kind regards,
Torsten. 

> On 9. Jul 2019, at 01:03, Aaron Parecki <aaron@parecki.com> wrote:
> 
> Hi all,
> 
> I've just uploaded a new version of oauth-browser-based-apps in preparation for the meeting in Montreal. 
> 
> https://tools.ietf.org/html/draft-ietf-oauth-browser-based-apps-02
> 
> This draft incorporates much of the feedback I've received over the last couple months, as well as what we discussed at the last meeting in Prague.
> 
> The primary change is a significant rewrite and addition of Section 6 to highlight the two common deployment patterns, a SPA with and without a dynamic backend. 
> 
> Please have a look and let me know what you think. I have a slot in the agenda for Montreal to present on this as well.
> 
> Thanks!
> 
> ----
> Aaron Parecki
> aaronparecki.com
> 
> _______________________________________________
> OAuth mailing list
> OAuth@ietf.org
> https://www.ietf.org/mailman/listinfo/oauth