Return-Path: <neil.madden@forgerock.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 422BD12018F
 for <oauth@ietfa.amsl.com>; Tue, 23 Jul 2019 02:46:28 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.998
X-Spam-Level: 
X-Spam-Status: No, score=-1.998 tagged_above=-999 required=5
 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1,
 DKIM_VALID_AU=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001,
 SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001]
 autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key)
 header.d=forgerock.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 1YI2qANHq4LA for <oauth@ietfa.amsl.com>;
 Tue, 23 Jul 2019 02:46:25 -0700 (PDT)
Received: from mail-wr1-x431.google.com (mail-wr1-x431.google.com
 [IPv6:2a00:1450:4864:20::431])
 (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 9D56F120194
 for <oauth@ietf.org>; Tue, 23 Jul 2019 02:46:24 -0700 (PDT)
Received: by mail-wr1-x431.google.com with SMTP id g17so42447242wrr.5
 for <oauth@ietf.org>; Tue, 23 Jul 2019 02:46:24 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=forgerock.com; s=google;
 h=from:message-id:mime-version:subject:date:in-reply-to:cc:to
 :references; bh=DHJYxCFuu3n9fe6kwRnnj9SigenkqykKJSEm+exJYlc=;
 b=dz5VvUtfj4JZ/oIXDBvGEFrnVMdtekRPRxaw2n7Wq1UguiwJos5ZyogB18O9o0nc7u
 GvnOAXbIyHZ7RP3R3sMzyPxqLoeLVxUdRJSCdWd9NQdCasAcuqyiM2lPV/aDX1zlAUrJ
 xPczr9SIf5sxNhBsaiQbVHLv30Qs3xh3fOUIU=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:from:message-id:mime-version:subject:date
 :in-reply-to:cc:to:references;
 bh=DHJYxCFuu3n9fe6kwRnnj9SigenkqykKJSEm+exJYlc=;
 b=OAxmAIqsMLa9sLojk6IXRaoG5LETwyiWBcP2sUBbmyDKF2HgZA839rWV4eKtqXTl/2
 sFxPS8AUit7FDJIZbi7uq1yobQRA1P87STQ5G9RF+SwyHSvLFZYY5vyluvY1BEiJA+F7
 yqgRYMdqcmltITMCQ1PnlFOWg8MIiNCvnkvKowY6SX1UPivrhJ3cia1GrVlPxh4DFpvJ
 2+fG10oBoo4wLwE91qQupOpVLAWfbXuaardVHXc/IVwmkU/jINVapPB3FvjrHWkJkY1p
 haMIL/QawwUuyB9Yj5bXoe/ExLKAlS6CrRee5HoqhoycW8xmRyZP0DE1HyhByPxGvzk+
 eIMw==
X-Gm-Message-State: APjAAAU9SZyAZdJpIfkFuQCfbio4P5T01VGx2LI0zcPAs+qBRFIryMS2
 l/AiWlOPoF9Kx1cn6BOxp17Oxg==
X-Google-Smtp-Source: APXvYqyhhJbITIP3ui14/5FNTiQJ/pSYYMXO8roxpvVUKu0AbH4OUL5B2FV7VueCRNNOMhWQDTd1JA==
X-Received: by 2002:a5d:4e06:: with SMTP id p6mr37689988wrt.336.1563875183007; 
 Tue, 23 Jul 2019 02:46:23 -0700 (PDT)
Received: from [192.168.2.140] (77-44-110-214.xdsl.murphx.net. [77.44.110.214])
 by smtp.gmail.com with ESMTPSA id p14sm34459800wrx.17.2019.07.23.02.46.21
 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
 Tue, 23 Jul 2019 02:46:22 -0700 (PDT)
From: Neil Madden <neil.madden@forgerock.com>
Message-Id: <E6B39AED-DC45-407B-BCF9-015D4FE8E0E2@forgerock.com>
Content-Type: multipart/alternative;
 boundary="Apple-Mail=_0EBCC58E-0223-496B-8DF6-0C7C878526CB"
Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\))
Date: Tue, 23 Jul 2019 10:46:19 +0100
In-Reply-To: <CAO7Ng+t9dXe1ijNb1eZqAfRMJx6xETp_oFj0SdYXp9FNviAoAA@mail.gmail.com>
Cc: Filip Skokan <panva.ip@gmail.com>,
 OAuth WG <oauth@ietf.org>
To: Dominick Baier <dbaier@leastprivilege.com>
References: <CAO7Ng+tyHaKQgJ4PcrcEpMcteqvdH2PE1CQP5j+5DqKJWuKPoQ@mail.gmail.com>
 <CAO7Ng+sLuLczQYjYX7yHSfVJd7bx5y0RnDofRh_Mb2Se+vA0=A@mail.gmail.com>
 <DB41BFE8-2123-43B4-9BFB-D548CD96FB72@forgerock.com>
 <7AB72379-075B-411D-B149-3759F16B001A@gmail.com>
 <CAO7Ng+t9dXe1ijNb1eZqAfRMJx6xETp_oFj0SdYXp9FNviAoAA@mail.gmail.com>
X-Mailer: Apple Mail (2.3445.104.11)
Archived-At: <https://mailarchive.ietf.org/arch/msg/oauth/1U3RGR66JCSSo9Zvbi3oz7N75R8>
Subject: Re: [OAUTH-WG] Feedback on OAuth for browser-based Apps
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: Tue, 23 Jul 2019 09:46:28 -0000


--Apple-Mail=_0EBCC58E-0223-496B-8DF6-0C7C878526CB
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
	charset=utf-8

Not sure I follow - the current OAuth security topics BCP allows for =
using either state or PKCE for detecting CSRF =
(https://tools.ietf.org/html/draft-ietf-oauth-security-topics-13#section-4=
.7.1 =
<https://tools.ietf.org/html/draft-ietf-oauth-security-topics-13#section-4=
.7.1>), with some caveats for when state is preferred.

I think I prefer the current wording in the browser-based draft, which =
provides a much clearer unambiguous recommendation.

-- Neil

> On 23 Jul 2019, at 09:31, Dominick Baier <dbaier@leastprivilege.com> =
wrote:
>=20
> Yes it would.
>=20
> =E2=80=94=E2=80=94=E2=80=94
> Dominick
>=20
> On 23. July 2019 at 10:08:43, Filip Skokan (panva.ip@gmail.com =
<mailto:panva.ip@gmail.com>) wrote:
>=20
>> Wouldn=E2=80=99t that contradict the security topics BCP?
>>=20
>> Odesl=C3=A1no z iPhonu
>>=20
>> 23. 7. 2019 v 9:44, Neil Madden <neil.madden@forgerock.com =
<mailto:neil.madden@forgerock.com>>:
>>=20
>>> Technically it could be optional, but it means that a CSRF attempt =
will only be detected by the AS not by the client. If we consider the =
possibility of a malicious AS, then this could allow Login CSRF attacks =
against the client. The client would also have to be sure that the AS =
actually implements PKCE. So I think it=E2=80=99s safer to leave the =
recommendation as-is.=20
>>>=20
>>> On 23 Jul 2019, at 08:28, Dominick Baier <dbaier@leastprivilege.com =
<mailto:dbaier@leastprivilege.com>> wrote:
>>>=20
>>>> Forgot one more thing
>>>>=20
>>>> In 7.1
>>>>=20
>>>> Browser-based apps MUST use the OAuth 2.0 "state" parameter to
>>>>    protect themselves against Cross-Site Request Forgery and
>>>>    authorization code swap attacks and MUST use a unique value for =
each
>>>>    authorization request, and MUST verify the returned state in the
>>>>    authorization response matches the original state the app =
created.
>>>>=20
>>>> Isn=E2=80=99t state optional when PKCE is used?
>>>>=20
>>>> thanks
>>>> =E2=80=94=E2=80=94=E2=80=94
>>>> Dominick
>>>>=20
>>>> On 22. July 2019 at 08:14:33, Dominick Baier =
(dbaier@leastprivilege.com <mailto:dbaier@leastprivilege.com>) wrote:
>>>>=20
>>>>> Hey,=20
>>>>>=20
>>>>> Just read the spec - good to see the progress. Some feedback:
>>>>>=20
>>>>> I am yet undecided if I like the categorisation of the =
=E2=80=9CApplication Architecture Patterns=E2=80=9D. I definitely want =
to distinguish between applications only accessing same-site back-end =
services and =E2=80=9Cothers=E2=80=9D. Not sure if =E2=80=9Cdynamic =
application server" and =E2=80=9Cstatic application server=E2=80=9D =
should be handled differently - they are deployment details and should =
not decide on the application security architecture. Also not sure how =
realistic it is to deploy a typical applications solely from e.g. a CDN. =
But I don=E2=80=99t have the right answer wrt to categories right now.
>>>>>=20
>>>>> 6.1.  Apps Served from a Common Domain as the Resource Server
>>>>>=20
>>>>> > 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.
>>>>>=20
>>>>> I think you are mixing authentication and API access here. =
Depending on application scenario it makes a lot of sense to use OIDC - =
but rely on the resulting session to control API access.=20
>>>>> Unless you want to dive into the details here, I suggest you =
remove the mention of OIDC because it is misleading.
>>>>>=20
>>>>>=20
>>>>> 6.2.  Apps Served from a Dynamic Application Server
>>>>>=20
>>>>> I have a .NET sample for that=20
>>>>>=20
>>>>> =
https://github.com/leastprivilege/AspNetCoreSecuritySamples/tree/aspnetcor=
e21/BFF =
<https://github.com/leastprivilege/AspNetCoreSecuritySamples/tree/aspnetco=
re21/BFF>
>>>>> And a blog post
>>>>> =
https://leastprivilege.com/2019/01/18/an-alternative-way-to-secure-spas-wi=
th-asp-net-core-openid-connect-oauth-2-0-and-proxykit/ =
<https://leastprivilege.com/2019/01/18/an-alternative-way-to-secure-spas-w=
ith-asp-net-core-openid-connect-oauth-2-0-and-proxykit/>
>>>>>=20
>>>>> 9.7 =
<https://tools.ietf.org/html/draft-ietf-oauth-browser-based-apps-02#sectio=
n-9.7>. Content-Security Policy
>>>>> A browser-based application that wishes to use either long-lived
>>>>>    refresh tokens or privileged scopes SHOULD restrict its =
JavaScript
>>>>>    execution to a set of statically hosted scripts via a Content
>>>>>    Security Policy ([CSP2 =
<https://tools.ietf.org/html/draft-ietf-oauth-browser-based-apps-02#ref-CS=
P2>]) or similar mechanism.
>>>>>=20
>>>>>=20
>>>>> I would rather say that ANY JS app should use CSP to lock down the =
browser features to a minimal attack surface. In addition, if refresh or =
access tokens are involved - further settings like disabling inline =
scripting (unsafe inline) and eval should be disabled.
>>>>>=20
>>>>> Thanks for doing this work!
>>>>>=20
>>>>> =E2=80=94=E2=80=94=E2=80=94
>>>>> Dominick
>>>> _______________________________________________
>>>> OAuth mailing list
>>>> OAuth@ietf.org <mailto:OAuth@ietf.org>
>>>> https://www.ietf.org/mailman/listinfo/oauth =
<https://www.ietf.org/mailman/listinfo/oauth>
>>> _______________________________________________
>>> OAuth mailing list
>>> OAuth@ietf.org <mailto:OAuth@ietf.org>
>>> https://www.ietf.org/mailman/listinfo/oauth =
<https://www.ietf.org/mailman/listinfo/oauth>

--Apple-Mail=_0EBCC58E-0223-496B-8DF6-0C7C878526CB
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html;
	charset=utf-8

<html><head><meta http-equiv=3D"Content-Type" content=3D"text/html; =
charset=3Dutf-8"></head><body style=3D"word-wrap: break-word; =
-webkit-nbsp-mode: space; line-break: after-white-space;" class=3D"">Not =
sure I follow - the current OAuth security topics BCP allows for using =
either state or PKCE for detecting CSRF (<a =
href=3D"https://tools.ietf.org/html/draft-ietf-oauth-security-topics-13#se=
ction-4.7.1" =
class=3D"">https://tools.ietf.org/html/draft-ietf-oauth-security-topics-13=
#section-4.7.1</a>), with some caveats for when state is preferred.<div =
class=3D""><br class=3D""></div><div class=3D"">I think I prefer the =
current wording in the browser-based draft, which provides a much =
clearer unambiguous recommendation.</div><div class=3D""><br =
class=3D""></div><div class=3D"">-- Neil<br class=3D""><div =
class=3D""><div><br class=3D""><blockquote type=3D"cite" class=3D""><div =
class=3D"">On 23 Jul 2019, at 09:31, Dominick Baier &lt;<a =
href=3D"mailto:dbaier@leastprivilege.com" =
class=3D"">dbaier@leastprivilege.com</a>&gt; wrote:</div><br =
class=3D"Apple-interchange-newline"><div class=3D""><div =
style=3D"caret-color: rgb(0, 0, 0); font-family: Helvetica, Arial; =
font-size: 13px; font-style: normal; font-variant-caps: normal; =
font-weight: normal; letter-spacing: normal; text-align: start; =
text-indent: 0px; text-transform: none; white-space: normal; =
word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: =
none;" class=3D"">Yes it would.</div><br style=3D"caret-color: rgb(0, 0, =
0); font-family: Helvetica, Arial; font-size: 13px; font-style: normal; =
font-variant-caps: normal; font-weight: normal; letter-spacing: normal; =
text-align: start; text-indent: 0px; text-transform: none; white-space: =
normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; =
text-decoration: none;" class=3D""><div class=3D"gmail_signature" =
style=3D"caret-color: rgb(0, 0, 0); font-family: Helvetica, Arial; =
font-size: 13px; font-style: normal; font-variant-caps: normal; =
font-weight: normal; letter-spacing: normal; text-align: start; =
text-indent: 0px; text-transform: none; white-space: normal; =
word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: =
none;">=E2=80=94=E2=80=94=E2=80=94<div class=3D"">Dominick</div></div><br =
style=3D"caret-color: rgb(0, 0, 0); font-family: Helvetica, Arial; =
font-size: 13px; font-style: normal; font-variant-caps: normal; =
font-weight: normal; letter-spacing: normal; text-align: start; =
text-indent: 0px; text-transform: none; white-space: normal; =
word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: =
none;" class=3D""><p class=3D"airmail_on" style=3D"caret-color: rgb(0, =
0, 0); font-family: Helvetica, Arial; font-size: 13px; font-style: =
normal; font-variant-caps: normal; font-weight: normal; letter-spacing: =
normal; text-align: start; text-indent: 0px; text-transform: none; =
white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; =
text-decoration: none;">On 23. July 2019 at 10:08:43, Filip Skokan (<a =
href=3D"mailto:panva.ip@gmail.com" class=3D"">panva.ip@gmail.com</a>) =
wrote:</p><blockquote type=3D"cite" class=3D"clean_bq" =
style=3D"font-family: Helvetica, Arial; font-size: 13px; font-style: =
normal; font-variant-caps: normal; font-weight: normal; letter-spacing: =
normal; orphans: auto; text-align: start; text-indent: 0px; =
text-transform: none; white-space: normal; widows: auto; word-spacing: =
0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; =
text-decoration: none;"><span class=3D""><div dir=3D"auto" class=3D""><div=
 class=3D""></div><div class=3D"">Wouldn=E2=80=99t that contradict the =
security topics BCP?<br class=3D""><br class=3D""><div dir=3D"ltr" =
class=3D"">Odesl=C3=A1no z&nbsp;iPhonu</div><div dir=3D"ltr" =
class=3D""><br class=3D"">23. 7. 2019 v&nbsp;9:44, Neil Madden &lt;<a =
href=3D"mailto:neil.madden@forgerock.com" =
class=3D"">neil.madden@forgerock.com</a>&gt;:<br class=3D""><br =
class=3D""></div><blockquote type=3D"cite" class=3D""><div dir=3D"ltr" =
class=3D""><div dir=3D"ltr" class=3D""></div><div dir=3D"ltr" =
class=3D"">Technically it could be optional, but it means that a CSRF =
attempt will only be detected by the AS not by the client. If we =
consider the possibility of a malicious AS, then this could allow Login =
CSRF attacks against the client. The client would also have to be sure =
that the AS actually implements PKCE. So I think it=E2=80=99s safer to =
leave the recommendation as-is.&nbsp;</div><div dir=3D"ltr" class=3D""><br=
 class=3D"">On 23 Jul 2019, at 08:28, Dominick Baier &lt;<a =
href=3D"mailto:dbaier@leastprivilege.com" =
class=3D"">dbaier@leastprivilege.com</a>&gt; wrote:<br class=3D""><br =
class=3D""></div><blockquote type=3D"cite" class=3D""><div dir=3D"ltr" =
class=3D""><div style=3D"font-family: Helvetica, Arial; font-size: =
13px;" class=3D"">Forgot one more thing</div><div style=3D"font-family: =
Helvetica, Arial; font-size: 13px;" class=3D""><br class=3D""></div><div =
style=3D"font-family: Helvetica, Arial; font-size: 13px;" class=3D"">In =
7.1</div><div style=3D"font-family: Helvetica, Arial; font-size: 13px;" =
class=3D""><br class=3D""></div><div style=3D"margin: 0px;" =
class=3D""><div style=3D"margin: 0px;" class=3D"">Browser-based apps =
MUST use the OAuth 2.0 "state" parameter to</div><div style=3D"margin: =
0px;" class=3D"">&nbsp; &nbsp;protect themselves against Cross-Site =
Request Forgery and</div><div style=3D"margin: 0px;" class=3D"">&nbsp; =
&nbsp;authorization code swap attacks and MUST use a unique value for =
each</div><div style=3D"margin: 0px;" class=3D"">&nbsp; =
&nbsp;authorization request, and MUST verify the returned state in =
the</div><div style=3D"margin: 0px;" class=3D"">&nbsp; =
&nbsp;authorization response matches the original state the app =
created.</div><div style=3D"margin: 0px;" class=3D""><br =
class=3D""></div><div style=3D"margin: 0px;" class=3D"">Isn=E2=80=99t =
state optional when PKCE is used?</div></div><div class=3D""><br =
class=3D""></div>thanks<br class=3D""><div =
class=3D"gmail_signature">=E2=80=94=E2=80=94=E2=80=94<div =
class=3D"">Dominick</div></div><br class=3D""><p class=3D"airmail_on">On =
22. July 2019 at 08:14:33, Dominick Baier (<a =
href=3D"mailto:dbaier@leastprivilege.com" =
class=3D"">dbaier@leastprivilege.com</a>) wrote:</p><blockquote =
type=3D"cite" class=3D"clean_bq"><div class=3D""><div class=3D""><div =
style=3D"font-family: Helvetica, Arial; font-size: 13px;" class=3D""><span=
 class=3D"">Hey,&nbsp;</span></div><div style=3D"font-family: Helvetica, =
Arial; font-size: 13px;" class=3D""><span class=3D""><br =
class=3D""></span></div><div style=3D"font-family: Helvetica, Arial; =
font-size: 13px;" class=3D""><span class=3D"">Just read the spec - good =
to see the progress. Some feedback:</span></div><div style=3D"font-family:=
 Helvetica, Arial; font-size: 13px;" class=3D""><span class=3D""><br =
class=3D""></span></div><div style=3D"font-family: Helvetica, Arial; =
font-size: 13px;" class=3D""><span class=3D"">I am yet undecided if I =
like the categorisation of the =E2=80=9CApplication Architecture =
Patterns=E2=80=9D. I definitely want to distinguish between applications =
only accessing same-site back-end services and =E2=80=9Cothers=E2=80=9D. =
Not sure if =E2=80=9Cdynamic application server" and =E2=80=9Cstatic =
application server=E2=80=9D should be handled differently - they are =
deployment details and should not decide on the application security =
architecture. Also not sure how realistic it is to deploy a typical =
applications solely from e.g. a CDN. But I don=E2=80=99t have the right =
answer wrt to categories right now.</span></div><div style=3D"font-family:=
 Helvetica, Arial; font-size: 13px;" class=3D""><span class=3D""><br =
class=3D""></span></div><div style=3D"margin: 0px;" class=3D""><span =
class=3D"">6.1.&nbsp; Apps Served from a Common Domain as the Resource =
Server</span></div><div style=3D"margin: 0px;" class=3D""><span =
class=3D""><br class=3D""></span></div><div style=3D"margin: 0px;" =
class=3D""><span class=3D"">&gt; OAuth and OpenID Connect provide very =
little benefit in this</span></div><div style=3D"margin: 0px;" =
class=3D""><span class=3D"">&nbsp; &nbsp;deployment scenario, so it is =
recommended to reconsider whether you</span></div><div style=3D"margin: =
0px;" class=3D""><span class=3D"">&nbsp; &nbsp;need OAuth or OpenID =
Connect at all in this case.</span></div><div style=3D"margin: 0px;" =
class=3D""><span class=3D""><br class=3D""></span></div><div =
style=3D"margin: 0px;" class=3D""><span class=3D"">I think you are =
mixing authentication and API access here. Depending on application =
scenario it makes a lot of sense to use OIDC - but rely on the resulting =
session to control API access.&nbsp;</span></div><div style=3D"margin: =
0px;" class=3D""><span class=3D"">Unless you want to dive into the =
details here, I suggest you remove the mention of OIDC because it is =
misleading.</span></div><div style=3D"margin: 0px;" class=3D""><span =
class=3D""><br class=3D""></span></div><div style=3D"margin: 0px;" =
class=3D""><span class=3D""><br class=3D""></span></div><div =
style=3D"margin: 0px;" class=3D""><span class=3D"">6.2.&nbsp; Apps =
Served from a Dynamic Application Server</span></div><div style=3D"margin:=
 0px;" class=3D""><span class=3D""><br class=3D""></span></div><div =
style=3D"margin: 0px;" class=3D""><span class=3D"">I have a .NET sample =
for that&nbsp;</span></div><div style=3D"margin: 0px;" class=3D""><span =
class=3D""><br class=3D""></span></div><div style=3D"margin: 0px;" =
class=3D""><span class=3D""><a =
href=3D"https://github.com/leastprivilege/AspNetCoreSecuritySamples/tree/a=
spnetcore21/BFF" =
class=3D"">https://github.com/leastprivilege/AspNetCoreSecuritySamples/tre=
e/aspnetcore21/BFF</a></span></div><div style=3D"margin: 0px;" =
class=3D""><span class=3D"">And a blog post</span></div><div =
style=3D"margin: 0px;" class=3D""><span class=3D""><a =
href=3D"https://leastprivilege.com/2019/01/18/an-alternative-way-to-secure=
-spas-with-asp-net-core-openid-connect-oauth-2-0-and-proxykit/" =
class=3D"">https://leastprivilege.com/2019/01/18/an-alternative-way-to-sec=
ure-spas-with-asp-net-core-openid-connect-oauth-2-0-and-proxykit/</a></spa=
n></div><div style=3D"margin: 0px;" class=3D""><span class=3D""><br =
class=3D""></span></div><div style=3D"margin: 0px;" class=3D""><pre =
class=3D"newpage" style=3D"font-size: 13.3333px; margin-top: 0px; =
margin-bottom: 0px; break-before: page; font-variant-ligatures: =
normal;"></pre><h3 style=3D"line-height: 0pt; display: inline; =
font-size: 1em;" class=3D""><span class=3D""><span class=3D"h3" =
style=3D"line-height: 0pt; display: inline; font-size: 1em; font-weight: =
bold;"><a class=3D"selflink" name=3D"section-9.7" =
href=3D"https://tools.ietf.org/html/draft-ietf-oauth-browser-based-apps-02=
#section-9.7" id=3D"section-9.7" style=3D"text-decoration: =
none;">9.7</a>. Content-Security Policy</span></span></h3><pre =
class=3D"">A browser-based application that wishes to use either =
long-lived
   refresh tokens or privileged scopes SHOULD restrict its JavaScript
   execution to a set of statically hosted scripts via a Content
   Security Policy ([<a =
href=3D"https://tools.ietf.org/html/draft-ietf-oauth-browser-based-apps-02=
#ref-CSP2" title=3D"&quot;Content Security Policy&quot;" =
class=3D"">CSP2</a>]) or similar mechanism.</pre><pre class=3D"newpage" =
style=3D"font-size: 13.3333px; margin-top: 0px; margin-bottom: 0px; =
break-before: page; font-variant-ligatures: normal;"><span class=3D"h3" =
style=3D"line-height: 0pt; display: inline; font-size: 1em; font-weight: =
bold;"><br class=3D""></span></pre><pre class=3D"newpage" =
style=3D"font-size: 13.3333px; margin-top: 0px; margin-bottom: 0px; =
break-before: page; font-variant-ligatures: normal;"><span class=3D"h3" =
style=3D"line-height: 0pt; display: inline; font-size: 1em; font-weight: =
bold;"><br class=3D""></span></pre></div><div style=3D"margin: 0px;" =
class=3D""><span class=3D"h3" style=3D"line-height: 0pt; display: =
inline; font-size: 1em; font-weight: bold;">I would rather say that ANY =
JS app should use CSP to lock down the browser features to a minimal =
attack surface. In addition, if refresh or access tokens are involved - =
further settings like disabling inline scripting (unsafe inline) and =
eval should be disabled.</span></div><div class=3D"bloop_container"><div =
class=3D"bloop_frame"></div></div><div class=3D""><span class=3D"h3" =
style=3D"line-height: 0pt; display: inline; font-size: 1em; font-weight: =
bold;"><br class=3D""></span></div><span class=3D"h3" =
style=3D"line-height: 0pt; display: inline; font-size: 1em; font-weight: =
bold;">Thanks for doing this work!</span><div class=3D""><span =
class=3D"h3" style=3D"line-height: 0pt; display: inline; font-size: 1em; =
font-weight: bold;"><br class=3D""></span><div =
class=3D"gmail_signature"><span class=3D"h3" style=3D"line-height: 0pt; =
display: inline; font-size: 1em; font-weight: =
bold;">=E2=80=94=E2=80=94=E2=80=94</span><div class=3D""><span =
class=3D"h3" style=3D"line-height: 0pt; display: inline; font-size: 1em; =
font-weight: =
bold;">Dominick</span></div></div></div></div></div></blockquote></div></b=
lockquote><blockquote type=3D"cite" class=3D""><div dir=3D"ltr" =
class=3D""><span =
class=3D"">_______________________________________________</span><br =
class=3D""><span class=3D"">OAuth mailing list</span><br class=3D""><span =
class=3D""><a href=3D"mailto:OAuth@ietf.org" =
class=3D"">OAuth@ietf.org</a></span><br class=3D""><span class=3D""><a =
href=3D"https://www.ietf.org/mailman/listinfo/oauth" =
class=3D"">https://www.ietf.org/mailman/listinfo/oauth</a></span><br =
class=3D""></div></blockquote></div></blockquote><blockquote type=3D"cite"=
 class=3D""><div dir=3D"ltr" class=3D""><span =
class=3D"">_______________________________________________</span><br =
class=3D""><span class=3D"">OAuth mailing list</span><br class=3D""><span =
class=3D""><a href=3D"mailto:OAuth@ietf.org" =
class=3D"">OAuth@ietf.org</a></span><br class=3D""><span class=3D""><a =
href=3D"https://www.ietf.org/mailman/listinfo/oauth" =
class=3D"">https://www.ietf.org/mailman/listinfo/oauth</a></span></div></b=
lockquote></div></div></span></blockquote></div></blockquote></div><br =
class=3D""></div></div></body></html>=

--Apple-Mail=_0EBCC58E-0223-496B-8DF6-0C7C878526CB--

