[OAUTH-WG] Re: Explicit typing of SD-JWTs (was SD-JWT architecture feedback)

Brian Campbell <bcampbell@pingidentity.com> Tue, 24 September 2024 16:17 UTC

Return-Path: <bcampbell@pingidentity.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 55BB4C1E7247 for <oauth@ietfa.amsl.com>; Tue, 24 Sep 2024 09:17:33 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -7.103
X-Spam-Level:
X-Spam-Status: No, score=-7.103 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, RCVD_IN_DNSWL_HI=-5, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, SPF_NONE=0.001, T_SCC_BODY_TEXT_LINE=-0.01, URIBL_BLOCKED=0.001, URIBL_DBL_BLOCKED_OPENDNS=0.001, URIBL_ZEN_BLOCKED_OPENDNS=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=pingidentity.com
Received: from mail.ietf.org ([50.223.129.194]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id VvZ6AYqPYz6E for <oauth@ietfa.amsl.com>; Tue, 24 Sep 2024 09:17:29 -0700 (PDT)
Received: from mail-ot1-x32c.google.com (mail-ot1-x32c.google.com [IPv6:2607:f8b0:4864:20::32c]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (P-256) server-digest SHA256) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 1BE49C1D4A92 for <oauth@ietf.org>; Tue, 24 Sep 2024 09:17:29 -0700 (PDT)
Received: by mail-ot1-x32c.google.com with SMTP id 46e09a7af769-71100987d1cso3387615a34.2 for <oauth@ietf.org>; Tue, 24 Sep 2024 09:17:29 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pingidentity.com; s=google; t=1727194648; x=1727799448; darn=ietf.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=AbyWbU7wZB6mB3hNYR9pGXhHqPtvDQn9KMi9D8ABeNA=; b=TPA04+0Pa55rkgeZM8j1n5QvVHLiMdOslNfYqqwuoI+gT6NruixIBBP7S4MCj/rRc9 Q8V2P75IM3DjaU8jXLIS1Hoz7Z+emtRxNOTWMHjlNO9cxFF+s/bTieh3V00MuIU6ujAb x+2MX464+X22SRWhU3mIpDD/rLfTuL3Z/TxMxxW7VfYvREsNMg+HeoXPd9XFkIF0hquH UPthxMrdmcAoS8QfamvSViCkh9HsSSXghWL9wnbbaWpvawMt7WvT+WbbbYviPXXZszU6 HKTb1nsFVTUmkONEMu73NbHs4F9juI6HXzfVxNacL7wA9hEq3L+DFS9JShW4VMC3VSe/ RzxQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727194648; x=1727799448; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=AbyWbU7wZB6mB3hNYR9pGXhHqPtvDQn9KMi9D8ABeNA=; b=GM/UqZPNju+r9t6N3CG7EduTJhv2oLiSDdX94faXj4ExXgF8wQowNJ6EAnYnvLFqa9 Wl14KxCor3arS2e2Fc+Oicl8z5Kvs7R8H8Z52kwq1HQt71xy6tT64ge0ViEgv31wesBA wj/2f2iHtusZRl0vy3lBrtvWOrR5j+klYzNYlwoseFOvqxgSRh2xLCeGNXPg6U0a3eEp 58po5o9XlPcAabRkjQ97bQsrihZrIoNn2qAJHr2PEjhOIlKauVn3YTa7FPVdz3S/d4TQ QTqv+LTCiUMaUu+PC2uZ269lxER5uBu5rWB/2yynE8/fQgYc//pg6+IszY+jDJ/pVyU/ JbmQ==
X-Forwarded-Encrypted: i=1; AJvYcCXrR3LML4bbmliB01FsqkXVxbBh0xcyMDj8iFg8kwWbaPk5Klvn74TFUko2sLSaSoRxqpYN6g==@ietf.org
X-Gm-Message-State: AOJu0Yx1/NXLtrCskKsHGp9jJ8/7KRm++5QSaata/cMPpmGIG57xiqlG mFsaIRHKsB8rDAYehItsJAaA8SH2Vnqw3z78JiiXJoqFMYmbnAclxIiNIKQL2UmL+jlK9+20apK 9sBcPnBgtPpz5yGTZsy7w77ZaeOTWvJI4Ao+JDFm2yq5wJ6tQC94w3G4IQTxidQjeXA/H5WYoy2 IDdUbh6neI9A==
X-Google-Smtp-Source: AGHT+IHRjUNbbcLia8usxw+eoF3K6G25jct9hyiNHYoN48sL8F772tSip+BXe/tWMB45eWGppOAmeGG1pKtgulV0dmM=
X-Received: by 2002:a05:6830:3156:b0:713:7e2d:225a with SMTP id 46e09a7af769-7139246623amr10305607a34.22.1727194647766; Tue, 24 Sep 2024 09:17:27 -0700 (PDT)
MIME-Version: 1.0
References: <CAD9ie-s9kricU8_VBBucQMob-n1jWN5xHd5Ymck=biUWqpH9yQ@mail.gmail.com> <e64eb21d-1ef4-4352-9c74-ffbb853ce3da@danielfett.de> <CAD9ie-t9jLMG5aROCR-EOuCYh19F2r67-C0Puw2OF4GEcvBc2g@mail.gmail.com> <SJ0PR02MB7439E7A8C62588FB6BBABA97B76D2@SJ0PR02MB7439.namprd02.prod.outlook.com> <CAD9ie-tOsd3wM6mXNFWqd-UNMG-4GaMCiZQ7H6Xw_5JNUrGQPA@mail.gmail.com>
In-Reply-To: <CAD9ie-tOsd3wM6mXNFWqd-UNMG-4GaMCiZQ7H6Xw_5JNUrGQPA@mail.gmail.com>
From: Brian Campbell <bcampbell@pingidentity.com>
Date: Tue, 24 Sep 2024 10:17:01 -0600
Message-ID: <CA+k3eCRJbTA6qcKzK0xAQA2Xv2jVFHyPb=pVnpoJTy0sMXCJog@mail.gmail.com>
To: Dick.Hardt@gmail.com
Content-Type: multipart/alternative; boundary="00000000000070f7da0622dfd7b5"
Message-ID-Hash: 7WA3YGUFZFNU3K2IGDK3DYCDICZKV35B
X-Message-ID-Hash: 7WA3YGUFZFNU3K2IGDK3DYCDICZKV35B
X-MailFrom: bcampbell@pingidentity.com
X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-oauth.ietf.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header
CC: "oauth@ietf.org" <oauth@ietf.org>, "kristina@sfc.keio.ac.jp" <kristina@sfc.keio.ac.jp>
X-Mailman-Version: 3.3.9rc4
Precedence: list
Subject: [OAUTH-WG] Re: Explicit typing of SD-JWTs (was SD-JWT architecture feedback)
List-Id: OAUTH WG <oauth.ietf.org>
Archived-At: <https://mailarchive.ietf.org/arch/msg/oauth/ovA6vGstS4X9n9zUYT5uw9bNEHU>
List-Archive: <https://mailarchive.ietf.org/arch/browse/oauth>
List-Help: <mailto:oauth-request@ietf.org?subject=help>
List-Owner: <mailto:oauth-owner@ietf.org>
List-Post: <mailto:oauth@ietf.org>
List-Subscribe: <mailto:oauth-join@ietf.org>
List-Unsubscribe: <mailto:oauth-leave@ietf.org>

I must admit that I'm finding it difficult to fully grasp the points you're
making on this topic.. As with the other topics, there has been extensive
discussion about typing and media types[1]. And, while I have my own
reservations about using something inside a thing to say what the thing is
and the ascension of that questionable mechanism to "best" practice[2], the
SD-JWT document explicitly cites and follows the guidance on explicit
typing[3] from the JWT BCP that bears your name as an author[3']. The
citing of that very section in asking "Why leave the typing in the header
to be determined by the application (10.11), and not just be 'sd-jwt' and
be REQUIRED"[4] seems incongruent and leads me to wonder if maybe there's
been some misunderstanding and/or miscommunication somewhere in all this.

The document does plan to request registration of an "application/sd-jwt"
media type to be used wherever media types might be used "indicate that the
content is an SD-JWT." As such, one could certainly use "typ":"sd-jwt" in a
SD-JWT header. But I don't see the utility in doing so and feel it would be
a throwback to the now largely seen as flawed suggestion in JWT that
"typ":"JWT" be used to say that the JWT is a JWT.

[1] a sampling of such discussions that I think have been referenced
previously but are relevant nonetheless:
https://github.com/oauth-wg/oauth-selective-disclosure-jwt/issues/267
https://github.com/oauth-wg/oauth-selective-disclosure-jwt/issues/327

[2] one small diatribe on the topic
https://github.com/oauth-wg/oauth-selective-disclosure-jwt/issues/327#issuecomment-1736438782

[3] The Explicit Typing section in SD-JWT (10.11)
https://datatracker.ietf.org/doc/html/draft-ietf-oauth-selective-disclosure-jwt-12#section-10.11
<https://datatracker.ietf.org/doc/html/draft-ietf-oauth-selective-disclosure-jwt#name-explicit-typing>

[3'] RFC 8725 aka BCP 225 aka JSON Web Token Best Current Practices
https://datatracker.ietf.org/doc/rfc8725/

[4] SD-JWT architecture feedback received several days after the close of
WGLC
https://mailarchive.ietf.org/arch/msg/oauth/412IiUprR9YbXNfEGfSXVVx_pzk/

[5] Media Type Registration in the draft
https://datatracker.ietf.org/doc/html/draft-ietf-oauth-selective-disclosure-jwt-12#section-13.2

[6] the "typ" (Type) Header Parameter in JWT
https://datatracker.ietf.org/doc/html/rfc7519#section-5.1

On Sun, Sep 22, 2024 at 8:15 AM Dick Hardt <dick.hardt@gmail.com> wrote:

> I am trying to make a few points. My reference to the BCP was on the
> recommendation to do explicit typing. I'm suggesting that the sd-jwt
> document state that include "typ" is a requirement, and to be explicit in
> what that value should be.
>
> I would suggest that value be "sd-jwt"
>
> The "application+" mechanism was already deployed when we wrote the BCP --
> too late to change that. But sd-jwt is a new token format and can learn
> from implementation challenges in the past.
>
>
>
> On Sat, Sep 21, 2024 at 9:17 PM Michael Jones <michael_b_jones@hotmail.com>
> wrote:
>
>> Actually, the JWT BCP (which we were both authors of) does not recommend
>> using a single media type.  Rather, it recommends using a specific media
>> type suffix in the “typ” values
>> <https://www.rfc-editor.org/rfc/rfc8725.html#name-use-explicit-typing>:
>>
>> When explicit typing is employed for a JWT, it is *RECOMMENDED* that a
>> media type name of the format "application/example+jwt" be used, where
>> "example" is replaced by the identifier for the specific kind of JWT.
>>
>>
>>
>> SD-JWT is doing the same thing, recommending the use of the media type
>> suffix “+sd-jwt”.
>>
>>
>>
>> This enables more fine-grained explicit typing.  For instance, when doing
>> explicit typing for an SD-JWT in the Example use case, the “typ” value
>> would be “example+sd-jwt”.  This can then be distinguished from an SD-JWT
>> for the Other use case, which would use the “typ” value “other+sd-jwt” –
>> meeting the goal of explicit typing.
>>
>>
>>
>>                                                                 -- Mike
>>
>>
>>
>> *From:* Dick Hardt <dick.hardt@gmail.com>
>> *Sent:* Saturday, September 21, 2024 9:16 AM
>> *To:* Daniel Fett <mail@danielfett.de>
>> *Cc:* oauth@ietf.org; kristina@sfc.keio.ac.jp
>> *Subject:* [OAUTH-WG] Re: SD-JWT architecture feedback
>>
>>
>>
>> …
>>
>>
>>
>> *Explicit Typing*
>>
>> Why leave the typing in the header to be determined by the application
>> (10.11), and not just be 'sd-jwt' and be REQUIRED?
>>
>> We had extensive discussions around typing, please refer to the following
>> issues:
>>
>> - https://github.com/oauth-wg/oauth-selective-disclosure-jwt/issues/267
>>
>> - https://github.com/oauth-wg/oauth-selective-disclosure-jwt/issues/327
>>
>> - https://github.com/oauth-wg/oauth-selective-disclosure-jwt/issues/345
>>
>>
>>
>> Those issues don't really address the point.
>>
>>
>>
>> Per RFC 8725: JSON Web Token Best Current Practices (rfc-editor.org)
>> <https://www.rfc-editor.org/rfc/rfc8725.html#name-use-explicit-typing> --
>> the best practice would be to have a single type that would allow a library
>> to know it is an SD-JWT. If additional context is needed, perhaps that
>> should be a different header property?
>>
> _______________________________________________
> OAuth mailing list -- oauth@ietf.org
> To unsubscribe send an email to oauth-leave@ietf.org
>

-- 
_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._