jiebi/CodeConvo huggingface dataset:
Code change:
Disclosures outside the document.  Disclosures can be omitted without breaking the signature, and modifying them can be detected. Selectively disclosable claims can be individual object properties <del> (key-value pairs) or array elements. </del> <ins> (name-value pairs) or array elements. </ins> Each digest value ensures the integrity of, and maps to, the respective Disclosure.  Digest values are calculated using a hash

Related discussion:
text: This seems problematic at least, that the “same” credential could be interpreted differently by different parties. A more sophisticated version of this “attack” illustrates the need for collision resistance in the hash function, not just preimage resistance as stated in the draft (and already raised by me in [1]). If the hash is not CR then a malicious Issuer can find colliding [salt, key, value] triplets that have the same hash value, give one to the Holder and then later claim that they actually signed the other one. (This is not just theoretical, similar attacks have been used to create fraudulent SSL certificates [2]). This also indicates that the security strength of the signature scheme is bounded by the collision resistance of the hash function - e.g. there’s little point using ES512 with SHA-256, for example. Probably the security considerations should suggest matching hash functions to signature algorithms. Furthermore, preimage resistance is not a sufficient property to ensure confidentiality of withheld claims. Preimage resistance holds if the attacker cannot recover the exact input that produced a given hash value, but it doesn’t preclude the attacker being able to recover partial information about that value. For example, consider the hash function H(x) = SHA-256(x) is concatenation). This hash function when applied to SD-JWT is preimage resistant (assuming the salt is strong), but leaks the last 10 bytes of the claim value. The appropriate security definition for SD-JWT is some form of cryptographic commitment scheme [3], with the associated security notions of hiding and binding. Honestly, I still think that this WG is not an appropriate venue for this kind of novel (in the OAuth world) cryptographic scheme and external review by experts would be helpful. All of this suggests that simply referring the the IANA hash function registry is not sufficient, as probably most of the entries there are not actually suitable for use in SD-JWT for one reason or another. Some other comments: The original JWT RFC [4] has this to say about the order of encryption and signatures: signatures over encrypted text are not considered valid in many jurisdictions. Presumably the same argument holds about signatures over blinded values? That should perhaps be noted at least. The draft repeatedly says that a symmetric signature algorithm (MAC) must not be used. Perhaps I’m missing something here, but why not?
Code change:
Disclosures outside the document.  Disclosures can be omitted without breaking the signature, and modifying them can be detected. Selectively disclosable claims can be individual object properties <del> (key-value pairs) or array elements. </del> <ins> (name-value pairs) or array elements. </ins> Each digest value ensures the integrity of, and maps to, the respective Disclosure.  Digest values are calculated using a hash

Related discussion:
text: It doesn’t seem like it compromises any of the intended security properties. Use of a symmetric MAC may also limit the privacy impacts on users as it provides some measure of deniability (similar to that mentioned in section 12.1), as any Verifier in possession of the secret key could also have produced any claims that are subsequently leaked, allowing the user to deny that they were produced by the supposed Issuer. (This deniability property holds even without subsequent leaking of old signing keys). The security considerations about salt entropy should probably reference RFC 4086 (BCP 106) or something more up to date (maybe RFC 8937 too). I think section 11.8 about selectively disclosing contraints on the use of a SD-JWT is completely inadequate and will almost certainly lead to attacks. Requiring Verifiers to hard-wire the set of constraints they enforce is likely to be damaging to future evolution of the standard as new security constraints are added. It would seem especially problematic to allow selective disclosure of a “cnf” claim for example, and yet nothing forbids it and the history of JWT usage suggests that anything not forbidden will at some point happen (and even some things that are forbidden). I suggest establishing a registry of claims that are really usage constraints and forbidding issuers from allowing anything in that list to be selectively-disclosed. (There are perhaps some exceptions here, e.g. “aud” is a constraint in this sense but it probably does make sense for it to be selectively disclosed, but only on a per-array-item basis: that way a Holder cannot remove the constraint entirely but can still hide other “recipients”). On a related note, section 11.6 says that to avoid this kind of attack, Verifiers MUST NOT take into account whether a Key Binding is present or not to decide whether to require Key Binding. This seems to preclude Verifiers that can handle different levels of access with different security requirements and is the sort of requirement that makes it near impossible to incrementally evolve tougher security requirements over time. It effectively becomes an all-or-nothing switch that will have the likely effect of making the use of Key Binding less attractive. Security hardening should be the easy path if we want to see it adopted. Best wishes, Neil [1]: URL [2]: URL [3]: URL
Code change:
Wherever End-User data is stored, it represents a potential target for an attacker.  This target can be of particularly high value when the data is signed by a trusted authority like an official national <del> identity service.  For example, in OpenID Connect, signed ID Tokens can be stored by Relying Parties.  In the case of SD-JWT, Holders have to store SD-JWTs, and Issuers and Verifiers may decide to do so as well. </del> <ins> identity service.  For example, in OpenID Connect OpenID.Core, signed ID Tokens can be stored by Relying Parties.  In the case of SD-JWT, Holders have to store SD-JWTs, and Issuers and Verifiers may decide to do so as well. </ins> Not surprisingly, a leak of such data risks revealing private data of End-Users to third parties.  Signed End-User data, the authenticity

Related discussion:
text: see URL and URL
oh wow... I apparently didn't confirm the merge so this is still pending. I really thought it was done and published -11. Sigh. Sorry. Will look at doing a -12 soonish.
see
Thanks for these additional updates. Michael B. Jones, Sir, I have endeavored to reply inline below to the remaining comments and/or addressing them with further updates to the source of the draft, which will appear in the -11 revision that hopefully will be published soon. I have the honor to be Your Obedient Servant, B. Cam remain consistent with that. But will expand the text defining Holder to better accommodate its use throughout the document. possible" line of reasoning, the use of the words "array elements" to mean array elements is the most concise and meaningful terminology the document authors were able to conceive of to convey the concept of elements in arrays. I believe it would be a disservice to readers to embellish the wording. a different misunderstanding at play here... and Terminology", sufficient and appropriate for the mention of a piece of terminology established by convention in a previously published RFC. 5.3. DPoP/RFC9449 is actually a complete sentence and this draft will be fixed so that it will also have a complete sentence. 5.3.2. the cnf claim the way to enable key binding with that increased interoperability as a primary aim. factually incorrect. The current wording might not be as descriptive as you'd like but it is correct. In what way does the encoding make it not a SHA-256 Hash? Asking rhetorically. opinion, that supports the assertion that any of that is "best practice". There are two occurrences of "[like or such as] nbf, iat, and exp" in the draft. In URL they are mentioned in the context of "claims carrying time information", which is what they all are. In URL they are mentioned in the context of claims to check regarding the validity of the SD-JWT. The "nbf" claim, as you likely know from (I think?) having written the text in RFC7519 , has normative requirements around when the "JWT MUST NOT be accepted for processing." As such, it is entirely appropriate in the context of mentioning some validity-controlling claims.
Code change:
Wherever End-User data is stored, it represents a potential target for an attacker.  This target can be of particularly high value when the data is signed by a trusted authority like an official national <del> identity service.  For example, in OpenID Connect, signed ID Tokens can be stored by Relying Parties.  In the case of SD-JWT, Holders have to store SD-JWTs, and Issuers and Verifiers may decide to do so as well. </del> <ins> identity service.  For example, in OpenID Connect OpenID.Core, signed ID Tokens can be stored by Relying Parties.  In the case of SD-JWT, Holders have to store SD-JWTs, and Issuers and Verifiers may decide to do so as well. </ins> Not surprisingly, a leak of such data risks revealing private data of End-Users to third parties.  Signed End-User data, the authenticity

Related discussion:
text: The only normative requirement on the "iat" claim , however, is about the syntax of its value. Rejecting a token based on the "iat" value can be required by a specific profile of JWT, such as was done in DPoP, but is otherwise something that is at the discretion of an implementation/deployment and something that has apparently been the cause of some interoperability problems . Arguably "iat" shouldn't be in that list. 10.7. belong in this list. place of content omitted from the main payload. The ellipsis is often used in place of content omitted from the context at hand. CONFIDENTIALITY NOTICE: This email may contain confidential and privileged material for the sole use of the intended recipient(s). Any review, use, distribution or disclosure by others is strictly prohibited. If you have received this communication in error, please notify the sender immediately by e-mail and delete the message and any file attachments from your computer. Thank you.
Thanks very much for addressing the majority of my comments and for replying to the rest of them. I’m replying inline to the remaining ones that I believe should still be addressed. I’ve deleted the ones from this thread that I’m satisfied with the responses to. Best wishes, -- Mike From: Kristina Yasuda Sent: Wednesday, August 14, 2024 6:07 AM To: Brian Campbell Cc: Michael Jones ; EMAIL Subject: Re: [OAUTH-WG] Re: Review of draft-ietf-oauth-selective-disclosure-jwt-10 Thank you very much, Mike. Majority of your comments have been incorporated in this PR URL, which has been merged. Below, in bold, please find explanations for the points that have not been reflected. We appreciate your review. Best, Kristina Introduction: The usage of “Holder” in “used a number of times by the user (the "Holder" of the JWT)” inconsistent with its usage in the definitions, which defines “Holder” as being “an entity”. The usage here in the introduction makes the holder into a person rather than an entity. Please adjust the language here to not confuse the user who utilizes the holder with the holder itself. -> Holder is defined as an entity and a person can be considered an entity.
Code change:
Wherever End-User data is stored, it represents a potential target for an attacker.  This target can be of particularly high value when the data is signed by a trusted authority like an official national <del> identity service.  For example, in OpenID Connect, signed ID Tokens can be stored by Relying Parties.  In the case of SD-JWT, Holders have to store SD-JWTs, and Issuers and Verifiers may decide to do so as well. </del> <ins> identity service.  For example, in OpenID Connect OpenID.Core, signed ID Tokens can be stored by Relying Parties.  In the case of SD-JWT, Holders have to store SD-JWTs, and Issuers and Verifiers may decide to do so as well. </ins> Not surprisingly, a leak of such data risks revealing private data of End-Users to third parties.  Signed End-User data, the authenticity

Related discussion:
text: We also have a phrase "the user (the "Holder" of the JWT)" in the introduction. Hence the editors consider the current wording to be sufficient. Since “Holder” is sometimes used in the spec to refer to the Wallet software and sometimes used to refer to the person using the Wallet, I believe that readers would be well served to make a clear terminological distinction between the two. Introduction: In “"Claims" here refers to both object properties (name-value pairs) as well as array elements.” change “array elements” to “elements in arrays that are the values of name/value pairs” (or something like that). Without saying what the array elements are, readers will be confused about what’s being referred to. I’d apply this clarification in 4.1. SD-JWT and Disclosures and other applicable locations as well. -> There is a misunderstanding. the intended meaning here is exactly what the text says: "each element in the array (regardless if it is a name/value pair or not, an array element as a string counts too) can be selectively disclosed". The fact that a misunderstanding is possible and occurred leads me to believe that a clarification of this phrase is needed. Readers won’t necessarily know where the “array elements” being referred to occur in the data structures. That was certainly my experience, hence my initial comment. Possible wording that’s simpler than my initial proposed wording could be “array elements occurring within Claim values”. Or clarify it with different wording of your choosing. Feature Summary: In “A format for enabling selective disclosure in nested JSON data structures, supporting selectively disclosable object properties (name-value pairs) and array elements”, consider expanding “array elements” in the same manner as the preceding comment to make the meaning more evident. -> same as above. There is a misunderstanding. the intended meaning here is exactly what the text says: "each element in the array (regardless if it is a name/value pair or not, an array element as a string counts too) can be selectively disclosed". Same response as my previous comment. 1.2.
Code change:
Wherever End-User data is stored, it represents a potential target for an attacker.  This target can be of particularly high value when the data is signed by a trusted authority like an official national <del> identity service.  For example, in OpenID Connect, signed ID Tokens can be stored by Relying Parties.  In the case of SD-JWT, Holders have to store SD-JWTs, and Issuers and Verifiers may decide to do so as well. </del> <ins> identity service.  For example, in OpenID Connect OpenID.Core, signed ID Tokens can be stored by Relying Parties.  In the case of SD-JWT, Holders have to store SD-JWTs, and Issuers and Verifiers may decide to do so as well. </ins> Not surprisingly, a leak of such data risks revealing private data of End-Users to third parties.  Signed End-User data, the authenticity

Related discussion:
text: Conventions and Terminology: I suggest moving the “base64url” definition to the Terms and Definitions section and use a parallel structure to that at URL Specifically, say “The “base64url” term denotes the URL-safe base64 encoding without padding defined in Section 2 of [RFC7515].” Then introduce the rest of the definitions with the phrase “These terms are defined by this specification:” as is done in RFC 7519. The current presentation is fairly jarring. -> Current text already points to Section 2 of RFC7515. The editors consider the current definition sufficient and clear enough. Yes, the definition is clear, but it’s in the wrong place. Definitions belong in the Terms and Definitions section. The current location leaves it strangely hang in a different section by itself, separate from the other definitions in the spec. Key Binding JWT: Change “MUST NOT be none.” to “It MUST NOT be "none".”. -> Changed to “It MUST NOT be .”. it is exactly the same wording as in DPoP RFC. The current wording is a sentence fragment – not a complete sentence. The fact that that error slipped through in DPoP isn’t a reason not to correct it here. 5.3.2. Validating the Key Binding JWT: In “if the SD-JWT contains a cnf value with a jwk member, the Verifier could parse the provided JWK and use it to verify the Key Binding JWT.”, change “could” to “MUST”. Make this normative to increase interoperability! -> the sentence you point at is an example, so we cannot add a normative statement here. We changed "should" to "would" to reflect the intent behind the suggestion. OK. Please address this then by adding this normative sentence at an appropriate place in the specification. “When the SD-JWT contains a cnf value with a jwk member, this key MUST be used to very the Key Binding JWT.” 6.1. Issuance: There are many places from here on where the label “SHA-256 Hash” is used, for instance “SHA-256 Hash: jsu9yVulwQQlhFlM3JlzMaSFzglhQG0DpfayQwLUK4”.
Code change:
Wherever End-User data is stored, it represents a potential target for an attacker.  This target can be of particularly high value when the data is signed by a trusted authority like an official national <del> identity service.  For example, in OpenID Connect, signed ID Tokens can be stored by Relying Parties.  In the case of SD-JWT, Holders have to store SD-JWTs, and Issuers and Verifiers may decide to do so as well. </del> <ins> identity service.  For example, in OpenID Connect OpenID.Core, signed ID Tokens can be stored by Relying Parties.  In the case of SD-JWT, Holders have to store SD-JWTs, and Issuers and Verifiers may decide to do so as well. </ins> Not surprisingly, a leak of such data risks revealing private data of End-Users to third parties.  Signed End-User data, the authenticity

Related discussion:
text: Change all of these to “Base64url-Encoded SHA-256 Hash” for correctness. -> Editors consider it to be sufficiently clear from the specification text that it is a base64url-endoded hash. This would also require changes to the tooling and might unintentionally make the examples harder to read. The fact remains that the current wording is factually incorrect and therefore needs to be corrected. If this can be done by updating the tooling, that’s actually good, since it means that it will be consistently corrected everywhere the error occurs. Verification of the SD-JWT: Delete “nbf” from “claims such as nbf, iat, and exp” and everywhere else in the spec, other than in 10.7. Selectively-Disclosable Validity Claims, where both “iat” and “nbf” should be listed, as described in my comment there. “iat” (Issued At) is a standard validity claim in JWT tokens (for instance, ID Tokens), whereas “nbf” (Not Before) is rarely used, since it is only useful when future-dating tokens, which is rare. -> "nbf" is used merely as an example here. the fact that it might be used rarely does not mean it cannot be used as an example, since it is a registered claim in JWT RFC. Sure, it’s an example, but the examples should nonetheless reflect best practices. Please delete “nbf” here. 10.7. Selectively-Disclosable Validity Claims: Add “iat (Issued At) to the validity claims list before “nbf”, and change “nbf (Not Before)” to “nbf (Not Before) (if present)”. “iat” (Issued At) is a standard validity claim in JWT tokens (for instance, ID Tokens), whereas “nbf” (Not Before) is rarely used, since it is only useful when future-dating tokens, which is rare. Change all uses of “nbf” to “iat” elsewhere in the spec. -> same as above. "nbf" is used merely as an example here. the fact that it might be used rarely does not mean it cannot be used as an example, since it is a registered claim in JWT RFC. As above, the examples should reflect best practices.
Code change:
Wherever End-User data is stored, it represents a potential target for an attacker.  This target can be of particularly high value when the data is signed by a trusted authority like an official national <del> identity service.  For example, in OpenID Connect, signed ID Tokens can be stored by Relying Parties.  In the case of SD-JWT, Holders have to store SD-JWTs, and Issuers and Verifiers may decide to do so as well. </del> <ins> identity service.  For example, in OpenID Connect OpenID.Core, signed ID Tokens can be stored by Relying Parties.  In the case of SD-JWT, Holders have to store SD-JWTs, and Issuers and Verifiers may decide to do so as well. </ins> Not surprisingly, a leak of such data risks revealing private data of End-Users to third parties.  Signed End-User data, the authenticity

Related discussion:
text: Please at least add “iat” to this list, even if you choose to retain “nbf”. Everywhere: Consider changing the name “…” to something more indicative of its function, such as “sdelement” or “sd_item”. Or alternatively, at least provide rationale for why that non-obvious name was chosen. -> we have extensively bikeshedded this claim name, and this one was chosen because it is concise and natural since '...' is what is used when something is omitted in a list. there seems to have been some misunderstanding how disclosure in the arrays work, so hopefully with the clarifications above, this claim also feels more appropriate than before. I wouldn’t say that there’s a misunderstanding in how disclosure in arrays work. Rather, I’d say that the current exposition of array disclosure can leave readers wondering what is meant, and could be improved by the suggested clarifications above. Thank you for explaining that “…” is intended to be understood as the ellipsis character, and the intuition behind it. Its usage in that way is slightly odd, since the ellipsis character is used in place of omitted content, whereas in this case it’s used with the opposite meaning to introduce content that is NOT omitted (content that is disclosed). Be that as it may, I understand very well the reasons for keeping the claim name as it is. Nonetheless, I think it would be helpful to readers to add a comment when the claim name is introduced about why this otherwise non-obvious claim name was chosen. The sentence you add could be something like “The claim name “…” was chosen because the ellipsis character, typically entered as three period characters, is used in contexts where content is omitted (not disclosed).” Or choose your own wording. Give readers the intuition behind the choice. Finally, this comment was incompletely addressed: Section 11.1. Storage of Signed User Data: Please change “OpenID Connect” to “OpenID Connect [OpenID.Core]” (adding the missing citation). Best wishes, -- Mike