[OAUTH-WG] Re: WGLC for Token Status List

Paul Bastian <paul.bastian@posteo.de> Thu, 06 February 2025 08:10 UTC

Return-Path: <paul.bastian@posteo.de>
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 6BAA5C1E7228 for <oauth@ietfa.amsl.com>; Thu, 6 Feb 2025 00:10:06 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.101
X-Spam-Level:
X-Spam-Status: No, score=-2.101 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_BLOCKED=0.001, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=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_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=posteo.de
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 vUf7Xb6jL-Yt for <oauth@ietfa.amsl.com>; Thu, 6 Feb 2025 00:10:01 -0800 (PST)
Received: from mout01.posteo.de (mout01.posteo.de [185.67.36.65]) (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 A09ECC1E643E for <oauth@ietf.org>; Thu, 6 Feb 2025 00:10:00 -0800 (PST)
Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id A9C15240027 for <oauth@ietf.org>; Thu, 6 Feb 2025 09:09:58 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.de; s=2017; t=1738829398; bh=1+qmZZKoke5dslnUJi34TcCg+sFGAMFs2CSSq5YXN6g=; h=Content-Type:Message-ID:Date:MIME-Version:Subject:To:From:From; b=Vb4IjFO0k7Vr30LY3ctSDd14BsbQd5J1EDpWIvlcAq67FBPSyP+Ai+EsUwE3XIhhg RoBGeIVRFxseU+uhTkBDgrPLGkGTCXqwpzuc7cFvSVZKTEQv06OfLwx6UkAZKm+4u3 nRgIxgdU3bBhqsFiGSVacEdwUYd+kub7p8fjpMUShTjcpQyvWkEQhNFcQnVYwRDarN 0amOuXxGRaditIA6mlWveR9FGMaZZ2RhvZreJaMgVgor+BP6+dW48LVrVnNW2+00T3 G1u/7gGe9zUmL8oLDFpr9xjmO6t4Sz9D7mAEq9SERsTDLOGJM+tSXwwLRA2Q1UMlx5 bOlk+rlFT3low==
Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4YpVBt16Sfz6tvd for <oauth@ietf.org>; Thu, 6 Feb 2025 09:09:58 +0100 (CET)
Content-Type: multipart/alternative; boundary="------------7pOV0trGpJ95fGKlQwvuZUyj"
Message-ID: <2952fd2b-8653-49d9-aec2-2c482678ea4d@posteo.de>
Date: Thu, 06 Feb 2025 08:09:57 +0000
MIME-Version: 1.0
To: oauth@ietf.org
References: <CADNypP_kmt2PdOJoUa+TNpYHYbfdyv+j2pteSaHsrPk4oxdqFw@mail.gmail.com> <CAKoiRuadWywURt0BuXb3yLU1Mo-nq95WGHov0dbghr2W4ND9Vw@mail.gmail.com>
Content-Language: en-US
From: Paul Bastian <paul.bastian@posteo.de>
In-Reply-To: <CAKoiRuadWywURt0BuXb3yLU1Mo-nq95WGHov0dbghr2W4ND9Vw@mail.gmail.com>
Message-ID-Hash: HT6UKZA2D4C4WUSTLE3EJORSPD267SCC
X-Message-ID-Hash: HT6UKZA2D4C4WUSTLE3EJORSPD267SCC
X-MailFrom: paul.bastian@posteo.de
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
X-Mailman-Version: 3.3.9rc6
Precedence: list
Subject: [OAUTH-WG] Re: WGLC for Token Status List
List-Id: OAUTH WG <oauth.ietf.org>
Archived-At: <https://mailarchive.ietf.org/arch/msg/oauth/kN-cGgsMTDIJ46M_bWGZwlLbfaY>
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>

Hi Rohan, thanks for your feedback. Answers are inline:

On 06.02.25 02:21, Rohan Mahy wrote:
> Hi,
> I support the overall goals of this document. I do *not* think the 
> document was ready for WGLC; at minimum there are still plenty of TBDs 
> and TODOs in the text. Below are some comments:
We do not have any TODOs in the text. We have TBD in the text for values 
that will be defined by IANA registry which is standard procedure in 
other drafts as well.
>
> 1. I would prefer we make the document standards track instead of 
> informational.
This is correct, this draft has always been planned for the standards 
track, we will fix the metadata to accompany for that.
>
> 2. You have to read through to section 6.2 to see how a verifier 
> determines the index of a token it receives in the status value array. 
> Please add one sentence in the Introduction saying that the index is 
> in the referenced token. You could even update the diagram to reflect 
> this.
This in incorrect, the introduction currently contains the following 
text: "Each Referenced Token is allocated an index during issuance that 
represents its position within this bit array. The value of the bit(s) 
at this index corresponds to the Referenced Token's status." We like the 
other idea, we will investigate the idea to add this to the diagram.
>
> 3. The document uses status_list (JSON object) and StatusList (CBOR 
> map) to refer to the map, but Status List seems to be used to refer to 
> both the compressed byte string (in Section 5) and the uncompressed 
> byte array of status values (in Section 4 step 2, and Section 4.1 2nd 
> sentence).
This is correct, we will separate, the parts of section 4 that talk 
about the the uncompressed byte array into its own subsection and not 
use the wording Status List for this. Otherwise, through out the rest of 
the document, Status List refers to the compressed byte array as defined 
in the terminology.
>
> 4. CRLs (Certificate Revocation Lists) are a list of the serial 
> numbers of every invalidated certificate (with a reason code). While a 
> compressed 1 or 2 bit status per token tends to be very compact per 
> issued token, it would be useful for the draft to show an analysis of 
> what percentage of issued tokens would need to be invalid before a 
> status list would be smaller than a CRL-like structure that only 
> references invalid indexes in a (possibly compressed) ordered list 
> (assuming randomly distributed invalidations).

I have not seen performance or comparative measures like this in many 
other drafts, we have made analysis and performance measures for our 
presentations at IEFT, for example here: 
https://docs.google.com/presentation/d/1m59OC8uKM4nZ14aH2TM9r2mxEhOiP-G5uqzAZ7oOAUk/edit#slide=id.g2318b641e56_0_23 


The comparison with the CRL depends on a bunch of parameters and 
assumptions, so it's not that easy.

What does the working group think about including performance metrics 
itself in the draft?

>
> 5. There is no discussion of maximum or recommended limits to the size 
> of a Status List. Starting ambitiously, idx is a JSON Number, so we 
> should probably follow the recommendation in 
> https://datatracker.ietf.org/doc/html/rfc8259#section-6 and say it 
> MUST NOT be larger than (2^53) - 1, but a 1-bit status list with that 
> many indexes would be 10TB with > 10:1 compression. I think the 
> document needs to define a reasonable maximum size, and could allow 
> profiles to make that smaller.
I haven't seen an guidance like this in CRL draft either and I believe 
that our assumptions about reasonable sizes in 2025 will not hold in 
2035, so I'm hesitant to add this kind of guidance.
>
> 6. I think it is a mistake to compress the entire status_list (JSON 
> object) or StatusList (CBOR map). Instead it would be better to 
> compress just the status value array (the "lst" field).
>
>   * Naive implementations might try to decompress the entire
>     object/map to get the bit field before trying to read the array.
>   * If you make the "lst" field an uncompressed byte string in JSON,
>     it will need to be base64url encoded *before* you compress it.
>     Then the status_list object would need to be base64url encoded
>     again. That's wasteful and accomplishes nothing as far as I can tell.
>   * Because JSON maps and CBOR maps are encoded differently,
>     compressing the object/map will make it hard to use a status list
>     across token encoding environments. If only the contents of the
>     "lst" field was compressed, it would allow an issuer to generate
>     JWT/CWT pairs with the same index and use one status list between
>     them. (both would be invalidated together).
>
I think this is a misunderstanding. The Status List from Section 4 is 
already compressed in the Step 3. Section 4.1 about Status List in JSON 
Format has an "lst" field that then contains the compressed byte array, 
which must however be base64-encoded as JSON does not support. byte 
array. Section 4.2 about Status List in CBOR Format has an "lst" field 
that then contains the compressed byte array directly. I don't see how 
we can be any more space-efficient than this. Therefore, JSON and CBOR 
structures would contain the same Status List byte array.

Furthermore, we have test vectors in the Appendix, so that 
implementations can verify correctness.

> 7. I am surprised by some details of the CBOR encoding:
>
>   * Traditionally, CWT maps have integer keys for comment values. Why
>     not replace "bits" with 1, and "lst" with 2?
>   * The document registers CWT claim keys 65534 and 65535. Why not ask
>     for unused numbers in the 24-256 range?
>   * It wasn't immediately clear from the text that the status list is
>     a bstr encoding of the compressed serialized map. If we implement
>     my recommendation in #6, this problem goes away.
>
- We have talked to people from the CBOR world and apparently this is 
what people do today, e.g. in the ISO mdoc world, but we are open for 
discussions here.
- We have talked to Mike Jones about this, who is one of the designated 
experts for CWT and this was his recommendation
- We have the text: "|lst|: REQUIRED. Byte string (Major Type 2) that 
contains the Status List as specified in Section 4 
<https://drafts.oauth.net/draft-ietf-oauth-status-list/draft-ietf-oauth-status-list.html#status-list>." 
which clearly references bstr.

> 8. There should be a CDDL snippet for the CBOR. I would be happy to 
> provide one once points 6 and 7 are addressed.
If CDDL is requested and helps the understanding, then we can add this 
to the draft.
>
> 9. I think it will be important for implementers to have some advice 
> on constructing a logical scope for Referenced Tokens to be 
> interoperable, so that issuers have good practices for recycling 
> indexes. For example if all the tokens with the same status list URL 
> have roughly the same duration of validity, cycling through URL paths 
> would eventually allow reuse after all previously referenced tokens 
> had expired.
> Is it ok to generate a Status List for 100 tokens, then generate a new 
> Status List with the same "referenced token scope" that covers 200 
> tokens (including the first 100 tokens)? If so, that would be good to say.
>
We have some guidance here: 
https://drafts.oauth.net/draft-ietf-oauth-status-list/draft-ietf-oauth-status-list.html#name-referenced-token-lifecycle 
saying "The lifetime of a Status List Token depends on the lifetime of 
its Referenced Tokens. Once all Referenced Tokens are expired, the 
Issuer may stop serving the Status List Token." We did not want to 
encourage re-usage of indices, as this may introduce security issues.

> 10. NIT: Section 6.3 refers to status_list but I think you mean StatusList
The CWT status structure says: "Each data item in the |Status| CBOR 
structure comprises a key-value pair, where the key must be a CBOR text 
string (Major Type 3) specifying the identifier of the status mechanism 
and the corresponding value defines its contents. This specification 
defines the following data items:", so indeed "status_list" refers to a 
CBOR text string.
>
> Thanks,
> -rohan

Thanks for your feedback. Best regards,

Paul+Christian


>
> On Thu, Jan 2, 2025 at 5:53 AM Rifaat Shekh-Yusef 
> <rifaat.s.ietf@gmail.com> wrote:
>
>     All,
>
>     This is a WG Last Call for the *Token Status List *document.
>     https://datatracker.ietf.org/doc/draft-ietf-oauth-status-list/
>
>     Please, review this document and reply on the mailing list if you
>     have any comments or concerns, by *Jan 17th*.
>     Note that this document will be discussed during the OAuth WG
>     *interim* on *Jan 13th*.
>
>     Regards,
>       Rifaat & Hannes
>
>     _______________________________________________
>     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 tooauth-leave@ietf.org