You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -130,6 +130,9 @@ document are to be interpreted as described in RFC 2119 [@!RFC2119].
130
130
This specification uses the terms "Holder", "Issuer", "Verifier", "Key Binding", and "Key Binding JWT" defined by
131
131
[@!I-D.ietf-oauth-selective-disclosure-jwt].
132
132
133
+
Consumer:
134
+
: Applications using the Type Metadata specified in (#type-metadata) are called Consumer. This typically includes Issuers, Verifiers, and Wallets.
135
+
133
136
Verifiable Credential (VC):
134
137
: An assertion with claims about a Subject that is cryptographically secured by an Issuer (usually by a digital signature).
135
138
@@ -309,6 +312,8 @@ the Key Binding JWT, the `cnf` claim of the SD-JWT MUST be used.
309
312
Furthermore, the recipient of the SD-JWT VC MUST validate the public verification key
310
313
for the Issuer-signed JWT as defined in (#issuer-signed-jwt-verification-key-validation).
311
314
315
+
If a schema is provided in the Type Metadata, a recipient MUST validate the schema as defined in (#schema-type-metadata).
316
+
312
317
If there are no selectively disclosable claims, there is no need to process the
313
318
`_sd` claim nor any Disclosures.
314
319
@@ -478,23 +483,21 @@ MUST NOT be used.
478
483
479
484
# Type Metadata {#type-metadata}
480
485
481
-
A typeis associated with metadata defining, for example, information about the type, a schema defining which claims MAY or MUST appear in the SD-JWT VC, and how they can be displayed.
486
+
A SD-JWT VC type, i.e., the `vct` value, is associated with Type Metadata defining, for example, information about the type or a schema defining (see (#schema-definition)) which claims MAY or MUST appear in the SD-JWT VC.
482
487
483
-
This section defines Type Metadata that can be associated with a type of a SD-JWT VC as well as a method for retrieving the Type Metadata and processing rules. This Type Metadata is intended to be used, among other things, for the following purposes:
488
+
This section defines Type Metadata that can be associated with a type of a SD-JWT VC, as well as a method for retrieving the Type Metadata and processing rules. This Type Metadata is intended to be used, among other things, for the following purposes:
484
489
485
-
* Developers of Issuers and Verifiers can use the Typ Metadata to understand the
490
+
* Developers of Issuers and Verifiers can use the Type Metadata to understand the
486
491
semantics of the type and the associated rules. While in some cases,
487
-
Issuers are the parties that define types (credential formats), this is
492
+
Issuers are the parties that define types, this is
488
493
not always the case. For example, a type can be defined by a
489
494
standardization body or a community.
490
-
* Verifiers can use the metadata to determine whether a credential is valid
495
+
* Verifiers can use the Type Metadata to determine whether a credential is valid
491
496
according to the rules of the type. For example, a Verifier can check
492
497
whether a credential contains all required claims and whether the claims
493
498
are selectively disclosable.
494
-
* Wallets can use the metadata to display the credential in a way that is
495
-
consistent with the Issuer's intent.
496
499
497
-
Applications using Type Metadata defined in this specification are called "Consumers" in the following. This typically includes Issuers, Verifiers, and Wallets.
500
+
Type Metadata can be retrieved as described in (#retrieving-type-metadata).
* OPTIONAL. A URI of another type that this type extends, as described in
548
553
(#extending-type-metadata).
549
-
550
-
## Extending Type Metadata {#extending-type-metadata}
551
-
552
-
A type can extend another type. The extended type is identified by the URI in
553
-
the `extends` property. Consumers MUST retrieve and process
554
-
Type Metadata for the extended type before processing the Type Metadata for the extending
555
-
type.
556
-
557
-
The extended type MAY itself extend another type. This can be used to create a
558
-
chain or hierarchy of types. The security considerations described in
559
-
(#circular-extends) apply in order to avoid problems with circular dependencies.
554
+
*`schema`
555
+
* OPTIONAL. An embedded JSON Schema document describing the structure of
556
+
the Verifiable Credential as described in (#schema-definition). `schema` MUST NOT be used
557
+
if `schema_uri` is present.
558
+
*`schema_uri`
559
+
* OPTIONAL. A URL pointing to a JSON Schema document describing the structure
560
+
of the Verifiable Credential as described in (#schema-definition). `schema_uri` MUST NOT
561
+
be used if `schema` is present.
560
562
561
563
## Retrieving Type Metadata {#retrieving-type-metadata}
562
564
@@ -575,7 +577,7 @@ If the claim `vct#integrity` is present in the SD-JWT VC, its value
575
577
576
578
### From a Registry {#retrieval-from-registry}
577
579
578
-
A Consumer MAY use a registry to retrieve Type Metadata for a type,
580
+
A Consumer MAY use a registry to retrieve Type Metadata for a SD-JWT VC type,
579
581
e.g., if the type is not a HTTPS URL or if the Consumer does not have
580
582
access to the URL. The registry MUST be a trusted registry, i.e., the Consumer MUST trust the registry to provide correct Type Metadata for the type.
581
583
@@ -590,15 +592,15 @@ retrieve Type Metadata based on a URN in the `vct` claim.
590
592
591
593
### From a Local Cache {#retrieval-from-local-cache}
592
594
593
-
A Consumer MAY cache Type metadata for a type. If a hash for integrity
595
+
A Consumer MAY cache Type Metadata for a SD-JWT VC type. If a hash for integrity
594
596
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
595
597
indefinitely. Otherwise, the Consumer MUST use the `Cache-Control`
596
598
header of the HTTP response to determine how long the metadata can be cached.
597
599
598
600
### From Type Metadata Glue Documents {#glue-documents}
599
601
600
602
Credentials MAY encode Type Metadata directly, providing it as "glue
601
-
information" to the consumer.
603
+
information" to the Consumer.
602
604
603
605
For JSON-serialized JWS-based credentials, such Type Metadata documents MAY be
604
606
included in the unprotected header of the JWS. In this case, the key `vctm` MUST
@@ -618,13 +620,146 @@ array instead of retrieving the respective Type Metadata elsewhere as follows:
618
620
Type Metadata document matches that of the `vct` in the Type Metadata document, and it MUST verify the integrity of the Type Metadata document as defined in
619
621
(#document-integrity). The Consumer MUST NOT use the Type Metadata if no hash for integrity protection was provided.
620
622
623
+
## Extending Type Metadata {#extending-type-metadata}
624
+
625
+
An SD-JWT VC type can extend another type. The extended type is identified by the URI in
626
+
the `extends` property. Consumers MUST retrieve and process
627
+
Type Metadata for the extended type before processing the Type Metadata for the extending
628
+
type.
629
+
630
+
The extended type MAY itself extend another type. This can be used to create a
631
+
chain or hierarchy of types. The security considerations described in
632
+
(#circular-extends) apply in order to avoid problems with circular dependencies.
633
+
634
+
## Schema Type Metadata {#schema-type-metadata}
635
+
636
+
### Schema Definition {#schema-definition}
637
+
638
+
Schemas for Verifiable Credentials are contained in the `schema` or retrieved via the `schema_uri` Type Metadata parameters (as defined in (#type-metadata-format)).
639
+
A schema MUST be represented by a JSON Schema document according to draft version 2020-12 [@JSON.SCHEMA.2020-12] or above.
640
+
641
+
The schema of a Verifiable Credential MUST include all properties that are required by this specification and MUST NOT override their cardinality, JSON data type, or semantic intent.
642
+
643
+
The following is a non-normative example of a JSON Schema document for the example in (#vc-sd-jwt-example) requiring the presence of the `cnf` claim in an SD-JWT VC presentation:
Note that `iss` and `vct` are always required by this specification.
719
+
720
+
### Schema Validation {#schema-validation}
721
+
722
+
If a `schema` or `schema_uri` property is present, a Consumer MUST validate the JSON document resulting from the SD-JWT verification algorithm
723
+
(as defined in Section 8 of [@!I-D.ietf-oauth-selective-disclosure-jwt]) against the JSON Schema document provided by the `schema` or `schema_uri` property.
724
+
725
+
If an `extends` property is present, the schema of the extended type MUST also be validated in the same manner. This process includes
726
+
validating all subsequent extended types recursively until a type is encountered that does not contain an `extends` property in its Type Metadata.
727
+
Each schema in this chain MUST be evaluated for a specific Verifiable Credential.
728
+
729
+
If the schema validation fails for any of the types in the chain, the Consumer MUST reject the Verifiable Credential.
730
+
731
+
The following is a non-normative example of a result JSON document after executing the SD-JWT verification algorithm that is validated against the JSON Schema document in the example provided in (#schema-definition):
Note, the example above does not contain any `_sd_alg`, `_sd`, or `...` claims.
755
+
621
756
# Document Integrity {#document-integrity}
622
757
623
-
Both the `vct` claim in the SD-JWT VC and various URIs in the metadata
624
-
document MAY be accompanied by a respective claim suffixed with `#integrity`, in particular:
758
+
Both the `vct` claim in the SD-JWT VC and the various URIs in the Type Metadata MAY be accompanied by a respective claim suffixed with `#integrity`, in particular:
625
759
626
760
*`vct` as defined in (#claims),
627
761
*`extends` as defined in (#extending-type-metadata)
762
+
*`schema_uri` as defined in (#schema-type-metadata)
628
763
629
764
The value MUST be an "integrity metadata" string as defined in Section 3 of
630
765
[@!W3C.SRI]. A Consumer of the respective documents MUST verify the
@@ -889,6 +1024,13 @@ recommendations in (#robust-retrieval) apply.
889
1024
<title>The European Digital Identity Wallet Architecture and Reference Framework</title>
0 commit comments