Re: [OAUTH-WG] OAuth Request JSON Encoding

Filip Skokan <panva.ip@gmail.com> Mon, 13 July 2020 15:47 UTC

Return-Path: <panva.ip@gmail.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 847DE3A1380 for <oauth@ietfa.amsl.com>; Mon, 13 Jul 2020 08:47:59 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.096
X-Spam-Level:
X-Spam-Status: No, score=-2.096 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, MIME_QP_LONG_LINE=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id HFsM-QkcMjuu for <oauth@ietfa.amsl.com>; Mon, 13 Jul 2020 08:47:58 -0700 (PDT)
Received: from mail-ej1-x634.google.com (mail-ej1-x634.google.com [IPv6:2a00:1450:4864:20::634]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id E55AC3A13CB for <oauth@ietf.org>; Mon, 13 Jul 2020 08:47:47 -0700 (PDT)
Received: by mail-ej1-x634.google.com with SMTP id l12so17747212ejn.10 for <oauth@ietf.org>; Mon, 13 Jul 2020 08:47:47 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=content-transfer-encoding:from:mime-version:subject:date:message-id :references:cc:in-reply-to:to; bh=eoqJsqABaEDg2i1mCkN+jEsXARpN1Q25CWNH2pwfGL8=; b=BXYODldtC/jOF6KwYtDwh0DAMxGZOe7eKUF7jfyzuFiKBzzR0qMJfOEQU2XUncZN6A xJjcW1tV8z5ntQEdrgOGdlIe6XOoNFlRJdmYa2KNLP7lvkc9fG+bG0AXKmGQi4PZwzBJ WbMFLAunrW9+OLPTG6e1IUjdde2B5yDYGDpZeo1pZ37ra3ah3MsvZ9oMkiPbS24MU5Cw Bvq3BtIA3w3JC5YLFCThI2C3p9uCNwAjhrXssWlAhrI447lh5f5swqjcWsUlMStDeYt8 NgZ9a/kKda/5h4kfXPEY0O5V7AuG8VAPLKrQfHwtFPZuECh6GHN5ASMBmhVFztcUAric FGWA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:content-transfer-encoding:from:mime-version :subject:date:message-id:references:cc:in-reply-to:to; bh=eoqJsqABaEDg2i1mCkN+jEsXARpN1Q25CWNH2pwfGL8=; b=bk4WDO/TkDXGXLLE0Jq4Ty0+EEujkMExuJbw0GWInYGb5+WM1xtOfoKtmMkhfnULqD pPmU9nHjX8LLDdoM5qDRvl6LofoIdK4Cjqi+x8+f/XWgB/ToFLgQpXIH+dLCuRPIZWgs hDVVprQ1QhIq/PlgUbDNEIW6fGSW31miI9c2fvo3NqdFX8AdVLun21d4C+aradIHK+Hq EOpFAWd2ZrYYiM9is6lBfFcEEWyVHzCqGRD1UDSb7onS1sb5zm8CGk2UdaBoPo2ZsQ1m vBosUk5Q8WtBLoZwMnZJOtqzJwCeVsSUPh1yJa8+1E9VY7RC3pMhPx4I87PcIJmRj2Dw Nf1A==
X-Gm-Message-State: AOAM532dykHi7Y2/EbPuVgHyz5ipkInYx8yJVf71ogJY7yINPMV65mRo YEw6U/C7EYqPVdz6S7eLIA==
X-Google-Smtp-Source: ABdhPJxc41iYMM6eqwbXMZ8uAX9b69jWJjArfOgXvAsxVhi2RqPHQtiZWBIXG0REEh4IgVLfja/DdQ==
X-Received: by 2002:a17:906:2318:: with SMTP id l24mr355770eja.291.1594655266367; Mon, 13 Jul 2020 08:47:46 -0700 (PDT)
Received: from [192.168.68.100] (173.c3.airnet.cz. [94.74.199.173]) by smtp.gmail.com with ESMTPSA id dt22sm10410508ejc.104.2020.07.13.08.47.45 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 13 Jul 2020 08:47:45 -0700 (PDT)
Content-Type: multipart/alternative; boundary="Apple-Mail-7B3A9592-608A-469B-BFBF-1E2AC73341A6"
Content-Transfer-Encoding: 7bit
From: Filip Skokan <panva.ip@gmail.com>
Mime-Version: 1.0 (1.0)
Date: Mon, 13 Jul 2020 17:47:44 +0200
Message-Id: <1C36CCB9-5D15-4456-89A8-8F038A689E68@gmail.com>
References: <0E71D133-A516-4F1C-92CB-36F181B1BA4A@mit.edu>
Cc: oauth <oauth@ietf.org>
In-Reply-To: <0E71D133-A516-4F1C-92CB-36F181B1BA4A@mit.edu>
To: Justin Richer <jricher@mit.edu>
X-Mailer: iPhone Mail (17F80)
Archived-At: <https://mailarchive.ietf.org/arch/msg/oauth/HMbYpb7SS63XAve9o60XgIjyIf4>
Subject: Re: [OAUTH-WG] OAuth Request JSON Encoding
X-BeenThere: oauth@ietf.org
X-Mailman-Version: 2.1.29
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: <https://mailarchive.ietf.org/arch/browse/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: Mon, 13 Jul 2020 15:48:00 -0000

Hello Justin, 

Your ID changes both how a client sends a request as well as how the, already a json, token response is structured (as far as i can see it changes scope from a space separated value to an array). 

The response morphing will be confusing to clients.

I don’t think there’s much to explore here, apart from authorization_details param sent to the token endpoint form encoded i don’t find much unnatural about the existing oauth interface. 

Filip

Odesláno z iPhonu

> 9. 7. 2020 v 21:29, Justin Richer <jricher@mit.edu>:
> 
> 
> In the ten years since OAuth started, we’ve seen a huge shift away from form encoding to JSON encoding for sending data to a server. And yet, OAuth is stuck with form encoding. So I thought, why can’t we change that?
> 
> I put together a quick proposal for how this would work.
> 
> https://www.ietf.org/id/draft-richer-oauth-json-request-00.html
> 
> The basic idea is that you take the map of form inputs and make it into a JSON object. For some fields, like scope and authorization_details, you can define a JSON-specific encoding to make use of object and array structures native to JSON. You also don’t have to url-encode values inside the JSON strings. 
> 
> Caveat, I haven’t tried implementing this yet, but I think it’s not likely to be that difficult for either the client or server side of things. At worst it seems like it’d be a pretty simple middleware function. Functionality can be detected at the AS by the content negotiation in HTTP (client sends content-type of JSON), and can be advertised as an option in the metadata (or in an OPTIONS call to the token endpoint, to be more HTTP-friendly).
> 
>  — Justin
> _______________________________________________
> OAuth mailing list
> OAuth@ietf.org
> https://www.ietf.org/mailman/listinfo/oauth