Re: [OAUTH-WG] Should registration request be form-urlencoded or JSON?

Justin Richer <jricher@mitre.org> Tue, 05 February 2013 15:04 UTC

Return-Path: <jricher@mitre.org>
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 DBA7821F8619 for <oauth@ietfa.amsl.com>; Tue, 5 Feb 2013 07:04:47 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.566
X-Spam-Level:
X-Spam-Status: No, score=-6.566 tagged_above=-999 required=5 tests=[AWL=0.032, BAYES_00=-2.599, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_MED=-4]
Received: from mail.ietf.org ([64.170.98.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id HW3yIJ3dX54u for <oauth@ietfa.amsl.com>; Tue, 5 Feb 2013 07:04:46 -0800 (PST)
Received: from smtpksrv1.mitre.org (smtpksrv1.mitre.org [198.49.146.77]) by ietfa.amsl.com (Postfix) with ESMTP id BD65921F84CE for <oauth@ietf.org>; Tue, 5 Feb 2013 07:04:45 -0800 (PST)
Received: from smtpksrv1.mitre.org (localhost.localdomain [127.0.0.1]) by localhost (Postfix) with SMTP id 872896150098; Tue, 5 Feb 2013 10:04:44 -0500 (EST)
Received: from IMCCAS02.MITRE.ORG (imccas02.mitre.org [129.83.29.79]) by smtpksrv1.mitre.org (Postfix) with ESMTP id 6AA78615009E; Tue, 5 Feb 2013 10:04:44 -0500 (EST)
Received: from [10.146.15.29] (129.83.31.58) by IMCCAS02.MITRE.ORG (129.83.29.79) with Microsoft SMTP Server (TLS) id 14.2.318.4; Tue, 5 Feb 2013 10:04:44 -0500
Message-ID: <51111F69.1080503@mitre.org>
Date: Tue, 05 Feb 2013 10:04:09 -0500
From: Justin Richer <jricher@mitre.org>
User-Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130106 Thunderbird/17.0.2
MIME-Version: 1.0
To: Mike Jones <Michael.Jones@microsoft.com>
References: <4E1F6AAD24975D4BA5B1680429673943674111BE@TK5EX14MBXC284.redmond.corp.microsoft.com> <B33BFB58CCC8BE4998958016839DE27E068866A0@IMCMBX01.MITRE.ORG> <4E1F6AAD24975D4BA5B168042967394367411337@TK5EX14MBXC284.redmond.corp.microsoft.com>
In-Reply-To: <4E1F6AAD24975D4BA5B168042967394367411337@TK5EX14MBXC284.redmond.corp.microsoft.com>
Content-Type: multipart/alternative; boundary="------------040104000305090407090405"
X-Originating-IP: [129.83.31.58]
Cc: "oauth@ietf.org" <oauth@ietf.org>
Subject: Re: [OAUTH-WG] Should registration request be form-urlencoded or JSON?
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: Tue, 05 Feb 2013 15:04:48 -0000

The counter argument is that if you do something that's half way between 
two fairly well-established programming practices, then you can end up 
making a strange chimera. I agree that we shouldn't "boil the ocean", 
but dictating HTTP verb usage on the endpoint is far from that.

The crux of my argument is this: with the same input format in and out, 
we have an opportunity to make something much more RESTful than with the 
data formats being asymmetrical, as they are now.

I'll put together a draft of this proposed change to DynReg sometime 
this week that's much more fully RESTful, based on Nat's OIDC 
registration draft. The pros/cons below still apply, but I think it 
might help people to see a concrete proposal. The goal will still be to 
have a base DynReg proposal that OIDC, UMA, and others can profile and 
extend for their use cases.

  -- Justin


On 02/04/2013 04:46 PM, Mike Jones wrote:
>
> I'm not proposing that we boil the ocean.  "Diving in with both feet 
> and define a full RESTful API with all appropriate verbs and CRUD ops" 
> is an almost sure way to build a complicated spec, most of which isn't 
> needed, and to have it take a long time.
>
> Everything in the current OpenID Registration spec is motivated by an 
> actual use case.  Stuff that isn't isn't in the spec. That's nearly 
> true of the closely-related OAuth Registration spec, with what I 
> believe to be a few exceptions.  (Yes, we should harmonize those 
> differences -- hopefully based upon real use cases.)
>
> I was only proposing that we answer the single question of whether 
> we're using the right input format or not.  I hope we can keep the 
> discussion to that topic and not use it to generate a passel of new 
> work items as a side effect.
>
> -- Mike
>
> *From:*Richer, Justin P. [mailto:jricher@mitre.org]
> *Sent:* Monday, February 04, 2013 1:34 PM
> *To:* Mike Jones
> *Cc:* oauth@ietf.org
> *Subject:* Re: [OAUTH-WG] Should registration request be 
> form-urlencoded or JSON?
>
> For history, the original UMA registration spec from whence this all 
> grew was JSON-in and JSON-out. It's feeling like this is coming back 
> around.
>
> Pro:
>
>  - more REST-ish (particularly if we use real REST style like URL 
> templates and verbs)
>
>  - consistent data structures
>
>  - possible use of rich client data structures like lists and sub-objects
>
> Con:
>
>  - unlike the rest of OAuth, which is form-in, JSON-out
>
>  - major change from existing code
>
>  - possible overhead for existing OAuth libraries which haven't had to 
> deal with JSON from clients
>
> If we're going to do this, we should dive in with both feet and define 
> a full RESTful API with all appropriate verbs and CRUD ops, and define 
> it at the OAuth DynReg level as well.
>
> -- Justin
>
> On Feb 4, 2013, at 4:25 PM, Mike Jones <Michael.Jones@microsoft.com 
> <mailto:Michael.Jones@microsoft.com>>
>
>  wrote:
>
>
>
> Now that we're returning the registration state as JSON, it's pretty 
> inconsistent for the registration request to instead be 
> form-url-encoded. The case can be made for switching to JSON now - 
> especially in light of possibly wanting to convey some structured 
> information at registration time.
>
> I realize that this is a big change, but if we're going to do it, we 
> should do it now.
>
> As a precedent, apparently SCIM requests are JSON, rather than 
> form-url-encoded.
>
> -- Mike
>
> _______________________________________________
> OAuth mailing list
> OAuth@ietf.org <mailto:OAuth@ietf.org>
> https://www.ietf.org/mailman/listinfo/oauth
>