Skip to content

Commit 150bfbb

Browse files
committed
Revert all changes to Section 5.3: Integrity of Related Resources.
1 parent ff6c9a1 commit 150bfbb

File tree

1 file changed

+54
-79
lines changed

1 file changed

+54
-79
lines changed

index.html

Lines changed: 54 additions & 79 deletions
Original file line numberDiff line numberDiff line change
@@ -3090,136 +3090,110 @@ <h4>Semantic Interoperability</h4>
30903090
<section>
30913091
<h2>Integrity of Related Resources</h2>
30923092
<p>
3093-
When including a link to an external resource in a [=verifiable credential=], it
3094-
is desirable to know whether the resource has been modified after the
3095-
[=verifiable credential=] was issued. This applies to cases where there is an
3096-
external resource that is remotely retrieved, as well as to cases where the
3097-
[=issuer=] and/or [=verifier=] might have local cached copies of a resource. It
3098-
is also desirable to know that the contents of the JSON-LD context(s) used in
3099-
the [=verifiable credential=] are the same when used by both the [=issuer=] and
3100-
[=verifier=].
3093+
When including a link to an external resource in a [=verifiable credential=],
3094+
it is desirable to know whether the resource that is pointed to is the same at
3095+
signing time as it is at verification time. This applies to cases where there is
3096+
an external resource that is remotely retrieved as well as to cases where the
3097+
[=issuer=] and/or [=verifier=] may have local cached copies of a resource.
3098+
</p>
3099+
<p>
3100+
It is also desirable to know that the contents of the JSON-LD context(s) used in
3101+
the [=verifiable credential=] are the same when used by both the
3102+
[=issuer=] and [=verifier=].
3103+
</p>
3104+
<p>
3105+
To validate that a resource referenced by a [=verifiable credential=] is the
3106+
same at verification time as it is at issuing time, an implementer MAY include a
3107+
property named <code id="defn-relatedResource">relatedResource</code> that
3108+
stores an array of objects that describe additional integrity metadata about
3109+
each resource referenced by the [=verifiable credential=]. If
3110+
`relatedResource` is present, there MUST be an object in the array
3111+
for each remote resource for each context used in the verifiable credential.
31013112
</p>
3102-
31033113
<p class="issue" title="Mandatory listing of contexts in relatedResouce are under debate.">
31043114
The requirement that contexts be listed in `relatedResource` is currently being
31053115
debated in the VCWG. This requirement might be removed in future iterations of
31063116
the specification.
31073117
</p>
3108-
31093118
<p>
3110-
To extend integrity protection to a related resource, an [=issuer=] of a
3111-
[=verifiable credential=] MAY include the `relatedResource` property:
3119+
Each object in the `relatedResource` array MUST contain the
3120+
following: the [[URL]] to the resource named `id` and the
3121+
<code id="defn-digestSRI">digestSRI</code> information for the resource
3122+
constructed using the method specified in
3123+
<a href="https://www.w3.org/TR/SRI/#integrity-metadata">Subresource Integrity</a>.
31123124
</p>
3113-
3114-
<dl>
3115-
<dt id="defn-relatedResource">relatedResource</dt>
3116-
<dd>
3117-
The value of the `relatedResource` property MUST be associated with one or
3118-
more objects of the following form:
3119-
<table class="simple">
3120-
<thead>
3121-
<th>Property</th>
3122-
<th>Description</th>
3123-
</thead>
3124-
<tbody>
3125-
<tr>
3126-
<td>`id`</td>
3127-
<td>
3128-
The identifier for the resource is REQUIRED and conforms to the format defined
3129-
in Section [[[#identifiers]]]. The value MUST be unique among the list of
3130-
related resource objects.
3131-
</td>
3132-
</tr>
3133-
<tr>
3134-
<td>`mediaType`</td>
3135-
<td>
3136-
An OPTIONAL valid media type as listed in the
3137-
<a href="https://www.iana.org/assignments/media-types/media-types.xhtml">
3138-
IANA Media Types</a> registry.
3139-
</td>
3140-
</tr>
3141-
<tr>
3142-
<td>`digestSRI`</td>
3143-
<td>
3144-
A cryptographic digest, as defined in [[[SRI]]].
3145-
</td>
3146-
</tr>
3147-
<tr>
3148-
<td>`digestMultibase`</td>
3149-
<td>
3150-
A cryptographic digest, as defined in [[[VC-DATA-INTEGRITY]]].
3151-
</td>
3152-
</tr>
3153-
</tbody>
3154-
</table>
3155-
Each object associated with `relatedResource` MUST contain at least a
3156-
`digestSRI` or `digestMultibase` value.
3157-
</dd>
3158-
</dl>
3159-
31603125
<p class="issue" title="Unification of cryptographic hash expression formats are under discussion">
31613126
The Working Group is currently attempting to determine whether cryptographic hash
31623127
expression formats can be unified across all of the VCWG core specifications.
31633128
Candidates for this mechanism include `digestSRI` and `digestMultibase`. There
31643129
are arguments for and against unification that the WG is currently debating.
31653130
</p>
3166-
31673131
<p>
3168-
If a `mediaType` is listed, implementations that retrieve the resource
3169-
using [[[?RFC9110]]] SHOULD:
3132+
There MUST NOT be more than one object in the `relatedResource` per
3133+
`id`.
3134+
</p>
3135+
<p>
3136+
An object in the `relatedResource` array MAY contain a property named
3137+
`mediaType` that indicates the expected media type for the indicated
3138+
`resource`. If a `mediaType` is included, its value
3139+
SHOULD:
31703140
</p>
31713141
<ul>
31723142
<li>
3173-
use the media type in the `Accept` HTTP Header, and
3143+
be a valid media type as listed in the
3144+
<a href="https://www.iana.org/assignments/media-types/media-types.xhtml">
3145+
IANA Media Types</a> registry
3146+
</li>
3147+
<li>
3148+
be used when retrieving the content, such as via the `Accept` HTTP Header
31743149
</li>
31753150
<li>
3176-
use the media type in the `Content-Type` HTTP Header.
3151+
match the retrieved content media type, such as via the `Content-Type` HTTP
3152+
Header.
31773153
</li>
31783154
</ul>
31793155

31803156
<p>
3181-
Any object in the [=verifiable credential=] that contains an `id`
3157+
Any object in the [=verifiable credential=] that contains an `id` [[URL]]
31823158
property MAY be annotated with integrity information as specified in this
3183-
section.
3159+
section by inclusion of `digestSRI`
3160+
in the object.
31843161
</p>
3185-
31863162
<p>
3187-
Any objects for which selective disclosure or unlinkable disclosure is desired
3188-
SHOULD NOT be included as an object in the `relatedResource` array.
3163+
Any objects for which selective disclosure is desired SHOULD NOT be included as
3164+
an object in the `relatedResource` array.
31893165
</p>
3190-
31913166
<p>
31923167
Specification authors that write algorithms that fetch a resource based on the
31933168
`id` of an object inside a [=conforming document=] need to consider whether
31943169
that resource's content is vital to the validity of that document. If it is, the
3195-
specification MUST produce a validation error unless the resource matches the
3196-
expected media type and cryptographic digest.
3170+
specification MUST produce a validation error unless the resource has the
3171+
expected media type and its bytes hash to the expected digest.
31973172
</p>
31983173
<p>
31993174
Implementers are urged to consult appropriate sources, such as the
32003175
<a href="https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.180-4.pdf">
32013176
FIPS 180-4 Secure Hash Standard</a> and the
32023177
<a href="https://media.defense.gov/2022/Sep/07/2003071834/-1/-1/0/CSA_CNSA_2.0_ALGORITHMS_.PDF">
32033178
Commercial National Security Algorithm Suite 2.0</a> to ensure that they are
3204-
choosing a current and reliable hash algorithm. At the time of this writing
3179+
chosing a current and reliable hash algorithm. At the time of this writing
32053180
`sha384` SHOULD be considered the minimum strength hash algorithm for use by
32063181
implementers.
32073182
</p>
32083183
<p class="issue">
32093184
The working group is discussing if we will adopt more aspects of subresource
32103185
integrity as defined in [[SRI]] is adopted into the [[JSON-LD11]] specification as
32113186
noted in that specifications <a href="https://www.w3.org/TR/json-ld11/#security">
3212-
current security considerations</a> of that specification, the
3213-
approach described in this section can serve as an additional check towards
3214-
ensuring that a cached context used when issuing
3215-
a [=verifiable credential=] matches the remote resource.
3187+
current security considerations</a> of that specification, this hash in the VC
3188+
can serve as an additional check towards ensuring that a cached context used
3189+
when issuing the VC matches the remote resource.
32163190
</p>
32173191
<p>
32183192
An example of a related resource integrity object referencing JSON-LD contexts.
32193193
</p>
32203194

32213195
<pre class="example nohighlight"
3222-
title="Usage of the relatedResource and digestSRI property">
3196+
title="Usage of the relatedResource property">
32233197
"relatedResource": [{
32243198
"id": "https://www.w3.org/ns/credentials/v2",
32253199
"digestSRI":
@@ -3242,8 +3216,9 @@ <h2>Integrity of Related Resources</h2>
32423216
"id": "did:example:ebfeb1f712ebc6f1c276e12ec21",
32433217
"image": {
32443218
"id": "https://university.example.org/images/58473",
3219+
"digestSRI":
3220+
"sha384-ZfAwuJmMgoX3s86L7x9XSPi3AEbiz6S/5SyGHJPCxWHs5NEth/c5S9QoS1zZft+J",
32453221
"mediaType": "application/svg+xml",
3246-
"digestMultibase": "zQmdfTbBqBPQ7VNxZEYEj14VmRuZBkqFbiwReogJgS1zR1n"
32473222
},
32483223
...
32493224
}

0 commit comments

Comments
 (0)