[OAUTH-WG] SD-JWT architecture feedback

Dick Hardt <dick.hardt@gmail.com> Sat, 21 September 2024 04:42 UTC

Return-Path: <dick.hardt@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 61BF4C15198F for <oauth@ietfa.amsl.com>; Fri, 20 Sep 2024 21:42:35 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.107
X-Spam-Level:
X-Spam-Status: No, score=-2.107 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_NONE=-0.0001, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01] 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 d3P_D21YO0L3 for <oauth@ietfa.amsl.com>; Fri, 20 Sep 2024 21:42:34 -0700 (PDT)
Received: from mail-yb1-xb2d.google.com (mail-yb1-xb2d.google.com [IPv6:2607:f8b0:4864:20::b2d]) (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 E7863C151989 for <oauth@ietf.org>; Fri, 20 Sep 2024 21:42:34 -0700 (PDT)
Received: by mail-yb1-xb2d.google.com with SMTP id 3f1490d57ef6-e22531db3baso1214429276.3 for <oauth@ietf.org>; Fri, 20 Sep 2024 21:42:34 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1726893754; x=1727498554; darn=ietf.org; h=cc:to:subject:message-id:date:from:reply-to:mime-version:from:to:cc :subject:date:message-id:reply-to; bh=6ihSKqV8asJcyuPTO2HmcNF8RJfgGx9gH+SKcXKfZfk=; b=EXx8MenoMzasVXdCGcrn/e8+ehI2bM1JrU8oKGtA9EhTH2jbdmPFO5Ah8K8K0yAoWf krE9OcUqkG9VfIeOX4EoF+uw4jBDwBtCqjlyfwfUcAjLE9h6gJhSCcyhalOwMeBlgjj8 ImcFotfuK+Y/A00S4eJAKVqWQ8qsLJHiI6PaVIJNZGxg9NoZmM2PgJGiWS82nqt07I5d FZJIJlBfxpIK02B3iOpgQmH4WuMsa6LHzZfnPxEvesfi1uFiany2tzh0GrpNFhiVtc6e QOuoC0l9cIoWz2RGaZrZSMgVLlKtZZEHyw9o56XK0BEoly/Gbdb0TGm95s/nWpYNR5Tk gsiQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726893754; x=1727498554; h=cc:to:subject:message-id:date:from:reply-to:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=6ihSKqV8asJcyuPTO2HmcNF8RJfgGx9gH+SKcXKfZfk=; b=sJwxtSSlx4PEa4fEikj/LJQDGYssaKxj4JnIflt0YsijULiMhcg2GfXqdrhNglOuCD 2u6JKvRT+bsYsvoCVQArecZWFI3ulirrWoVDTk2lW7qPZWORCyrfrUTQUcgVPBDDgvQO oxK0Bc8JYWorm6WdxJ3z8waw9hn+Uwm5xleOGHFywA4pgHcSbJIhivgNeR8Xo2FG7nD0 1XWi8d+XPZPWFBuNOo2eROJvlWvzRY8/VmTIcLQMTocTjv0tiEi9KQlxa0q3It2b4OTF drraMJ8dm9++nu+N/j/7uZntYx8+5hNsXXkQcvGZ0PZ+tHdg4GbXUs/A5pcEi7Wdmxt7 NpNA==
X-Gm-Message-State: AOJu0YyBtMeTx260rQpxKkFZn8xrrzoDsAOEKggJVSO1DHDE3ONsl6f0 U4KfFOpJ7exEGjwWcRQLwJAZrOXnQAkkZW+10eDgrBZ4i6Vg3n+NtbqwBrklDTqMRcukASyYUm5 cXBqzZjSr6PDf6cVAhYubmQ5eR+3G1+A7B90=
X-Google-Smtp-Source: AGHT+IGETcJUXqiAg4BqYRfRcYFV01B7YSW5rEROuxJRJfzgSUCKqAJy74QJWZPo1dqVru1f6sBFyKorYCev+TlsrJY=
X-Received: by 2002:a05:6902:1547:b0:e1d:a175:c9eb with SMTP id 3f1490d57ef6-e2250cca1d9mr4780054276.36.1726893753888; Fri, 20 Sep 2024 21:42:33 -0700 (PDT)
MIME-Version: 1.0
From: Dick Hardt <dick.hardt@gmail.com>
Date: Sat, 21 Sep 2024 06:41:58 +0200
Message-ID: <CAD9ie-s9kricU8_VBBucQMob-n1jWN5xHd5Ymck=biUWqpH9yQ@mail.gmail.com>
To: oauth@ietf.org
Content-Type: multipart/alternative; boundary="000000000000c3f9c1062299c86f"
Message-ID-Hash: OO4X5DADRGMM2VT5KEQMCZXXNRF3IKYZ
X-Message-ID-Hash: OO4X5DADRGMM2VT5KEQMCZXXNRF3IKYZ
X-MailFrom: dick.hardt@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: kristina@sfc.keio.ac.jp
X-Mailman-Version: 3.3.9rc4
Precedence: list
Reply-To: Dick.Hardt@gmail.com
Subject: [OAUTH-WG] SD-JWT architecture feedback
List-Id: OAUTH WG <oauth.ietf.org>
Archived-At: <https://mailarchive.ietf.org/arch/msg/oauth/412IiUprR9YbXNfEGfSXVVx_pzk>
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>

Hey Brian, Kristina, Daniel

I appreciate you have been working on this for a while, and this feedback
is last minute, and people have already working code that works with it --
so this is unlikely to be welcome feedback -- but in the spirit of wanting
what is best long term, here it is.

*Token Separators*
It is not clear to me why the disclosures are an arbitrary array of '~'
separated items. It seems very odd to me as a developer. Why not have a 4th
'.' separated string that is base64 URL encoded JSON array of the
disclosures? The header includes the 'typ' so that a parser knows what all
the following components are and how many there are.

*Disclosure Format*
On the format of the disclosures, the implicit semantics of the order of
items in an array is a throwback to data formats of the last century. We
are using JSON, let's have it be an object where we name each item.

*Array Disclosure*
Is this really needed? The only example I saw was for multiple
citizenships. Would the issuer of an SD-JWT that contains a subject's
citizenship not be the country who they are a citizen of? Why would another
country be authoritative that the subject is a citizen of another country?
In the example, it is hard to imagine a verifier trusting the US to say
someone is a DE citizen, or vice versa. The array of age claims in example
A.3 does not need the non intuitive '...' array mechanism. Taking this out
would simplify implementations.

*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?

*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?