From nobody Tue Sep  8 23:43:07 2020
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 CEB3A3A0FD1
 for <oauth@ietfa.amsl.com>; Tue,  8 Sep 2020 23:43:05 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.097
X-Spam-Level: 
X-Spam-Status: No, score=-2.097 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,
 MIME_QP_LONG_LINE=0.001, 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 uMJvmjUq303o for <oauth@ietfa.amsl.com>;
 Tue,  8 Sep 2020 23:43:03 -0700 (PDT)
Received: from mail-wm1-x336.google.com (mail-wm1-x336.google.com
 [IPv6:2a00:1450:4864:20::336])
 (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 285853A0FCD
 for <oauth@ietf.org>; Tue,  8 Sep 2020 23:43:02 -0700 (PDT)
Received: by mail-wm1-x336.google.com with SMTP id a65so1125592wme.5
 for <oauth@ietf.org>; Tue, 08 Sep 2020 23:43:02 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=forgerock.com; s=google;
 h=content-transfer-encoding:mime-version:subject:from:in-reply-to:cc
 :date:message-id:references:to;
 bh=bX9LmfqT8cqE7cBMV6z5PO+2SIPpZ7BdHCn7MGyKwpE=;
 b=R+otf55uqlZxxVoNgIZNEwp5jF5ipxkxH8r6JdtmSfhEi6u7o4wxXvxftrIZMlMvH4
 S2m+i+Y1NRAD3+fowWjQg7Iau4Gt6GpZy3WnFgOyFDsylJdtVMB9o++UdF5A0/SPWUDa
 CHzGa/jFqO2klYhIGxBOZPUE9uFj+Dc/JHa2Q=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:content-transfer-encoding:mime-version:subject
 :from:in-reply-to:cc:date:message-id:references:to;
 bh=bX9LmfqT8cqE7cBMV6z5PO+2SIPpZ7BdHCn7MGyKwpE=;
 b=UtPnHAktFr9JEQfRR5l/z/xNs2bMgzlB0kvdegbXOJFXO2qX2A4MkO10LGVQrfhz5X
 eQNeM0zrP1CJs//N7eD4YK7EBZbD2o+0qVus1EhaWXkOKRpai4N5IiHKcSpBZs/LEIz/
 WpFR2ZkSLuX4b372ss3Dw2/wlF7TMoCPjceG3HRsKYmRvPdi1MKJ36vqhvayxVkA2Beg
 aRyZT0yJgupGNHBH44hy9IF7L1zv9ttgYdzY/lYI6e/FPpSzMcR2JGwo9A2ZEjvyvPro
 wPw0GdxEoYacbBlCNqER33VBqu6D/wdtqVerBJ89K/TRdUQWdi4XnSXNAjTR2VcNKOPm
 dONw==
X-Gm-Message-State: AOAM530x5UDoXnbgEaoGp7xfZKeoggXmq/tRGnEbwJY/L62s7gwm6eQY
 B8WxHEkMAAjLVeh/1zUUW73po08ll708hmhY++sxCLrwfym1JuuC5aBU57uldQoRxf1Beuxf0vk
 ZWw1g3j1bBifXXTPNlcKWnl9oZURLcGv4jovzuaEirSr0B+c1gvslFfhZYN0mI0q9rg==
X-Google-Smtp-Source: ABdhPJxgiGUXr47Ciu5NG0SoB86VogaEYrIw+hjGZRWfv4pUXvczIQw/eRR+LaTrzXUSUILJDqcNqw==
X-Received: by 2002:a1c:9a48:: with SMTP id c69mr1907285wme.43.1599633780930; 
 Tue, 08 Sep 2020 23:43:00 -0700 (PDT)
Received: from [10.0.0.5] (139.249.143.150.dyn.plus.net. [150.143.249.139])
 by smtp.gmail.com with ESMTPSA id h76sm2516394wme.10.2020.09.08.23.43.00
 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
 Tue, 08 Sep 2020 23:43:00 -0700 (PDT)
Content-Type: multipart/alternative;
 boundary=Apple-Mail-EC30A4EE-E6F5-4DFB-895A-DB089CE7E2AC
Content-Transfer-Encoding: 7bit
Mime-Version: 1.0 (1.0)
From: Neil Madden <neil.madden@forgerock.com>
In-Reply-To: <CA+k3eCRffzry_+GVieOcWs0RHqwo_XGgMTwx4LOCZFPioD_xdw@mail.gmail.com>
Cc: toshio9.ito@toshiba.co.jp, oauth <oauth@ietf.org>
Date: Wed, 9 Sep 2020 07:42:59 +0100
Message-Id: <C5175328-2C70-4FF9-9BFD-22E081154F5B@forgerock.com>
References: <CA+k3eCRffzry_+GVieOcWs0RHqwo_XGgMTwx4LOCZFPioD_xdw@mail.gmail.com>
To: Brian Campbell <bcampbell=40pingidentity.com@dmarc.ietf.org>
X-Mailer: iPhone Mail (17G80)
Archived-At: <https://mailarchive.ietf.org/arch/msg/oauth/jX2HvGJaFeaRMzpBcZNZuI1b1uQ>
Subject: Re: [OAUTH-WG] Omit "jwk" (or use "kid" instead) in DPoP Proof?
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, 09 Sep 2020 06:43:06 -0000


--Apple-Mail-EC30A4EE-E6F5-4DFB-895A-DB089CE7E2AC
Content-Type: text/plain;
	charset=utf-8
Content-Transfer-Encoding: quoted-printable

I disagree with this rationale, I=E2=80=99m afraid. I don=E2=80=99t think th=
e simplicity gain for the client is really very great and I think we will re=
gret this decision.

Most importantly, including the JWK directly in the proof token increases th=
e likelihood that somebody will just validate the signature using that key a=
nd fail to check that it matches the hash in the AT. We=E2=80=99ve already s=
een at least one vendor make exactly this kind of mistake in the past [1]. L=
etting the proof tell you the key to use to verify the proof is another exam=
ple of Moxie=E2=80=99s Cryptographic Doom Principle [2] - trusting the messa=
ge before you=E2=80=99ve authenticated it.=20

Moving the jwk from the DPoP proof to the AT/introspection response reduces t=
he chances of these kind of mistakes.=20

As a bonus it also has efficiency gains because the size of the DPoP proof i=
s reduced - potentially by a lot for RSA keys. Although the JWK still has to=
 be communicated to the RS, this can be more efficient because:
- For token introspection, in many deployments the introspection request wil=
l be within a datacenter and so over a high-bandwidth low-latency network. T=
his is usually not the case for the DPoP proof, which may be over a poor mob=
ile connection.=20
- For embedded directly in a JWT access token, the JWK will be in the claims=
 rather than the header and so can at least be compressed. (Albeit not by mu=
ch, because public keys don=E2=80=99t compress well, but the rest of the AT w=
ill and that can compensate a little for the extra bulk).=20

[1]: https://nvd.nist.gov/vuln/detail/CVE-2018-0114
[2]: https://moxie.org/2011/12/13/the-cryptographic-doom-principle.html

=E2=80=94 Neil

>> On 8 Sep 2020, at 23:46, Brian Campbell <bcampbell=3D40pingidentity.com@d=
marc.ietf.org> wrote:
> =EF=BB=BF
> Indeed there are cases, as you point out, where the key might be knowable t=
o the server via some other means, which makes the "jwk" header in the DPoP p=
roof not strictly necessary. And while omitting the key in such cases would r=
educe the size of some messages (the DPoP proof anyway), such optionality wo=
uld add complexity to implementations and deployments (and that kind of comp=
lexity can and often does degrade interoperability and even security). How, f=
or example, would a client know if the access token includes the public key a=
nd thus whether or not to include the key with the proof? Sure the access to=
ken could always include the key (rather than thumbprint) but then there's t=
he question of how to get the key to the AS. As well as the stated desire to=
 utilize the same DPoP Proof structure for requests to both the AS and RS. T=
here will be some clients that have public key(s) registered and some that w=
on't (maybe a lot that won't as a driving use case for many for this is key b=
inding access and refresh tokens for public clients). The protocol defined b=
y the draft needs to account for both.=20
>=20
> Ultimately there are a number of different ways the necessary data could f=
low through the various protocol elements. And there are some tradeoffs with=
 different approaches and/or trying to accommodate variations under one appr=
oach. The approach the draft has taken thus far is to prioritize consistency=
 and simplicity as much as is possible. And that ethos has led to how it's c=
urrently defined, which is to always include the key in the proof and bind t=
o a hash of the key in the access token.=20
>=20
>=20
>> On Tue, Sep 8, 2020 at 3:29 AM <toshio9.ito@toshiba.co.jp> wrote:
>> Hi all,
>>=20
>> In section 4.1 of draft-ietf-oauth-dpop-01, the "jwk" header parameter is=

>> REQUIRED. However, there are some cases where "jwk" is not necessary in t=
heory.
>>=20
>> For example, consider a case where the client is registered with the
>> Authorization Server, and its one and only public key is also registered w=
ith
>> the AS. In that case, when the AS receives a request on Token endpoint, i=
t can
>> just use the public key registered for the client to verify the DPoP Proo=
f.
>> There is no need to send the public key in DPoP Proof.
>>=20
>> The same goes for requests to the Resource Server, if the AS and RS share=
 the
>> storage for clients' public keys. Things are a little difficult if the AS=
 and RS
>> are separate. Probably the Access Token or its introspection result have t=
o
>> include the public key (instead of its thumbprint as described in section=
 7).
>>=20
>> If the client registers multiple keys with the AS, it needs to specify wh=
ich key
>> it uses to sign the DPoP Proof. However, there is still no absolute need t=
o send
>> the whole key in DPoP Proof. Instead, the client could use "kid" header
>> parameter to specify the key.
>>=20
>> Daniel Fett once mentioned the above case in the GitHub issue #26 [*1], b=
ut I'm
>> not sure what happened to the discussion. There was also a comment on the=
 latest
>> draft about the "jwk" header parameter [*2]. I agree with using the same D=
PoP
>> Proof structure for requests to AS and RS, but I think there are some cas=
es
>> where we can omit "jwk" in BOTH requests. Making "jwk" OPTIONAL would all=
ow
>> those cases to reduce some messaging overhead.
>>=20
>> I'd like to hear your opinions about it.
>>=20
>>=20
>> [*1]: https://github.com/danielfett/draft-dpop/issues/26#issuecomment-480=
701746
>> [*2]: https://mailarchive.ietf.org/arch/msg/oauth/smwsONA6c4H2UICcZMzb8Yv=
2QRc/
>>=20
>>=20
>> Best regards,
>> Toshio Ito
>>=20
>> -------------
>> Toshio Ito
>> Research and Development Center
>> Toshiba Corporation
>>=20
>> _______________________________________________
>> OAuth mailing list
>> OAuth@ietf.org
>> https://www.ietf.org/mailman/listinfo/oauth
>=20
> CONFIDENTIALITY NOTICE: This email may contain confidential and privileged=
 material for the sole use of the intended recipient(s). Any review, use, di=
stribution or disclosure by others is strictly prohibited.  If you have rece=
ived this communication in error, please notify the sender immediately by e-=
mail and delete the message and any file attachments from your computer. Tha=
nk you._______________________________________________
> OAuth mailing list
> OAuth@ietf.org
> https://www.ietf.org/mailman/listinfo/oauth

--Apple-Mail-EC30A4EE-E6F5-4DFB-895A-DB089CE7E2AC
Content-Type: text/html;
	charset=utf-8
Content-Transfer-Encoding: quoted-printable

<html><head><meta http-equiv=3D"content-type" content=3D"text/html; charset=3D=
utf-8"></head><body dir=3D"auto"><div dir=3D"ltr"><meta http-equiv=3D"conten=
t-type" content=3D"text/html; charset=3Dutf-8"><div dir=3D"ltr">I disagree w=
ith this rationale, I=E2=80=99m afraid. I don=E2=80=99t think the simplicity=
 gain for the client is really very great and I think we will regret this de=
cision.</div><div dir=3D"ltr"><br></div><div dir=3D"ltr">Most importantly, i=
ncluding the JWK directly in the proof token increases the likelihood that s=
omebody will just validate the signature using that key and fail to check th=
at it matches the hash in the AT. We=E2=80=99ve already seen at least one ve=
ndor make exactly this kind of mistake in the past [1]. Letting the proof te=
ll you the key to use to verify the proof is another example of Moxie=E2=80=99=
s Cryptographic Doom Principle [2] - trusting the message before you=E2=80=99=
ve authenticated it.&nbsp;</div><div dir=3D"ltr"><br></div><div dir=3D"ltr">=
Moving the jwk from the DPoP proof to the AT/introspection response reduces t=
he chances of these kind of mistakes.&nbsp;</div><div dir=3D"ltr"><br></div>=
<div dir=3D"ltr">As a bonus it also has efficiency gains because the size of=
 the DPoP proof is reduced - potentially by a lot for RSA keys. Although the=
 JWK still has to be communicated to the RS, this can be more efficient beca=
use:</div><div dir=3D"ltr">- For token introspection, in many deployments th=
e introspection request will be within a datacenter and so over a high-bandw=
idth low-latency network. This is usually not the case for the DPoP proof, w=
hich may be over a poor mobile connection.&nbsp;</div><div dir=3D"ltr">- For=
 embedded directly in a JWT access token, the JWK will be in the claims rath=
er than the header and so can at least be compressed. (Albeit not by much, b=
ecause public keys don=E2=80=99t compress well, but the rest of the AT will a=
nd that can compensate a little for the extra bulk).&nbsp;</div><div dir=3D"=
ltr"><br></div><div dir=3D"ltr">[1]:&nbsp;<a href=3D"https://nvd.nist.gov/vu=
ln/detail/CVE-2018-0114">https://nvd.nist.gov/vuln/detail/CVE-2018-0114</a><=
/div><div dir=3D"ltr">[2]:&nbsp;<a href=3D"https://moxie.org/2011/12/13/the-=
cryptographic-doom-principle.html">https://moxie.org/2011/12/13/the-cryptogr=
aphic-doom-principle.html</a></div><div dir=3D"ltr"><br></div><div dir=3D"lt=
r">=E2=80=94 Neil</div><div dir=3D"ltr"><br><blockquote type=3D"cite">On 8 S=
ep 2020, at 23:46, Brian Campbell &lt;bcampbell=3D40pingidentity.com@dmarc.i=
etf.org&gt; wrote:<br><br></blockquote></div><blockquote type=3D"cite"><div d=
ir=3D"ltr">=EF=BB=BF<div dir=3D"ltr"><div>Indeed there are cases, as you poi=
nt out, where the key might be knowable to the server via some other means, w=
hich makes the "jwk" header in the DPoP proof not strictly necessary. And wh=
ile omitting the key in such cases would reduce the size of some messages (t=
he DPoP proof anyway), such optionality would add complexity to implementati=
ons and deployments (and that kind of complexity can and often does degrade i=
nteroperability and even security). How, for example, would a client know if=
 the access token includes the public key and thus whether or not to include=
 the key with the proof? Sure the access token could always include the key (=
rather than thumbprint) but then there's the question of how to get the key t=
o the AS. As well as the stated desire to utilize the same DPoP Proof struct=
ure for requests to both the AS and RS. There will be some clients that have=
 public key(s) registered and some that won't (maybe a lot that won't as a d=
riving use case for many for this is key binding access and refresh tokens f=
or public clients). The protocol defined by the draft needs to account for b=
oth. <br></div><div><br></div><div>Ultimately there are a number of differen=
t ways the necessary data could flow through the various protocol elements. A=
nd there are some tradeoffs with different approaches and/or trying to accom=
modate variations under one approach. The approach the draft has taken thus f=
ar is to prioritize consistency and simplicity as much as is possible. And t=
hat ethos has led to how it's currently defined, which is to always include t=
he key in the proof and bind to a hash of the key in the access token. <br><=
/div><div><br></div></div><br><div class=3D"gmail_quote"><div dir=3D"ltr" cl=
ass=3D"gmail_attr">On Tue, Sep 8, 2020 at 3:29 AM &lt;<a href=3D"mailto:tosh=
io9.ito@toshiba.co.jp">toshio9.ito@toshiba.co.jp</a>&gt; wrote:<br></div><bl=
ockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left=
:1px solid rgb(204,204,204);padding-left:1ex">Hi all,<br>
<br>
In section 4.1 of draft-ietf-oauth-dpop-01, the "jwk" header parameter is<br=
>
REQUIRED. However, there are some cases where "jwk" is not necessary in theo=
ry.<br>
<br>
For example, consider a case where the client is registered with the<br>
Authorization Server, and its one and only public key is also registered wit=
h<br>
the AS. In that case, when the AS receives a request on Token endpoint, it c=
an<br>
just use the public key registered for the client to verify the DPoP Proof.<=
br>
There is no need to send the public key in DPoP Proof.<br>
<br>
The same goes for requests to the Resource Server, if the AS and RS share th=
e<br>
storage for clients' public keys. Things are a little difficult if the AS an=
d RS<br>
are separate. Probably the Access Token or its introspection result have to<=
br>
include the public key (instead of its thumbprint as described in section 7)=
.<br>
<br>
If the client registers multiple keys with the AS, it needs to specify which=
 key<br>
it uses to sign the DPoP Proof. However, there is still no absolute need to s=
end<br>
the whole key in DPoP Proof. Instead, the client could use "kid" header<br>
parameter to specify the key.<br>
<br>
Daniel Fett once mentioned the above case in the GitHub issue #26 [*1], but I=
'm<br>
not sure what happened to the discussion. There was also a comment on the la=
test<br>
draft about the "jwk" header parameter [*2]. I agree with using the same DPo=
P<br>
Proof structure for requests to AS and RS, but I think there are some cases<=
br>
where we can omit "jwk" in BOTH requests. Making "jwk" OPTIONAL would allow<=
br>
those cases to reduce some messaging overhead.<br>
<br>
I'd like to hear your opinions about it.<br>
<br>
<br>
[*1]: <a href=3D"https://github.com/danielfett/draft-dpop/issues/26#issuecom=
ment-480701746" rel=3D"noreferrer" target=3D"_blank">https://github.com/dani=
elfett/draft-dpop/issues/26#issuecomment-480701746</a><br>
[*2]: <a href=3D"https://mailarchive.ietf.org/arch/msg/oauth/smwsONA6c4H2UIC=
cZMzb8Yv2QRc/" rel=3D"noreferrer" target=3D"_blank">https://mailarchive.ietf=
.org/arch/msg/oauth/smwsONA6c4H2UICcZMzb8Yv2QRc/</a><br>
<br>
<br>
Best regards,<br>
Toshio Ito<br>
<br>
-------------<br>
Toshio Ito<br>
Research and Development Center<br>
Toshiba Corporation<br>
<br>
_______________________________________________<br>
OAuth mailing list<br>
<a href=3D"mailto:OAuth@ietf.org" target=3D"_blank">OAuth@ietf.org</a><br>
<a href=3D"https://www.ietf.org/mailman/listinfo/oauth" rel=3D"noreferrer" t=
arget=3D"_blank">https://www.ietf.org/mailman/listinfo/oauth</a><br>
</blockquote></div>

<br>
<i style=3D"margin:0px;padding:0px;border:0px;outline:0px;vertical-align:bas=
eline;background:rgb(255,255,255);font-family:proxima-nova-zendesk,system-ui=
,-apple-system,system-ui,&quot;Segoe UI&quot;,Roboto,Oxygen-Sans,Ubuntu,Cant=
arell,&quot;Helvetica Neue&quot;,Arial,sans-serif;color:rgb(85,85,85)"><span=
 style=3D"margin:0px;padding:0px;border:0px;outline:0px;vertical-align:basel=
ine;background:transparent;font-family:proxima-nova-zendesk,system-ui,-apple=
-system,BlinkMacSystemFont,&quot;Segoe UI&quot;,Roboto,Oxygen-Sans,Ubuntu,Ca=
ntarell,&quot;Helvetica Neue&quot;,Arial,sans-serif;font-weight:600"><font s=
ize=3D"2">CONFIDENTIALITY NOTICE: This email may contain confidential and pr=
ivileged material for the sole use of the intended recipient(s). Any review,=
 use, distribution or disclosure by others is strictly prohibited.&nbsp; If y=
ou have received this communication in error, please notify the sender immed=
iately by e-mail and delete the message and any file attachments from your c=
omputer. Thank you.</font></span></i><span>_________________________________=
______________</span><br><span>OAuth mailing list</span><br><span>OAuth@ietf=
.org</span><br><span>https://www.ietf.org/mailman/listinfo/oauth</span><br><=
/div></blockquote></div></body></html>=

--Apple-Mail-EC30A4EE-E6F5-4DFB-895A-DB089CE7E2AC--

