Re: [OAUTH-WG] WGLC on "JSON Web Token (JWT) Profile for OAuth 2.0 Access Tokens"

George Fletcher <gffletch@aol.com> Tue, 24 March 2020 19:55 UTC

Return-Path: <gffletch@aol.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 DB3BC3A09C5 for <oauth@ietfa.amsl.com>; Tue, 24 Mar 2020 12:55:50 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.56
X-Spam-Level:
X-Spam-Status: No, score=-3.56 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, RCVD_IN_MSPIKE_H2=-1.463, 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=aol.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 hMvz871_8eYV for <oauth@ietfa.amsl.com>; Tue, 24 Mar 2020 12:55:49 -0700 (PDT)
Received: from sonic301-32.consmr.mail.ne1.yahoo.com (sonic301-32.consmr.mail.ne1.yahoo.com [66.163.184.201]) (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 381D43A0C07 for <oauth@ietf.org>; Tue, 24 Mar 2020 12:55:49 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aol.com; s=a2048; t=1585079748; bh=Yx4JnHsB7GMj/5Vp8cP3XtR0/bxfW2cuP2gkxnNnuyk=; h=Subject:To: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TWIQ8hisCHg HRGTxAiqXETgu4Z_OIWRCxYWrrjDXq4DqajRNn5wgMTopNue0i1S6vElXjAMYkF_jQhCG10oRdDJ EzZPsDSQWz0HV9JQC.eUkoShb7K_GqXYHynDtaWzHV3EMTizEgUtw41evH.yNdmkUS_f1XIzJJ5Q adeOvWE_QPA3p8mRNeFnunfKIBk.W3zS62iFL_PdzndyYVOEO9S0BxZ7Uz8iq75rqABlf9fGttBO 7fhsC9QH4W_iyQD091csXyYCF1Uinx2j0sTbKIT0fz8y9SIBlzj1YA5Q9ZL6glMo0DHCpMqvrj8Q Hx0XWARWCBnsAV4GujGBFWzGmC50M.g4a_b.BoZuMr7Dqegs7nL3CdxbuwuN27nHHeA9qILx_CTl C0lYB1G874fjeUg9k3dZwGMeaLoOUaRKRMYL4X6ami4.2srAKE.JONJzwjbPoEn7yXKQJqbP_4x_ EmhF3c3Wl_SiE.v_hH5yqG0d8RZRmZGYqJ6FSC.OQqamz3CdBL0Xv2BocFLNNGr_uQk8q.XvWWpM HTEsMkK.3KVVxOS30xoqzE2Kl6lQ72k0wB4j4_mzW.nO6FklSZMCMQQSLSt5yASDnxM9uxYT6aAP z_97XN71IikX6CEwcx3k12CWzOJxEz.hkeEp88efjKLl1xMknUBJi2ALykjjxVkcIhG_NJS6yDy4 ZYwRnP4DUiKEX2jhYxYRy2bf5DLKWTsS5WvJlHbA8pSlpFNmKWeUXcrSK2dX82.tBBkRUeId2Rw- -
Received: from sonic.gate.mail.ne1.yahoo.com by sonic301.consmr.mail.ne1.yahoo.com with HTTP; Tue, 24 Mar 2020 19:55:48 +0000
Received: by smtp428.mail.bf1.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID ca7a52404b4a039927e98949bd7bd39b; Tue, 24 Mar 2020 19:55:44 +0000 (UTC)
To: Vittorio Bertocci <vittorio.bertocci=40auth0.com@dmarc.ietf.org>, Vittorio Bertocci <Vittorio@auth0.com>, Takahiko Kawasaki <taka@authlete.com>
Cc: oauth <oauth@ietf.org>
References: <AM0PR08MB37160B8A021052198699CD17FAF00@AM0PR08MB3716.eurprd08.prod.outlook.com> <01ec01d6017c$162eb2e0$428c18a0$@aueb.gr> <CAHdPCmMzRn8iYG025Vq0sQNzgZTOkQJuMJwttDgjMDLESpjptw@mail.gmail.com> <CAO_FVe5UXY4Jxd3LdG6zyXJ8B8nFKYevcHQTVJEAFSdW0ku9tg@mail.gmail.com> <52f18114-4f8e-da86-5735-4c4e8f8d2db5@aol.com> <BL0PR08MB5394CA3CB524E95EA87CD6B6AEF10@BL0PR08MB5394.namprd08.prod.outlook.com>
From: George Fletcher <gffletch@aol.com>
Organization: AOL LLC
Message-ID: <74da4cc3-359c-c08a-0ae5-54c8ca309f32@aol.com>
Date: Tue, 24 Mar 2020 15:55:42 -0400
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:68.0) Gecko/20100101 Thunderbird/68.5.0
MIME-Version: 1.0
In-Reply-To: <BL0PR08MB5394CA3CB524E95EA87CD6B6AEF10@BL0PR08MB5394.namprd08.prod.outlook.com>
Content-Type: multipart/alternative; boundary="------------70AB00C208120224F1112538"
Content-Language: en-US
X-Mailer: WebService/1.1.15518 hermes Apache-HttpAsyncClient/4.1.4 (Java/1.8.0_242)
Archived-At: <https://mailarchive.ietf.org/arch/msg/oauth/D2M-i5_YQhhcbGFhW6qWpiawgng>
Subject: Re: [OAUTH-WG] WGLC on "JSON Web Token (JWT) Profile for OAuth 2.0 Access Tokens"
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: Tue, 24 Mar 2020 19:55:51 -0000

I think one of the problems we have in being super specific about how 
the JWT access token is constructed is that is means it's not possible 
for many organizations to follow. How scopes are implemented is very 
varied across deployments which means that some may conform to the 
perspective of the spec and many may not.

Personally, I'm not a big fan of trying to use scopes for fine-grain 
authorization. I don't think that is what they were intended for when 
originally designed. (This can be seen by the RAR spec introducing a 
completely different way of specifying fine-grain authorization 
context.) Even in multi-tenant systems, I don't see issues with using 
sub-resource scopes as each tenant should define the scopes that make 
sense for that tenant. I don't think the AS needs to understand the 
scopes, just provide a mechanism to issue the correct scope under user 
consent to the client and let the RS apply the authorization policy when 
it gets the scopes out of the token.

I'll wait for your response to my other feedback :)

On 3/24/20 3:07 PM, Vittorio Bertocci wrote:
> You are too fast 😊 I am still replying to your other comments! 😃
> Yes, it is possible for resource servers to define sub-resource specific scopes, but it cannot be mandated- and it can be extremely problematic when your AS is multitenant. The resource identifier in those scenarios can be a LONG URI, and forcing people to do scope stuffing (eg : csutomresource:// 1f150b81-c98e-45ec-8252-ab47ef0645ff/read) is hard from the management, provisioning and even bandwidth use standpoints. I have experienced this firsthand when Azure AD moved from v1 style resource identification (where resource was a mandatory request param) to v2, where the resource was inferred from the scopes via scopes stuffing.
>
> From: OAuth <oauth-bounces@ietf.org> on behalf of George Fletcher <gffletch=40aol.com@dmarc.ietf.org>
> Date: Tuesday, March 24, 2020 at 11:48
> To: Vittorio Bertocci <Vittorio=40auth0.com@dmarc.ietf.org>, Takahiko Kawasaki <taka@authlete.com>
> Cc: oauth <oauth@ietf.org>
> Subject: Re: [OAUTH-WG] WGLC on "JSON Web Token (JWT) Profile for OAuth 2.0 Access Tokens"
>
> Focusing just on this comment...
>
> This assumes the system uses a specific implementation of scopes values (e.g. 'read', 'write', 'delete'). It is very possible that in the context of a calendar services and an inbox service... the system defines scopes like 'cal-r', 'cal-w', 'mail-r', mail-w' in which there is no ambiguity.
> On 3/24/20 2:14 PM, Vittorio Bertocci wrote:
>
>    I don't think the rule referring to the "scope" parameter is worth being
>
> defined. That "aud" is missing but "scope" is available is enough for
>
> resource servers. In other words, if "aud" is determined based on the
>
> "scope", why do we have to set "aud" redundantly?
>
> Scope is actually not sufficient for many resource servers. Whenever an RS
>
> is facading a collection of existing finer grained resources, scopes
>
> representing permissions might be ambiguous - if my API facades both
>
> calendar and inbox, what does the "read" scope refer to? Having an audience
>
> resolves that ambiguity.
>
>

-- 
Identity Standards Architect
Verizon Media                     Work: george.fletcher@oath.com
Mobile: +1-703-462-3494           Twitter: http://twitter.com/gffletch
Office: +1-703-265-2544           Photos: http://georgefletcher.photography