Re: [OAUTH-WG] OAuth Request JSON Encoding

Filip Skokan <panva.ip@gmail.com> Mon, 13 July 2020 17:01 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 9C8CC3A163E for <oauth@ietfa.amsl.com>; Mon, 13 Jul 2020 10:01:09 -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 8sz22eGPzCkV for <oauth@ietfa.amsl.com>; Mon, 13 Jul 2020 10:01:07 -0700 (PDT)
Received: from mail-ej1-x62c.google.com (mail-ej1-x62c.google.com [IPv6:2a00:1450:4864:20::62c]) (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 C27C73A1671 for <oauth@ietf.org>; Mon, 13 Jul 2020 10:00:58 -0700 (PDT)
Received: by mail-ej1-x62c.google.com with SMTP id w6so18036401ejq.6 for <oauth@ietf.org>; Mon, 13 Jul 2020 10:00:58 -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=dxm+VW7eaf6v5r6UPt2qPUkvjKGZkcqyOYnnDFUt+8c=; b=e0mpqxffmKRshddXndmx8btQ7l0MiarrD2uSVUObxDY0oPurPqfyfyGFZmH/Bq+R9O Rj2GlpTuIC06/TJA/y0RvjfkFyZqkmUeh/PsHz5IPupCYSZfFn83icRo9jx1YgJ2YFpF njhKSO6AuTv657SLBRfIee1awLtdAPQEN2AMPzPqeXKKWXyVK/Geyf/EwybpUjpGFJdw R0pfClmxx1nPQH8s8fj3K2XwHUfuEXbJ0Q05vbxQO7Ke+gwK1qbb/KQHru6we4BF5u8B v+/ypIxrmCqYxIJnT7NfcgNl5X3HOxuoQq/sTvs6PhfqdAUuX3gPlowmJ2IlvT42RCa8 bdig==
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=dxm+VW7eaf6v5r6UPt2qPUkvjKGZkcqyOYnnDFUt+8c=; b=gm4rz/KDToKV4IwF406/+XDsVGfYjWD5fUq1fNrKJNrrLhsuj89qeX6N2HeOZ0a0ey F4G1qdLm9E3Pc2BxIhDHOxCrKVD9JiJ3nbrf8MHDdN6KaRoQtoHH2IvzYO/fLe8jQql4 CPB2cFsUbStILw/UAIhskciAcHN/sruZdDz+aaGbn6gadxRcf/sO6cdutG5uvBfyBBQz YRHzSS7HoNJcb4TR+ORHHbyyLQDxS2JtSAHMI1UzOjDI3F3pg9ATrcIAiZcM0vmHfqi5 cbjTTSGNI37u1AvFQSDuSLwK/hHK5blKf48wGIixMzsULavIV25fOqDF9NGeLC8HCmiq ynbA==
X-Gm-Message-State: AOAM532uqF23y5JbbhG4rBoGT9bmWERxAXGg7n9+ocG30ADFT+p6VG1m GUB9zNrmGXYtGXCAQOOOBg==
X-Google-Smtp-Source: ABdhPJzC+bqonY5IbnEC9mDw2seadvatcjRrog2x4B9FkOaPmrOUfqKI1NCX/mcFd+Ea+gAUWGTn7Q==
X-Received: by 2002:a17:906:375a:: with SMTP id e26mr686824ejc.324.1594659657174; Mon, 13 Jul 2020 10:00:57 -0700 (PDT)
Received: from [192.168.68.100] (173.c3.airnet.cz. [94.74.199.173]) by smtp.gmail.com with ESMTPSA id sd15sm10156049ejb.66.2020.07.13.10.00.56 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 13 Jul 2020 10:00:56 -0700 (PDT)
Content-Type: multipart/alternative; boundary="Apple-Mail-4516EF2F-6D75-4615-8D0A-CCFB15F459C1"
Content-Transfer-Encoding: 7bit
From: Filip Skokan <panva.ip@gmail.com>
Mime-Version: 1.0 (1.0)
Date: Mon, 13 Jul 2020 19:00:55 +0200
Message-Id: <795E9946-C272-4B09-9078-018AA6EEDE44@gmail.com>
References: <7126D3DA-57E4-4381-8F6A-3BC5734E1469@mit.edu>
Cc: oauth <oauth@ietf.org>
In-Reply-To: <7126D3DA-57E4-4381-8F6A-3BC5734E1469@mit.edu>
To: Justin Richer <jricher@mit.edu>
X-Mailer: iPhone Mail (17F80)
Archived-At: <https://mailarchive.ietf.org/arch/msg/oauth/IeWZpFi43AfcFCvtdH5OR5EmLcg>
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 17:01:14 -0000

Apologies Justin, i read it in a rush. 

But, even more so after your clarification, if the ID means responses are unmodified it’s just confusing - as you say - at odds with each other, since i’d send in scope as array and get it back as a string from the token response. 

Odesláno z iPhonu

> 13. 7. 2020 v 18:09, Justin Richer <jricher@mit.edu>:
> 
> The intent was to only affect the request, not the response, though I can see the confusion that would arise in having those be at odds with each other. 
> 
>  — Justin
> 
>>> On Jul 13, 2020, at 11:47 AM, Filip Skokan <panva.ip@gmail.com> wrote:
>>> 
>>> 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
>