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

Kristina Yasuda <yasudakristina@gmail.com> Mon, 23 September 2024 21:41 UTC

Return-Path: <yasudakristina@gmail.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 E95AEC1D5C5A for <oauth@ietfa.amsl.com>; Mon, 23 Sep 2024 14:41:08 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.104
X-Spam-Level:
X-Spam-Status: No, score=-2.104 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, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-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=gmail.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 x5Wu8OdIuJLr for <oauth@ietfa.amsl.com>; Mon, 23 Sep 2024 14:41:05 -0700 (PDT)
Received: from mail-yb1-xb36.google.com (mail-yb1-xb36.google.com [IPv6:2607:f8b0:4864:20::b36]) (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 11612C151539 for <oauth@ietf.org>; Mon, 23 Sep 2024 14:41:05 -0700 (PDT)
Received: by mail-yb1-xb36.google.com with SMTP id 3f1490d57ef6-e116d2f5f7fso4385659276.1 for <oauth@ietf.org>; Mon, 23 Sep 2024 14:41:05 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1727127664; x=1727732464; 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=Tm765c0Rz9r+vTwerR+SaOwAkfXpqiHzinBw/qT/gTY=; b=GdWQvq31W36OjrLwQYZZ9g31ZVhAKY4kTtBQQ0UHT7rGLeeYjxpG6a0BW1IyHx2FLE YQ3/s+SAm9F/GNf4M3ocE4h9Dd4tPem+QugvkTOlsm3C+R+UzIa5f3juHpHYDXKvwphf 1TiDwyhzsV8YJQNl1KNdBjPG0K/wRFJ2rRmrcv2/IATzlryiWHqbbuq8THCpM6ipNWH2 tnrjauZ6XO0Wi25Lfnh2bGjWELSo92SeGeYESJS8NgxjZp7HpvrfqrAWgrfCTG1ZXWJB uiQdwtiWa/9nY1Uj3XEBfpw5HKE3Yib68u0gE35T/d55Ky5vlsLjyIJqpujAnwmjj78d J0qw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727127664; x=1727732464; 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=Tm765c0Rz9r+vTwerR+SaOwAkfXpqiHzinBw/qT/gTY=; b=sXcnHCTEG67ajpmzT9igUOPyDb9ISrSjuupMgXJwZZrUIJxB/RuydKpOpxfj8C37T/ szLKdR/NqL3bygo5XkVETZWUBREU9St1esWg0XDpPViSqgzyXbARBz/REtiTcV741P+h WW7Fq4rmnUMxj5M0fE8sUXzFE+NrrCDiQre3+fIVmslBreWwGO3gALJmrWOq8T6ZzVxQ hiDevEVra1rfk1fjwf4yhu7XYJsjd+rB8JZQumM0oeWZkXwvCrpM1v7j8lo/QHQ88WYK fTxHFE0SolHKbgAOWbdOP0P5ObwZUz3W2lIdJUnA8EkJk9ETwGbE3SB8NPNISGU0GlCq aYVw==
X-Forwarded-Encrypted: i=1; AJvYcCXpfdwjCNygGWQSITMoqcuElZfdaNz3dhJ9b7CQZXDz4chm3KcLVibmQZwEd7sEF4Z/oP4xqQ==@ietf.org
X-Gm-Message-State: AOJu0YwnPw0lAPhEJnjjcySbbaLplHxY8nc4Qtckb+zIoIx57UZsbEk+ 3VbRi7Boedntyf2qaGHJbWObyHgYPMpFC+tRNKPMoSHdXYc5vRV7oOzyNDSTP6IprQUM5/ueeZV gjv2E2V4vaCl1wJuHeMku8bPCFlA=
X-Google-Smtp-Source: AGHT+IGynrwycG8YvqS/grgorDlESV9T4+s/HdZk7VsaCeSj/B3baT4L9CNwNBdXpw1SzloZpWlEceK8wO/2k6R2fz8=
X-Received: by 2002:a05:6902:1147:b0:e16:566f:eed5 with SMTP id 3f1490d57ef6-e2497860257mr1027489276.1.1727127664106; Mon, 23 Sep 2024 14:41:04 -0700 (PDT)
MIME-Version: 1.0
References: <CAKoiRubpOptOoZkfG9Ro756VHX-0kOAquspSpXH7ASXvBAeRUQ@mail.gmail.com> <350583BC-5C8B-49BC-9A5B-8E1060EEE0D3@alkaline-solutions.com> <CAKoiRua6SYV5NBDF+eduHztfy+UMYFvLn3fyZeazKQ43usnsNA@mail.gmail.com>
In-Reply-To: <CAKoiRua6SYV5NBDF+eduHztfy+UMYFvLn3fyZeazKQ43usnsNA@mail.gmail.com>
From: Kristina Yasuda <yasudakristina@gmail.com>
Date: Mon, 23 Sep 2024 23:40:53 +0200
Message-ID: <CAFje9PghA3gy38J-j4KxQOjXY1Yq82xooMVpTpNC1U3Wycvx9A@mail.gmail.com>
To: Rohan Mahy <rohan.mahy@gmail.com>
Content-Type: multipart/alternative; boundary="000000000000e6a42f0622d03ed3"
Message-ID-Hash: DZQRFCHIFKJZBQVG5ROP3QMTZXCT3IVG
X-Message-ID-Hash: DZQRFCHIFKJZBQVG5ROP3QMTZXCT3IVG
X-MailFrom: yasudakristina@gmail.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/BjP4vCem39lS7M4Hud5XQkugy_Q>
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>

The reason why section 10.11 recommends JWT type to be defined by the
use-case is because SD-JWT specification is not meant only for one kind of
use-case/architecture. SD-JWT document does not define a stand alone
credential format for issuer-holder-verifier model, SD-JWT VC document is
intended to serve that purpose. Theoretically, SD-JWT could be used with
any other JWTs (such as ID Tokens, Access Tokens, JARM JWTs, etc.) which
have their own typing. So giving SD-JWT construct itself an explicit type
is not very helpful (though still defined for the cases where no
example+sd-jwt media type is defined), and might even become the source of
the confusion if developers start using a type defined in the SD-JWT
document instead of a type defined in documents like SD-JWT VC.

This is why the SD-JWT draft already defined both application/sd-jwt
and +sd-jwt Structured Syntax for use-cases like application/vc+sd-jwt in
SD-JWT VC, and if I am interpreting the thread correctly, sounds like that
is a good balance and is the way to go.

Hope this helps,
Kristina



On Sun, Sep 22, 2024 at 7:40 PM Rohan Mahy <rohan.mahy@gmail.com> wrote:

> But when you *don't* use the public key to secure more than a single type
> of application message (unsurprisingly a very common use case), there is no
> issue. Given that the current document defers to profiles all decisions
> about which validation claims to require, which is a much more serious
> likely security concern, I think a default type should be defined,
> mentioned in security considerations, and its use (or not) can be profiled
> as appropriate.
> Thanks,
> -rohan
>
> On Sun, Sep 22, 2024 at 10:24 AM David Waite <david@alkaline-solutions.com>
> wrote:
>
>> 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 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
>>>
>> _______________________________________________
>> OAuth mailing list -- oauth@ietf.org
>> To unsubscribe send an email to oauth-leave@ietf.org
>>
>>