Re: [OAUTH-WG] draft-ietf-oauth-access-token-jwt-07

vittorio.bertocci@auth0.com Wed, 09 September 2020 06:03 UTC

Return-Path: <vittorio.bertocci@auth0.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 3E1453A0F11 for <oauth@ietfa.amsl.com>; Tue, 8 Sep 2020 23:03:58 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.098
X-Spam-Level:
X-Spam-Status: No, score=-2.098 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, HTML_MESSAGE=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=auth0.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 nqTepu9WlH_n for <oauth@ietfa.amsl.com>; Tue, 8 Sep 2020 23:03:55 -0700 (PDT)
Received: from mail-pj1-x1031.google.com (mail-pj1-x1031.google.com [IPv6:2607:f8b0:4864:20::1031]) (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 BF06E3A0113 for <oauth@ietf.org>; Tue, 8 Sep 2020 23:03:55 -0700 (PDT)
Received: by mail-pj1-x1031.google.com with SMTP id mm21so796042pjb.4 for <oauth@ietf.org>; Tue, 08 Sep 2020 23:03:55 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=auth0.com; s=google; h=from:to:references:in-reply-to:subject:date:message-id:mime-version :thread-index:content-language; bh=Ru1mXTl2LAPWdx8HyDTXXj9QWTRCjtD+PZgdSSVjJCQ=; b=RedgyV/I+GH+ACnqW0X0p0BUj0rK9IWKYyMgGRLBuYvGtZDBwuQJZLYIuFyv/OVAKa IIdKdtfoJNDKGSq6TDWhLnuQm0WLbOduqLYKP9IB4Uo57rkOjpeoCqHGvvQ0djSwGWx9 2ynHh1dk+uCY5kNbTvrvMfKq1Hc4ZZxyJJC91QDdt/wbF11MBNj2Q4VSEDa3CyKtvzkj PkJr3wcJ0LhWLxwwqcidlCE86uxW8+8ygT77KZj5OqXMv0jdTjzWNmU2+nfX0s6Y3/W8 Oc1kVOhAXeRRJ8o08oV5rRb/G+gFHCBKQuA5psiNhfcpOfi7VMx9VSGiflSrtnpTlxPh VE9Q==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:references:in-reply-to:subject:date :message-id:mime-version:thread-index:content-language; bh=Ru1mXTl2LAPWdx8HyDTXXj9QWTRCjtD+PZgdSSVjJCQ=; b=VOe+DqD9y8/KfhrYBQ8GGk6Vz1lnhnUd3bQOaPob1XLlGChcFLI/29oluu26w4kV5R Df+sOvzia5NNNW9JNQYUQ3gyXQx0s10Yls264sMKrwL4/2B2oGMBJNKZfxhsLh5nzdzd dnJgk2X0h5EbwXsop8OoUpLIc7MNDwuEdpRoBZ0KSOlkLQXPb87n1N3CORE8ytwwKeTy SePhDqpB5R2Wcv01qpQoImCdbg/773tl840uMDBWESv2QFxS/2VUrYahTl2NfjsSBoFI VSx160wpHPLjBsgtVb3Ep1QWwC0G0C497gdSIAXdp9J9qAjL+lwOhYdBs3HgyF8B4Xes G6pg==
X-Gm-Message-State: AOAM532/QBzq6En6/Z1dQJ/7yGFB/nMbqgZWG6132RqQT07wzygkirt5 iHLZ0QU6gXXm4cVOpmxwCmtzz54pnGv7tRxE
X-Google-Smtp-Source: ABdhPJxU6ZaVH2HctcaVz6Hxd5prPksN+UyELFxr9CyNM/tMX1zRT5TVG8FdGYznp5RDgh3osnFFuQ==
X-Received: by 2002:a17:90a:9915:: with SMTP id b21mr2200895pjp.109.1599631434836; Tue, 08 Sep 2020 23:03:54 -0700 (PDT)
Received: from vibrosurface7 (c-67-171-8-60.hsd1.wa.comcast.net. [67.171.8.60]) by smtp.gmail.com with ESMTPSA id m20sm1302093pfa.115.2020.09.08.23.03.53 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 08 Sep 2020 23:03:54 -0700 (PDT)
From: <vittorio.bertocci@auth0.com>
To: "'Hannes Tschofenig'" <Hannes.Tschofenig@arm.com>, <oauth@ietf.org>
References: <AM0PR08MB371667F70B227C3EFA4C3ECAFA290@AM0PR08MB3716.eurprd08.prod.outlook.com>
In-Reply-To: <AM0PR08MB371667F70B227C3EFA4C3ECAFA290@AM0PR08MB3716.eurprd08.prod.outlook.com>
Date: Tue, 8 Sep 2020 23:03:54 -0700
Message-ID: <05cc01d6866e$ffc73c20$ff55b460$@auth0.com>
MIME-Version: 1.0
Content-Type: multipart/alternative; boundary="----=_NextPart_000_05CD_01D68634.536A11D0"
X-Mailer: Microsoft Outlook 16.0
Thread-Index: AQFyjJi0BD2RCwpq8TgHc1kMOIq9cKonxHXQ
Content-Language: en-us
Archived-At: <https://mailarchive.ietf.org/arch/msg/oauth/qmaweNJlidgNXtj-ZkL_YLfKUYQ>
Subject: Re: [OAUTH-WG] draft-ietf-oauth-access-token-jwt-07
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, 09 Sep 2020 06:03:58 -0000

Thanks Hannes!

I will go thru the comments and update accordingly by EoW.

 

From: OAuth <oauth-bounces@ietf.org> On Behalf Of Hannes Tschofenig
Sent: Monday, September 7, 2020 11:30 PM
To: oauth@ietf.org
Subject: [OAUTH-WG] draft-ietf-oauth-access-token-jwt-07

 

Hi Victorio, Hi all, 

 

I am doing my shepherd write-up for draft-ietf-oauth-access-token-jwt-07.
Reading through the draft I have a few minor suggestions: 

 

Section 2: 

 

I would delete this sentence "JWT access tokens are regular JWTs complying
with the requirements described in this section."

 

Reason: You pretty much make the same statement on the previous page (see
terminology section). 

 

Section 2.1

 

s/asymmetric algorithms/asymmetric cryptography

(same replacement in Section 4)

 

s/   This specification registers the "application/at+jwt" media type,

   which can be used to indicate that the content is an access token./This
specification registers the "application/at+jwt" media type,

   which can be used to indicate that the content is a JWT access token.

 

Use capitalized "Section" when a section number is indicated, such as in
Section 2.2.   

 

Section 2.2

 

s/""aud"/"aud"

 

2.2.1

 

s/   auth_time  OPTIONAL - as defined in section 2 of [OpenID.Core]./
auth_time  OPTIONAL - as defined in Section 2 of [OpenID.Core].

s/   acr, amr  OPTIONAL - as defined in section 2 of [OpenID.Core]./   acr,
amr  OPTIONAL - as defined in Section 2 of [OpenID.Core].

 

 

s/Please see/See 

 

s/For example:/For example, 

 

Section 4

 

You write: 

 

"Authorization servers SHOULD implement OAuth 2.0 Authorization Server
Metadata [RFC8414] ... "

 

Are you sure you mean "implement" and not "use"? The paragraph gives me the
impression that you talk about "ASs using RFC 8414"

 

 

s/Please see section Section 5 for further guidance on security
implications./Please see Section 5 for further guidance on security
implications.

 

This sentence sounds strange to me: 

"

   When invoked as described in OAuth 2.0 Bearer Token Usage [RFC6750],

   resource servers receiving a JWT access token MUST validate it in the

   following manner.

"

 

How about: 

"

   Resource servers receiving a JWT access token MUST validate it in the

   following manner.

"

 

Question: If you refer to RFC 6750 and then list the steps are you just
repeating the steps from RFC 6750 or are you augmenting them? 

 

 

You write: 

 

"

If the JWT access token includes authorization claims as described in

   the authorization claims section, the resource server SHOULD use them

   in combination with any other contextual information available to

   determine whether the current call should be authorized or rejected.

"

 

Include a reference to the authorization claims section

 

 

s/ For more

   details on cross-JWT confusion please refer to 2.8 of [RFC8725]./ For
more

   details on cross-JWT confusion please refer to Section 2.8 of [RFC8725].

   

   

You write: 

 

"

   Authorization servers should not rely on the use of different keys

   for signing OpenID Connect ID Tokens and JWT tokens as a method to

   safeguard against the consequences of leaking specific keys.

"

 

The phrase "leaking keys" is probably not the best term to describe what
follows afterwards in the text. 

 

You write:

 

"

The client MUST NOT inspect the content of

   the access token

"

 

This RFC 2119 language is not really enforceable in terms of
interoperability. Maybe you could rephrase a bit. Something like the
following would work:

 

"   

   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. The OAuth 2.0 framework assumes that access
tokens 

   are treated opaque by clients. 

 

   Administrators of authorization servers should also take into account
that 

   the content of an access token is visible to the client. Whenever client

   access to the access token content presents privacy issues for a

   given scenario, the authorization server should take explicit steps

   to prevent it.   

"

 

 

You wrote: 

 

"

 

   In scenarios in which JWT access tokens are accessible to the end

   user, it should be evaluated whether the information can be accessed

   without privacy violations (for example, if an end user would simply

   access his or her own personal information) or if steps must be taken

   to enforce confidentiality.  Possible measures include: encrypting

   the access token, encrypting the sensitive claims, omitting the

   sensitive claims or not using this profile, falling back on opaque

   access tokens.

"

 

The first sentence is a repetition of the previous paragraph. I would
suggest to delete

the first sentence in this paragraph and to move the second sentence to the
previous paragraph. 

 

You wrote: 

 

"

   This profile mandates the presence of the "sub" claim in every JWT

   access token, making it possible for resource servers to rely on that

   information for performing tasks such as correlating incoming

   requests with data stored locally for the authenticated principal.

   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.  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 tht cannot be

   correlated in the event of resource servers collusion.  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.  In turn, the client should obtain a new JWT access

   token for every call to the resource server, to ensure that the

   resource server receives different "sub" and "jti" values at every

   call, thus preventing correlation between distinct requests.

"

 

The above paragraph suggests that there are different levels of privacy.
What you are 

talking about in the text is unlinkability and identification. Ways to deal
with such 

privacy threats are described in Section 6 of RFC 6973. 

 

Hence, I would suggest to slightly rephrase the paragraph to something like:

 

"

   This profile mandates the presence of the "sub" claim in every JWT

   access token, making it possible for resource servers to rely on that

   information for correlating incoming

   requests with data stored locally for the authenticated principal.

   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. The "sub" claim should be 

   populated by the authorization servers according to a privacy impact 

   assessment. 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.  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.  In turn, the client should obtain a new JWT access

   token for every call to the resource server, to ensure that the

   resource server receives different "sub" and "jti" values at every

   call, thus preventing correlation between distinct requests.

"

 

 

Section 7.2

 

s/   Section Section 2.2.3.1 of this specification refers to the

   attributes "roles", "groups", "entitlements" defined in [RFC7643] to

   express authorization information in JWT access tokens.

/   Section 2.2.3.1 of this specification refers to the

   attributes "roles", "groups", "entitlements" defined in [RFC7643] to

   express authorization information in JWT access tokens.

     

  

References

 

RFC 7519 has to be a normative reference: 

 

   [RFC7519]  Jones, M., Bradley, J., and N. Sakimura, "JSON Web Token

              (JWT)", RFC 7519, DOI 10.17487/RFC7519, May 2015,

              <https://www.rfc-editor.org/info/rfc7519>.

          

RFC 7644 is an unused reference: 

 

   [RFC7644]  Hunt, P., Ed., Grizzle, K., Ansari, M., Wahlstroem, E.,

              and C. Mortimore, "System for Cross-domain Identity

              Management: Protocol", RFC 7644, DOI 10.17487/RFC7644,

              September 2015, <https://www.rfc-editor.org/info/rfc7644>.


 

The same is true for RFC 3986: 

 

   [RFC3986]  Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform

              Resource Identifier (URI): Generic Syntax", STD 66,

              RFC 3986, DOI 10.17487/RFC3986, January 2005,

              <https://www.rfc-editor.org/info/rfc3986>.

 

 

Ciao

Hannes

 

IMPORTANT NOTICE: The contents of this email and any attachments are
confidential and may also be privileged. If you are not the intended
recipient, please notify the sender immediately and do not disclose the
contents to any other person, use it for any purpose, or store or copy the
information in any medium. Thank you.