Skip to content

Commit f7d5cf1

Browse files
bc-pirohanmahySakuranndanielfett
authored
some updates resulting from late WG review (#553)
* Selective incorporation of changes based on feedback received nearly four months after the end of the second working group last call (thread at https://mailarchive.ietf.org/arch/msg/oauth/o9G6ibRuibzHQeoKHG7hLpU-CUM/) * > for note Co-authored-by: Rohan Mahy <rohan.mahy@gmail.com> * more > offsets on notes * add missing word Co-authored-by: Kristina <52878547+Sakurann@users.noreply.github.com> * add missing word Co-authored-by: Kristina <52878547+Sakurann@users.noreply.github.com> * revised wording Co-authored-by: Daniel Fett <fett@danielfett.de> --------- Co-authored-by: Rohan Mahy <rohan.mahy@gmail.com> Co-authored-by: Kristina <52878547+Sakurann@users.noreply.github.com> Co-authored-by: Daniel Fett <fett@danielfett.de>
1 parent f4df942 commit f7d5cf1

File tree

1 file changed

+31
-25
lines changed

1 file changed

+31
-25
lines changed

draft-ietf-oauth-selective-disclosure-jwt.md

Lines changed: 31 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ A popular application of JWS is JSON Web Token (JWT) [@!RFC7519], a format that
5555
An ID Token as defined in OpenID Connect [@?OpenID.Core], for example, is a JWT containing the user's claims created by the server for consumption by a relying party.
5656
In cases where the JWT is sent immediately from the server to the relying party, as in OpenID Connect, the server can select at the time of issuance which user claims to include in the JWT, minimizing the information shared with the relying party who validates the JWT.
5757

58-
A new model is emerging that fully decouples the issuance of a JWT from its presentation.
58+
Another model is emerging that fully decouples the issuance of a JWT from its presentation.
5959
In this model, a JWT containing many claims is issued to an intermediate party, who holds the JWT (the Holder).
6060
The Holder can then present the JWT to different verifying parties (Verifiers), that each may only require a subset of the claims in the JWT.
6161
For example, the JWT may contain claims representing both an address and a birthdate.
@@ -79,7 +79,7 @@ An SD-JWT with a Key Binding JWT is called SD-JWT+KB in this specification.
7979

8080
This specification defines two primary data formats:
8181

82-
1. SD-JWT is a composite structure enabling selective disclosure of its contents. It comprises the following:
82+
1. SD-JWT is a composite structure, consisting of a JWS plus optional disclosures, enabling selective disclosure of portions of the JWS payload. It comprises the following:
8383
- A format for enabling selective disclosure in nested JSON data structures,
8484
supporting selectively disclosable object properties (name/value pairs) and array elements
8585
- A format for encoding the selectively disclosable data items
@@ -88,7 +88,7 @@ This specification defines two primary data formats:
8888
- An alternate format extending the JWS JSON Serialization, also allowing for
8989
transport of the Issuer-signed JSON data structure and disclosure data
9090

91-
2. SD-JWT+KB is a composite structure enabling cryptographic key binding when presented to the Verifier. It comprises the following:
91+
2. SD-JWT+KB is a composite structure of an SD-JWT and a cryptographic key binding that can be presented to and verified by the Verifier. It comprises the following:
9292
- A mechanism for associating an SD-JWT with a key pair
9393
- A format for a Key Binding JWT (KB-JWT) that allows proof of possession of the private key of
9494
the associated key pair
@@ -110,7 +110,7 @@ Throughout the document the term "claims" refers generally to both
110110
object properties (name/value pairs) as well as array elements.
111111

112112
Selective Disclosure:
113-
: Process of a Holder disclosing to a Verifier a subset of claims contained in a JWT Claims Set issued by an Issuer.
113+
: Process of a Holder disclosing to a Verifier a subset of claims contained in a JWT issued by an Issuer.
114114

115115
Selectively Disclosable JWT (SD-JWT):
116116
: A composite structure, consisting of an Issuer-signed JWT (JWS, [@!RFC7515]) and zero or more Disclosures, which
@@ -127,9 +127,8 @@ Key Binding:
127127

128128
Key Binding JWT (KB-JWT):
129129
: A Key Binding JWT is said to "be tied to" a particular SD-JWT when its payload
130-
is signed using the key included in the SD-JWT payload, and also contains
131-
a hash of the SD-JWT in its `sd_hash` claim. A JWT for proving Key Binding
132-
as defined in (#kb-jwt).
130+
is signed using the key included in the SD-JWT payload, and the KB-JWT contains
131+
a hash of the SD-JWT in its `sd_hash` claim. Its format is defined in (#kb-jwt).
133132

134133
Selectively Disclosable JWT with Key Binding (SD-JWT+KB):
135134
: A composite structure, comprising an SD-JWT and a Key Binding JWT tied to that SD-JWT.
@@ -198,7 +197,7 @@ To disclose to a Verifier a subset of the SD-JWT claim values, a Holder sends on
198197

199198
Key Binding is an optional feature. When Key Binding is required by the use case, the SD-JWT MUST contain information about the key material controlled by the Holder.
200199

201-
Note: How the public key is included in SD-JWT is described in (#key_binding).
200+
> Note: How the public key is included in SD-JWT is described in (#key_binding).
202201
203202
When a Verifier requires Key Binding, the Holder presents an SD-JWT+KB, consisting of an SD-JWT as well as a Key Binding JWT tied to that SD-JWT.
204203
The Key Binding JWT encodes a signature by the Holder's private key over
@@ -235,7 +234,7 @@ An SD-JWT+KB is composed of
235234
The Issuer-signed JWT, Disclosures, and Key Binding JWT are explained in
236235
(#iss-signed-jwt), (#creating_disclosures), and (#kb-jwt) respectively.
237236

238-
The serialized format for the SD-JWT is the concatenation of each part delineated with a single tilde ('~') character as follows:
237+
The compact serialized format for the SD-JWT is the concatenation of each part delineated with a single tilde ('~') character as follows:
239238

240239
```
241240
<Issuer-signed JWT>~<Disclosure 1>~<Disclosure 2>~...~<Disclosure N>~
@@ -359,7 +358,7 @@ associated with the Holder, or a reference thereto, using the `cnf` claim as def
359358
The `jwk` confirmation method, as defined in Section 3.2 of [@!RFC7800], is
360359
suggested for doing so, however, other confirmation methods can be used.
361360

362-
Note that, as was stated in [@!RFC7800],
361+
> Note that, as was stated in [@!RFC7800],
363362
if an application needs to represent multiple proof-of-possession
364363
keys in the same SD-JWT, one way to achieve this is to use other
365364
claim names, in addition to `cnf`, to hold the additional proof-of-possession key information.
@@ -369,7 +368,7 @@ established. For example, the Holder MAY create a key pair and provide a public
369368
the Issuer MAY create the key pair for the Holder, or
370369
Holder and Issuer MAY use pre-established key material.
371370

372-
Note: The examples throughout this document use the `cnf` claim with the `jwk` member to include
371+
> Note: The examples throughout this document use the `cnf` claim with the `jwk` member to include
373372
the raw public key by value in SD-JWT.
374373

375374
## Disclosures {#creating_disclosures}
@@ -387,9 +386,9 @@ For each claim that is an object property and that is to be made selectively dis
387386
2. The claim name, or key, as it would be used in a regular JWT payload. It MUST be a string and MUST NOT be `_sd`, `...`, or a claim name existing in the object as a non-selectively disclosable claim.
388387
3. The claim value, as it would be used in a regular JWT payload. The value can be of any type that is allowed in JSON, including numbers, strings, booleans, arrays, null, and objects.
389388
* JSON-encode the array, producing an UTF-8 string.
390-
* base64url-encode the byte representation of the UTF-8 string, producing a US-ASCII [@!RFC20] string. This string is the Disclosure.
389+
* base64url-encode the byte representation of the UTF-8 string. This string is the Disclosure.
391390

392-
The order is decided based on the readability considerations: salts would have a
391+
> Note: The order was decided based on readability considerations: salts have a
393392
constant length within the SD-JWT, claim names would be around the same length
394393
all the time, and claim values would vary in size, potentially being large
395394
objects.
@@ -401,10 +400,10 @@ The array is created as follows:
401400
["_26bc4LT-ac6q2KI6cBW5es", "family_name", "Möbius"]
402401
```
403402

404-
The resulting Disclosure would be: `WyJfMjZiYzRMVC1hYzZxMktJNmNCVzVlcyIsICJmYW1pbHlfbmFtZSIsICJNw7ZiaXVzIl0`
403+
The resulting Disclosure is: `WyJfMjZiYzRMVC1hYzZxMktJNmNCVzVlcyIsICJmYW1pbHlfbmFtZSIsICJNw7ZiaXVzIl0`
405404

406405
Note that variations in whitespace, encoding of Unicode characters, ordering of object properties, etc., are allowed
407-
in the JSON representation and no canonicalization needs be performed before base64url-encoding.
406+
in the JSON representation and no canonicalization needs to be performed before base64url-encoding because the digest is calculated over the base64url-encoded value itself.
408407
For example, the following strings are all valid and encode the
409408
same claim value "Möbius":
410409

@@ -418,6 +417,8 @@ same claim value "Möbius":
418417
`WwoiXzI2YmM0TFQtYWM2cTJLSTZjQlc1ZXMiLAoiZmFtaWx5X25hbWUiLAoiT`\
419418
`cO2Yml1cyIKXQ`
420419

420+
However, the digest is calculated over the respective base64url-encoded value itself, which effectively signs the variation chosen by the Issuer and makes it immutable in the context of the particular SD-JWT.
421+
421422
See (#disclosure_format_considerations) for some further considerations on the Disclosure format approach.
422423

423424
### Disclosures for Array Elements {#disclosures_for_array_elements}
@@ -449,7 +450,7 @@ The resulting Disclosure would be: `WyJsa2x4RjVqTVlsR1RQVW92TU5JdkNBIiwgIkZSIl0`
449450

450451
### Hashing Disclosures {#hashing_disclosures}
451452

452-
For embedding references to the Disclosures in the SD-JWT, each Disclosure is hashed using the hash algorithm specified in the `_sd_alg` claim described in (#hash_function_claim). The resulting digest is then included in the SD-JWT payload instead of the original claim value, as described next.
453+
For embedding references to the Disclosures in the SD-JWT, each Disclosure is hashed using the hash algorithm specified in the `_sd_alg` claim described in (#hash_function_claim), or SHA-256 if no algorithm is specified. The resulting digest is then included in the SD-JWT payload instead of the original claim value, as described next.
453454

454455
The digest MUST be taken over the US-ASCII bytes of the base64url-encoded value that is the Disclosure. This follows the convention in JWS [@!RFC7515] and JWE [@RFC7516]. The bytes of the digest MUST then be base64url-encoded.
455456

@@ -476,6 +477,8 @@ For selectively disclosable claims, the digests of the Disclosures are embedded
476477
Digests of Disclosures for object properties are added to an array under the new
477478
key `_sd` in the object. The `_sd` key MUST refer to an array of strings, each
478479
string being a digest of a Disclosure or a decoy digest as described in (#decoy_digests).
480+
An `_sd` key can be present at any level of the JSON object hierarchy, including the top-level,
481+
nested deeper as described in (#nested_data), or in recursive disclosures as described in (#recursive_disclosures).
479482

480483
The array MAY be empty in case the Issuer decided not to selectively disclose
481484
any of the claims at that level. However, it is RECOMMENDED to omit the `_sd`
@@ -675,7 +678,7 @@ Details of the Validation process are defined in (#verifier_verification).
675678

676679
In this example, a simple SD-JWT is demonstrated. This example is split into issuance and presentation.
677680

678-
Note: Throughout the examples in this document, line breaks had to be added to
681+
> Note: Throughout the examples in this document, line breaks had to be added to
679682
JSON strings and base64-encoded strings to adhere to the 72-character limit for
680683
lines in RFCs and for readability. JSON does not allow line breaks within strings.
681684

@@ -736,7 +739,7 @@ After validation, the Verifier will have the following processed SD-JWT payload
736739

737740
# Considerations on Nested Data in SD-JWTs {#nested_data}
738741

739-
Being JSON, an object in an SD-JWT payload MAY contain name/value pairs where the value is another object or objects MAY be elements in arrays. In SD-JWT, the Issuer decides for each claim individually, on each level of the JSON, whether the claim should be selectively disclosable or not. This choice can be made on each level independent from whether keys higher in the hierarchy are selectively disclosable.
742+
Being JSON, an object in an SD-JWT payload MAY contain name/value pairs where the value is another object or objects MAY be elements in arrays. In SD-JWT, the Issuer decides for each claim individually, on each level of the JSON, whether the claim should be selectively disclosable or not. This choice can be made on each level independent of whether keys higher in the hierarchy are selectively disclosable.
740743

741744
From this it follows that the `_sd` key containing digests MAY appear multiple
742745
times in an SD-JWT, and likewise, there MAY be multiple arrays within the
@@ -749,7 +752,7 @@ The following input JWT Claims Set is used as an example throughout this section
749752

750753
<{{examples/address_only_flat/user_claims.json}}
751754

752-
Note: The following examples of the structures are non-normative and are not intended to
755+
> Note: The following examples of the structures are non-normative and are not intended to
753756
represent all possible options. They are also not meant to define or restrict
754757
how `address` can be represented in an SD-JWT.
755758

@@ -835,13 +838,13 @@ an SD-JWT to validate the SD-JWT and extract the payload:
835838

836839
If any step fails, the SD-JWT is not valid, and processing MUST be aborted. Otherwise, the JSON document resulting from the preceding processing and verification steps, herein referred to as the processed SD-JWT payload, can be made available to the application to be used for its intended purpose.
837840

838-
Note that these processing steps do not yield any guarantees to the Holder about having received a complete set of Disclosures. That is, for some digest values in the Issuer-signed JWT (which are not decoy digests) there may be no corresponding Disclosures, for example, if the message from the Issuer was truncated.
841+
> Note that these processing steps do not yield any guarantees to the Holder about having received a complete set of Disclosures. That is, for some digest values in the Issuer-signed JWT (which are not decoy digests) there may be no corresponding Disclosures, for example, if the message from the Issuer was truncated.
839842
It is up to the Holder how to maintain the mapping between the Disclosures and the plaintext claim values to be able to display them to the user when needed.
840843

841844

842845
## Processing by the Holder {#holder_verification}
843846

844-
The Issuer MUST provide the Holder an SD-JWT, not an SD-JWT+KB. If the Holder
847+
The Issuer provides the Holder with an SD-JWT, not an SD-JWT+KB. If the Holder
845848
receives an SD-JWT+KB, it MUST be rejected.
846849

847850
When receiving an SD-JWT, the Holder MUST do the following:
@@ -1266,8 +1269,10 @@ mitigate them as much as possible, and/or make the risks transparent to the user
12661269
Contrary to that, Issuer/Verifier unlinkability with an honest Verifier can generally be achieved.
12671270
However, a callback from the Verifier to the Issuer, such as a revocation check, could potentially
12681271
disclose information about the credential's usage to the Issuer.
1269-
Where such callbacks are necessary, they MUST be executed in a manner that
1270-
preserves privacy and does not disclose details about the credential to the Issuer. It is
1272+
Where such callbacks are necessary, they need to be executed in a manner that
1273+
preserves privacy and does not disclose details about the credential to the Issuer
1274+
(the mechanism described in [@?I-D.ietf-oauth-status-list] is an example of an approach
1275+
with minimal information disclosure towards the Issuer). It is
12711276
important to note that the timing of such requests could potentially serve as a side-channel.
12721277

12731278
Verifier/Verifier unlinkability and presentation unlinkability can be achieved using batch issuance: A batch
@@ -1418,7 +1423,7 @@ Torsten Lodderstedt,
14181423
Vittorio Bertocci,
14191424
Watson Ladd, and
14201425
Yaron Sheffer
1421-
for their contributions (some of which substantial) to this draft and to the initial set of implementations.
1426+
for their contributions (some of which were substantial) to this draft and to the initial set of implementations.
14221427

14231428
Special appreciation is extended to Martin Thomson, who wielded his considerable intellect and influence to change a single occurrence of the word "to" to "with" in the midst of a significant proposal that would be integrated into this document six months later.
14241429

@@ -1465,7 +1470,7 @@ This section requests registration of the following media types [@RFC2046] in
14651470
the "Media Types" registry [@IANA.MediaTypes] in the manner described
14661471
in [@!RFC6838].
14671472

1468-
Note: For the media type value used in the `typ` header in the Issuer-signed JWT
1473+
> Note: For the media type value used in the `typ` header in the Issuer-signed JWT
14691474
itself, see (#explicit_typing).
14701475

14711476
To indicate that the content is an SD-JWT:
@@ -1977,6 +1982,7 @@ data. The original JSON data is then used by the application. See
19771982

19781983
* Updates following review of -15 by Hannes Tschofenig, document shepherd
19791984
* Editorial updates to text introduced in -15
1985+
* Changes based on feedback received after the end of the second working group last call
19801986

19811987
-15
19821988

0 commit comments

Comments
 (0)