Re: [OAUTH-WG] Proposal for single JSON response format
Eran Hammer-Lahav <eran@hueniverse.com> Sun, 13 June 2010 15:18 UTC
Return-Path: <eran@hueniverse.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 B30983A68BA for <oauth@core3.amsl.com>; Sun, 13 Jun 2010 08:18:19 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.048
X-Spam-Level:
X-Spam-Status: No, score=-3.048 tagged_above=-999 required=5 tests=[AWL=1.550, BAYES_00=-2.599, GB_I_LETTER=-2, 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 CUOxIOQw1-PA for <oauth@core3.amsl.com>; Sun, 13 Jun 2010 08:18:12 -0700 (PDT)
Received: from p3plex1out02.prod.phx3.secureserver.net (p3plex1out02.prod.phx3.secureserver.net [72.167.180.18]) by core3.amsl.com (Postfix) with SMTP id B01373A6947 for <oauth@ietf.org>; Sun, 13 Jun 2010 08:18:12 -0700 (PDT)
Received: (qmail 19077 invoked from network); 13 Jun 2010 15:18:15 -0000
Received: from unknown (HELO smtp.ex1.secureserver.net) (72.167.180.21) by p3plex1out02.prod.phx3.secureserver.net with SMTP; 13 Jun 2010 15:18:14 -0000
Received: from P3PW5EX1MB01.EX1.SECURESERVER.NET ([10.6.135.20]) by P3PW5EX1HT003.EX1.SECURESERVER.NET ([72.167.180.21]) with mapi; Sun, 13 Jun 2010 08:18:14 -0700
From: Eran Hammer-Lahav <eran@hueniverse.com>
To: Evan Gilbert <uidude@google.com>, Robert Sayre <sayrer@gmail.com>
Date: Sun, 13 Jun 2010 08:18:12 -0700
Thread-Topic: [OAUTH-WG] Proposal for single JSON response format
Thread-Index: AcsK3WYs+znB84DmQyGvVMurXTB4uQALai3A
Message-ID: <90C41DD21FB7C64BB94121FBBC2E72343B3EBB6597@P3PW5EX1MB01.EX1.SECURESERVER.NET>
References: <90C41DD21FB7C64BB94121FBBC2E72343B3EAF73EF@P3PW5EX1MB01.EX1.SECURESERVER.NET> <255B9BB34FB7D647A506DC292726F6E11263FEC9FC@WSMSG3153V.srv.dir.telstra.com> <4A5E1C55-D589-4F25-9D45-E640BA7C833F@facebook.com> <AANLkTik1HYTYa-Bc5kImyr6Oh6OLR0tqPgHiP7Hjeeu7@mail.gmail.com> <AANLkTikdUoT_K9ls4kwCH4zbmWiUTzIYGM1eeIi2d8xB@mail.gmail.com> <AANLkTinEJsrBHuW73XqF3fCWk7Ts2SpvgbgYO6X1Fl3P@mail.gmail.com>
In-Reply-To: <AANLkTinEJsrBHuW73XqF3fCWk7Ts2SpvgbgYO6X1Fl3P@mail.gmail.com>
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_90C41DD21FB7C64BB94121FBBC2E72343B3EBB6597P3PW5EX1MB01E_"
MIME-Version: 1.0
Cc: "OAuth WG (oauth@ietf.org)" <oauth@ietf.org>
Subject: Re: [OAUTH-WG] Proposal for single JSON response format
X-BeenThere: oauth@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
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: Sun, 13 Jun 2010 15:18:19 -0000
Using JSON in the end-user authorization endpoint response is still something we need to discuss. In the web server flow, it makes more sense to use form-encoded because the URI is processed by a typical query processor (automatic in every web server). In the fragment, it is a question of preference, and I was told that there are many benefits to using JSON. I think Facebook uses JSON in such a way. However, there is still value in using JSON across all server responses because it allows returning the same structured data. Can you explain the XSS hole from parsing a random JSON string? If all server responses are JSON, why does the client have to do form-decoding? What simple model? Format isn't a model. EHL From: oauth-bounces@ietf.org [mailto:oauth-bounces@ietf.org] On Behalf Of Evan Gilbert Sent: Sunday, June 13, 2010 2:47 AM To: Robert Sayre Cc: OAuth WG (oauth@ietf.org) Subject: Re: [OAUTH-WG] Proposal for single JSON response format -1 I disagree very strongly with this approach if I'm understanding correctly. Let me paraphrase to make sure I understand: All responses, even those encoded in a browser URL redirect back from the AS (redirect with verification code in the web server flow and the redirect with token in the user-agent flow) will be JSON This means that we will have a URL-encoded JSON blob as a form parameter (as it has to play nicely with existing URL parameters). So the response back in the web server flow would be: https://client.com/receiveVerificationCode?existingParam=value&oauth2=%7Bcode%3A'abc123'%2C+state%3A+'randomstatedata'%7D and the response back in the user-agent flow would be https://client.com/page?existingParam=value&oauth2=%7Baccess_token%3A+'accesstoken1234'%2Cexpires_in%3A3600%2Cstate%3A'randomstatedata'%7D Reasons why this is of concern: - Requires clients to do URL decoding and JSON decoding - Encourages unsafe JSON handling in the User-Agent flow (eval(JSON) = XSS hole) - Breaks the simple model we've been creating in these flows. Evan On Fri, Jun 11, 2010 at 1:51 PM, Robert Sayre <sayrer@gmail.com<mailto:sayrer@gmail.com>> wrote: +1 On Fri, Jun 11, 2010 at 1:17 AM, Naitik Shah <n@daaku.org<mailto:n@daaku.org>> wrote: > +1 > > On Thu, Jun 10, 2010 at 5:50 PM, Luke Shepard <lshepard@facebook.com<mailto:lshepard@facebook.com>> wrote: >> >> +1 >> >> On Jun 10, 2010, at 5:46 PM, Manger, James H wrote: >> >> > +1 >> > >> > -- >> > James Manger >> > >> > ---------- >> > From: oauth-bounces@ietf.org<mailto:oauth-bounces@ietf.org> [mailto:oauth-bounces@ietf.org<mailto:oauth-bounces@ietf.org>] On Behalf >> > Of Eran Hammer-Lahav >> > Sent: Friday, 11 June 2010 6:29 AM >> > To: OAuth WG (oauth@ietf.org<mailto:oauth@ietf.org>) >> > Subject: [OAUTH-WG] Proposal for single JSON response format >> > >> > - Support a single response format (including in the user-agent >> > fragment) using JSON. >> > _______________________________________________ >> > OAuth mailing list >> > OAuth@ietf.org<mailto:OAuth@ietf.org> >> > https://www.ietf.org/mailman/listinfo/oauth >> >> _______________________________________________ >> OAuth mailing list >> OAuth@ietf.org<mailto:OAuth@ietf.org> >> https://www.ietf.org/mailman/listinfo/oauth > > > _______________________________________________ > OAuth mailing list > OAuth@ietf.org<mailto:OAuth@ietf.org> > https://www.ietf.org/mailman/listinfo/oauth > > -- Robert Sayre "I would have written a shorter letter, but I did not have the time." _______________________________________________ OAuth mailing list OAuth@ietf.org<mailto:OAuth@ietf.org> https://www.ietf.org/mailman/listinfo/oauth
- [OAUTH-WG] Proposal for single JSON response form… Eran Hammer-Lahav
- Re: [OAUTH-WG] Proposal for single JSON response … Justin Hart
- Re: [OAUTH-WG] Proposal for single JSON response … Eran Hammer-Lahav
- Re: [OAUTH-WG] Proposal for single JSON response … Brian Eaton
- Re: [OAUTH-WG] Proposal for single JSON response … Dick Hardt
- Re: [OAUTH-WG] Proposal for single JSON response … Dick Hardt
- Re: [OAUTH-WG] Proposal for single JSON response … Michael D Adams
- Re: [OAUTH-WG] Proposal for single JSON response … David Recordon
- Re: [OAUTH-WG] Proposal for single JSON response … Justin Richer
- Re: [OAUTH-WG] Proposal for single JSON response … Torsten Lodderstedt
- Re: [OAUTH-WG] Proposal for single JSON response … Chuck Mortimore
- Re: [OAUTH-WG] Proposal for single JSON response … Brian Eaton
- Re: [OAUTH-WG] Proposal for single JSON response … Nat
- Re: [OAUTH-WG] Proposal for single JSON response … Manger, James H
- Re: [OAUTH-WG] Proposal for single JSON response … Luke Shepard
- Re: [OAUTH-WG] Proposal for single JSON response … Naitik Shah
- Re: [OAUTH-WG] Proposal for single JSON response … Robert Sayre
- Re: [OAUTH-WG] Proposal for single JSON response … Evan Gilbert
- Re: [OAUTH-WG] Proposal for single JSON response … Eran Hammer-Lahav
- Re: [OAUTH-WG] Proposal for single JSON response … Evan Gilbert
- Re: [OAUTH-WG] Proposal for single JSON response … Dick Hardt
- Re: [OAUTH-WG] Proposal for single JSON response … Evan Gilbert
- Re: [OAUTH-WG] Proposal for single JSON response … Dick Hardt
- Re: [OAUTH-WG] Proposal for single JSON response … Eran Hammer-Lahav
- Re: [OAUTH-WG] Proposal for single JSON response … Evan Gilbert
- Re: [OAUTH-WG] Proposal for single JSON response … Dirk Balfanz