<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">If they send it and don’t detect if it has changed from the request then that is a definite error.<div class=""><br class=""></div><div class="">If they don’t send it, it should be a warning as there are some cases with a simple preconfigured client that not checking may be OK.</div><div class=""><br class=""></div><div class="">I personally argued at the time to always check it, so I am not going to push back very hard on making it mandatory to check other than it is a change to the spec.</div><div class=""><br class=""></div><div class="">John B.</div><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Apr 12, 2016, at 5:34 PM, William Denniss <<a href="mailto:wdenniss@google.com" class="">wdenniss@google.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><br class="Apple-interchange-newline"><br style="font-family: Helvetica; font-size: 12px; 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-stroke-width: 0px;" class=""><div class="gmail_quote" style="font-family: Helvetica; font-size: 12px; 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-stroke-width: 0px;">On Tue, Apr 12, 2016 at 2:28 PM, John Bradley<span class="Apple-converted-space"> </span><span dir="ltr" class=""><<a href="mailto:ve7jtb@ve7jtb.com" class="">ve7jtb@ve7jtb.com</a>></span><span class="Apple-converted-space"> </span>wrote:<br class=""><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex;"><div style="word-wrap: break-word;" class="">The AS is all-ready required to include nonce in the id_token if it is present in the request.  That is a MUST in the spec.<div class="">That should be a test all-ready.</div></div></blockquote><div class=""><br class=""></div><div class="">There is: <i class=""><span style="font-size: 12.8px;" class="">ID Token has nonce when requested for code flow [Basic] (OP-nonce-code)</span> </i></div><div class=""><br class=""></div><div class="">So for this, it's more that we need to add an RP test to ensure that RPs are actually sending and verifying nonce.</div><div class=""><br class=""></div><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex;"><div style="word-wrap: break-word;" class=""><div class="">Basically fragment encoding is not a good idea any more other than for JS in the browser or for native apps using view controllers or system browsers.</div><div class=""><br class=""></div><div class="">Servers really should support the form post response mode.</div><div class=""><br class=""></div><div class="">A client that wants to be secure can send nonce and use “code id_token” if they want offline or “token id_token” if they don’t want offline.</div><div class=""><br class=""></div><div class="">That is secure.    </div><div class=""><br class=""></div><div class="">There are other mitigations we talked about in OAuth with returning the client_id and iss as parameters rather than returning a id_token.</div><div class=""><br class=""></div><div class="">The client really only needs to check those two values in the front channel, but I would not want to change the spec to say that.</div></div></blockquote><div class=""><br class=""></div><div class="">+1 to all the above</div><div class=""> </div><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex;"><div style="word-wrap: break-word;" class=""><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">John B.</div><div class=""><div class="gmail-h5"><div class=""><br class=""><div class=""><blockquote type="cite" class=""><div class="">On Apr 12, 2016, at 4:58 PM, William Denniss <<a href="mailto:wdenniss@google.com" class="">wdenniss@google.com</a>> wrote:</div><br class=""><div class=""><div dir="ltr" style="font-family: helvetica; font-size: 12px; font-style: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;" class=""><div class="gmail_extra"><div class="gmail_quote"><br class="">On Tue, Apr 12, 2016 at 12:50 PM, Hans Zandbelt<span class=""> </span><span dir="ltr" class=""><<a href="mailto:hzandbelt@pingidentity.com" class="">hzandbelt@pingidentity.com</a>></span><span class=""> </span>wrote:<br class=""><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex;">from an implementers/deployment standpoint I would argue that if the id_token is delivered in the front channel, I may just as well get the access token from there too rather than having to deal with the overhead of calling the token endpoint, esp. since at_hash is there to protect integrity<br class=""><br class="">so I'd favor response_mode=form_post, response_type="id_token token" over hybrid<br class=""><br class="">I realize that this doesn't leverage the possibility of using a client secret to get the access token but it doesn't really seem to matter security-wise at this point as the id_token was delivered without leveraging it as well<br class=""><br class="">anything wrong with that line of reasoning?<br class=""></blockquote><div class=""><br class=""></div><div class="">1) Server won't have offline access with "id_token token". 2) The primary case we are dealing with today is the code flow, and we are really just suggesting clients add security checks onto their existing flows by leveraging id_token.</div><div class=""><br class=""></div><div class="">It's true that you could do many of the same checks with "id_token token" to verify that the access token was issued by the correct party and avoid cut-and-paste and mix-up, if you only needed a once-off access token.</div><div class=""><br class=""></div><div class="">You raise an interesting point regarding client confidentiality.</div><div class=""> </div><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex;"><span class="">On 4/12/16 9:23 PM, William Denniss wrote:<br class=""></span><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex;"><span class="">Good point.<br class=""><br class="">Regarding the OP tests, the following are relevant to mitigate the<br class="">cut-and-paste and mix-up attacks:<br class=""><br class=""></span> 1. ID Token has nonce when requested for code flow [Basic] (OP-nonce-code)<br class=""> 2. Request with response_mode=form_post [Extra] (OP-Response-form_post)<span class=""><br class=""><br class="">1) is important for preventing cut-and-paste (the id token needs to<br class="">contain the 'nonce')<br class="">2) is important for preventing mix-up as it means the redirect endpoint<br class="">gets the id_token on the response at the server, as opposed to in the<br class="">URI fragment.<br class=""><br class="">Unfortunately, form_post is optional for OPs, and sending the nonce on<br class="">the code flow is optional for RPs (though fortunately to it is<br class="">compulsory for OPs to support thanks to OP-nonce-code).<br class=""><br class="">We could add an hardened OP test for:<br class="">– Forcing nonce to be present on the code flow<br class=""><br class="">We should definitely have RP tests for:<br class="">– sending and validating nonce on the code flow<br class="">– validating the c_hash, iss, aud on the hybrid flow<br class=""><br class="">How we would profile these tests I'm not sure; would they go in the<br class="">Basic testing profile, or in a new Hardened one?  We could move<br class="">OP-Response-form_post to the Basic profile if we wanted to be<br class="">opinionated, or define a new profile.<br class=""><br class="">The good news is that supporting the features required to mitigate<br class="">mix-up & cut-and-paste is not all that hard to do in Connect.<br class=""><br class=""><br class="">On Tue, Apr 12, 2016 at 10:46 AM, Nick Roy <<a href="mailto:nroy@internet2.edu" class="">nroy@internet2.edu</a><br class=""></span><span class=""><mailto:<a href="mailto:nroy@internet2.edu" class="">nroy@internet2.edu</a>>> wrote:<br class=""><br class="">   <span class="Apple-converted-space"> </span>Would it be possible to check for the secure behavior in Roland's<br class="">   <span class="Apple-converted-space"> </span>test suite and either not certify non-mitigating implementations, or<br class="">   <span class="Apple-converted-space"> </span>offer a risk mitigation add-on cert for those that do the right thing?<br class=""><br class="">   <span class="Apple-converted-space"> </span>Nick<br class=""><br class="">   <span class="Apple-converted-space"> </span>From: Openid-specs-ab <<a href="mailto:openid-specs-ab-bounces@lists.openid.net" class="">openid-specs-ab-bounces@lists.openid.net</a><br class=""></span>   <span class="Apple-converted-space"> </span><mailto:<a href="mailto:openid-specs-ab-bounces@lists.openid.net" class="">openid-specs-ab-bounces@lists.openid.net</a>>> on behalf of<br class="">   <span class="Apple-converted-space"> </span>William Denniss <<a href="mailto:wdenniss@google.com" class="">wdenniss@google.com</a><span class=""> </span><mailto:<a href="mailto:wdenniss@google.com" class="">wdenniss@google.com</a>>><span class=""><br class="">   <span class="Apple-converted-space"> </span>Date: Tuesday, April 12, 2016 at 11:01 AM<br class="">   <span class="Apple-converted-space"> </span>To: "<a href="mailto:openid-specs-ab@lists.openid.net" class="">openid-specs-ab@lists.openid.net</a><br class=""></span>   <span class="Apple-converted-space"> </span><mailto:<a href="mailto:openid-specs-ab@lists.openid.net" class="">openid-specs-ab@lists.openid.net</a>>"<br class="">   <span class="Apple-converted-space"> </span><<a href="mailto:openid-specs-ab@lists.openid.net" class="">openid-specs-ab@lists.openid.net</a><br class="">   <span class="Apple-converted-space"> </span><mailto:<a href="mailto:openid-specs-ab@lists.openid.net" class="">openid-specs-ab@lists.openid.net</a>>><span class=""><br class="">   <span class="Apple-converted-space"> </span>Subject: [Openid-specs-ab] Defining a Hardened (Mix-up and<br class="">   <span class="Apple-converted-space"> </span>Cut-and-Paste Proof) OpenID Connect Profile<br class=""><br class="">   <span class="Apple-converted-space"> </span>One item that came out of the discussions on the sidelines of IETF95<br class="">   <span class="Apple-converted-space"> </span>with folk from this WG (specifically Nat, Mike, John, Brian and<br class="">   <span class="Apple-converted-space"> </span>myself) was the need for the Connect community to respond to the<br class=""></span>   <span class="Apple-converted-space"> </span>recently <<a href="http://arxiv.org/abs/1508.04324v2/" rel="noreferrer" class="">http://arxiv.org/abs/1508.04324v2/</a>> documented<br class="">   <span class="Apple-converted-space"> </span><<a href="http://arxiv.org/abs/1601.01229v2/" rel="noreferrer" class="">http://arxiv.org/abs/1601.01229v2/</a>> security threats.<span class=""><br class=""><br class="">   <span class=""> </span>Connect is actually in a much stronger place for mitigating these<br class="">   <span class=""> </span>attacks (as noted in the papers themselves) than pure OAuth, with<br class="">   <span class=""> </span>the id_token offering a cryptographic binding of the code to the<br class="">   <span class=""> </span>issuer, audience and session identifier (nonce).<br class=""><br class="">   <span class=""> </span>However, certain steps need to be followed, for example using<br class="">   <span class=""> </span>'nonce' with the code flow (which is optional to implement for<br class="">   <span class=""> </span>clients) to protect against cut-and-paste, and using the form-post<br class="">   <span class=""> </span>response type with the hybrid flow to verify that the code was<br class="">   <span class=""> </span>issued by the expected IdP, to ensure the code is exchanged at the<br class="">   <span class=""> </span>correct token endpoint (mitigating mix-up).<br class=""><br class="">   <span class=""> </span>We discussed last week creating a profile of Connect that recommends<br class="">   <span class=""> </span>those practices to mitigate these classes of attack as a response to<br class="">   <span class=""> </span>the security researchers' findings. I wanted to share that<br class="">   <span class=""> </span>suggestion with the list, and continue the conversation.<br class=""><br class=""><br class=""><br class=""><br class=""></span>_______________________________________________<br class="">Openid-specs-ab mailing list<br class=""><a href="mailto:Openid-specs-ab@lists.openid.net" class="">Openid-specs-ab@lists.openid.net</a><br class=""><a href="http://lists.openid.net/mailman/listinfo/openid-specs-ab" rel="noreferrer" class="">http://lists.openid.net/mailman/listinfo/openid-specs-ab</a><br class=""><br class=""><span class=""><font color="#888888" class=""></font></span></blockquote><span class=""><font color="#888888" class=""><br class="">--<span class=""> </span><br class="">Hans Zandbelt              | Sr. Technical Architect<br class=""><a href="mailto:hzandbelt@pingidentity.com" class="">hzandbelt@pingidentity.com</a><span class=""> </span>| Ping Identity<br class=""></font></span></blockquote></div><br class=""></div></div><span style="font-family: helvetica; font-size: 12px; font-style: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; float: none; display: inline;" class="">_______________________________________________</span><br style="font-family: helvetica; font-size: 12px; font-style: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;" class=""><span style="font-family: helvetica; font-size: 12px; font-style: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; float: none; display: inline;" class="">Openid-specs-ab mailing list</span><br style="font-family: helvetica; font-size: 12px; font-style: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;" class=""><a href="mailto:Openid-specs-ab@lists.openid.net" style="font-family: helvetica; font-size: 12px; font-style: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;" class="">Openid-specs-ab@lists.openid.net</a><br style="font-family: helvetica; font-size: 12px; font-style: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;" class=""><a href="http://lists.openid.net/mailman/listinfo/openid-specs-ab" style="font-family: helvetica; font-size: 12px; font-style: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;" class="">http://lists.openid.net/mailman/listinfo/openid-specs-ab</a></div></blockquote></div></div></div></div></div></blockquote></div></div></blockquote></div><br class=""></div></body></html>