Re: [OAUTH-WG] oauth-access-token-jwt: comments and clarifications

Vittorio Bertocci <vittorio.bertocci@auth0.com> Wed, 14 April 2021 07:18 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 404653A1121 for <oauth@ietfa.amsl.com>; Wed, 14 Apr 2021 00:18:54 -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 RHf8h2IpjZrq for <oauth@ietfa.amsl.com>; Wed, 14 Apr 2021 00:18:49 -0700 (PDT)
Received: from mail-pg1-x52b.google.com (mail-pg1-x52b.google.com [IPv6:2607:f8b0:4864:20::52b]) (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 809DB3A1117 for <oauth@ietf.org>; Wed, 14 Apr 2021 00:18:49 -0700 (PDT)
Received: by mail-pg1-x52b.google.com with SMTP id l76so13763416pga.6 for <oauth@ietf.org>; Wed, 14 Apr 2021 00:18:49 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=auth0.com; s=google; h=from:to:subject:thread-topic:thread-index:date:message-id :references:in-reply-to:accept-language:content-language :mime-version; bh=TT44O72YjBoTNTLMhQoUQqJy8A4obPOqSv2JDiNjE3I=; b=S6ddssb/1agvBeXWMQqhlHFRftE+HOSDMNLF3EJPNhTYzhrMjw4BF/wCziLPJxpz+0 1BlcjJ7riqqvsxZtHSjODSJxq2qiPaWbWQQEre0IDyRerGFkMsrEMWoBdsHNcJktD48D 66fK44yk9lYDBOaeZY5PWMkslRMNSNlC5/lpIDCzXKoI3R61gDOZnQBSOzvflR0vVqWN 7LTr1JZrVuqPHAIqkCYHxM4D5NxAn0Nph9+jU+HoxIho5bsYHTyvN9njn1l9fTT8maND uLaS/pog3t3OqeTClkLFPrLcSLf5pCS9y043LOY4kEDby6X0c9li4g7xCTrmqViKgNRB TrMw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:thread-topic:thread-index:date :message-id:references:in-reply-to:accept-language:content-language :mime-version; bh=TT44O72YjBoTNTLMhQoUQqJy8A4obPOqSv2JDiNjE3I=; b=Uy9wTlrsJROyitpGI3PmpH8sxXk5ADNUY76NHxEr+ZGsE8xuP05unJcJ8ha11Mega6 H+4fuG6uM0QWEBhRlKaNceOpK14YZAMOWLiI1cfPPUXeUUVKD0YbygHiduIiDqkkZXma yiY6xExjkrSKvSmdys08ZKYYnlD+28APLARLKTkwmXfTKxwWIaJbRQ0ZZy2rkWLnliBo L6QQubzcde43LwinW1h6+z1mcuHLZqhnOxUUIu1Bkxsmdvi9Vbu0+qR8Rw18bZvstFXg ULCxhRYugYLanA5PE6qtBRsCvLGt5ldiJOKJ4GKVfI4g67VH7PbXi+9SBrsBI5ZoqHRe YUIw==
X-Gm-Message-State: AOAM533hMmZKPBJBEfcSPUZY05V7Z7RLg84svUbT2SLYmohlP5Hzza+9 2BxBe0V7uJRB9JHIouCOYS7a2A==
X-Google-Smtp-Source: ABdhPJx7MxdoTq/AQfhSbBRLisSFBmZ3dAUEDnAlTKGc5BXPc498hnMny/vCIyB3Hx3F+S0atbCn8w==
X-Received: by 2002:a63:1352:: with SMTP id 18mr34912790pgt.11.1618384727922; Wed, 14 Apr 2021 00:18:47 -0700 (PDT)
Received: from CO6PR18MB4052.namprd18.prod.outlook.com ([2603:1036:301:402a::5]) by smtp.gmail.com with ESMTPSA id pg11sm3768606pjb.53.2021.04.14.00.18.47 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 14 Apr 2021 00:18:47 -0700 (PDT)
From: Vittorio Bertocci <vittorio.bertocci@auth0.com>
To: Roberto Polli <robipolli@gmail.com>, oauth <oauth@ietf.org>
Thread-Topic: [OAUTH-WG] oauth-access-token-jwt: comments and clarifications
Thread-Index: AXdZQnYypLO8gLFSWhSr/r3KNpSwl7+vd+NF
X-MS-Exchange-MessageSentRepresentingType: 1
Date: Wed, 14 Apr 2021 07:18:46 +0000
Message-ID: <CO6PR18MB40528FB106077C3E36C645D6AE4E9@CO6PR18MB4052.namprd18.prod.outlook.com>
References: <CAP9qbHURF22ehJfQ3=8v1X07wueAcBUFG4HUq6KYda8NA+3=nw@mail.gmail.com>
In-Reply-To: <CAP9qbHURF22ehJfQ3=8v1X07wueAcBUFG4HUq6KYda8NA+3=nw@mail.gmail.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-Exchange-Organization-SCL: -1
X-MS-TNEF-Correlator:
X-MS-Exchange-Organization-RecordReviewCfmType: 0
Content-Type: multipart/alternative; boundary="_000_CO6PR18MB40528FB106077C3E36C645D6AE4E9CO6PR18MB4052namp_"
MIME-Version: 1.0
Archived-At: <https://mailarchive.ietf.org/arch/msg/oauth/VLjw4nP1bTKgUMOoMuZFlETgEV0>
Subject: Re: [OAUTH-WG] oauth-access-token-jwt: comments and clarifications
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, 14 Apr 2021 07:18:54 -0000

Hi Roberto,
Thanks for the comments and apologies for the delay. Inline


  *   An example with client_credential grant type would be nice too.
Are you thinking of specific aspects that aren’t sufficiently clear from the text that would be clarified by one example? Unless there’s something specific, at this late stage I’d like to avoid big edits.


  *   + The terms "Collision-Resistant",  is used according to Section 2 of {{JWT}}.
Is the feedback to add the reference to section 2, or to add a dash? The referenced section 4.2 of RFC7519 clarifies the use of the term, hence it seems unnecessary to mention section 2 as well (given that the notion of collision resistance is clear outside of this context too).


  *   - mentioning "none" alg can be redundant. I'd reference all the JWT BCP instead.
Calling out “none” was specifically brought up during discussions as something that is worth calling out. Although we might be formally covered by simply referencing the BCP, forcing the user to resolve a reference and process another large document seems to lose efficacy, clarity and immediacy of the guidance.


  *   Is it worth mentioning the "implicit flow"?
What would you want to highlight of that particular case?


  *   - " ... scope parameter..."  should `scope` be quoted?
That’s’ a good question! Given that scope the parameter and scope the claim appear in the same sentence, I chose to use the quotes for the claim and leave the parameter unquoted to make it easier for the reader to follow (see also the subsequent paragraph). I am inclined to leave it as is and see whether the editors accept it.


  *   ^ otherwise the error returned is ...? Should we reference §4 here?
This was a hotly debated point. The consensus we landed on is enshrined in P4 of Section 5, which we do reference from there. Substantially, establishing clear rules for how to make that match or how the AS should react to it is very hard, hence we explicitly leave handling the details to individual implementations.


  *   which are the delegated scenarios described in RFC7519? Do you refer to "When using an administratively delegated
      namespace" ? It is not clear to a first-reader.
I mean the most classical oauth use cases :) The core scenarios described in RFC7519 are about a resource owner delegating limited access to a third party application, as stated in the abstract and most of the document. The mainstream literature covering oauth uses the term consistently, and the section goes on describing user level attributes that have no direct role in the identity of the client application. I believe the intent of this section should be reasonably clear with someone with some familiarity with oauth, which I’d assume as prerequisite.


  *   - iiuc `jti` is required, the example does not report it.
Great catch! In draft 06 we made both JTI and IAT REQUIRED, but we never updated the sample. Adding both in the upcoming revision. Thank you.


  *   the step about forbidding "none" is limitative WRT JWT BCP 8725
I think the limitation in the case of JWTs used as ATs is justified.
Whereas openid connect’s ID_tokens (also JWTs) can be acquired thru a direct TLS channel between the client and the AS, hence obviating for the need of an explicit signature check, that isn’t usually the case with access tokens- there the requestor (the client) and the intended recipient (the RS) are separate entities. The responsibility of the token validation falls on the RS, which has no direct channel toward the AS (excluding introspection, which would largely make the entire JWT encoding of ATs moot) hence needs a way of validating tokens independently, and a signature is the common practice. Although alternative mechanisms are possible, they are uncommon enough to be safely excluded from an interop profile.

From: OAuth <oauth-bounces@ietf.org> on behalf of Roberto Polli <robipolli@gmail.com>
Date: Friday, April 2, 2021 at 02:55
To: oauth <oauth@ietf.org>
Subject: [OAUTH-WG] oauth-access-token-jwt: comments and clarifications

Hi Vittorio et al,

some considerations on oauth access token jwt follows.
You can see them here too https://docs.google.com/document/d/1XsvBzGvhcY0N6vJNgLx6G1dJ5trvgwYRJA9F_NCakbU/edit

An example with client_credential grant type would be nice too.

My 2¢,
R.

§ 1.2  Terminology

+ The terms "Collision-Resistant",  is used according to Section 2 of {{JWT}}.

§2.1 Header

- mentioning "none" alg can be redundant. I'd reference all the JWT BCP instead.
- I'd add an example header, eg


~~~ example

{

  "typ": "at+jwt",

  "alg": "PS256"

}

~~~


§ 2.2.1 Authentication Information Claims

Is it worth mentioning the "implicit flow"?

§2.2.2 Identity Claims

- use the "Collision-Resistant" definition in {{JWT}}

§2.2.3 Authorization Claims

- " ... scope parameter..."  should `scope` be quoted?
-  "All the individual scope strings in the "scope" claim MUST have meaning for the resources indicated in the "aud" claim."
^ otherwise the error returned is ...? Should we reference §4 here?

§2.2.3.1 Claims for Authorization Outside of Delegation Scenarios
- which are the delegated scenarios described in RFC7519? Do you refer to "When using an administratively delegated
      namespace" ? It is not clear to a first-reader.


§3 Requesting a JWT Access Token
- an example with `client_credential` grant type would be great.
- iiuc `jti` is required, the example does not report it.

§4 Validating JWT Access Tokens

- the step about forbidding "none" is limitative WRT JWT BCP 8725