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

Denis <denis.ietf@free.fr> Wed, 29 April 2020 16:11 UTC

Return-Path: <denis.ietf@free.fr>
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 A95893A13D4 for <oauth@ietfa.amsl.com>; Wed, 29 Apr 2020 09:11:55 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -0.405
X-Spam-Level:
X-Spam-Status: No, score=-0.405 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, KHOP_HELO_FCRDNS=0.275, LONGWORDS=2.035, RCVD_IN_MSPIKE_H2=-0.82, SPF_HELO_NONE=0.001, SPF_NONE=0.001, URIBL_BLOCKED=0.001] autolearn=no autolearn_force=no
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 9t7YD3x6pQX9 for <oauth@ietfa.amsl.com>; Wed, 29 Apr 2020 09:11:53 -0700 (PDT)
Received: from smtp.smtpout.orange.fr (smtp07.smtpout.orange.fr [80.12.242.129]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id D79663A13D6 for <oauth@ietf.org>; Wed, 29 Apr 2020 09:10:32 -0700 (PDT)
Received: from [192.168.1.11] ([86.238.65.197]) by mwinf5d14 with ME id YgAS2200s4FMSmm03gATRE; Wed, 29 Apr 2020 18:10:28 +0200
X-ME-Helo: [192.168.1.11]
X-ME-Auth: ZGVuaXMucGlua2FzQG9yYW5nZS5mcg==
X-ME-Date: Wed, 29 Apr 2020 18:10:28 +0200
X-ME-IP: 86.238.65.197
To: oauth@ietf.org
References: <CAGL6epKuHTqLrZEjm0goKV+3jaPfTkN_JSLc0jfQyPqNzeP3aA@mail.gmail.com>
From: Denis <denis.ietf@free.fr>
Message-ID: <125f32d3-dd3b-3add-1172-391acd831cde@free.fr>
Date: Wed, 29 Apr 2020 18:10:25 +0200
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.6.0
MIME-Version: 1.0
In-Reply-To: <CAGL6epKuHTqLrZEjm0goKV+3jaPfTkN_JSLc0jfQyPqNzeP3aA@mail.gmail.com>
Content-Type: multipart/alternative; boundary="------------1BDD8CF2A5A52B589A4DD3C0"
Content-Language: en-GB
Archived-At: <https://mailarchive.ietf.org/arch/msg/oauth/uDyWiQkeRk1H6TQOkowhWakWkV0>
Subject: Re: [OAUTH-WG] Second 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: Wed, 29 Apr 2020 16:11:56 -0000

You will find four comments numbered 1) to 4).

*1) *The title of this spec. is:

JSON Web Token (JWT) Profile for OAuth *2.0* Access Tokens

So, this spec. is supposed to be targeted to OAuth *2.0. *However, the 
header at the top of the page omits to mention it.

Currently, it is :

Internet-Draft       OAuth Access Token JWT Profile           April 2020

It should rather be:

Internet-Draft       OAuth *2.0* Access Token JWT Profile           
April 2020

*2)* The following text is within section 6.

The client MUST NOT inspect the content of
the access token: the authorization server and the resource server
might decide to change token format at any time (for example by
switching from this profile to opaque tokens) hence any logic in the
client relying on the ability to read the access token content would
break without recourse.
Nonetheless, authorization servers should
not assume that clients will comply with the above.

It is of a primary importance that clients MAY be able to inspect tokens 
before transmitting them.
The "MUST NOT" is not acceptable.

The above text should be replaced with:

Reading the access token content may be useful for the user to verify that
the access token content matches with its expectations.However,
the authorization server and the resource server might decide to change the
token format at any time.Thus, the client should not expect to always be
in a position to read the access token content.

The remaining of the text about this topic is fine.


*3) *The next topic is about the sub claim.

The text states:

Although the ability to correlate requests might be required by
design in many scenarios, there are scenarios where the authorization
server might want to prevent correlation to preserve the desired
level of privacy. Authorization servers should choose how to assign
sub values according to the level of privacy required by each
situation.

I have a set of questions:

 1. How can authorization servers choose how to assign sub values
    according to the level of privacy required "by each situation" ?
 2. How can authorization servers know the level of privacy required "by
    each situation" ?
 3. How can the users be informed of the level of privacy required "by
    each situation" ?
 4. How can the users *consent* with the level of privacy required "by
    each situation" ?

Currently, the request MUST include either a resource parameter or an 
aud claim parameter, while it MAY include a scope parameter.

The syntax of the scope parameter is a list of space-delimited, 
case-sensitive strings (RFC 6749). It is thus subject to private agreements
between clients and Authorization Servers. Since the scope is being 
returned, it is a primary importance that the returned scope matches
with its expectations before transmitting the token to a Resource Server.

In theory, a client should be able to choose whether it wishes the sub 
claim to contain :

  * a global unique identifier for all ASs ("globally unique"),
  * a unique identifier for each AS ("locally unique in the context of
    the issuer"),
  * a different pseudonym for each RS, or
  * a different pseudonym for each authorization token request.

The only variable parameter that it can use for this purpose in the 
token request is the scope parameter.

RFC 7519 states is section 4.1.2:

The subject value MUST either be scoped to be locally unique in the 
context of the issuer
or be globally unique.

It is quite hard to recognize that the sub claim is able to carry a 
different pseudonym for each RS, i.e. for case (c), or
a different pseudonym for each authorization token request, i.e. for 
case (d), which has nothing to do with uniqueness
since the value changes for every generated token.

This has implications about the following text:

For instance: if a solution requires preventing tracking
principal activities across multiple resource servers, the
authorization server should ensure that JWT access tokens meant for
different resource servers have distinct sub values that cannot be
correlated in the event of resource servers collusion.

Since it addresses case (c).

and also about the following text:

4.b) Similarly: if a solution requires preventing a resource server from
correlating the principal’s activity within the resource itself, the
authorization server should assign different sub values for every JWT
access token issued.

Since it addresses case (d).

This means that the current text placed in the privacy considerations 
section was a good attempt to address the case,
but that the text needs to be revised.

Proposed text replacement for all the previously quoted sentences:

According to RFC 7519 (4.1.2): The subject value MUST either be scoped 
to be locally unique in the context of the issuer or be globally unique.

When the sub claim contains a globally unique identifier, this allows to 
correlate principal activities across multiple resource servers, while 
in addition,
this globally unique identifier may also allow to correlate the 
principal activities on servers where no access has been performed by 
the principals
to these servers but where the same globally unique identifiers are 
being used by these servers.

When the sub claim contains a locally unique identifier in the context 
of the issuer, this also allows the tracking of principal activities 
across multiple resource servers.

The scope request parameter is the only way to influence on the content 
of the sub claim parameter. Its meaning is subject to a private agreement
between the client and the AS, which means that the use of the scope 
parameter is the only way to choose between a locally unique identifier
in the context of the issuer or a globally unique identifier.

Since the scope parameter is being returned, it is a primary importance 
that the returned scope matches with the expectations of the client 
before transmitting
the token to a Resource Server.

However, there are other cases where the client would like to be able to 
choose whether it wishes the sub claim to contain :
- a different pseudonym for each RS so that different resource servers 
will be unable to correlate its activities, or
- a different pseudonym for each authorization token request, so that 
the same resource server cannot correlate its activities performed at 
different instant of time.

Considering the semantics of the sub claim, these two cases cannot be 
currently supported.


*4) *The next topic is about the targeting of access tokens

Text had been proposed before the last conference call. Then, the topic 
has been presented at the very end of the last conference call, but no 
text has been included
in the next draft.

Here is a revised text be included in the privacy considerations section:

For security reasons, some clients may be willing to target their access 
tokens but, for privacy reasons, may be unwilling to disclose to 
Authorization Servers
an identification of the Resource Servers they are going to access, so 
that Authorization Servers will be unable to know which resources 
servers are being accessed.
The disclosure of the Resource Servers names allows the Authorization 
Servers to list all the Resource Servers being access by all its users 
and in addition to list pairs
of (Principal, Resource Servers) which allow to trace all the users 
accesses to Resource Servers performed through a given Authorization 
Server. When a token is targeted,
this profile does not contain provisions to address these two threats.

Denis

> Hi all,
>
> This is a second working group last call for "JSON Web Token (JWT) 
> Profile for OAuth 2.0 Access Tokens".
>
> Here is the document:
>
> https://tools.ietf.org/html/draft-ietf-oauth-access-token-jwt-06
>
> Please send your comments to the OAuth mailing list by April 29, 2020.
>
> Regards,
>
>  Rifaat & Hannes
>
>
> _______________________________________________
> OAuth mailing list
> OAuth@ietf.org
> https://www.ietf.org/mailman/listinfo/oauth