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

David Waite <david@alkaline-solutions.com> Sun, 22 September 2024 17:24 UTC

Return-Path: <david@alkaline-solutions.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 8D3A2C14F6FE for <oauth@ietfa.amsl.com>; Sun, 22 Sep 2024 10:24:06 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.214
X-Spam-Level:
X-Spam-Status: No, score=-6.214 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, MIME_HTML_ONLY=0.1, MIME_HTML_ONLY_MULTI=0.001, MIME_QP_LONG_LINE=0.001, MPART_ALT_DIFF=0.79, RCVD_IN_DNSWL_HI=-5, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, 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=alkaline-solutions.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 UEumHoJ0MD2X for <oauth@ietfa.amsl.com>; Sun, 22 Sep 2024 10:24:02 -0700 (PDT)
Received: from mail.alkaline-solutions.com (caesium6.alkaline.solutions [157.230.133.164]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-256) server-digest SHA256) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 422AAC16941F for <oauth@ietf.org>; Sun, 22 Sep 2024 10:24:02 -0700 (PDT)
Content-Type: multipart/alternative; boundary="Apple-Mail-ABEB34F7-3535-4896-A60D-100605BE3F35"
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alkaline-solutions.com; s=dkim; t=1727025841; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=i96bdgtKmYnpGn/ClW3OXMYfjHGursY7ucu1hJEZax8=; b=DivT6q4/7a0sC7rDd45WzUU9WTKyAjzUbKKbw2LEJTgS+fUagiL2zgpZ4fnrwR5pkC9G5x N+4xuG6zLJpgdHbZvMMpCrekRsMGVUAoNIDKJCZ/O8OWpGobRtLjYmBk4fLXw6NcSdvXZ8 umPONK3/FNK9Ybjm6HYW4ZpKpbmbMhJoWKxUZ5W+anw0SIpq4iy3Vz+7tGvJ3jOUvceEA8 MmgNphhoyX+4nnUFhsEmlB0lmCeru3G4y0i3ErHJQ28bzCQvOqVqGJp8qpjt4l9TaiSQh3 oyQ11gPnEltFGNkgXk0iLm9P0TO6nccgw/sO84VLG66T9KHPV/qcqJ1uSMhXrQ==
Authentication-Results: mail.alkaline-solutions.com; auth=pass smtp.mailfrom=david@alkaline-solutions.com
Content-Transfer-Encoding: 7bit
From: David Waite <david@alkaline-solutions.com>
Mime-Version: 1.0
Date: Sun, 22 Sep 2024 11:17:48 -0600
Message-Id: <350583BC-5C8B-49BC-9A5B-8E1060EEE0D3@alkaline-solutions.com>
References: <CAKoiRubpOptOoZkfG9Ro756VHX-0kOAquspSpXH7ASXvBAeRUQ@mail.gmail.com>
In-Reply-To: <CAKoiRubpOptOoZkfG9Ro756VHX-0kOAquspSpXH7ASXvBAeRUQ@mail.gmail.com>
To: Rohan Mahy <rohan.mahy@gmail.com>
X-Spamd-Bar: +++++
Message-ID-Hash: VJVEZCFCB6HNLNEG45TA7PRWBKYZT5GN
X-Message-ID-Hash: VJVEZCFCB6HNLNEG45TA7PRWBKYZT5GN
X-MailFrom: david@alkaline-solutions.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: Dick.Hardt@gmail.com, oauth@ietf.org, 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/_SQWxT9oc96zTgMp7m-X0WQCU80>
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>

There are security issues from this however if the public key is used to secure more than a single type of application message - say a message normally used to indicate someone is logging out accidentally being accepted for log-in or as a valid session token on a website. 

In this scenario, you need some way to differentiate the two messages reliably (across many potential interoperable implementations), and making them different media types is the best current practice. 

-DW

On Sep 22, 2024, at 10:52 AM, Rohan Mahy <rohan.mahy@gmail.com> wrote:


Hi,
If someone defines a new profile application/foobar-audit-system and it has sd-jwt, jwt, and sd-cwt versions, it seems perfectly reasonable to have a fine-grained explicit media type application/foobar-audit-system+sd-jwt. That said, there are times when someone just wants an sd-jwt with an unspecified profile. In this second case, it makes more sense to me to also register application/sd-jwt. The implementor should fill in whichever form they are using in the `typ` header.

Thanks,
-rohan

On Sat, Sep 21, 2024 at 12: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 https://www.rfc-editor.org/rfc/rfc8725.html#name-use-explicit-typing" target="_blank" rel="nofollow">recommends using a specific media type suffix in the “typ” values:

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" target="_blank" rel="nofollow"> https://github.com/oauth-wg/oauth-selective-disclosure-jwt/issues/267

- https://github.com/oauth-wg/oauth-selective-disclosure-jwt/issues/327" target="_blank" rel="nofollow"> https://github.com/oauth-wg/oauth-selective-disclosure-jwt/issues/327

- https://github.com/oauth-wg/oauth-selective-disclosure-jwt/issues/345" target="_blank" rel="nofollow"> https://github.com/oauth-wg/oauth-selective-disclosure-jwt/issues/345

 

Those issues don't really address the point.

 

Per https://www.rfc-editor.org/rfc/rfc8725.html#name-use-explicit-typing" target="_blank" rel="nofollow">RFC 8725: JSON Web Token Best Current Practices (rfc-editor.org) -- 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
_______________________________________________
OAuth mailing list -- oauth@ietf.org
To unsubscribe send an email to oauth-leave@ietf.org