[OAUTH-WG] Re: Leading underscores in SD-JWT Claim Names (was SD-JWT architecture feedback)
Rohan Mahy <rohan.mahy@gmail.com> Sun, 22 September 2024 17:01 UTC
Return-Path: <rohan.mahy@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 01512C14F605 for <oauth@ietfa.amsl.com>; Sun, 22 Sep 2024 10:01:55 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -7.104
X-Spam-Level:
X-Spam-Status: No, score=-7.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_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_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 AktqYtXrszY1 for <oauth@ietfa.amsl.com>; Sun, 22 Sep 2024 10:01:51 -0700 (PDT)
Received: from mail-ej1-x631.google.com (mail-ej1-x631.google.com [IPv6:2a00:1450:4864:20::631]) (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 ED944C14F5F2 for <oauth@ietf.org>; Sun, 22 Sep 2024 10:01:50 -0700 (PDT)
Received: by mail-ej1-x631.google.com with SMTP id a640c23a62f3a-a90349aa7e5so524464466b.0 for <oauth@ietf.org>; Sun, 22 Sep 2024 10:01:50 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1727024509; x=1727629309; 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=u/BgRSrc/eKU4wTw8vF3NejZz+5769mKs2pBmSwZ6b4=; b=EGfznxtrCUrn9fwtCus2ooywtirUhO7xOdV9rAzC49A1DX3xJ0xIUtNF8U7/F53iF7 glPPeRsuGWYrcYvFRrVp74PS1/kdZn4zKG2BKXbu863y9ReDZNYWqbpOpP0KzCCC9ASN NWpFWxGknk5cmLVbtAK4qjRiE3zC3ng/XbVPuhiAV6I51C95d+Lf1DeKCcsqqTLjOfsb Mh89Ej0K9TV/LxKoi4jMvBcWqnQHr8IdlQ3HRbRqnHflEjp+sUq5O0OqQX9Zhsxi2g5Q rjCY95e+RldrMzc6oYvVGWJJUDHoqrxJ5a+gstLVavfux8fELhLLL5hb5DgrJkVmz5VG JzLA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727024509; x=1727629309; 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=u/BgRSrc/eKU4wTw8vF3NejZz+5769mKs2pBmSwZ6b4=; b=cYRd2ORZ3ZNbLiivPBFpcBSzrrHWg6Ytnt8S9deRRhC4mdsiS3kWvfAwQMcJEp0Tka nVkStQU1fLfYEF2K4UnJJWC+qYBbyGe/jgPl3z7UBh1DeV+O+9Z9qIkxDIx9oRjEmwbU xZnczp1a6nnDd93x7+vQTBY7lMBJ0q6auW1DBb6/GbpUG5Bss6tXhCvvhiBz55kc7GWU 8orQ75t8yheVm95WfeJUyfG9maVKjLdQXhkHQ98LVfxUwAHybwA3jWq2sYtvCoFgXZ1U 0QbCB2ZAIUoANxER7JPJLmjS+fCqOwZ6H1GvtoPpZfVXrxKODplYjpFICRUjYtaWyCiq 8KJA==
X-Forwarded-Encrypted: i=1; AJvYcCWk2caCZv1LYdS8Gu9CQc3u8tbfgNbyLRs2lWgpz5VkejxIDWgQRFNh1F+J33y3qOvldr/qEg==@ietf.org
X-Gm-Message-State: AOJu0YxiSjvb/K/4pdB4JS2aH2OdjLLPTNxusfySOx04hcxEx3uPdRAh UKRTWajs3g1yLLeZh7CY6SUpoqAOXEWb4IoxuwttGn4M7XXhqdlmLtvvrvt3lV304rLW215S5Wj SxLvwr65RMGXTsnmNXSABj80PxUofbg==
X-Google-Smtp-Source: AGHT+IEOhi92/ObCUssc5sgBFc1UJFvMYYyi5B90Av4TMnnw6HVRHYuYy0zoWYXXSTVncubT8cLJYRz0wk6fggf9Uvk=
X-Received: by 2002:a17:907:9341:b0:a8d:439d:5c42 with SMTP id a640c23a62f3a-a90d5671afamr1002733066b.13.1727024509325; Sun, 22 Sep 2024 10:01:49 -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> <SJ0PR02MB74392337DDF75B31B1915EC5B76D2@SJ0PR02MB7439.namprd02.prod.outlook.com> <CAD9ie-sE7VGPT9w0yy60hX=JOABi5BJdreR71VZHe3idfCi5_g@mail.gmail.com>
In-Reply-To: <CAD9ie-sE7VGPT9w0yy60hX=JOABi5BJdreR71VZHe3idfCi5_g@mail.gmail.com>
From: Rohan Mahy <rohan.mahy@gmail.com>
Date: Sun, 22 Sep 2024 10:01:37 -0700
Message-ID: <CAKoiRuapxTBmViJNuXaVDcLoMPGhYMGw2x0AB8gUq_N6weY=-w@mail.gmail.com>
To: Dick.Hardt@gmail.com
Content-Type: multipart/alternative; boundary="0000000000006598360622b83a4e"
Message-ID-Hash: RKP3YJ45DTQ6HATWCTYYXHI7FSTCHAZY
X-Message-ID-Hash: RKP3YJ45DTQ6HATWCTYYXHI7FSTCHAZY
X-MailFrom: rohan.mahy@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: "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: Leading underscores in SD-JWT Claim Names (was SD-JWT architecture feedback)
List-Id: OAUTH WG <oauth.ietf.org>
Archived-At: <https://mailarchive.ietf.org/arch/msg/oauth/QZlOZyK1xhGrGHR4C5O4P7-cou0>
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>
Dick, I would like to point out that `_sd` won't just be present at the top level. It could be present arbitrarily deep in the object hierarchy. There is an excellent chance that some hierarchy of JWTs already has an `sd` claim (claims deeper than the top level are not currently covered by an IANA registry), or a `digests` claim for that matter. Using an underscore (meaning it is a claim about a claim), I think we are much more solid ground with respect to a claim that can appear almost anywhere in a JWT. Regarding `_sd_hash`, I can see your point about this being something that feels like a (protected) header. As an implementer, I don't really care either way. It is the same amount of work either way. Thanks, -rohan On Sun, Sep 22, 2024 at 7:16 AM Dick Hardt <dick.hardt@gmail.com> wrote: > I have a few points here as well: > > 1) the hash algorithm should be in the header. It is not a claim. It > describes how to process the rest of the text in the token. People parse > the header to learn what to do with the rest of the string. That was a key > decision in this format. > > 2) underscores typically signal that something is an internal / off limits > value. The digests are a claim in the payload that are expected to be > operated on. > > 3) related to that, calling the digests "digests" would be more meaningful > that "_sd" -- as that is what they are > > Just because there are other claims with _ does not mean they are > intuitive to an implementer in this case. Daniel did not rationalize the > use of underscore because other claims that are meta data used an > underscore. > > Per my other note, I'm just giving my feedback as a community member. Zero > interest in winning an argument. > > On Sat, Sep 21, 2024 at 9:06 PM Michael Jones <michael_b_jones@hotmail.com> > wrote: > >> SD-JWT is following an existing OAuth (and OpenID) convention by >> including an underscore prefix in the names of claims about claims. You’ll >> find that _claim_names and _claim_sources are registered at >> https://www.iana.org/assignments/jwt/jwt.xhtml, which are both claims >> about claims, rather than claims whose values are used in the usual way. >> These are currently the only claims with leading underscores registered. >> >> >> >> Therefore, I believe SD-JWT is on solid ground creating and registering >> the names _sd and _sd_alg as other claims about claims. >> >> >> >> -- 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 >> >> >> >> … >> >> >> >> >> >> *Claim Names* >> >> Why do the claims start with '_'? Why not just 'sd' and 'sda'? Why is >> '_sd_alg' in the payload and not in the header? >> >> While the underscore doesn't officially have any special meaning, adding >> it reduces the chance for collisions with existing claims and makes the >> SD-JWT-related claims sort nicely. All SD-related claims are in the >> payload, that's why we put _sd_alg there as well. >> >> Do you have data that shows it will reduce collisions? I have seen many >> implementations that created their own claims that start with _ to reduce >> collisions with the same rationale! >> >> >> >> There is an IANA registry for claim names to avoid collisions. >> >> >> >> The _ reminds me of internal C variables that others were not supposed to >> use, but eventually did. >> >> >> >> _sd_alg is NOT a claim. It is a signal for which algorithm to use and >> should be in the header. >> >> >> >> I'm unclear on the sorting advantage. They would sort together if they >> started with sd as well. >> >> >> > _______________________________________________ > OAuth mailing list -- oauth@ietf.org > To unsubscribe send an email to oauth-leave@ietf.org >
- [OAUTH-WG] SD-JWT architecture feedback Dick Hardt
- [OAUTH-WG] Re: SD-JWT architecture feedback Warren Parad
- [OAUTH-WG] Re: SD-JWT architecture feedback Daniel Fett
- [OAUTH-WG] Re: SD-JWT architecture feedback Dick Hardt
- [OAUTH-WG] Leading underscores in SD-JWT Claim Na… Michael Jones
- [OAUTH-WG] Explicit typing of SD-JWTs (was SD-JWT… Michael Jones
- [OAUTH-WG] Re: Leading underscores in SD-JWT Clai… Dick Hardt
- [OAUTH-WG] Re: Explicit typing of SD-JWTs (was SD… Dick Hardt
- [OAUTH-WG] Re: Leading underscores in SD-JWT Clai… Rohan Mahy
- [OAUTH-WG] Re: Explicit typing of SD-JWTs (was SD… David Waite
- [OAUTH-WG] Re: SD-JWT architecture feedback Rohan Mahy
- [OAUTH-WG] Re: Explicit typing of SD-JWTs (was SD… Rohan Mahy
- [OAUTH-WG] Re: SD-JWT architecture feedback Dick Hardt
- [OAUTH-WG] Re: Leading underscores in SD-JWT Clai… Brian Campbell
- [OAUTH-WG] Array Disclosure (was SD-JWT architect… Denis
- [OAUTH-WG] Re: Explicit typing of SD-JWTs (was SD… Kristina Yasuda
- [OAUTH-WG] Re: SD-JWT architecture feedback Brian Campbell
- [OAUTH-WG] Re: SD-JWT architecture feedback Dick Hardt
- [OAUTH-WG] Re: Explicit typing of SD-JWTs (was SD… Brian Campbell
- [OAUTH-WG] Re: Explicit typing of SD-JWTs (was SD… Dick Hardt
- [OAUTH-WG] Re: Explicit typing of SD-JWTs (was SD… Brian Campbell
- [OAUTH-WG] Re: Explicit typing of SD-JWTs (was SD… Dick Hardt
- [OAUTH-WG] Re: Explicit typing of SD-JWTs (was SD… Rohan Mahy
- [OAUTH-WG] Re: Explicit typing of SD-JWTs (was SD… Brian Campbell
- [OAUTH-WG] Re: Explicit typing of SD-JWTs (was SD… Dick Hardt