oauth-wg / oauth-selective-disclosure-jwt

https://datatracker.ietf.org/doc/draft-ietf-oauth-selective-disclosure-jwt/
Other
56 stars 27 forks source link

Ambiguous what to do if same digest appears more than once #363

Closed rohan-wire closed 8 months ago

rohan-wire commented 8 months ago

The spec currently does not define what to do if the same digest value appears more than once in an SD-JWT. This could be the case if the Issuer or Holder is operating maliciously.

Some possible approaches:

Proposal: Holders and Verifiers receiving an SD-JWT have to scan all digests in all _sd element at any level of the document to check for duplicates. If the same digest appears more than once, the entire document is invalid. This prevents an attack where the Issuer gets the Holder to request an innocuous claim inside in a private claim with the same name as a more valuable claim, and includes this digest where it has a different meaning (perhaps offering an x5c or aud claim at the root level.

rohan-wire commented 8 months ago

Duplicate issue to #355 . Closing.