[OAUTH-WG] Fwd: AD Review of draft-ietf-oauth-jwt-bcp

Eric Rescorla <ekr@rtfm.com> Sat, 22 December 2018 14:43 UTC

Return-Path: <ekr@rtfm.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 AC323128766 for <oauth@ietfa.amsl.com>; Sat, 22 Dec 2018 06:43:09 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.899
X-Spam-Level:
X-Spam-Status: No, score=-1.899 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_MED=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=rtfm-com.20150623.gappssmtp.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 oJrc2A-KvAlt for <oauth@ietfa.amsl.com>; Sat, 22 Dec 2018 06:43:07 -0800 (PST)
Received: from mail-lj1-x231.google.com (mail-lj1-x231.google.com [IPv6:2a00:1450:4864:20::231]) (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 672F112875B for <oauth@ietf.org>; Sat, 22 Dec 2018 06:43:06 -0800 (PST)
Received: by mail-lj1-x231.google.com with SMTP id x85-v6so7220374ljb.2 for <oauth@ietf.org>; Sat, 22 Dec 2018 06:43:06 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rtfm-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=vLUsQBxRc1CexLXhvWWyOLaD5xqBFHg0BUFbeaZUyZ4=; b=lSwGsljR0vPtVLjkAYw1vEdjJdkQphiGR0wHCSiBXVC61VmIhURvzd9UuuIVB2I3y0 5pHFg6s6NLR8ZAD5PZPfqHFarU+gsF6CNUK6uT8yVq7ITZaWQncNB/igYgCEMRWM8iS6 Dg12UitlxEnE+ZaVj8aNgoI/x1m8+btBpQx2GTrCxnyQ7H9uJNDnBF+hdZ3eBaQQ8Ggq F31T9oIuQ5vgeaB83ezA+e0V7x/P4B6vH6XJM+5gspNZACmWiuk+LwMo0+N6uxveWw1d ex+H05a9T7LcHWqDyrFFM/ErpO3aU239pLW0Zz0YkzCFNQLfEhCJx/cvZkynW+jNbzXt G4Mg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=vLUsQBxRc1CexLXhvWWyOLaD5xqBFHg0BUFbeaZUyZ4=; b=A0YZcl770jYH1NWmzqnYqhnjv4/PnHpaspNotl/2euGAukcRyQLMsYdcDLC8yn3HB1 nIOru5+tdu3exdiBNkzYgOfanaiqL3pgF1tClwmNZe2uh4WOcZVMAGrIFAW5MpiMEgZi cBrVVKjouuMWKoFd0zaxi8suFNSJsoMmVcr9Eig4ExdsMPEvjFcwji3X/bamBmsgM25C vio+eunaKJRhnV23uHhS3bf/HRiO4CTD2fEBrL6V4CKtYTuy5rzErEntWDwS2WL9BdSO O2tXgK2bjds+5B9/pqY4WJsrOFedDItk+NYD0Lt/l9XbzcfjF4RfG0zsnkZuF3VDsuzp Lf4g==
X-Gm-Message-State: AJcUukcgVxL/vMdsQXIrxXkxyXvpw5MM//6UagTX1A/sEanIEDS9w6cp NwXzp+j1LoPtCdZQDD3c+emw9YN1+B5WiBnYb4NGdimyLzc=
X-Google-Smtp-Source: ALg8bN7TIAOViQE8/MjpAAh6O8R3VP1uKK7t8/kAQIvJvKVMdeV6KhaxCyAjF+7EjFyjahynw2BdRKKnz8M3S49WW9o=
X-Received: by 2002:a2e:1552:: with SMTP id 18-v6mr4027176ljv.68.1545489784213; Sat, 22 Dec 2018 06:43:04 -0800 (PST)
MIME-Version: 1.0
References: <CABcZeBOwbN9-Yjoshc-NW7Px_c5RkVQg_8P3dHpZnRszNuJtQg@mail.gmail.com>
In-Reply-To: <CABcZeBOwbN9-Yjoshc-NW7Px_c5RkVQg_8P3dHpZnRszNuJtQg@mail.gmail.com>
From: Eric Rescorla <ekr@rtfm.com>
Date: Sat, 22 Dec 2018 06:42:27 -0800
Message-ID: <CABcZeBPHdQFY-CoWnuqwrwh7ERptDFHBZ4SkwUoLgwGEL3pajw@mail.gmail.com>
To: oauth <oauth@ietf.org>
Content-Type: multipart/alternative; boundary="000000000000979ff4057d9d6101"
Archived-At: <https://mailarchive.ietf.org/arch/msg/oauth/00h_DrQZEV_1HGab0lxY6N5bJh8>
Subject: [OAUTH-WG] Fwd: AD Review of draft-ietf-oauth-jwt-bcp
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: Sat, 22 Dec 2018 14:43:12 -0000

CCing the WG because I was wrong about the aliases.

---------- Forwarded message ---------
From: Eric Rescorla <ekr@rtfm.com>
Date: Sun, Aug 26, 2018 at 2:02 PM
Subject: AD Review of draft-ietf-oauth-jwt-bcp
To: oauth <oauth@ietf.org>


Rich version of this review at:
https://mozphab-ietf.devsvcdev.mozaws.net/D4649


COMMENTS
S 1.2.
>   1.2.  Conventions used in this document
>
>      The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
>      "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and
>      "OPTIONAL" in this document are to be interpreted as described in
>      [RFC2119].

You will want to cite 8174 here.


S 2.6.
>
>   2.6.  Substitution Attacks
>
>      There are attacks in which one recipient will have a JWT intended for
>      it and attempt to use it at a different recipient that it was not
>      intended for.  If not caught, these attacks can result in the

I don't understand this attack. Can you go into more detail?


S 3.2.
>      Therefore, applications MUST only allow the use of cryptographically
>      current algorithms that meet the security requirements of the
>      application.  This set will vary over time as new algorithms are
>      introduced and existing algorithms are deprecated due to discovered
>      cryptographic weaknesses.  Applications must therefore be designed to
>      enable cryptographic agility.

Is this must normative?


S 3.2.
>      may be no need to apply another layer of cryptographic protections to
>      the JWT.  In such cases, the use of the "none" algorithm can be
>      perfectly acceptable.  JWTs using "none" are often used in
>      application contexts in which the content is optionally signed; then
>      the URL-safe claims representation and processing can be the same in
>      both the signed and unsigned cases.

I think you probably need to have a clearer "don't use none by
default" statement here.


S 3.4.
>      ECDH-ES ephemeral public key (epk) inputs should be validated
>      according to the recipient's chosen elliptic curve.  For the NIST
>      prime-order curves P-256, P-384 and P-521, validation MUST be
>      performed according to Section 5.6.2.3.4 "ECC Partial Public-Key
>      Validation Routine" of NIST Special Publication 800-56A revision 3
>      [nist-sp-800-56a-r3].

Is there an X25519 specification for JWE? If so, you should probably
specify the appropriate checks.


S 3.5.
>   3.5.  Ensure Cryptographic Keys have Sufficient Entropy
>
>      The Key Entropy and Random Values advice in Section 10.1 of [RFC7515]
>      and the Password Considerations in Section 8.8 of [RFC7518] MUST be
>      followed.  In particular, human-memorizable passwords MUST NOT be
>      directly used as the key to a keyed-MAC algorithm such as "HS256".

If you can't use them "directly" than how should you use them? Do you
want to say anything about password hashing (argon, etc.)?


S 3.12.
>         of JWTs.
>
>      Given the broad diversity of JWT usage and applications, the best
>      combination of types, required claims, values, header parameters, key
>      usages, and issuers to differentiate among different kinds of JWTs
>      will, in general, be application specific.

I get that this is the state we find ourselves in, but it seems like
it's unfortunate. This might be a good time to re-emphasize the
recommendation for explicit types in 3.11.