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

David Waite <> Wed, 24 July 2019 02:13 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id F1806120026 for <>; Tue, 23 Jul 2019 19:13:55 -0700 (PDT)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -1.9
X-Spam-Status: No, score=-1.9 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HTML_MESSAGE=0.001, SPF_PASS=-0.001] autolearn=unavailable autolearn_force=no
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id c9_loEQ-k8jA for <>; Tue, 23 Jul 2019 19:13:53 -0700 (PDT)
Received: from ( []) by (Postfix) with ESMTP id DE0FD1209C3 for <>; Tue, 23 Jul 2019 19:13:52 -0700 (PDT)
Received: from [IPv6:2601:282:202:b210:c84:db81:3715:c5de] (unknown [IPv6:2601:282:202:b210:c84:db81:3715:c5de]) by (Postfix) with ESMTPSA id 8C20B31686; Wed, 24 Jul 2019 02:13:51 +0000 (UTC)
From: David Waite <>
Message-Id: <>
Content-Type: multipart/alternative; boundary="Apple-Mail=_097CDDAD-8950-4C3A-BA6F-561DA3F7618A"
Mime-Version: 1.0 (Mac OS X Mail 13.0 \(3566.0.1\))
Date: Tue, 23 Jul 2019 20:13:50 -0600
In-Reply-To: <>
Cc: Torsten Lodderstedt <>, OAuth WG <>
To: Brian Campbell <>
References: <> <> <>
X-Mailer: Apple Mail (2.3566.0.1)
Archived-At: <>
Subject: Re: [OAUTH-WG] New OAuth for Browser-Based Apps draft -02
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: OAUTH WG <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-Subscribe: <>, <>
X-List-Received-Date: Wed, 24 Jul 2019 02:13:56 -0000

> On Jul 23, 2019, at 12:47 PM, Brian Campbell <> wrote:
> On Mon, Jul 22, 2019 at 7:31 AM Torsten Lodderstedt < <>> 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.