Re: [OAUTH-WG] [jose] preventing confusion of one kind of JWT for another in JWT BCP

Dick Hardt <> Thu, 27 July 2017 21:29 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id 5F1431321BB; Thu, 27 Jul 2017 14:29:37 -0700 (PDT)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -1.998
X-Spam-Status: No, score=-1.998 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: (amavisd-new); dkim=pass (2048-bit key)
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id q-xh4Gj3Qq9n; Thu, 27 Jul 2017 14:29:34 -0700 (PDT)
Received: from ( [IPv6:2607:f8b0:400d:c0d::234]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by (Postfix) with ESMTPS id 0158D1321BD; Thu, 27 Jul 2017 14:29:33 -0700 (PDT)
Received: by with SMTP id p3so68181167qtg.2; Thu, 27 Jul 2017 14:29:33 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=XSTLI0ZY66yudmGmJZcDkLZ735Q2jjVHp5LbBwYYvWo=; b=UpO8xZzuHo4vtbTfiN2K+TSoXSCin+2JqXkt++jbzaXsaXdWIE7R95wCj+/myOK4Uc nd0/8VH4+lFuWFBQlSvp7/ltcsHxVqJbDGffESRh5P4gVMk+U6mCwAqR5dbNvl27Irmw fHv4xh5VNifsi4TbRyvmh58NgeVqD2QWqE5Og7yjwQxQyXnX1BnZV03Rej/kHD7DKzWY YN6wWriizYFk+1vtObex5LLELxRUEr+WZH/uDcJIulQc+0Y+Vukbb9HmgJWXgheFrLK4 dApngr1FDMXOCh675WWeIn8cBfwhTeQGV1eXLnvmr8J+nBb6Zy23KFgTvqAdKLFy1MJE yOYw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=XSTLI0ZY66yudmGmJZcDkLZ735Q2jjVHp5LbBwYYvWo=; b=Y+oz7a7J3F8EYIJycLS8R5Kz9udUoULHJ4dMHPXP292E6PDzOscK3SBR+c6F3IQvxl MhLCbdxUG2FjGLa8mVE82dat69KMDEtExq4KzrphANn9O4v5HzpMlVHV6tvB1bwmu0SX Cdt2dpU5vCXT3YpAMONyGj82gVlMhc56tO4xWgm6EjDOwcw//14JYjPHJRuK8rYBzw0D xX61wSKDxNBH8CGAMmIm8KKgrHS/Zbcqd12B7R0U8MONTBLEZ09KWWZ7ZUMCvgQa2B7h zAh/yubROlGPOS+cs1pZAWzwTea05xBIhT4KdAnpe3WNScx7QRyYfhF3TVKiZirOkZkk ntYQ==
X-Gm-Message-State: AIVw112qzOLPcvgAfBNe4ubX3Pvzk1d4UU4Gq7jVWWClk14jOu4Kg1mq 3K/9d1gLUH73IxAbDPrSCPW+D1sGLQ==
X-Received: by with SMTP id q28mr8355802qtf.49.1501190973101; Thu, 27 Jul 2017 14:29:33 -0700 (PDT)
MIME-Version: 1.0
Received: by with HTTP; Thu, 27 Jul 2017 14:29:09 -0700 (PDT)
In-Reply-To: <>
References: <>
From: Dick Hardt <>
Date: Thu, 27 Jul 2017 22:29:09 +0100
Message-ID: <>
To: Brian Campbell <>
Cc: oauth <>, "" <>
Content-Type: multipart/alternative; boundary="001a1146e496b11e36055553428c"
Archived-At: <>
Subject: Re: [OAUTH-WG] [jose] preventing confusion of one kind of JWT for another in JWT BCP
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: OAUTH WG <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-Subscribe: <>, <>
X-List-Received-Date: Thu, 27 Jul 2017 21:29:37 -0000

Brian: I did not think that 'crit' processing is required in JWT

We have two goals:

Preventing new JWT profiles from being confused with older JWTs, which
'typ' solves (as does your proposal of 'crit' and 'p', but requires more

Preventing existing JWT implementations from being confused with new JWT
profiles. 'crit' can solve that for JOSE JWTs, but not other JWTs.

On Thu, Jul 27, 2017 at 7:49 PM, Brian Campbell <>

> During the first WG meeting last week
> <> I asked if use of
> the JOSE "crit" (Critical) Header Parameter had been considered as a
> recommendation for preventing confusion of one kind of JWT for another.
> Time was running short in the meeting so there wasn't much discussion and
> it was requested that I take the question to the list. And so here on the
> list is that.
> Section 3.9
> <>
> of the JWT BCP draft now recommends explicit typing using the "typ" JWS/JWE
> header parameter but does concede that 'the use of explicit typing may not
> achieve disambiguation from existing kinds of JWTs, as the validation rules
> for existing kinds JWTs often do not use the "typ" header parameter
> value.'  And the recommendations for how to use the Type Header Parameter
> in JWT <> strongly suggest
> that it's not currently being used for any validation.
> Alternatively using the JWS/JWE "crit" (Critical) Header Parameter
> <> to signal the
> type/intent/profile/application of a JWT could achieve disambiguation
> even in validation of existing kinds of JWTs. The critical header lists
> other headers which must be understood and processed by the receiver and
> that the JWS/JWE is invalid if those listed aren't understood. So a new
> type/profile of JWT that uses the "crit" header would produce JWTs that
> would be rejected even by existing applications of JWT validation (that
> actually implement "crit" properly anyway).
> The JWT BCP could suggest the use of "crit" in conjunction with a
> profile/application/type specific header. Or it could provide a bit more of
> a framework like defining a registering a new JOSE header "p" (strawman of
> p as a very short name for profile) and create a registry for its values. A
> JWT header using that approach might look like the following where the
> value 1 is registered as some cool new JWT profile/application. The
> consumer of such a JWT would have to understand and process the "p" header,
> which would mean checking that it had the value expected.
>      {
>       "alg":"ES256",
>       "crit":["p"],
>       "p":1
>      }
> A JOSE compliant JWT validator would reject such a JWT even for an OAuth
> access token or OIDC id_token because the "p" header isn't known or
> understood but is marked as critical.
> To me, that seems like an approach to preventing confusion that has more
> teeth than the "typ" header. Which is why I asked about it last week and am
> now bringing it to the list.
> *CONFIDENTIALITY NOTICE: This email may contain confidential and
> privileged material for the sole use of the intended recipient(s). Any
> review, use, distribution or disclosure by others is strictly prohibited.
> If you have received this communication in error, please notify the sender
> immediately by e-mail and delete the message and any file attachments from
> your computer. Thank you.*
> _______________________________________________
> jose mailing list

Subscribe to the HARDTWARE <> mail list to learn about
projects I am working on!