Re: [OAUTH-WG] Quick survey: fragment vs. query

Oleg Gryb <oleg_gryb@yahoo.com> Tue, 10 August 2010 17:59 UTC

Return-Path: <oleg_gryb@yahoo.com>
X-Original-To: oauth@core3.amsl.com
Delivered-To: oauth@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id 135E23A6A95 for <oauth@core3.amsl.com>; Tue, 10 Aug 2010 10:59:49 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.299
X-Spam-Level:
X-Spam-Status: No, score=-2.299 tagged_above=-999 required=5 tests=[AWL=0.299, BAYES_00=-2.599, HTML_MESSAGE=0.001]
Received: from mail.ietf.org ([64.170.98.32]) by localhost (core3.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id LYzYRPAwBTwn for <oauth@core3.amsl.com>; Tue, 10 Aug 2010 10:59:47 -0700 (PDT)
Received: from web37601.mail.mud.yahoo.com (web37601.mail.mud.yahoo.com [209.191.87.84]) by core3.amsl.com (Postfix) with SMTP id 7BF823A6A8B for <oauth@ietf.org>; Tue, 10 Aug 2010 10:59:47 -0700 (PDT)
Received: (qmail 1866 invoked by uid 60001); 10 Aug 2010 18:00:20 -0000
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1281463219; bh=aryz9T14OUfdjNMyirwjhKfTvWwMCqRKTQqNePKuppg=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:References:Date:From:Reply-To:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type; b=MrzPjyUvaz4USO1o3pR2zFyjE4WWqq9LV87KdEkaGkK300/mouvq/JseznyjmSd9t8G+kJcjYGYDjd1rWSFwvKPymq6EOD+cM7Iq7gIs4yNaEJT8vPqVc6K3RIKBm8AiyPTjLlPY75Zml0Dtr2wKolBq2BMSjyQh2IEa+8ioAbU=
DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:X-Mailer:References:Date:From:Reply-To:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type; b=ZQxuZer4H8fOBTC+1ew719yls9Xqxuwpxz0oHSnAA0XXaLcE1222kB/LihU7L2NIlXPyeDRcMvcC3lyxlszjM+rTdatvWyAaGkJDA5bzn1BxAxznWKC+lRtDRlKyDZYsunLCXN36Lx7NQMNVaUnwXMc1NRpvul2Nls6dPeAk2Is=;
Message-ID: <917905.1164.qm@web37601.mail.mud.yahoo.com>
X-YMail-OSG: dpqXXvMVM1msHGHN6MLJDkxEwNCT0GF9GwHgxIPVZNVv2RE C2ftTwfKaxBelpBgZjIpwg62e3dsC7gEMaTcvn8gww.NLOqZECOqPsTErxpB E74gU_wlPjnEmFrjAtP46TsfiAWUVX5KSx1I42ilcJs.iOd4qPYHGTTnViVA qDZKJ4zDmpg3A00NaqP0LbG56tTofbh2cLpGIAoy9caUKMxVATFGpVYKjO7M vE5YcI3HKGpP8vLcFZv5TMWnjVU1IN6Y5bhvEv5MomfV4VW5fq.oR80PtImg vDZMhw.2Efroq9kATOBB.vJY18Ov8ghD0QBk.iPN0mlJK7OsNLkrwVwenTOR ByISRg740qtl_
Received: from [208.240.243.170] by web37601.mail.mud.yahoo.com via HTTP; Tue, 10 Aug 2010 11:00:19 PDT
X-Mailer: YahooMailRC/459 YahooMailWebService/0.8.105.279950
References: <C862F736.37253%eran@hueniverse.com> <AANLkTil_MQ1-JxNC-5S3bLDo6-WhG0GMBHVXQvvN-jdv@mail.gmail.com> <AANLkTi=A+ztAH8vbR-O8vYUxiE2cGjn-KHCpM05NE3fL@mail.gmail.com> <8F6F3A55-274C-4F38-84C8-C956D74504AE@lodderstedt.net> <837544.77407.qm@web37602.mail.mud.yahoo.com> <F4265A73-F743-4E5F-BE16-5A7D31308B5A@facebook.com>
Date: Tue, 10 Aug 2010 11:00:19 -0700
From: Oleg Gryb <oleg_gryb@yahoo.com>
To: Luke Shepard <lshepard@facebook.com>, Oleg Gryb <oleg@gryb.info>
In-Reply-To: <F4265A73-F743-4E5F-BE16-5A7D31308B5A@facebook.com>
MIME-Version: 1.0
Content-Type: multipart/alternative; boundary="0-1686917626-1281463219=:1164"
Cc: Naitik Shah <naitik@facebook.com>, OAuth WG <oauth@ietf.org>
Subject: Re: [OAUTH-WG] Quick survey: fragment vs. query
X-BeenThere: oauth@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
Reply-To: Oleg Gryb <oleg@gryb.info>
List-Id: OAUTH WG <oauth.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/listinfo/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: Tue, 10 Aug 2010 17:59:49 -0000

Luke,

Thanks for answering. Sorry, for been paranoid, but I think that you'll have 
more qs in regards of your frame-based-cross-domain-secret-sharing solution.

The thing is that each time when a web app with sensitive info can be run in a 
frame, security people would advice to break that frame-reads-other-frame-data 
logic, because it can lead to violation of same origin policy.

I think Torsten's suggestion is correct: somebody would need to "threat model" 
the current UA flow.

Alternatively, you might want to consider creating yet another "safer UA flow" 
where access token will not be passed in a URL. It might require using dynamic 
pages generated by a server, but if somebody wants to implement a more secure 
solution, they'll at least have a choice.

 



>
>From: Luke Shepard <lshepard@facebook.com>
>To: Oleg Gryb <oleg@gryb.info>
>Cc: Torsten Lodderstedt <torsten@lodderstedt.net>; David Recordon 
><recordond@gmail.com>; Naitik Shah <naitik@facebook.com>; OAuth WG 
><oauth@ietf.org>
>Sent: Tue, August 10, 2010 10:23:56 AM
>Subject: Re: [OAUTH-WG] Quick survey: fragment vs. query
>
>
>Here are the possible URLs:
>
>
>http://static.facebook.com/connect/xd_proxy.php#code=10alkji&access_token=lzipa3p
>
>http://static.facebook.com/connect/xd_proxy.php?code=10alkji#access_token=lzipa3p
>
>
>
>Those who already use this flow in production (including Google, Facebook, 
>Twitter, and others) typically work like this:
>
>
>- Parent frame initiates the transaction by spawning a popup or an iframe
>- Response comes back to a static relay file (like the xd_proxy.php above)
>- The relay interprets the URL, parses out arguments, and hands them to the 
>parent frame
>- Parent frame then does what it wants. this could be making an API call via 
>JSONP, handing info to the server via Ajax, or something else.
>
>
>Because the relay file is static, it isn't going to interpret the code 
>regardless, even if it is sent in the query parameter. So since the client will 
>handle it anyway, the fragment is better for two reasons:
>
>
>1/ Less code for the JS to just pull it out of the fragment
>2/ More efficient, as the relay file can be cached on the client. If you include 
>a code then you degrade performance because it busts the cache every time.
>
>
>
>
>On Aug 10, 2010, at 9:35 AM, Oleg Gryb wrote:
>
>I was trying to understand that too (see "Is user agent profile secure" thread). 
>The answers that I've got were:
>>
>>
>>1. It's already coded this way.
>>2. It's the most efficient way of doing that, because that relay.html page is 
>>static and can be cached by a browser.
>>
>>None of the answers above looks very convincing to me, but that's where UA is 
>>now. 
>>
>>From: Torsten Lodderstedt <torsten@lodderstedt.net>
>>
>>Can someone pls. explain why code and token should both be returned in the 
>>fragment?
>>>
>>>
>>>
>>>regards,
>>>Torsten.
>>>
>>_______________________________________________
>>OAuth mailing list
>>OAuth@ietf.org
>>https://www.ietf.org/mailman/listinfo/oauth
>>
>