Re: [OAUTH-WG] WGLC for Browser-based Apps

Philippe De Ryck <philippe@pragmaticwebsecurity.com> Thu, 10 August 2023 06:51 UTC

Return-Path: <philippe@pragmaticwebsecurity.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 6D58FC151068 for <oauth@ietfa.amsl.com>; Wed, 9 Aug 2023 23:51:30 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -7.107
X-Spam-Level:
X-Spam-Status: No, score=-7.107 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_MESSAGE=0.001, RCVD_IN_DNSWL_HI=-5, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, 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=pragmaticwebsecurity.com header.b="Iv5HPW9g"; dkim=pass (2048-bit key) header.d=messagingengine.com header.b="FWh9gsPw"
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 6tQFAz4kW9_T for <oauth@ietfa.amsl.com>; Wed, 9 Aug 2023 23:51:25 -0700 (PDT)
Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 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 D6C25C151063 for <oauth@ietf.org>; Wed, 9 Aug 2023 23:51:25 -0700 (PDT)
Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id BA9FE5C00FC for <oauth@ietf.org>; Thu, 10 Aug 2023 02:51:24 -0400 (EDT)
Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Thu, 10 Aug 2023 02:51:24 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= pragmaticwebsecurity.com; h=cc:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to; s=fm3; t= 1691650284; x=1691736684; bh=Fss5o4cAAKi0R212xT6wq45xmKiKMj4/MFv gpCF1OaQ=; b=Iv5HPW9gPnZr6a5rsgTmHC6hGAn6BoqsfRee6OUtpA2mJP86N3F IALl7x/EB2qW8mGkgx7mS3RJDEself/4QYu5IkNoMaCSKBtETfBw1gaU45tu+u0V er5ZbYNN2YRLKdtxajGc2qVW1iGnVoWBhjk8UQXgf2vNT4e1pJCVAJKyBO6nq9xP QB2cZlH08ZwhoagAt/A1d4UV2RYcvWyiBGUh65emFDIsZn3c62pb97VN+R43ffpM HN+bySki18QiwqxDBhqPO8Z2iNI/LfVyPVwKQla/TI+HvjQrt+1jhqxTy+0cx1WW v5z27Va9yZDDbFxeZIGVCPBpb8H21338Bdg==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; t=1691650284; x=1691736684; bh=Fss5o4cAAKi0R 212xT6wq45xmKiKMj4/MFvgpCF1OaQ=; b=FWh9gsPw/lyq8y/G468cK00cQN5sR v8SFgsXoSFJ9mPaP7U5Kylpvxc5q8AT7KeSp/Fsu7C85LIk04WG7UFZ7qjCLUj3t V6K0BvevrktMCgg8NQ1/rkFQJMNnol4hii2iuxPPJNtoWI+/HUzz/AhvxxbEpxGF e9ZwpIq17DTrzDyyhOz6Kfj1k2p/IIptcBn0nbCsqz/ffjSdq8HHm4XaGwa5Lmzo CaqXcOQj/1vh0LT4X9yIBEXQUU+PwqagoTrc5UzqSvnjaRLdBMKa9znKrbaf18F3 lAKPWvbpbpiGdc0VdVFaXDAeFs2MfpdjGPmNDxJAaPxmdSrJZJ8EgpEKQ==
X-ME-Sender: <xms:7IjUZLSQVKlm43rWJ06z-RJr087eEgWV7a-81t9kr_RPJ7ji80I4Uw> <xme:7IjUZMxw6dgvg-fUDh8aovnlVnTWZnnkpQsmjaG65KTpL6N_nr1E-omLsUBWi8XhA YVFaIbuRTS1aKm3UA>
X-ME-Received: <xmr:7IjUZA2nLPKAP0JrBz1Bglz1wS8EpTjZI-4Qr8MaIufwEaSBFgYr-P4NwztVoD2xWpCJc8g3ejtr-oydsVXRccaEeZuAELc>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedviedrleehgdduuddtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhtggguffffhfvjgfkofesrgdtmh erhhdtjeenucfhrhhomheprfhhihhlihhpphgvucffvgcutfihtghkuceophhhihhlihhp phgvsehprhgrghhmrghtihgtfigvsghsvggtuhhrihhthidrtghomheqnecuggftrfgrth htvghrnhepiedvieegkeekfeffudelkefggfffjeejgfekjeeghfetjeetffevhedvhfdt tdetnecuffhomhgrihhnpehsvggtfihorhhkshhhohhprdgvvhgvnhhtshdphihouhhtuh gsvgdrtghomhdpghhithhhuhgsrdgtohhmpddtgidtfedquhhsihhnghdqrghsvhhsrdhm ugdpphhrrghgmhgrthhitgifvggsshgvtghurhhithihrdgtohhmpdhivghtfhdrohhrgh enucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehphhhi lhhiphhpvgesphhrrghgmhgrthhitgifvggsshgvtghurhhithihrdgtohhm
X-ME-Proxy: <xmx:7IjUZLA6-MW6Q_EI7M4Lv8Awjz6PVU83GEiCmfSrULwIx12HY9TViA> <xmx:7IjUZEjh7kWinE9gxTUZ3H4kT_qgeRAjHcc2PIhIHg1xJbe0pFK2Dg> <xmx:7IjUZPo3YwSJQQOQKM1G_F2YedJw770BKX8K31gSiKt0RqA_q56DUw> <xmx:7IjUZCdxZmS9iW-u16Eagbf2G-0MgZhLs6kf3eXsu8UP40g85XgLZQ>
Feedback-ID: i21e1449f:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA for <oauth@ietf.org>; Thu, 10 Aug 2023 02:51:24 -0400 (EDT)
From: Philippe De Ryck <philippe@pragmaticwebsecurity.com>
Content-Type: multipart/alternative; boundary="Apple-Mail=_1C5C46B6-A3FF-44CE-A9B2-1C5E7997867D"
Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.600.7\))
Date: Thu, 10 Aug 2023 08:51:21 +0200
References: <CADNypP9gdt6NiaiMiqaM3mbjb44dRfECBnSgrkCg0DLa+w1fEg@mail.gmail.com>
To: oauth <oauth@ietf.org>
In-Reply-To: <CADNypP9gdt6NiaiMiqaM3mbjb44dRfECBnSgrkCg0DLa+w1fEg@mail.gmail.com>
Message-Id: <899023C1-659D-47DB-808E-307F5B5F8FD5@pragmaticwebsecurity.com>
X-Mailer: Apple Mail (2.3731.600.7)
Archived-At: <https://mailarchive.ietf.org/arch/msg/oauth/3oT1mRW5aYm5VXwReYaSwdcUjgE>
Subject: Re: [OAUTH-WG] WGLC for Browser-based Apps
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: Thu, 10 Aug 2023 06:51:30 -0000

In my opinion, this document is not ready to be published as an RFC. 

In fact, I will be at the OAuth Security Workshop in two weeks to discuss exactly this (See "The insecurity of OAuth 2.0 in frontends" here: https://oauth.secworkshop.events/osw2023/agenda-thursday). My hope is that my presentation can spark the necessary discussion to identify a path forward to make the RFC useful for practitioners building browser-based apps.

I don't have the resources available to write a lengthy email detailing my objections. I just want to point out that I've raised these points on the mailing list in the past, and there have been a couple of threads on this very list suggesting how to move this document forward (e.g., identify concrete threat models). I've also given a talk at NDC Security earlier this year (https://www.youtube.com/watch?v=OpFN6gmct8c) about how the security mechanisms proposed in this document fall short. This video has been posted to this list before as well.

Here are a couple of suggestions that I believe would improve this document:

- Clearly identify the danger of malicious JS (exfiltrating existing tokens is only one threat, and the most trivial one at that)
- State the baseline achievable level of security in light of existing XSS vulnerabilities (i.e., session riding, where the attacker controls the frontend)
- Identify different desired levels of security for a client application (e.g., a "public recipe app" vs "eHealth"). Existing work can help, such as the OWASP ASVS levels (https://github.com/OWASP/ASVS/blob/master/4.0/en/0x03-Using-ASVS.md)
- Define which levels of security certain mechanisms can offer (e.g., RTR for level 1, TMI-BFF for level 2, BFF for level 3)
- Remove unproven and overly complicated solutions (i.e., the service worker approach)

As stated before, I'll be at OSW in London in 2 weeks and would be happy to discuss this further.

Kind regards

Philippe

—
Pragmatic Web Security
Security for developers
https://pragmaticwebsecurity.com

> On 30 Jul 2023, at 17:46, Rifaat Shekh-Yusef <rifaat.s.ietf@gmail.com> wrote:
> 
> All,
> 
> This is a WG Last Call for the Browser-based Apps draft.
> https://www.ietf.org/archive/id/draft-ietf-oauth-browser-based-apps-14.html
> 
> Please, review this document and reply on the mailing list if you have any comments or concerns, by August 11th.
> 
> Regards,
>  Rifaat & Hannes
> _______________________________________________
> OAuth mailing list
> OAuth@ietf.org
> https://www.ietf.org/mailman/listinfo/oauth