Skip to content

Commit d96324d

Browse files
danielfettbc-pi
andauthored
Various fixes (#373)
* Various fixes * Apply suggestion from @bc-pi --------- Co-authored-by: Brian Campbell <71398439+bc-pi@users.noreply.github.com>
1 parent 5452c3e commit d96324d

File tree

1 file changed

+43
-13
lines changed

1 file changed

+43
-13
lines changed

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

Lines changed: 43 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ SD-JWTs VC can contain claims that are registered in "JSON Web Token Claims"
113113
registry as defined in [@!RFC7519], as well as public and
114114
private claims.
115115

116-
Note: This specification does not utilize the W3C's Verifiable Credentials Data Model v1.0, v1.1, or v2.0.
116+
Note: This specification does not utilize the W3C Verifiable Credentials Data Model v1.0, v1.1, or v2.0.
117117

118118
## Requirements Notation and Conventions
119119

@@ -145,9 +145,10 @@ an SD-JWT VC complying to this specification.
145145

146146
# Scope
147147

148-
* This specification defines
149-
- Data model and media types for Verifiable Credentials based on SD-JWTs.
150-
- Validation and processing rules for Verifiers and Holders.
148+
This specification defines
149+
150+
- a data model and media types for Verifiable Credentials based on SD-JWTs, and
151+
- validation and processing rules for Verifiers and Holders.
151152

152153
# Verifiable Credentials based on SD-JWT
153154

@@ -156,14 +157,14 @@ This section defines encoding, validation and processing rules for SD-JWT VCs.
156157
## Media Type
157158

158159
SD-JWT VCs compliant with this specification MUST use the media type
159-
`application/dc+sd-jwt` as defined in (#media-type).
160+
`application/dc+sd-jwt`.
160161

161162
The base subtype name `dc` is meant to stand for "digital credential", which is
162163
a term that is emerging as a conceptual synonym for "verifiable credential".
163164

164165
## Data Format
165166

166-
SD-JWT VCs MUST be encoded using the SD-JWT format defined in Section 4 or
167+
An SD-JWT VC MUST be encoded using the SD-JWT format defined in Section 4 or
167168
Section 8 of [@!I-D.ietf-oauth-selective-disclosure-jwt], where support for the
168169
JWS JSON Serialization is OPTIONAL.
169170

@@ -177,8 +178,8 @@ SD-JWT VC.
177178

178179
The `typ` header parameter of the SD-JWT MUST be present. The `typ` value MUST
179180
use `dc+sd-jwt`. This indicates that the payload of the SD-JWT contains plain
180-
JSON and follows the rules as defined in this specification. It further
181-
indicates that the SD-JWT is a SD-JWT component of a SD-JWT VC.
181+
JSON and follows the rules defined in this specification. It further
182+
indicates that the SD-JWT is an SD-JWT component of an SD-JWT VC.
182183

183184
The following is a non-normative example of a decoded SD-JWT header:
184185

@@ -198,8 +199,8 @@ SD-JWT VCs.
198199

199200
#### Verifiable Credential Type - `vct` Claim {#type-claim}
200201

201-
This specification defines the new JWT claim `vct` (for verifiable credential type). The `vct` value MUST be a
202-
case-sensitive string value serving as an identifier
202+
This specification defines the new JWT claim `vct` (for verifiable credential type). Its value MUST be a
203+
case-sensitive string serving as an identifier
203204
for the type of the SD-JWT VC. The `vct` value MUST be a Collision-Resistant
204205
Name as defined in Section 2 of [@!RFC7515].
205206

@@ -211,7 +212,7 @@ the semantics of the respective claims and associated rules (e.g., policies for
211212
validating credentials beyond what is defined in this specification).
212213

213214
The `vct` value also effectively identifies the version of the credential type definition,
214-
as it ties a particular instance of a credential to a specific structure, set of semantics and rules.
215+
as it ties a particular instance of a credential to a specific structure, set of semantics, and rules.
215216
When evolving a credential type without updating the version, changes to the structure or meaning of the associated claims
216217
need to be made in a way that preserves compatibility with existing implementations.
217218

@@ -229,6 +230,7 @@ a type:
229230
"vct": "https://credentials.example.com/identity_credential"
230231
}
231232
```
233+
232234
For example, a value of `https://credentials.example.com/identity_credential` can be associated with rules that define that at least the registered JWT claims `given_name`, `family_name`, `birthdate`, and `address` must appear in the Unsecured Payload. Additionally, the registered JWT claims `email` and `phone_number`, and the private claims `is_over_18`, `is_over_21`, and `is_over_65` may be used. The type might also indicate that any of the aforementioned claims can be selectively disclosable.
233235

234236
#### Registered JWT Claims {#claims}
@@ -627,6 +629,9 @@ The extended type MAY itself extend another type. This can be used to create a
627629
chain or hierarchy of types. The security considerations described in
628630
(#circular-extends) apply in order to avoid problems with circular dependencies.
629631

632+
Processing details when extending type metadata are described in
633+
(#display-metadata-extends) and (#claim-metadata-extends).
634+
630635
# Document Integrity {#document-integrity}
631636

632637
The `vct` claim in the SD-JWT VC as defined in (#claims) and various URIs in the
@@ -772,6 +777,17 @@ template and thereby compromise the security of the consuming application. The
772777
consuming application MUST NOT execute any code in the SVG template. If code
773778
execution cannot be prevented reliably, the SVG display MUST be sandboxed.
774779

780+
Furthermore, consuming applications MUST ensure that references to external
781+
resources (images, etc.) from within the SVG cannot be used to track users or
782+
the usage of credentials.
783+
784+
## Extending Display Metadata {#display-metadata-extends}
785+
786+
When an SD-JWT VC type extends another type as described in
787+
(#extending-type-metadata), the `display` metadata remains valid for the
788+
inheriting type unless that type defines its own `display` property, in which
789+
case the original display metadata is ignored.
790+
775791
# Claim Metadata {#claim-metadata}
776792

777793
The `claims` property is an array of objects containing information about
@@ -803,6 +819,8 @@ selected, a `null` value indicates that all elements of the currently selected
803819
array(s) are to be selected, and a non-negative integer indicates that the
804820
respective index in an array is to be selected.
805821

822+
### Example
823+
806824
The following shows a non-normative, reduced example of a credential:
807825

808826
```json
@@ -841,7 +859,9 @@ claims in the credential above:
841859
The example in (#ExampleTypeMetadata) shows how the `path` can be used to
842860
address arrays and their elements.
843861

844-
In detail, the array is processed from left to right as follows:
862+
### Processing of `path`
863+
864+
In detail, the array components of `path` are processed from left to right as follows:
845865

846866
1. Select the root element of the credential, i.e., the top-level JSON object.
847867
2. Process the `path` components from left to right:
@@ -913,7 +933,14 @@ either `always` or `never` to avoid ambiguity.
913933

914934
## Extending Claim Metadata {#claim-metadata-extends}
915935

916-
The `extends` property allows a type to inherit claim metadata from another type. When present, all claim metadata from the extended type MUST be respected and are inherited by the child type. The child type can extend the claim metadata by adding new claims or properties. If the child type defines claim metadata with the same `path` as in the extended type, the child type's object will override the corresponding object from the extended type.
936+
When an SD-JWT VC type extends another type as described in
937+
(#extending-type-metadata), all claim metadata from the extended type MUST be
938+
respected and are inherited by the child type. The child type can extend the
939+
claim metadata by adding new claims or properties. If the child type defines
940+
claim metadata with the same `path` as in the extended type, the child type's
941+
object will override the corresponding object from the extended type.
942+
943+
### Limitations for `sd` and `mandatory`
917944

918945
An extending type can specify an `sd` property for a claim that is marked as
919946
`allowed` in the extended type (or where `sd` was omitted), changing it to either `always` or `never`.
@@ -924,6 +951,8 @@ Similarly, an extending type can set the `mandatory` property of a claim that is
924951
optional in the extended type to `true`, but it MUST NOT change a claim that is
925952
`mandatory` in the extended type to `false`.
926953

954+
### Example for Extending Type Metadata
955+
927956
Suppose we have a base type metadata document:
928957

929958
```json
@@ -1631,6 +1660,7 @@ for their contributions (some of which substantial) to this draft and to the ini
16311660
* Updated/expanded example for Type Metadata
16321661
* Be more consistent with style for lists of claims/parameters/properties
16331662
* Update PID example to make clear that it is not normative
1663+
* Clarification on processing of display metadata
16341664

16351665
-11
16361666

0 commit comments

Comments
 (0)