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

Tomek Stojecki <tstojecki@yahoo.com> Wed, 24 July 2019 07:50 UTC

Return-Path: <tstojecki@yahoo.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 3CAF112034A for <oauth@ietfa.amsl.com>; Wed, 24 Jul 2019 00:50:15 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.999
X-Spam-Level:
X-Spam-Status: No, score=-1.999 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=yahoo.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 7LPGu_Cd_QG7 for <oauth@ietfa.amsl.com>; Wed, 24 Jul 2019 00:50:12 -0700 (PDT)
Received: from sonic303-20.consmr.mail.ne1.yahoo.com (sonic303-20.consmr.mail.ne1.yahoo.com [66.163.188.146]) (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 C94611200D6 for <oauth@ietf.org>; Wed, 24 Jul 2019 00:50:12 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1563954612; bh=xZJExtcgu7zK55NoJVdIk0kmyV/x4mK9Wk5e2/uHASs=; h=Date:From:To:Cc:In-Reply-To:References:Subject:From:Subject; b=EiMOL/20hOfFg9RLd60DHnjFIRxSJFdB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v.iulL B8TynhLejBTh_dQjw5t1ujRBWJQrcFQeEVBo_PL3unxLjl0a60VI3UU.XZCNQK3GV_R8XlrJrum_ _FLzwGWxlTmu3O9DOD9i8K0Lav1TswnNL1whpX8Xrv6fllWqIwdE7ry1BCBanlf9H2Iiygg8SXM2 dmGxyDjMw2q0gyCPI6pHKcz3HeUZNXmV7MImlW_Uvn85gjbdE8ANvxuHhr6_EsVyHMP8JunMkVDh 4JRxcr.K7MUVPnOFUnjF0iDipgEJKY3bwtmTznK8cBR7h1qJj4X8X2ioi7QodNFN6F85KoBwXtSP B1LY5CVXXw5FKx8HyqvQ89AuFPHDX9_tnPnV.Eg_kxjfIJ0X5fz.ycDhIMFv99ZAC5ekPAXzczyz dYExo58Fs6wVQW5pgROoieu.DTTtHxz.LtdSbqkyKCunTC0ROhFFWLC6FFhj3yy_8ZFLZA.OsCKk 9KUdRvRSDPtaKQJ0MTUBmR1JhByTV7MpGRnWWdADSIRC3XBeiUPO2F4J1F9O9xAO5ILZRqjkPa5N nd4r4WP5WSHEs5H.C7R9w7mpebg0JYZfpWPY0GA_guj0-
Received: from sonic.gate.mail.ne1.yahoo.com by sonic303.consmr.mail.ne1.yahoo.com with HTTP; Wed, 24 Jul 2019 07:50:12 +0000
Date: Wed, 24 Jul 2019 07:50:10 +0000 (UTC)
From: Tomek Stojecki <tstojecki@yahoo.com>
To: Brian Campbell <bcampbell=40pingidentity.com@dmarc.ietf.org>, David Waite <david@alkaline-solutions.com>
Cc: OAuth WG <oauth@ietf.org>
Message-ID: <1903519861.188545.1563954610968@mail.yahoo.com>
In-Reply-To: <99169CD8-F415-43CB-9F93-D779E5A15592@alkaline-solutions.com>
References: <CAGBSGjqVV3jJaXEX28N_fKbLSp3ijzb34N9NrZwZ+ZNXwXGKAg@mail.gmail.com> <0C094925-1429-46ED-8CF6-0D7B8DFB332F@lodderstedt.net> <CA+k3eCT5eG=S9AjM7Ss=DwHvsjwnriuZC3_yMxhrUaJXf2-vrw@mail.gmail.com> <99169CD8-F415-43CB-9F93-D779E5A15592@alkaline-solutions.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
X-Mailer: WebService/1.1.13991 YMailNorrin Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.142 Safari/537.36
Archived-At: <https://mailarchive.ietf.org/arch/msg/oauth/EKh6LLfoHDw_ExTqrxieGpo-l6c>
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: Wed, 24 Jul 2019 07:50:15 -0000

I agree that 6.1 takes too broad of a swipe, but I'd say with same-site cookies and (sadly) without token-binding, the suggestion to use cookie based session following oauth/oidc auth is a good one and should be incorporated perhaps in 6.2?

Leo sums it up well here:
> We need to be clear on the distinction between browser based apps that hold the token(s) in the browser space, vs. those that don't.  I agree that with this "common domain" architecture, the tokens should not be held in the browser, but it doesn't follow that oauth should not be used at all.  

Finally and sorry if this is off-topic, why isn't this discussion taking place in github? Aaron has uploaded the document there. This medium, while good for some things, seems to have a lot of shortcomings for this sort of discussion and review. 

Thanks,
Tomek


On Wednesday, July 24, 2019, 04:14:14 AM GMT+2, David Waite <david@alkaline-solutions.com> wrote: 







> On Jul 23, 2019, at 12:47 PM, Brian Campbell <bcampbell=40pingidentity.com@dmarc.ietf.org> wrote:
> 
> 
> 
> On Mon, Jul 22, 2019 at 7:31 AM Torsten Lodderstedt <torsten@lodderstedt.net> wrote:
>> 
>> 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 c. and to rephrase the second paragraph of the abstract.
> 
> I believe the experiences that the statement is based on are the predominant practice over the course of much of the history of the web of using a cookie to maintain an authenticated HTTP session in web applications. When the script of the browser-based application is served from a domain that can share cookies with the domain of the API, then cookies can still be used to authorize requests (even if those requests are API calls rather than full page HTTP request/response). And I do believe that's likely a better decision in a lot of such cases. 
> 
> That authenticated HTTP session may be establish from a username/password form submission, FIDO/WebAuthn, or whatever.  Even as a result of an OpenID Connect flow. Or even SAML for that matter. But the the requests after that are authorized by the cookie. 
> 
> I think there's a tendency to assume because SPA style apps make API calls, they simply must use OAuth. Because API implies OAuth in the minds of many (which is a sign of its success). But OAuth isn't necessarily the only thing that can be used for API authorization. Cookies work too. I think/hope that's what Section 6.1. is getting at - providing some potential guidance that OAuth might not necessarily be the right choice in those cases where a common domain allows for a cookie. Perhaps the text in that section could be phased in a different or better way, but I think its useful to have some mention of in this document. 
> 
> Although taking out "and OpenID Connect" from the sentence quoted above might be more appropriate and alleviate some confusion. 
> 
> 

Perhaps it should be turned into a stated document assumption (that the reader has decided to use OAuth) rather than guidance later in the document (that OAuth may not be the best fit)

There is AFAIK no set of security considerations or best practices we can point to for “use some non-standardized system for acquiring and using cookies” or even “here’s a standard for acquiring and using cookies”. Omitting some of the moving pieces of OAuth might alleviate some security concerns, but also resurrect some other security issues. The most immediate example that comes to mind: using a HttpOnly cookie-as-token instead of an access token may mean that you can’t have injected scripts exfiltrate the token, but applying the access token was also a mitigation against browser CSRF for your APIs.

-DW
_______________________________________________
OAuth mailing list
OAuth@ietf.org
https://www.ietf.org/mailman/listinfo/oauth