<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
span.apple-converted-space
{mso-style-name:apple-converted-space;}
span.EmailStyle18
{mso-style-type:personal-reply;
font-family:"Calibri","sans-serif";
color:#1F497D;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">John, you wrote: “</span>At the IIW F2F we took a decision that we should match the RFC and require the client to have a TLS endpoint if using a http redirect.(not
a custom scheme)<span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">”. While the working group was leaning that way early in the discussion, Naveen and others pushed back, and that doesn’t actually match the decision that we recorded
in the notes, which say:<o:p></o:p></span></p>
<p class="MsoNormal"> OP may prevent registration of redirect_uris that do not use https<o:p></o:p></p>
<p class="MsoNormal"> A confidential client needs to be required to use http<o:p></o:p></p>
<p class="MsoNormal"> We will discuss this further on the list<o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Consider this the start of the further discussion on the list. What do people think?<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"> -- Mike<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> openid-specs-ab-bounces@lists.openid.net [mailto:openid-specs-ab-bounces@lists.openid.net]
<b>On Behalf Of </b>John Bradley<br>
<b>Sent:</b> Thursday, October 24, 2013 5:42 AM<br>
<b>To:</b> Vladimir Dzhuvinov / NimbusDS<br>
<b>Cc:</b> openid-specs-ab@lists.openid.net<br>
<b>Subject:</b> Re: [Openid-specs-ab] First Release Candidates for final OpenID Connect specifications<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Snip<o:p></o:p></p>
<div>
<div>
<p class="MsoNormal">On 2013-10-24, at 1:36 AM, "Vladimir Dzhuvinov / NimbusDS" <<a href="mailto:vladimir@nimbusds.com">vladimir@nimbusds.com</a>> wrote:<o:p></o:p></p>
</div>
<p class="MsoNormal"><br>
<br>
<o:p></o:p></p>
<div id="wmQuoteWrapper">
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<div style="margin-left:.5in">
<p class="MsoNormal"><span style="font-family:"Calibri","sans-serif""><br>
<br>
"When using this flow, the redirection URI MAY use the http scheme, provided that the Client Type is confidential, as defined in Section 2.1 of OAuth 2.0; otherwise, it MUST use the https scheme" - This, surprisingly enough, is relaxed in comparison to<a href="http://tools.ietf.org/html/rfc6749#section-10.5" target="_blank"><span style="color:purple">http://tools.ietf.org/html/rfc6749#section-10.5</span></a>.<br>
<br>
RFC 6749 states: "Authorization codes operate as plaintext bearer credentials, used to verify that the resource owner who granted authorization at the authorization server is the same resource owner returning to the client to complete the process. Therefore,
if the client relies on the authorization code for its own resource owner authentication, the client redirection endpoint MUST require the use of TLS."<br>
<br>
Why is Connect, in this particular case, less restrictive than OAuth?<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Calibri","sans-serif";color:#1F497D"> </span><span style="font-family:"Calibri","sans-serif""><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Calibri","sans-serif";color:#1F497D">John, can you speak to why we’re allowing http redirect_uri values when apparently OAuth doesn’t?</span><span style="font-family:"Calibri","sans-serif""><o:p></o:p></span></p>
</div>
</blockquote>
<p class="MsoNormal">I had some questions on this point as well. I believe the thinking is that since the client is protecting the secret and the code is sent to the /token endpoint with client authentication, even if someone was able to hijack the code value
they couldn't exchange it for the access (and possibly refresh) tokens. If we are trying to make things simpler, then just moving all of it to TLS makes sense. To me, the only exception is localhost.<span class="apple-converted-space"> </span><o:p></o:p></p>
</blockquote>
<p class="MsoNormal"><br>
The attacker could inject the authorization code into the same application as used by the victim in order to impersonate her/him.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><br>
<span style="color:fuchsia">For this to happen the attacker should also have gained control over the RP (the application), i.e. have the RPs' authentication credentials.</span><br>
<br>
<o:p></o:p></p>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</blockquote>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">Early OAuth 2 inherited the idea from OAuth 1 that the client didn't need to have a TLS cert. We were matching that. At the IIW F2F we took a decision that we should match the RFC and require the client to have a TLS endpoint if using
a http redirect.(not a custom scheme)<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Earlier in this thread there is also a question about exact redirect_uri matching and if it is required for confidential clients. In the code flow if the token is leaked through an open redirector then it can be presented to the real
client and the attacker gets in as the user.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">The OAuth AS side mitigation of this is the confidential client passing the redirect URI to the AS in the token request and the AS performing an exact match on the redirect URI, and failing if it is different. In the wild it appears AS
are also not being sufficiently strict on matching that and causing some problems in deployments.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">The client side mitigation for this is using nonce in the signed token to allow the client to check on its own if it initiated the request through the same browser that presented the code. However that was left as optional for code.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">At the end of the day the reality is that some of the large IdP only allow exact matching of redirect_uri. If some are strict and some allow query parameters then clients using query parameters to carry state will fail and not be interoperable.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">The WG decided that the strict matching of the redirect_uri by those IDP is allowed by the RFC, rather than forcing them to change and do pattern matching for interoperability we precluded clients from hiding state in the query parameters
and forced them to use the "state" parameter.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">So yes for a fully RFC compliant OAuth server with a client that is truly confidential and not just pretending, it would be secure for the AS to relax the matching for the redirect_uri in the request to the authorization server as long
as it records that URI and is doing an exact string match on it aginst the one sent to the token endpoint. It is not however safe for a client to assume all AS are going to act that way. The only safe thing for the client is to assume exact string match.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">So while this relates to security issues the final decision was taken for interoperability of the client.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">John B.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
</body>
</html>