Skip to content

Commit ef1a5fa

Browse files
authored
Fixes #408, #409, #410, #411, #412, #413, #417
* fixes #408, #409, #410, #411, #412, #413, #417 * fix: editorial fix that an SD-JWT builds on JWT and JWS, not only JWT
1 parent eb15547 commit ef1a5fa

1 file changed

Lines changed: 58 additions & 14 deletions

File tree

draft-ietf-oauth-sd-jwt-vc.md

Lines changed: 58 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ a specification that introduces conventions to support selective disclosure for
102102
JWTs: For an SD-JWT document, a Holder can decide which claims to release (within
103103
bounds defined by the Issuer).
104104

105-
SD-JWT is a superset of JWT. It can also be used when there are no selectively
105+
SD-JWT builds on JWT/JWS. It can also be used when there are no selectively
106106
disclosable claims. Furthermore, SD-JWT supports JWS JSON serialization,
107107
which is useful for long-term archiving and multi-signatures.
108108
However, SD-JWT itself does not define
@@ -113,7 +113,7 @@ extensibility model as basis for representing Verifiable Digital Credentials wit
113113
payloads. These Verifiable Digital Credentials are called SD-JWT VCs. The use of
114114
selective disclosure in SD-JWT VCs is optional.
115115

116-
SD-JWTs VC can contain claims that are registered in "JSON Web Token Claims"
116+
SD-JWT VCs can contain claims that are registered in "JSON Web Token Claims"
117117
registry as defined in [@!RFC7519], as well as public and
118118
private claims.
119119

@@ -159,7 +159,7 @@ This section defines encoding, validation and processing rules for SD-JWT VCs.
159159
## Media Type
160160

161161
SD-JWT VCs compliant with this specification MUST use the media type
162-
`application/dc+sd-jwt`, where the base base subtype name `dc` stands for "digital credential".
162+
`application/dc+sd-jwt`, where the base subtype name `dc` stands for "digital credential".
163163

164164
## Data Format
165165

@@ -372,6 +372,9 @@ If Key Binding is required (refer to the security considerations in Section 9.5
372372
according to Section 7.3 of [@!RFC9901]. To verify
373373
the KB-JWT, the `cnf` claim of the SD-JWT MUST be used.
374374

375+
After the processed SD-JWT payload is available to the recipient, a Holder or Verifier MAY process Type Metadata as described in (#processing-type-metadata).
376+
If Type Metadata is processed, the rules defined in (#processing-type-metadata) apply and can require the SD-JWT VC to be rejected.
377+
375378
If there are no selectively disclosable claims, there is no need to process the
376379
`_sd` claim nor any Disclosures.
377380

@@ -401,7 +404,7 @@ To enable different trust anchoring systems or key resolution methods, separate
401404
may define additional key discovery and validation mechanisms that complement or override those defined above; however, the specifics of such mechanisms are out of scope for this specification.
402405
See (#ecosystem-verification-rules) for related security considerations.
403406

404-
If a recipient cannot validate that the public verification key corresponds the Issuer of the Issuer-signed JWT using a permitted key discovery and validation mechanism, the SD-JWT VC MUST be rejected.
407+
If a recipient cannot validate that the public verification key corresponds to the Issuer of the Issuer-signed JWT using a permitted key discovery and validation mechanism, the SD-JWT VC MUST be rejected.
405408

406409
# JWT VC Issuer Metadata {#jwt-vc-issuer-metadata}
407410

@@ -535,6 +538,7 @@ This section defines Type Metadata that can be associated with a type of an SD-J
535538
consistent with the intent of the provider of the Type Metadata.
536539

537540
Type Metadata can be retrieved as described in (#retrieving-type-metadata).
541+
Ecosystems can define rules for a `vct` value that specify whether Type Metadata is to be processed and which Type Metadata retrieval methods Consumers are expected to support.
538542

539543
## Type Metadata Example {#type-metadata-example}
540544

@@ -606,6 +610,9 @@ SD-JWT VC payload is identical to the `vct` value in the reference to the Type
606610
Metadata (either in the SD-JWT VC itself or in an `extends` property in a Type
607611
Metadata document).
608612

613+
If the claim `vct#integrity` is present in the SD-JWT VC, its value
614+
MUST be an "integrity metadata" string as defined in (#document-integrity).
615+
609616
The following sections define methods to retrieve Type Metadata.
610617

611618
### From a URL in the `vct` Claim {#retrieval-from-vct-claim}
@@ -618,9 +625,6 @@ A successful response MUST use an HTTP `200` status code and return a JSON
618625
object as defined in (#type-metadata-format) using the `application/json` content type.
619626
An error response MUST use the applicable HTTP status code value.
620627

621-
If the claim `vct#integrity` is present in the SD-JWT VC, its value
622-
`vct#integrity` MUST be an "integrity metadata" string as defined in (#document-integrity).
623-
624628
### From a Registry {#retrieval-from-registry}
625629

626630
A Consumer MAY use a registry to retrieve Type Metadata for a SD-JWT VC type,
@@ -639,7 +643,7 @@ retrieve Type Metadata based on a URN in the `vct` claim.
639643
### From a Local Cache {#retrieval-from-local-cache}
640644

641645
A Consumer MAY cache Type Metadata for a SD-JWT VC type. If a hash for integrity
642-
protection is present in the Type Metadata as defined in (#document-integrity), the Consumer MAY assume that the Type Metadata is static and can be cached
646+
protection is present for the Type Metadata as defined in (#document-integrity), the Consumer MAY assume that the Type Metadata is static and can be cached
643647
indefinitely. Otherwise, the Consumer MUST use the `Cache-Control`
644648
header of the HTTP response to determine how long the metadata can be cached.
645649

@@ -825,6 +829,28 @@ Each object contains the following properties:
825829
type metadata. It MUST consist of only alphanumeric characters and underscores
826830
and MUST NOT start with a digit. This property is OPTIONAL.
827831

832+
When a Consumer processes Type Metadata for an SD-JWT VC, the `claims` property and each claim metadata object MUST conform to the structure defined in this section and its subsections; otherwise, claim metadata processing fails.
833+
Properties that are not understood are ignored as defined in (#type-metadata-format).
834+
835+
When a Holder or Verifier processes claim metadata for an SD-JWT VC, it MUST validate the processed SD-JWT payload against the claim metadata in the Type Metadata after applying any extensions as described in (#claim-metadata-extends).
836+
Claim metadata validation fails if any of the following applies:
837+
838+
* Processing a `path` results in an error as defined in (#claim-path).
839+
* The Holder or Verifier can determine that a claim addressed by a claim metadata object with `mandatory` set to `true` was not included in the issued credential (see (#claim-mandatory-metadata)).
840+
* A claim selected by a claim metadata object's `path` is not selectively disclosable as required by its `sd` value (see (#claim-selective-disclosure-metadata)).
841+
842+
Whether a mandatory claim was included can be determined by a Holder that has all Disclosures by evaluating the `path` against the complete Unsecured Payload.
843+
A Verifier MUST NOT treat absence of a selectively disclosable claim from a presentation as evidence that the Issuer failed to include a mandatory claim.
844+
845+
When evaluating a `path` for this validation, the following applies:
846+
847+
* A claim is selectively disclosable at a path if it is directly represented as a Disclosure for an object property or array element in the SD-JWT; it is not selectively disclosable solely because one of its ancestors is.
848+
* Non-negative integer and `null` components of a `path` are evaluated against the array as issued, counting array elements that are not disclosed and are therefore absent from the processed SD-JWT payload (see (#claim-path)).
849+
* If a `path` selects an array element that is not disclosed, that element was included in the issued credential and is selectively disclosable; its contents are unknown, so any deeper `path` components select no claims.
850+
851+
Performing this validation requires the Holder or Verifier to retain sufficient information during SD-JWT processing, including the positions of array elements that are not disclosed.
852+
See (#processing-type-metadata) for the consequences of claim metadata processing and validation failures.
853+
828854
### Claim Path {#claim-path}
829855

830856
The `path` property MUST be a non-empty array of strings, `null` values, or
@@ -884,7 +910,7 @@ In detail, the array components of `path` are processed from left to right as fo
884910
1. If the `path` component is a string, select the element in the respective
885911
key in the currently selected element(s). If any of the currently
886912
selected element(s) is not an object, abort processing and return an
887-
error. If the key does not exist in any element currently selected,
913+
error. If the key does not exist in an element currently selected,
888914
remove that element from the selection.
889915
2. If the `path` component is `null`, select all elements of the currently
890916
selected array(s). If any of the currently selected element(s) is not an
@@ -894,8 +920,8 @@ In detail, the array components of `path` are processed from left to right as fo
894920
currently selected element(s) is not an array, abort processing and
895921
return an error. If the index does not exist in a selected array, remove
896922
that array from the selection.
897-
3. If the set of elements currently selected is empty, abort processing and
898-
return an error.
923+
3. If the set of elements currently selected is empty, the result of processing
924+
is the empty set.
899925

900926
The result of the processing is the set of elements to which the respective
901927
claim metadata applies.
@@ -1047,6 +1073,17 @@ In this example, the child type inherits the `name` claim metadata from the base
10471073
```
10481074
Figure: Effective Claim Metadata for Child Type {#effective-claim-metadata-child-type}
10491075

1076+
## Processing Type Metadata {#processing-type-metadata}
1077+
1078+
This specification does not require every Holder or Verifier to process Type Metadata; whether Type Metadata is processed is determined by the Holder's or Verifier's policy and, where applicable, ecosystem rules.
1079+
A Holder or Verifier typically processes Type Metadata after the processed SD-JWT payload is available, as described in (#vc-sd-jwt-verification-and-processing).
1080+
1081+
If Type Metadata is processed, it MUST be fully processed, including any extended types (see (#extending-type-metadata)), before its contents are used for validation, display, rendering, or acceptance decisions.
1082+
If the Type Metadata after applying any extensions contains claim metadata, the Holder or Verifier MUST process and validate the claim metadata as defined in (#claim-metadata).
1083+
If claim metadata processing or validation fails, the SD-JWT VC MUST be rejected.
1084+
1085+
If Type Metadata processing is required by policy or ecosystem rules and the Holder or Verifier cannot retrieve or process the applicable Type Metadata, the SD-JWT VC MUST be rejected.
1086+
10501087

10511088
# Integrity of Referenced Documents {#document-integrity}
10521089

@@ -1065,8 +1102,8 @@ Type Metadata MAY be accompanied by a respective item suffixed with
10651102
* `uri` as used in three places in (#rendering-metadata).
10661103

10671104
The value MUST be an "integrity metadata" string as defined in Section 3 of
1068-
[@!W3C.SRI]. If an integrity property is present for a particular claim, the
1069-
Consumer of the respective document MUST verify the integrity of the retrieved
1105+
[@!W3C.SRI]. If an integrity property is present for a claim or metadata property, the
1106+
Consumer of the referenced document MUST verify the integrity of the retrieved
10701107
document as defined in Section 3.3.5 of [@!W3C.SRI].
10711108

10721109

@@ -1136,7 +1173,7 @@ described in (#privacy-preserving-retrieval-of-type-metadata).
11361173

11371174
## Risks Associated with Textual Information {#risks-textual-information}
11381175

1139-
Some claims in the SD-JWT VC and properties in the Type Metadata, e.g., `display`, allows issuers and providers of metadata to
1176+
Some claims in the SD-JWT VC and properties in the Type Metadata, e.g., `display`, allow issuers and providers of metadata to
11401177
specify human-readable information. These can contain arbitrary textual information that
11411178
may be displayed to end users and developers. As such, any consuming application MUST ensure that maliciously
11421179
crafted information cannot be used to compromise the security of the application
@@ -1675,6 +1712,13 @@ for their contributions (some of which substantial) to this draft and to the ini
16751712

16761713
-17
16771714

1715+
* Clarified when optional Type Metadata processing occurs and how ecosystem rules can require it, in a new Processing Type Metadata section.
1716+
* Require rejection when processed claim metadata is malformed or when `mandatory` or `sd` claim metadata does not match the credential.
1717+
* Clarified claim metadata validation for presentations: a Verifier must not treat absence of a selectively disclosable claim as a missing mandatory claim, and array positions in `path` account for array elements that are not disclosed.
1718+
* Moved the `vct#integrity` requirement to the general Type Metadata retrieval section.
1719+
* `path` processing yields an empty set instead of an error when no claims are selected.
1720+
* Updated the referenced document integrity wording.
1721+
* Editorial fixes.
16781722

16791723
-16
16801724

0 commit comments

Comments
 (0)