<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<font face="Helvetica, Arial, sans-serif">If we are going to give
guidance, then we really need to give guidance for two different
use cases...<br>
<br>
1. The "client" will validate the response locally in the browser<br>
2. The "client" will validate the response at it's server (even
though it's using the implicit flow)<br>
<br>
For use case 1: One method to achieve this is for the client to
generate a random string with sufficient entropy and store a SHA-1
hash of the string in local storage. Then use the SHA-1 hash of
the random string as the value of the nonce parameter. To validate
the nonce on receipt of the ID Token, extract the nonce from the
ID Token and compare it to the stored SHA-1 hash in local storage.<br>
<br>
For use case 2: One method to achieve this is for the backend
server to use a SHA-1 hash of the "clients" protected session
cookie as the value of the nonce parameter when constructing the
AuthorizationRequest. Note that the Session cookie SHOULD be
protected (restricted to SSL and not readable by JavaScript) for
this method. To validate the ID Token at the server, the server
calculates a SHA-1 hash of the Session cookie value and compares
that to the nonce value in the ID Token.<br>
<br>
I don't know where the best place is to provide this guidance. If
we have a "validating the ID Token" sub-section in the new ID
Token section, then maybe it would best fit there.<br>
<br>
Thanks,<br>
George<br>
<br>
</font>
<div class="moz-cite-prefix">On 10/24/13 7:16 PM, John Bradley
wrote:<br>
</div>
<blockquote
cite="mid:9FFAFB68-6C38-49B3-B1B7-4EC201A8340E@ve7jtb.com"
type="cite">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<base href="x-msg://19/">We want the implicit flow to validate
nonce, it would be better to have some reasonable advice for
using HTML local storage rather than session cookies.
<div><br>
<div>
<div>On 2013-10-24, at 3:44 PM, Mike Jones <<a
moz-do-not-send="true"
href="mailto:Michael.Jones@microsoft.com">Michael.Jones@microsoft.com</a>>
wrote:</div>
<br class="Apple-interchange-newline">
<blockquote type="cite">
<div link="blue" vlink="purple" style="font-family:
Helvetica; font-size: medium; font-style: normal;
font-variant: normal; font-weight: normal; letter-spacing:
normal; line-height: normal; orphans: 2; text-align:
-webkit-auto; text-indent: 0px; text-transform: none;
white-space: normal; widows: 2; word-spacing: 0px;
-webkit-text-size-adjust: auto; -webkit-text-stroke-width:
0px; " lang="EN-US">
<div class="WordSection1" style="page: WordSection1; ">
<div style="margin: 0in 0in 0.0001pt; font-size: 12pt;
font-family: 'Times New Roman', serif; "><span
style="font-size: 11pt; font-family: Calibri,
sans-serif; color: rgb(31, 73, 125); ">We could drop
it from the Implicit Flow, as it’s already present
in the Code Flow. Does that work for people?<o:p></o:p></span></div>
<div style="margin: 0in 0in 0.0001pt; font-size: 12pt;
font-family: 'Times New Roman', serif; "><span
style="font-size: 11pt; font-family: Calibri,
sans-serif; color: rgb(31, 73, 125); "> </span></div>
<div style="margin: 0in 0in 0.0001pt; font-size: 12pt;
font-family: 'Times New Roman', serif; "><span
style="font-size: 11pt; font-family: Calibri,
sans-serif; color: rgb(31, 73, 125); ">
-- Mike<o:p></o:p></span></div>
<div style="margin: 0in 0in 0.0001pt; font-size: 12pt;
font-family: 'Times New Roman', serif; "><span
style="font-size: 11pt; font-family: Calibri,
sans-serif; color: rgb(31, 73, 125); "> </span></div>
<div>
<div style="border-style: solid none none;
border-top-width: 1pt; border-top-color: rgb(181,
196, 223); padding: 3pt 0in 0in; ">
<div style="margin: 0in 0in 0.0001pt; font-size:
12pt; font-family: 'Times New Roman', serif; "><b><span
style="font-size: 10pt; font-family: Tahoma,
sans-serif; ">From:</span></b><span
style="font-size: 10pt; font-family: Tahoma,
sans-serif; "><span
class="Apple-converted-space"> </span>Richer,
Justin P. [<a class="moz-txt-link-freetext" href="mailto:jricher@">mailto:jricher@</a><a
moz-do-not-send="true" href="http://mitre.org">mitre.org</a>]<span
class="Apple-converted-space"> </span><br>
<b>Sent:</b><span class="Apple-converted-space"> </span>Thursday,
October 24, 2013 12:56 PM<br>
<b>To:</b><span class="Apple-converted-space"> </span>Mike
Jones<br>
<b>Cc:</b><span class="Apple-converted-space"> </span><a
moz-do-not-send="true"
href="mailto:openid-specs-ab@lists.openid.net">openid-specs-ab@lists.openid.net</a><br>
<b>Subject:</b><span
class="Apple-converted-space"> </span>Re:
[Openid-specs-ab] Nonce value suggestion for the
Implicit Flow<o:p></o:p></span></div>
</div>
</div>
<div style="margin: 0in 0in 0.0001pt; font-size: 12pt;
font-family: 'Times New Roman', serif; "><o:p> </o:p></div>
<div style="margin: 0in 0in 0.0001pt; font-size: 12pt;
font-family: 'Times New Roman', serif; ">I'm actually
in favor of dropping this example, or else providing
it in a list of alternatives. The important thing is
that the client can validate the exact value of the
nonce parameter on its way back through, the mechanics
of how that happens are client specific (but we can
provide simple guidance).<o:p></o:p></div>
<div>
<div style="margin: 0in 0in 0.0001pt; font-size: 12pt;
font-family: 'Times New Roman', serif; "><o:p> </o:p></div>
<div>
<div style="margin: 0in 0in 0.0001pt; font-size:
12pt; font-family: 'Times New Roman', serif; "> --
Justin<o:p></o:p></div>
</div>
<div>
<div style="margin: 0in 0in 0.0001pt; font-size:
12pt; font-family: 'Times New Roman', serif; "><o:p> </o:p></div>
<div>
<div>
<div style="margin: 0in 0in 0.0001pt; font-size:
12pt; font-family: 'Times New Roman', serif; ">On
Oct 24, 2013, at 11:44 AM, Mike Jones <<a
moz-do-not-send="true"
href="mailto:Michael.Jones@microsoft.com"
style="color: purple; text-decoration:
underline; ">Michael.Jones@microsoft.com</a>><o:p></o:p></div>
</div>
<div>
<div style="margin: 0in 0in 0.0001pt; font-size:
12pt; font-family: 'Times New Roman', serif; "> wrote:<o:p></o:p></div>
</div>
<div style="margin: 0in 0in 0.0001pt; font-size:
12pt; font-family: 'Times New Roman', serif; "><br>
<br>
<o:p></o:p></div>
<div>
<div>
<div style="margin: 0in 0in 0.0001pt;
font-size: 12pt; font-family: 'Times New
Roman', serif; "><span style="font-size:
11pt; font-family: Calibri, sans-serif; ">For
the Implicit Flow, the “nonce” description
contains this text at<a
moz-do-not-send="true"
href="http://openid.bitbucket.org/openid-connect-core-1_0.html#ImplicitAuthorizationRequest"
style="color: purple; text-decoration:
underline; "><span style="color: purple;
">http://openid.bitbucket.org/openid-connect-core-1_0.html#ImplicitAuthorizationRequest</span></a>:<o:p></o:p></span></div>
</div>
<div style="margin-left: 0.5in; ">
<div style="margin: 0in 0in 0.0001pt;
font-size: 12pt; font-family: 'Times New
Roman', serif; "><span style="font-size:
11pt; font-family: Verdana, sans-serif; "
lang="EN">Sufficient entropy MUST be
present in the<span
class="apple-converted-space"> </span></span><tt
style="font-family: 'Courier New'; "><span
style="color: rgb(0, 51, 102); "
lang="EN">nonce</span></tt><span
class="apple-converted-space"><span
style="font-size: 11pt; font-family:
Verdana, sans-serif; " lang="EN"> </span></span><span
style="font-size: 11pt; font-family:
Verdana, sans-serif; " lang="EN">values
used to prevent attackers from guessing
values.<span class="apple-converted-space"> </span><span
style="background-color: yellow;
background-position: initial initial;
background-repeat: initial initial; ">One
method to achieve this is to store a
random value as a signed session cookie,
and pass the value in the</span></span><tt
style="font-family: 'Courier New'; "><span
style="color: rgb(0, 51, 102);
background-color: yellow;
background-position: initial initial;
background-repeat: initial initial; "
lang="EN">nonce</span></tt><span
class="apple-converted-space"><span
style="font-size: 11pt; font-family:
Verdana, sans-serif; background-color:
yellow; background-position: initial
initial; background-repeat: initial
initial; " lang="EN"> </span></span><span
style="font-size: 11pt; font-family:
Verdana, sans-serif; background-color:
yellow; background-position: initial
initial; background-repeat: initial
initial; " lang="EN">parameter. In that
case, the<span
class="apple-converted-space"> </span></span><tt
style="font-family: 'Courier New'; "><span
style="color: rgb(0, 51, 102);
background-color: yellow;
background-position: initial initial;
background-repeat: initial initial; "
lang="EN">nonce</span></tt><span
class="apple-converted-space"><span
style="font-size: 11pt; font-family:
Verdana, sans-serif; background-color:
yellow; background-position: initial
initial; background-repeat: initial
initial; " lang="EN"> </span></span><span
style="font-size: 11pt; font-family:
Verdana, sans-serif; background-color:
yellow; background-position: initial
initial; background-repeat: initial
initial; " lang="EN">in the returned ID
Token can be compared to the signed
session cookie to detect ID Token replay
by third parties.</span><span
style="font-size: 11pt; font-family:
Calibri, sans-serif; "><o:p></o:p></span></div>
</div>
<div>
<div style="margin: 0in 0in 0.0001pt;
font-size: 12pt; font-family: 'Times New
Roman', serif; "><span style="font-size:
11pt; font-family: Calibri, sans-serif; "> <o:p></o:p></span></div>
</div>
<div>
<div style="margin: 0in 0in 0.0001pt;
font-size: 12pt; font-family: 'Times New
Roman', serif; "><span style="font-size:
11pt; font-family: Calibri, sans-serif; ">George
wrote this about the suggestion in his
review:<o:p></o:p></span></div>
</div>
<div style="margin-left: 0.5in; ">
<div style="margin: 0in 0in 0.0001pt;
font-size: 12pt; font-family: 'Times New
Roman', serif; "><span style="font-size:
11pt; font-family: Calibri, sans-serif; ">“I'm
not sure this suggestion makes sense for
the implicit flow. The client would need
to write a cookie value on the domain of
the redirect_uri and the attempt to read
it on the return of the implicit flow.
Wondering if a local storage example would
make more sense.”<o:p></o:p></span></div>
</div>
<div>
<div style="margin: 0in 0in 0.0001pt;
font-size: 12pt; font-family: 'Times New
Roman', serif; "><span style="font-size:
11pt; font-family: Calibri, sans-serif; "> <o:p></o:p></span></div>
</div>
<div>
<div style="margin: 0in 0in 0.0001pt;
font-size: 12pt; font-family: 'Times New
Roman', serif; "><span style="font-size:
11pt; font-family: Calibri, sans-serif; ">Do
people agree with him? If so, does
someone want to supply specific
alternative text to use?<o:p></o:p></span></div>
</div>
<div>
<div style="margin: 0in 0in 0.0001pt;
font-size: 12pt; font-family: 'Times New
Roman', serif; "><span style="font-size:
11pt; font-family: Calibri, sans-serif; "> <o:p></o:p></span></div>
</div>
<div>
<div style="margin: 0in 0in 0.0001pt;
font-size: 12pt; font-family: 'Times New
Roman', serif; "><span style="font-size:
11pt; font-family: Calibri, sans-serif; ">
-- Mike<o:p></o:p></span></div>
</div>
<div>
<div style="margin: 0in 0in 0.0001pt;
font-size: 12pt; font-family: 'Times New
Roman', serif; "><span style="font-size:
11pt; font-family: Calibri, sans-serif; "> <o:p></o:p></span></div>
</div>
<div style="margin: 0in 0in 0.0001pt; font-size:
12pt; font-family: 'Times New Roman', serif; "><span
style="font-size: 13.5pt; font-family:
Helvetica, sans-serif; ">_______________________________________________<br>
Openid-specs-ab mailing list<br>
<a moz-do-not-send="true"
href="mailto:Openid-specs-ab@lists.openid.net"
style="color: purple; text-decoration:
underline; "><span style="color: purple; ">Openid-specs-ab@lists.openid.net</span></a><br>
<a moz-do-not-send="true"
href="http://lists.openid.net/mailman/listinfo/openid-specs-ab"
style="color: purple; text-decoration:
underline; "><span style="color: purple; ">http://lists.openid.net/mailman/listinfo/openid-specs-ab</span></a><o:p></o:p></span></div>
</div>
</div>
<div style="margin: 0in 0in 0.0001pt; font-size:
12pt; font-family: 'Times New Roman', serif; "><o:p> </o:p></div>
</div>
</div>
</div>
_______________________________________________<br>
Openid-specs-ab mailing list<br>
<a moz-do-not-send="true"
href="mailto:Openid-specs-ab@lists.openid.net">Openid-specs-ab@lists.openid.net</a><br>
<a class="moz-txt-link-freetext" href="http://lists.openid.net/mailman/listinfo/openid-specs-ab">http://lists.openid.net/mailman/listinfo/openid-specs-ab</a></div>
</blockquote>
</div>
<br>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Openid-specs-ab mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Openid-specs-ab@lists.openid.net">Openid-specs-ab@lists.openid.net</a>
<a class="moz-txt-link-freetext" href="http://lists.openid.net/mailman/listinfo/openid-specs-ab">http://lists.openid.net/mailman/listinfo/openid-specs-ab</a>
</pre>
</blockquote>
<br>
<div class="moz-signature">-- <br>
<a href="http://connect.me/gffletch" title="View full card on
Connect.Me"><img src="cid:part9.09070305.03040304@aol.com"
alt="George Fletcher" height="113" width="359"></a></div>
</body>
</html>