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

Oleg Gryb <oleg_gryb@yahoo.com> Thu, 12 August 2010 15:26 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 AD66628C136 for <oauth@core3.amsl.com>; Thu, 12 Aug 2010 08:26:27 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -0.185
X-Spam-Level:
X-Spam-Status: No, score=-0.185 tagged_above=-999 required=5 tests=[BAYES_40=-0.185]
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 DJgVVQoufd-7 for <oauth@core3.amsl.com>; Thu, 12 Aug 2010 08:26:26 -0700 (PDT)
Received: from web37604.mail.mud.yahoo.com (web37604.mail.mud.yahoo.com [209.191.87.87]) by core3.amsl.com (Postfix) with SMTP id BBC3C28C128 for <oauth@ietf.org>; Thu, 12 Aug 2010 08:26:24 -0700 (PDT)
Received: (qmail 82392 invoked by uid 60001); 12 Aug 2010 15:26:58 -0000
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1281626818; bh=eokXOvoGq+4uBFUMcQbp3aRjjHobKdQRA04UFbrYJFg=; 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=rm1X405HcwF6z8B/Kw45EZtEt2k7dzPeCbUHGGy4fZNTkegeM3HhqqfGwJwaMbeoZUmf1U22G2G7ugUHOENl0jQZleSH+tWFkbCa4QPo/U2iDPU17CyE/khfAFDBdMlNMAtgbwyhBxlCI4MriqnKc7YhiFw8McEJXMPGIaZZ59A=
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=6Q6XwclK4twcJwCY0/6VRhkV6npMx2bGH4GVi+Dx4VNOMBK7ASgCZ6Zn+RY8dNBe1oVmOYC+Gc9QgzAnEiZPjZaCmSi2ytvqF4BnRhfjBP+/HLllpM7JnMIw3X/yvp8dYoNNW7BoRgXQi1J9hiv8ZXObtRii9p1BtT5rinbHvJk=;
Message-ID: <674292.82385.qm@web37604.mail.mud.yahoo.com>
X-YMail-OSG: u1aqasEVM1kRqOtatOqf9_rsdqzpGjGvOm5xbSA5.8z8HsH KNcY9ShBaoAgeCFyvLnaBQFjhbzrJBAbLI7EuDJ_vVeax_OGmrw8_JMRZifi QT.t0Y0TxcO_FVS20..6J0a1fyItSYwZZMdRtsMiSJyzeMg3XnnWnoyMw9Hx v0Iu_tjX8RojWTRROuuzqH0xZGYmn84WyoaP0nf9OvY1XKpFbm2J0G3QFFLh Nbt.tUNS4naNezd0QQGwH_7RZPsXPFgmH9Kv.pZotl6c28gOLAmgCYKf3cK7 De8RfQHdQo9LPrYGbf.e9kwF6j3GkiptGWHGsAnNYGQZ1nB81yRIpQYHicWU 6vzg9BEAVhNfZEeVpvzx3CrtI1mmH14.qzKzoaCqZ.FGSqchkDoOT_NjXHw- -
Received: from [75.24.108.43] by web37604.mail.mud.yahoo.com via HTTP; Thu, 12 Aug 2010 08:26:58 PDT
X-Mailer: YahooMailRC/470 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> <917905.1164.qm@web37601.mail.mud.yahoo.com> <AANLkTikrLCnFyn-03QvBwRC6cuf_XW9xgb=RnoxpPyWk@mail.gmail.com>
Date: Thu, 12 Aug 2010 08:26:58 -0700
From: Oleg Gryb <oleg_gryb@yahoo.com>
To: Brian Eaton <beaton@google.com>, Oleg Gryb <oleg@gryb.info>
In-Reply-To: <AANLkTikrLCnFyn-03QvBwRC6cuf_XW9xgb=RnoxpPyWk@mail.gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
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: Thu, 12 Aug 2010 15:26:27 -0000

----- Original Message ----
> From: Brian Eaton <beaton@google.com>
> To: Oleg Gryb <oleg@gryb.info>
> Cc: Naitik Shah <naitik@facebook.com>; OAuth WG <oauth@ietf.org>
> Sent: Wed, August 11, 2010 11:03:12 AM
> Subject: Re: [OAUTH-WG] Quick survey: fragment vs. query
> 
> On Tue, Aug 10, 2010 at 11:00 AM, Oleg Gryb <oleg_gryb@yahoo.com> wrote:
> > 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.
> 
> This is incorrect.  The security of this  flow is based entirely on the
> same-origin policy.  

It is not: you get an access token from authz server and want to share it with 
thirdparty.com domain, which is in a different domain. You do it through frames 
running in a browser. Do a threat modeling as others suggested here. Why the 
access token needs to be shared with thirdparty.com is still not clear.

> Note  that both the web-server and the user-agent flows are entirely
> about passing  information to third-party web sites, so suggesting that
> these flows should  not pass information across domains is not really
> helpful. =)

There are two kinds of information here: thirdparty.com state (e.g. list of 
selected photos on Facebook) and access token, which is really a printing.com 
secret. If you store access token in a printing.com cookie you don't need to 
share it with thirdparty.com.

> >  Yes, but you'll need a web server client for that. I'm saying that UA 
>profile  can
> > be POST based too.
> 
> (a) The POST would bust the browser  cache.
> (b) Javascript can't read POST bodies.  (At least not to my  knowledge.

No, it can't and I never said it could. Busting the browser cache by writing a 
server side logic doesn't look like a big issue or performance lost to me. You 
could aqcwire access token once, persist it (e.g. through a cookie in 
printing.com domain) and reuse until it's expired.

> If we were willing to accept the performance penalty of  busting the
> browser-cache, we would use the web-server  flow.

I'm still struggling to undertand what you're trying to achieve with UA profile. 
If it's getting rid of web server client, you didn't aachieve it, because you 
still have thridparty.com, which is actually a web server client.

Here are some qs to the existing spec (v.10) related to that:

   "The user-agent profile is suitable for client applications residing
   in a user-agent, typically implemented in a browser using a scripting
   language such as JavaScript"Client application (JavaScript) resides and is 
implemented on thrirdparty.com. Browser only executes it, so you actually do 
have a web server client, it just you don't want to use server side code and 
server side objects, right? If this is the case, why don't you say it 
explicitly?


"These clients cannot keep client
   secrets confidential"What is wrong with cookies? 

I think, in your UA flow you'll also need to reflect:

1. thirdparty.com and it's role.
2. the cross-domain secret sharing logic that we've discussed here and why you 
need it.

> _______________________________________________
> OAuth mailing  list
> OAuth@ietf.org
> https://www.ietf.org/mailman/listinfo/oauth
>