Return-Path: <eran@hueniverse.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 8906E21F8B19 for <oauth@ietfa.amsl.com>;
 Sun, 21 Aug 2011 12:04:39 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.555
X-Spam-Level: 
X-Spam-Status: No, score=-2.555 tagged_above=-999 required=5 tests=[AWL=0.043,
 BAYES_00=-2.599, HTML_MESSAGE=0.001]
Received: from mail.ietf.org ([12.22.58.30]) by localhost (ietfa.amsl.com
 [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id mxg3LW3MIl9U for
 <oauth@ietfa.amsl.com>; Sun, 21 Aug 2011 12:04:35 -0700 (PDT)
Received: from p3plex1out01.prod.phx3.secureserver.net
 (p3plex1out01.prod.phx3.secureserver.net [72.167.180.17]) by ietfa.amsl.com
 (Postfix) with SMTP id 3180221F8B18 for <oauth@ietf.org>;
 Sun, 21 Aug 2011 12:04:34 -0700 (PDT)
Received: (qmail 30245 invoked from network); 21 Aug 2011 19:05:37 -0000
Received: from unknown (HELO smtp.ex1.secureserver.net) (72.167.180.19) by
 p3plex1out01.prod.phx3.secureserver.net with SMTP; 21 Aug 2011 19:05:36 -0000
Received: from P3PW5EX1MB01.EX1.SECURESERVER.NET ([10.6.135.19]) by
 P3PW5EX1HT001.EX1.SECURESERVER.NET ([72.167.180.19]) with mapi;
 Sun, 21 Aug 2011 12:04:04 -0700
From: Eran Hammer-Lahav <eran@hueniverse.com>
To: Torsten Lodderstedt <torsten@lodderstedt.net>
Date: Sun, 21 Aug 2011 12:02:41 -0700
Thread-Topic: [OAUTH-WG] Auth Code Swap Attack
Thread-Index: AcxgLMN0Y2Y+vxPHR3aUSIUK/Z5JuAACAwIQ
Message-ID: <90C41DD21FB7C64BB94121FBBC2E7234518A292F49@P3PW5EX1MB01.EX1.SECURESERVER.NET>
References: <B26C1EF377CB694EAB6BDDC8E624B6E723BA5043@SN2PRD0302MB137.namprd03.prod.outlook.com>
 <CA6AE9D9.17DE9%eran@hueniverse.com>
 <90C41DD21FB7C64BB94121FBBC2E7234502498CE8D@P3PW5EX1MB01.EX1.SECURESERVER.NET>
 <90C41DD21FB7C64BB94121FBBC2E72345029DFA961@P3PW5EX1MB01.EX1.SECURESERVER.NET>
 <4E5148A8.8070903@lodderstedt.net>
In-Reply-To: <4E5148A8.8070903@lodderstedt.net>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
acceptlanguage: en-US
Content-Type: multipart/alternative;
 boundary="_000_90C41DD21FB7C64BB94121FBBC2E7234518A292F49P3PW5EX1MB01E_"
MIME-Version: 1.0
Cc: "OAuth WG \(oauth@ietf.org\)" <oauth@ietf.org>
Subject: Re: [OAUTH-WG] Auth Code Swap Attack
X-BeenThere: oauth@ietf.org
X-Mailman-Version: 2.1.12
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: <http://www.ietf.org/mail-archive/web/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: Sun, 21 Aug 2011 19:04:39 -0000

--_000_90C41DD21FB7C64BB94121FBBC2E7234518A292F49P3PW5EX1MB01E_
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

I light to the recent discussion, do you still feel that changing 'state' f=
rom optional to required is the best approach?

EHL

From: Torsten Lodderstedt [mailto:torsten@lodderstedt.net]
Sent: Sunday, August 21, 2011 11:04 AM
To: Eran Hammer-Lahav
Cc: OAuth WG (oauth@ietf.org)
Subject: Re: [OAUTH-WG] Auth Code Swap Attack

My intention is to require clients to implement CSRF prevention. I thought =
making the state parameter mandatory would be the straightforward way.

regards,
Torsten.

Am 18.08.2011 08:04, schrieb Eran Hammer-Lahav:
I would like to hear from the other 3 authors of the proposed change about =
their reasons for changing the use of 'state' from recommended to required =
for CSRF prevention. It would also help moving this issue forward if the 4 =
authors can provide answers or clarifications on the issues raised below.

Assuming we can count all 4 authors are in favor of making the change, I be=
lieve we have a tie (4:4) and therefore no consensus for making it (as of t=
his point). However, we did identify issues with the section's language and=
 clarity which we should address either way.

To clarify - I am not proposing we close this issue just yet.

EHL

From: oauth-bounces@ietf.org<mailto:oauth-bounces@ietf.org> [mailto:oauth-b=
ounces@ietf.org] On Behalf Of Eran Hammer-Lahav
Sent: Monday, August 15, 2011 9:35 AM
To: OAuth WG (oauth@ietf.org<mailto:oauth@ietf.org>)
Subject: Re: [OAUTH-WG] Auth Code Swap Attack

To demonstrate why making state required as proposed isn't very helpful, he=
re is an incomplete list of other requirements needed to make an effective =
CSRF:

* State value must not be empty (a common bug in many implementations using=
 simple value comparison).

* 'Non-guessable' isn't sufficient as most developers will simply use a has=
h of the session cookie, with or without salt which isn't sufficient. We us=
e "cannot be generated, modified, or guessed to produce valid values" elsew=
here in the document, but this is much easier to get right for access token=
s and refresh tokens than CSRF tokens which are often just some algorithm o=
n top of the session cookie.

* State CSRF value should be short-lived or based on a short-lived session =
cookie to prevent the use of a leaked state value in multiple attacks on th=
e same user session once the leak is no longer viable.

In addition, this is not what "state" was originally intended for. If the w=
orking group decides to mandate a CSRF parameter, it should probably be a n=
ew parameter with a more appropriate name (e.g. 'csrf'). By forcing clients=
 to use "state" for this purpose, developers will need to use dynamic queri=
es for other state information which further reduces the security of the pr=
otocol (as the draft recommends not using dynamic callback query components=
). Encoding both CSRF tokens and other state information can be non-intuiti=
ve or complicated for some developers/platforms.

EHL




From: Eran Hammer-Lahav
Sent: Friday, August 12, 2011 2:53 PM
To: Anthony Nadalin; OAuth WG (oauth@ietf.org<mailto:oauth@ietf.org>)
Subject: Re: [OAUTH-WG] Auth Code Swap Attack

This is really just a flavor of CSRF attacks. I have no objections to bette=
r documenting it (though I feel the current text is already sufficient), bu=
t we can't realistically expect to identify and close every possible browse=
r-based attack. A new one is invented every other week.

The problem with this text is that developers who do no understand CSRF att=
acks are not likely to implement it correctly with this information. Those =
who understand it do not need the extra verbiage which is more confusing th=
an helpful.

As for the new requirements, they are insufficient to actually accomplish w=
hat the authors propose without additional requirements on state local stor=
age and verification to complete the flow. Also, the proposed text needs cl=
arifications as noted below.


From: Anthony Nadalin <tonynad@microsoft.com<mailto:tonynad@microsoft.com>>
Date: Fri, 12 Aug 2011 12:06:36 -0700
To: "OAuth WG (oauth@ietf.org<mailto:oauth@ietf.org>)" <oauth@ietf.org<mail=
to:oauth@ietf.org>>
Subject: [OAUTH-WG] Auth Code Swap Attack



Recommended Changes to draft-ietf-oauth-v2

In section 4, request options (e.g. 4.1.1) featuring "state" should change =
from:

state
OPTIONAL. An opaque value used by the client to maintain state between the =
request and callback. The authorization server includes this value when red=
irecting the user-agent back to the client.

to:

state
REQUIRED. An opaque value used by the client to maintain state between the =
request and callback. The authorization server includes this value when red=
irecting the user-agent back to the client. The encoded value SHOULD enable=
 the client application to determine the user-context that was active at th=
e time of the  request (see section 10.12). The value MUST NOT be guessable=
 or predictable, and MUST be kept confidential.


Making the parameter required without making its usage required (I.e. "valu=
e SHOULD enable") accomplishes nothing. Also, what does "MUST be kept confi=
dential" mean? Confidential from what? Why specify an "encoded value"?


Section 10.12 Cross-Site Request Forgery

Change to:

Cross-site request forgery (CSRF) is a web-based attack whereby HTTP reques=
ts are transmitted from the user-agent of an end-user the server trusts or =
has authenticated. CSRF attacks enable the attacker to intermix the attacke=
r's security context with that of the resource owner resulting in a comprom=
ise of either the resource server or of the client application itself. In t=
he OAuth context, such attacks allow an attacker to inject their own author=
ization code or access token into a client, which can result in the client =
using an access token associated with the attacker's account rather than th=
e victim's. Depending on the nature of the client and the protected resourc=
es, this can have undesirable and damaging effects.

In order to prevent such attacks, the client application MUST encode a non-=
guessable, confidential end-user artifact and submit as the "state" paramet=
er to authorization and access token requests to the authorization server. =
The client MUST keep the state value in a location accessible only by the c=
lient or the user-agent (i.e., protected by same-origin policy), for exampl=
e, using a DOM variable, HTTP cookie, or HTML5 client-side storage.

The authorization server includes the value of the "state" parameter when r=
edirecting the user-agent back to the client. Upon receiving a redirect, th=
e client application MUST confirm that returned value of "state" correspond=
s to the state value of the user-agent's user session. If the end-user sess=
ion represents an authenticated user-identity, the client MUST ensure that =
the user-identity has NOT changed.


The above text uses 'user-context' and this 'user-identity'. Neither term i=
s defined.

EHL




_______________________________________________

OAuth mailing list

OAuth@ietf.org<mailto:OAuth@ietf.org>

https://www.ietf.org/mailman/listinfo/oauth

--_000_90C41DD21FB7C64BB94121FBBC2E7234518A292F49P3PW5EX1MB01E_
Content-Type: text/html; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

<html xmlns:v=3D"urn:schemas-microsoft-com:vml" xmlns:o=3D"urn:schemas-micr=
osoft-com:office:office" xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns:m=3D"http://schemas.microsoft.com/office/2004/12/omml" xmlns=3D"http:=
//www.w3.org/TR/REC-html40"><head><META HTTP-EQUIV=3D"Content-Type" CONTENT=
=3D"text/html; charset=3Dus-ascii"><meta name=3DGenerator content=3D"Micros=
oft Word 14 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
	{font-family:Helvetica;
	panose-1:2 11 6 4 2 2 2 2 2 4;}
@font-face
	{font-family:Courier;
	panose-1:2 7 4 9 2 2 5 2 4 4;}
@font-face
	{font-family:"Cambria Math";
	panose-1:2 4 5 3 5 4 6 3 2 4;}
@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;}
@font-face
	{font-family:Consolas;
	panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0in;
	margin-bottom:.0001pt;
	font-size:11.0pt;
	font-family:"Calibri","sans-serif";
	color:black;}
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;}
pre
	{mso-style-priority:99;
	mso-style-link:"HTML Preformatted Char";
	margin:0in;
	margin-bottom:.0001pt;
	font-size:10.0pt;
	font-family:"Courier New";
	color:black;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
	{mso-style-priority:99;
	mso-style-link:"Balloon Text Char";
	margin:0in;
	margin-bottom:.0001pt;
	font-size:8.0pt;
	font-family:"Tahoma","sans-serif";
	color:black;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
	{mso-style-priority:34;
	margin-top:0in;
	margin-right:0in;
	margin-bottom:0in;
	margin-left:.5in;
	margin-bottom:.0001pt;
	font-size:11.0pt;
	font-family:"Calibri","sans-serif";
	color:black;}
span.BalloonTextChar
	{mso-style-name:"Balloon Text Char";
	mso-style-priority:99;
	mso-style-link:"Balloon Text";
	font-family:"Tahoma","sans-serif";}
span.EmailStyle20
	{mso-style-type:personal;
	font-family:"Calibri","sans-serif";
	color:windowtext;}
span.apple-style-span
	{mso-style-name:apple-style-span;}
span.EmailStyle22
	{mso-style-type:personal;
	font-family:"Calibri","sans-serif";
	color:#1F497D;}
span.EmailStyle23
	{mso-style-type:personal;
	font-family:"Calibri","sans-serif";
	color:#1F497D;}
span.HTMLPreformattedChar
	{mso-style-name:"HTML Preformatted Char";
	mso-style-priority:99;
	mso-style-link:"HTML Preformatted";
	font-family:Consolas;
	color:black;}
span.EmailStyle26
	{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=3D"edit" spidmax=3D"1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext=3D"edit">
<o:idmap v:ext=3D"edit" data=3D"1" />
</o:shapelayout></xml><![endif]--></head><body bgcolor=3Dwhite lang=3DEN-US=
 link=3Dblue vlink=3Dpurple><div class=3DWordSection1><p class=3DMsoNormal>=
<span style=3D'color:#1F497D'>I light to the recent discussion, do you stil=
l feel that changing &#8216;state&#8217; from optional to required is the b=
est approach?<o:p></o:p></span></p><p class=3DMsoNormal><span style=3D'colo=
r:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=3DMsoNormal><span style=3D'=
color:#1F497D'>EHL<o:p></o:p></span></p><p class=3DMsoNormal><span style=3D=
'color:#1F497D'><o:p>&nbsp;</o:p></span></p><div style=3D'border:none;borde=
r-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt'><div><div style=3D'borde=
r:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'><p class=
=3DMsoNormal><b><span style=3D'font-size:10.0pt;font-family:"Tahoma","sans-=
serif";color:windowtext'>From:</span></b><span style=3D'font-size:10.0pt;fo=
nt-family:"Tahoma","sans-serif";color:windowtext'> Torsten Lodderstedt [mai=
lto:torsten@lodderstedt.net] <br><b>Sent:</b> Sunday, August 21, 2011 11:04=
 AM<br><b>To:</b> Eran Hammer-Lahav<br><b>Cc:</b> OAuth WG (oauth@ietf.org)=
<br><b>Subject:</b> Re: [OAUTH-WG] Auth Code Swap Attack<o:p></o:p></span><=
/p></div></div><p class=3DMsoNormal><o:p>&nbsp;</o:p></p><p class=3DMsoNorm=
al>My intention is to require clients to implement CSRF prevention. I thoug=
ht making the state parameter mandatory would be the straightforward way.<b=
r><br>regards,<br>Torsten.<br><br>Am 18.08.2011 08:04, schrieb Eran Hammer-=
Lahav: <o:p></o:p></p><p class=3DMsoNormal><span style=3D'color:#1F497D'>I =
would like to hear from the other 3 authors of the proposed change about th=
eir reasons for changing the use of &#8216;state&#8217; from recommended to=
 required for CSRF prevention. It would also help moving this issue forward=
 if the 4 authors can provide answers or clarifications on the issues raise=
d below.</span><o:p></o:p></p><p class=3DMsoNormal><span style=3D'color:#1F=
497D'>&nbsp;</span><o:p></o:p></p><p class=3DMsoNormal><span style=3D'color=
:#1F497D'>Assuming we can count all 4 authors are in favor of making the ch=
ange, I believe we have a tie (4:4) and therefore no consensus for making i=
t (as of this point). However, we did identify issues with the section&#821=
7;s language and clarity which we should address either way.</span><o:p></o=
:p></p><p class=3DMsoNormal><span style=3D'color:#1F497D'>&nbsp;</span><o:p=
></o:p></p><p class=3DMsoNormal><span style=3D'color:#1F497D'>To clarify &#=
8211; I am not proposing we close this issue just yet.</span><o:p></o:p></p=
><p class=3DMsoNormal><span style=3D'color:#1F497D'>&nbsp;</span><o:p></o:p=
></p><p class=3DMsoNormal><span style=3D'color:#1F497D'>EHL</span><o:p></o:=
p></p><p class=3DMsoNormal><span style=3D'color:#1F497D'>&nbsp;</span><o:p>=
</o:p></p><div style=3D'border:none;border-left:solid blue 1.5pt;padding:0i=
n 0in 0in 4.0pt'><div><div style=3D'border:none;border-top:solid #B5C4DF 1.=
0pt;padding:3.0pt 0in 0in 0in'><p class=3DMsoNormal><b><span style=3D'font-=
size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span style=
=3D'font-size:10.0pt;font-family:"Tahoma","sans-serif"'> <a href=3D"mailto:=
oauth-bounces@ietf.org">oauth-bounces@ietf.org</a> [<a href=3D"mailto:oauth=
-bounces@ietf.org">mailto:oauth-bounces@ietf.org</a>] <b>On Behalf Of </b>E=
ran Hammer-Lahav<br><b>Sent:</b> Monday, August 15, 2011 9:35 AM<br><b>To:<=
/b> OAuth WG (<a href=3D"mailto:oauth@ietf.org">oauth@ietf.org</a>)<br><b>S=
ubject:</b> Re: [OAUTH-WG] Auth Code Swap Attack</span><o:p></o:p></p></div=
></div><p class=3DMsoNormal>&nbsp;<o:p></o:p></p><p class=3DMsoNormal><span=
 style=3D'color:#1F497D'>To demonstrate why making state required as propos=
ed isn&#8217;t very helpful, here is an incomplete list of other requiremen=
ts needed to make an effective CSRF:</span><o:p></o:p></p><p class=3DMsoNor=
mal><span style=3D'color:#1F497D'>&nbsp;</span><o:p></o:p></p><p class=3DMs=
oNormal><span style=3D'color:#1F497D'>* State value must not be empty (a co=
mmon bug in many implementations using simple value comparison).</span><o:p=
></o:p></p><p class=3DMsoNormal><span style=3D'color:#1F497D'>&nbsp;</span>=
<o:p></o:p></p><p class=3DMsoNormal><span style=3D'color:#1F497D'>* &#8216;=
Non-guessable&#8217; isn&#8217;t sufficient as most developers will simply =
use a hash of the session cookie, with or without salt which isn&#8217;t su=
fficient. We use &#8220;cannot be generated, modified, or guessed to produc=
e valid values&#8221; elsewhere in the document, but this is much easier to=
 get right for access tokens and refresh tokens than CSRF tokens which are =
often just some algorithm on top of the session cookie.</span><o:p></o:p></=
p><p class=3DMsoNormal><span style=3D'color:#1F497D'>&nbsp;</span><o:p></o:=
p></p><p class=3DMsoNormal><span style=3D'color:#1F497D'>* State CSRF value=
 should be short-lived or based on a short-lived session cookie to prevent =
the use of a leaked state value in multiple attacks on the same user sessio=
n once the leak is no longer viable.</span><o:p></o:p></p><p class=3DMsoNor=
mal><span style=3D'color:#1F497D'>&nbsp;</span><o:p></o:p></p><p class=3DMs=
oNormal><span style=3D'color:#1F497D'>In addition, this is not what &#8220;=
state&#8221; was originally intended for. If the working group decides to m=
andate a CSRF parameter, it should probably be a new parameter with a more =
appropriate name (e.g. &#8216;csrf&#8217;). By forcing clients to use &#822=
0;state&#8221; for this purpose, developers will need to use dynamic querie=
s for other state information which further reduces the security of the pro=
tocol (as the draft recommends not using dynamic callback query components)=
. Encoding both CSRF tokens and other state information can be non-intuitiv=
e or complicated for some developers/platforms.</span><o:p></o:p></p><p cla=
ss=3DMsoNormal><span style=3D'color:#1F497D'>&nbsp;</span><o:p></o:p></p><p=
 class=3DMsoNormal><span style=3D'color:#1F497D'>EHL</span><o:p></o:p></p><=
p class=3DMsoNormal><span style=3D'color:#1F497D'>&nbsp;</span><o:p></o:p><=
/p><p class=3DMsoNormal><span style=3D'color:#1F497D'>&nbsp;</span><o:p></o=
:p></p><p class=3DMsoNormal><span style=3D'color:#1F497D'>&nbsp;</span><o:p=
></o:p></p><p class=3DMsoNormal><span style=3D'color:#1F497D'>&nbsp;</span>=
<o:p></o:p></p><div style=3D'border:none;border-left:solid blue 1.5pt;paddi=
ng:0in 0in 0in 4.0pt'><div><div style=3D'border:none;border-top:solid #B5C4=
DF 1.0pt;padding:3.0pt 0in 0in 0in'><p class=3DMsoNormal><b><span style=3D'=
font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span s=
tyle=3D'font-size:10.0pt;font-family:"Tahoma","sans-serif"'> Eran Hammer-La=
hav <br><b>Sent:</b> Friday, August 12, 2011 2:53 PM<br><b>To:</b> Anthony =
Nadalin; OAuth WG (<a href=3D"mailto:oauth@ietf.org">oauth@ietf.org</a>)<br=
><b>Subject:</b> Re: [OAUTH-WG] Auth Code Swap Attack</span><o:p></o:p></p>=
</div></div><p class=3DMsoNormal>&nbsp;<o:p></o:p></p><div><p class=3DMsoNo=
rmal><span style=3D'font-size:10.5pt'>This is really just a flavor of CSRF =
attacks. I have no objections to better documenting it (though I feel the c=
urrent text is already sufficient), but we can't realistically expect to id=
entify and close every possible browser-based attack. A new one is invented=
 every other week.</span><o:p></o:p></p></div><div><p class=3DMsoNormal><sp=
an style=3D'font-size:10.5pt'>&nbsp;</span><o:p></o:p></p></div><div><p cla=
ss=3DMsoNormal><span style=3D'font-size:10.5pt'>The problem with this text =
is that developers who do no understand CSRF attacks are not likely to impl=
ement it correctly with this information. Those who understand it do not ne=
ed the extra verbiage which is more confusing than helpful.</span><o:p></o:=
p></p></div><div><p class=3DMsoNormal><span style=3D'font-size:10.5pt'>&nbs=
p;</span><o:p></o:p></p></div><div><p class=3DMsoNormal><span style=3D'font=
-size:10.5pt'>As for the new requirements, they are insufficient to actuall=
y accomplish what the authors propose without additional requirements on st=
ate local storage and verification to complete the flow. Also, the proposed=
 text needs clarifications as noted below.</span><o:p></o:p></p></div><div>=
<p class=3DMsoNormal><span style=3D'font-size:10.5pt'>&nbsp;</span><o:p></o=
:p></p></div><div><p class=3DMsoNormal><span style=3D'font-size:10.5pt'>&nb=
sp;</span><o:p></o:p></p></div><div style=3D'border:none;border-top:solid #=
B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'><p class=3DMsoNormal><b>From: </b>A=
nthony Nadalin &lt;<a href=3D"mailto:tonynad@microsoft.com">tonynad@microso=
ft.com</a>&gt;<br><b>Date: </b>Fri, 12 Aug 2011 12:06:36 -0700<br><b>To: </=
b>&quot;OAuth WG (<a href=3D"mailto:oauth@ietf.org">oauth@ietf.org</a>)&quo=
t; &lt;<a href=3D"mailto:oauth@ietf.org">oauth@ietf.org</a>&gt;<br><b>Subje=
ct: </b>[OAUTH-WG] Auth Code Swap Attack<o:p></o:p></p></div><div><p class=
=3DMsoNormal><span style=3D'font-size:10.5pt'>&nbsp;</span><o:p></o:p></p><=
/div><div><p class=3DMsoNormal><span style=3D'font-size:10.5pt'>&nbsp;</spa=
n><o:p></o:p></p></div><div><p class=3DMsoNormal><span style=3D'font-size:1=
0.5pt'>&nbsp;</span><o:p></o:p></p></div><blockquote style=3D'border:none;b=
order-left:solid #B5C4DF 4.5pt;padding:0in 0in 0in 4.0pt;margin-left:3.75pt=
;margin-top:5.0pt;margin-right:0in;margin-bottom:5.0pt' id=3D"MAC_OUTLOOK_A=
TTRIBUTION_BLOCKQUOTE"><div><div><p class=3DMsoNormal><b><span style=3D'fon=
t-size:9.0pt;font-family:"Helvetica","sans-serif"'>Recommended Changes to d=
raft-ietf-oauth-v2</span></b><o:p></o:p></p><p class=3DMsoNormal><span styl=
e=3D'font-size:9.0pt;font-family:Courier'>&nbsp;</span><o:p></o:p></p><p cl=
ass=3DMsoNormal><span class=3Dapple-style-span><span style=3D'font-size:9.0=
pt;font-family:"Helvetica","sans-serif"'>In section 4, request options (e.g=
. 4.1.1) featuring &quot;state&quot; should change from:</span></span><o:p>=
</o:p></p><p class=3DMsoNormal><span style=3D'font-size:9.0pt;font-family:C=
ourier'>&nbsp;</span><o:p></o:p></p><p class=3DMsoNormal><span style=3D'fon=
t-size:9.0pt;font-family:Courier'>state</span><o:p></o:p></p><p class=3DMso=
Normal><span style=3D'font-size:9.0pt;font-family:Courier'>OPTIONAL. An opa=
que value used by the client to maintain state between the request and call=
back. The authorization server includes this value when redirecting the use=
r-agent back to the client.</span><o:p></o:p></p><p class=3DMsoNormal><span=
 style=3D'font-size:9.0pt;font-family:Courier'>&nbsp;</span><o:p></o:p></p>=
<p class=3DMsoNormal><span class=3Dapple-style-span><span style=3D'font-siz=
e:9.0pt;font-family:"Helvetica","sans-serif"'>to:</span></span><o:p></o:p><=
/p><p class=3DMsoNormal><span style=3D'font-size:9.0pt;font-family:Courier'=
>&nbsp;</span><o:p></o:p></p><p class=3DMsoNormal><span style=3D'font-size:=
9.0pt;font-family:Courier'>state</span><o:p></o:p></p><p class=3DMsoNormal>=
<span style=3D'font-size:9.0pt;font-family:Courier'>REQUIRED. An opaque val=
ue used by the client to maintain state between the request and callback. T=
he authorization server includes this value when redirecting the user-agent=
 back to the client. The encoded value SHOULD enable the client application=
 to determine the user-context that was active at the time of the &nbsp;req=
uest (see section 10.12). The value MUST NOT be guessable or predictable, a=
nd MUST be kept confidential.</span><o:p></o:p></p><p class=3DMsoNormal><sp=
an style=3D'font-size:9.0pt;font-family:Courier'>&nbsp;</span><o:p></o:p></=
p></div></div></blockquote><div><p class=3DMsoNormal><span style=3D'font-si=
ze:10.5pt'>&nbsp;</span><o:p></o:p></p></div><div><p class=3DMsoNormal><spa=
n style=3D'font-size:10.5pt'>Making the parameter required without making i=
ts usage required (I.e. &quot;value SHOULD enable&quot;) accomplishes nothi=
ng. Also, what does &quot;MUST be kept confidential&quot; mean? Confidentia=
l from what? Why specify an &quot;encoded value&quot;?</span><o:p></o:p></p=
></div><div><p class=3DMsoNormal><span style=3D'font-size:10.5pt'>&nbsp;</s=
pan><o:p></o:p></p></div><div><p class=3DMsoNormal><span style=3D'font-size=
:10.5pt'>&nbsp;</span><o:p></o:p></p></div><blockquote style=3D'border:none=
;border-left:solid #B5C4DF 4.5pt;padding:0in 0in 0in 4.0pt;margin-left:3.75=
pt;margin-top:5.0pt;margin-right:0in;margin-bottom:5.0pt' id=3D"MAC_OUTLOOK=
_ATTRIBUTION_BLOCKQUOTE"><div><div><p class=3DMsoNormal><span class=3Dapple=
-style-span><span style=3D'font-size:9.0pt;font-family:"Helvetica","sans-se=
rif"'>Section 10.12 Cross-Site Request Forgery</span></span><o:p></o:p></p>=
<p class=3DMsoNormal><span style=3D'font-size:9.0pt;font-family:Courier'>&n=
bsp;</span><o:p></o:p></p><p class=3DMsoNormal><span class=3Dapple-style-sp=
an><span style=3D'font-size:9.0pt;font-family:"Helvetica","sans-serif"'>Cha=
nge to:</span></span><o:p></o:p></p><p class=3DMsoNormal><span style=3D'fon=
t-size:9.0pt;font-family:Courier'>&nbsp;</span><o:p></o:p></p><p class=3DMs=
oNormal><span style=3D'font-size:9.0pt;font-family:Courier'>Cross-site requ=
est forgery (CSRF) is a web-based attack whereby HTTP requests are transmit=
ted from the user-agent of an end-user&nbsp;the server trusts or has authen=
ticated. CSRF attacks enable the attacker to intermix the attacker's securi=
ty context with that of the&nbsp;resource owner resulting in a compromise o=
f either the resource server or of the client application itself. In the OA=
uth context, such&nbsp;attacks allow an attacker to inject their own author=
ization code or access token into a client, which can result in the client =
using an&nbsp;access token associated with the attacker's account rather th=
an the victim's. Depending on the nature of the client and the protected&nb=
sp;resources, this can have undesirable and damaging effects.<br><br>In ord=
er to prevent such attacks, the client application MUST encode a non-guessa=
ble, confidential end-user artifact and submit as&nbsp;the &quot;state&quot=
; parameter to authorization and access token requests to the authorization=
 server. The client MUST keep the state value in&nbsp;a location accessible=
 only by the client or the user-agent (i.e., protected by same-origin polic=
y), for example, using a DOM variable,&nbsp;HTTP cookie, or HTML5 client-si=
de storage.<br><br>The authorization server includes the value of the &quot=
;state&quot; parameter when redirecting the user-agent back to the client. =
Upon&nbsp;receiving a redirect, the client application MUST confirm that re=
turned value of &quot;state&quot; corresponds to the state value of the use=
r-agent's user session. If the end-user session represents an authenticated=
 user-identity, the client MUST ensure that the user-identity&nbsp;has NOT =
changed.</span><o:p></o:p></p><p class=3DMsoNormal>&nbsp;<o:p></o:p></p></d=
iv></div></blockquote><div><p class=3DMsoNormal><span style=3D'font-size:10=
.5pt'>&nbsp;</span><o:p></o:p></p></div><div><p class=3DMsoNormal><span sty=
le=3D'font-size:10.5pt'>The above text uses 'user-context' and this 'user-i=
dentity'. Neither term is defined.</span><o:p></o:p></p></div><div><p class=
=3DMsoNormal><span style=3D'font-size:10.5pt'>&nbsp;</span><o:p></o:p></p><=
/div><div><p class=3DMsoNormal><span style=3D'font-size:10.5pt'>EHL</span><=
o:p></o:p></p></div></div></div><p class=3DMsoNormal><span style=3D'font-si=
ze:12.0pt;font-family:"Times New Roman","serif"'><br><br><br><o:p></o:p></s=
pan></p><pre>_______________________________________________<o:p></o:p></pr=
e><pre>OAuth mailing list<o:p></o:p></pre><pre><a href=3D"mailto:OAuth@ietf=
.org">OAuth@ietf.org</a><o:p></o:p></pre><pre><a href=3D"https://www.ietf.o=
rg/mailman/listinfo/oauth">https://www.ietf.org/mailman/listinfo/oauth</a><=
o:p></o:p></pre></div></div></body></html>=

--_000_90C41DD21FB7C64BB94121FBBC2E7234518A292F49P3PW5EX1MB01E_--
