From 09103b24a056acba929075647a5aaad7f1558278 Mon Sep 17 00:00:00 2001
From: mprorock
+ In some cases it is desirable to know that the contents of the
+ context(s) utilized in the verifiable credential are the same as
+ used by both the issuer and verifier.
+
+ To validate that a context included in a Verifiable Credential is
+ the same at verification time as at issuing time an implementer
+ MAY include a property named
+ Each object in the
+
+ Implementers should consult appropriate sources, such as the IANA
+ Named Information Hash Algorithm Registry to ensure that they
+ are chosing a current and reliable hash algorithm. At the time of
+ this writing `sha-256` should be considered the minimum strength
+ hash algorithm for use by implemnters.
+
+ If at a later date subresource integrity as defined in [[SRI]] is
+ adopted into the [[JSON-LD]] specification as noted in that
+ specifications current security
+ considerations of that specification, this hash in the VC can
+ serve as an additional check towards ensuring that a cached
+ context used when issuing the VC matches the remote resource.
+
+
+ An example of a context integrity object An example of a context integrity object
- In some cases it is desirable to know that the contents of the
+ When including a link to an external resource in a VC it is
+ desireable to know if the resource that is pointed to, is the
+ same at signing time, as at verification time. This applies to
+ both cases where there is an external resource that is
+ remotely retrieved, as well as to cases where the issuer and/or
+ verifier may have local cached copies of a resource.
+
+ It is also desirable to know that the contents of the
context(s) utilized in the verifiable credential are the same as
- used by both the issuer and verifier.
+ used by both the issuer and verifier.
- To validate that a context included in a Verifiable Credential is
+ To validate that a resource referenced by a Verifiable Credential is
the same at verification time as at issuing time an implementer
- MAY include a property named
Each object in the
-
+
+
- When including a link to an external resource in a VC it is
- desireable to know if the resource that is pointed to, is the
- same at signing time, as at verification time. This applies to
- both cases where there is an external resource that is
- remotely retrieved, as well as to cases where the issuer and/or
+ When including a link to an external resource in a VC, it is
+ desirable to know whether the resource that is pointed to is the
+ same at signing time as at verification time. This applies
+ to cases where there is an external resource that is
+ remotely retrieved as well as to cases where the issuer and/or
verifier may have local cached copies of a resource.
It is also desirable to know that the contents of the
- context(s) utilized in the verifiable credential are the same as
+ context(s) used in the verifiable credential are the same when
used by both the issuer and verifier.
To validate that a resource referenced by a Verifiable Credential is
- the same at verification time as at issuing time an implementer
+ the same at verification time as at issuing time, an implementer
MAY include a property named
From b226e771c8a4a90b73b5bf14b44851006d035b7c Mon Sep 17 00:00:00 2001
From: Mike Prorock
+ An object in the
+ An object in the
@@ -2653,15 +2653,15 @@ Data Schemas
+ Context Integrity
+ contextIntegrity
that
+ stores an array of objects that describe additional integrity
+ metadata about each context used by the VC. If
+ contextIntegrity
+ is present there MUST be an object in the array for each remote
+ context.
+ contextIntegrity
array MUST contain the following:
+ the URL to the context named context
, a
+ timestamp
+ that indicates the time at which the hash was computed, the
+ hash
+ of the context, and the method
which indicates what
+ hashing algorithm was used as listed as the 'Hash Name String'
+ property from the IANA
+ Named Information Hash Algorithm Registry.
+ The timestamp
property MUST be a string value of an
+ [[XMLSCHEMA11-2]] combined date-time string. An implementer may
+ include other fields in each object.
+ Refreshing
From 71960a5960eef13f4cd3724c31dcad2610a14813 Mon Sep 17 00:00:00 2001
From: Mike Prorock Context Integrity
"contextIntegrity": [{
- "context":"https://example.org/v1/context",
+ "@context": [
+ "https://www.w3.org/ns/credentials/v2",
+ "https://www.w3.org/ns/credentials/examples/v2"
+ ],
"timestamp": "2020-01-01T19:23:24Z",
"hash": "0c63a75b845e4f7d01107d852e4c2485c51a50aaaa94fc61995e71bbee983a2ac3713831264adb47fb6bd1e058d5f004",
"method": "sha3-384"
From 4d8bbde5eff747cb3a0eef0c66be1a93881ddf76 Mon Sep 17 00:00:00 2001
From: Mike Prorock
Context Integrity
"contextIntegrity": [{
"@context": [
"https://www.w3.org/ns/credentials/v2",
- "https://www.w3.org/ns/credentials/examples/v2"
],
"timestamp": "2020-01-01T19:23:24Z",
"hash": "0c63a75b845e4f7d01107d852e4c2485c51a50aaaa94fc61995e71bbee983a2ac3713831264adb47fb6bd1e058d5f004",
From c361bf7b05ec4194082d794fa68c9221b0194f41 Mon Sep 17 00:00:00 2001
From: Mike Prorock Context Integrity
"contextIntegrity": [{
- "@context": [
- "https://www.w3.org/ns/credentials/v2",
- ],
+ "@context": "https://www.w3.org/ns/credentials/v2",
"timestamp": "2020-01-01T19:23:24Z",
"hash": "0c63a75b845e4f7d01107d852e4c2485c51a50aaaa94fc61995e71bbee983a2ac3713831264adb47fb6bd1e058d5f004",
"method": "sha3-384"
+ },{
+ "@context": "https://www.w3.org/ns/credentials/examples/v2",
+ "timestamp": "2019-02-04T17:32:15Z",
+ "hash": "ac996ae492f9a987c84f109f2118d3f6632e2259455d30c455a9ecd66c3c4959",
+ "method": "sha2-256"
}]
From 94b5aa1ce43ae6394d82b2fb1149a70de46daf4b Mon Sep 17 00:00:00 2001
From: mprorock Data Schemas
Context Integrity
+ External Resource Integrity
contextIntegrity
that
+ MAY include a property named resourceIntegrity
that
stores an array of objects that describe additional integrity
- metadata about each context used by the VC. If
- contextIntegrity
+ metadata about each resource referenced by the VC. If
+ resourceIntegrity
is present there MUST be an object in the array for each remote
- context.
+ resource.
contextIntegrity
array MUST contain the following:
- the URL to the context named context
, a
+ resourceIntegrity
array MUST contain the following:
+ the URL to the resource named resource
, a
timestamp
that indicates the time at which the hash was computed, the
hash
- of the context, and the method
which indicates what
+ of the resource, and the method
which indicates what
hashing algorithm was used as listed as the 'Hash Name String'
property from the IANA
@@ -2648,17 +2656,17 @@ Context Integrity
Data Schemas
External Resource Integrity
resourceIntegrity
that
stores an array of objects that describe additional integrity
metadata about each resource referenced by the VC. If
resourceIntegrity
- is present there MUST be an object in the array for each remote
+ is present, there MUST be an object in the array for each remote
resource.
External Resource Integrity
property from the IANA
Named Information Hash Algorithm Registry.
+ The hash
property MUST be the base64url [[RFC 4648]]
+ encoded digest of the hash.
The timestamp
property MUST be a string value of an
[[XMLSCHEMA11-2]] combined date-time string. An implementer may
include other fields in each object.
@@ -2662,13 +2664,13 @@ External Resource Integrity
"resourceIntegrity": [{
"resource": "https://www.w3.org/ns/credentials/v2",
- "timestamp": "2020-01-01T19:23:24Z",
- "hash": "0c63a75b845e4f7d01107d852e4c2485c51a50aaaa94fc61995e71bbee983a2ac3713831264adb47fb6bd1e058d5f004",
+ "timestamp": "2023-06-07T19:23:24Z",
+ "hash": "zMxXZRc9wGRgtsdFaCaqluKtZbyEz-emTp4Y1k1wBvgKNYguD7qTACwjWOTUgB-A",
"method": "sha3-384"
},{
"resource": "https://www.w3.org/ns/credentials/examples/v2",
- "timestamp": "2019-02-04T17:32:15Z",
- "hash": "ac996ae492f9a987c84f109f2118d3f6632e2259455d30c455a9ecd66c3c4959",
+ "timestamp": "2023-06-07T17:32:15Z",
+ "hash": "STCt_TVvy-QH6PCA8IDH7tw0dsBsgkewEl9VjCDwvUCVPz5M10dUhrMG9f2Q82MA",
"method": "sha2-256"
}]
@@ -2684,7 +2686,7 @@ External Resource Integrity
"resourceIntegrity": [{
"resource": "https://www.w3.org/Icons/w3c_home.png",
"timestamp": "2023-06-05T19:23:24Z",
- "hash": "d727ecbc780ef52b029e0013677afa36c14e0f31b30dfb6d946739800dd0926ff4f3225be1f7a94d76c02ba2116760be",
+ "hash": "1yfsvHgO9SsCngATZ3r6NsFODzGzDfttlGc5gA3Qkm_08yJb4fepTXbAK6IRZ2C-",
"method": "sha3-384"
}]
From 67e936cc837485112e3efce86ad4eee9dd6e7d6d Mon Sep 17 00:00:00 2001
From: mprorock External Resource Integrity
[[XMLSCHEMA11-2]] combined date-time string. An implementer may
include other fields in each object.
resourceIntegrity
array MAY contain
+ a property named mediaType
that indicates the
+ expected media type for the indicated resource
.
+ If a mediaType
is included it must be a valid
+ media type as listed in the
+
+ IANA Media Types
+ registry.
+ resourceIntegrity
array MAY contain
+ additional properties.
+ External Resource Integrity
additional properties.
- Implementers should consult appropriate sources, such as the IANA Named Information Hash Algorithm Registry to ensure that they are chosing a current and reliable hash algorithm. At the time of - this writing `sha-256` should be considered the minimum strength + this writing `sha-256` SHOULD be considered the minimum strength hash algorithm for use by implemnters.
-- If at a later date subresource integrity as defined in [[SRI]] is +
+ The working group is discussing if we will adopt subresource integrity as defined in [[SRI]] is
adopted into the [[JSON-LD]] specification as noted in that
specifications current security
@@ -2677,14 +2677,14 @@ An example of a resource integrity object referencing contexts An example of a resource integrity object refering to an image
Each object in the
External Resource Integrity
"resourceIntegrity": [{
- "resource": "https://www.w3.org/ns/credentials/v2",
+ "id": "https://www.w3.org/ns/credentials/v2",
"timestamp": "2023-06-07T19:23:24Z",
- "hash": "zMxXZRc9wGRgtsdFaCaqluKtZbyEz-emTp4Y1k1wBvgKNYguD7qTACwjWOTUgB-A",
+ "digest": "zMxXZRc9wGRgtsdFaCaqluKtZbyEz-emTp4Y1k1wBvgKNYguD7qTACwjWOTUgB-A",
"method": "sha3-384"
},{
- "resource": "https://www.w3.org/ns/credentials/examples/v2",
+ "id": "https://www.w3.org/ns/credentials/examples/v2",
"timestamp": "2023-06-07T17:32:15Z",
- "hash": "STCt_TVvy-QH6PCA8IDH7tw0dsBsgkewEl9VjCDwvUCVPz5M10dUhrMG9f2Q82MA",
+ "digest": "STCt_TVvy-QH6PCA8IDH7tw0dsBsgkewEl9VjCDwvUCVPz5M10dUhrMG9f2Q82MA",
"method": "sha2-256"
}]
@@ -2698,9 +2698,9 @@ External Resource Integrity
"resourceIntegrity": [{
- "resource": "https://www.w3.org/Icons/w3c_home.png",
+ "id": "https://www.w3.org/Icons/w3c_home.png",
"timestamp": "2023-06-05T19:23:24Z",
- "hash": "1yfsvHgO9SsCngATZ3r6NsFODzGzDfttlGc5gA3Qkm_08yJb4fepTXbAK6IRZ2C-",
+ "digest": "1yfsvHgO9SsCngATZ3r6NsFODzGzDfttlGc5gA3Qkm_08yJb4fepTXbAK6IRZ2C-",
"method": "sha3-384"
}]
From a53c272785f86a6b4d3bc4027cafe13ec91c6c4a Mon Sep 17 00:00:00 2001
From: Mike Prorock External Resource Integrity
resourceIntegrity
array MUST contain the following:
- the URL to the resource named resource
, a
+ the URL to the resource named id
, a
timestamp
that indicates the time at which the hash was computed, the
- hash
+ digest
of the resource, and the method
which indicates what
hashing algorithm was used as listed as the 'Hash Name String'
property from the IANA
Named Information Hash Algorithm Registry.
- The hash
property MUST be the base64url [[RFC 4648]]
+ The digest
property MUST be the base64url [[RFC 4648]]
encoded digest of the hash.
The timestamp
property MUST be a string value of an
[[XMLSCHEMA11-2]] combined date-time string. An implementer MAY
From aaba294676deb1fa7e8e3e82494e5c103c2c61c2 Mon Sep 17 00:00:00 2001
From: Mike Prorock External Resource Integrity
href="https://www.iana.org/assignments/named-information/named-information.xhtml">IANA
Named Information Hash Algorithm Registrydigest
property MUST be the base64url [[RFC 4648]]
- encoded digest of the hash.
+ encoded digest of the hash with no trailing characters.
The timestamp
property MUST be a string value of an
[[XMLSCHEMA11-2]] combined date-time string. An implementer MAY
include other fields in each object.
From 8c21cc8f83bf8a6ebac466288cdf2831094f654a Mon Sep 17 00:00:00 2001
From: mprorock External Resource Integrity
metadata about each resource referenced by the VC. If
resourceIntegrity
is present, there MUST be an object in the array for each remote
- resource.
+ resource.
Each object in the
resourceIntegrity
array MUST contain the following:
- the URL to the resource named id
, a
+ the [[URL]] to the resource named resource
, a
timestamp
that indicates the time at which the hash was computed, the
digest
@@ -2653,21 +2653,29 @@
- Implementers SHOULD consult appropriate sources, such as the IANA + Implementers SHOULD consult appropriate sources, such as the + IANA Named Information Hash Algorithm Registry to ensure that they are chosing a current and reliable hash algorithm. At the time of this writing `sha-256` SHOULD be considered the minimum strength hash algorithm for use by implemnters.
+
+ If there is more than one object in resourceIntegrity
+ that refers to the same resource
the method
+ MUST be different for each object. When performing integrity
+ checking the strongest hash algorithm available SHOULD be used
+ to confirm integrity of the resource.
+
- The working group is discussing if we will adopt subresource integrity as defined in [[SRI]] is - adopted into the [[JSON-LD]] specification as noted in that - specifications current security - considerations of that specification, this hash in the VC can - serve as an additional check towards ensuring that a cached - context used when issuing the VC matches the remote resource. + The working group is discussing if we will adopt subresource + integrity as defined in [[SRI]] is adopted into the [[JSON-LD]] + specification as noted in that specifications current + security considerations of that specification, this hash in + the VC can serve as an additional check towards ensuring that a + cached context used when issuing the VC matches the remote + resource.
+
+ An object in the resourceIntegrity
array MAY contain
+ a property named timestamp
+ that indicates the time at which the hash was computed.
+
An object in the resourceIntegrity
array MAY contain
a property named mediaType
that indicates the
@@ -2707,7 +2710,6 @@
"resourceIntegrity": [{ "resource": "https://www.w3.org/Icons/w3c_home.png", - "timestamp": "2023-06-05T19:23:24Z", "digest": "1yfsvHgO9SsCngATZ3r6NsFODzGzDfttlGc5gA3Qkm_08yJb4fepTXbAK6IRZ2C-", "method": "sha3-384" }] From 8694f7d9666d8e227003fd9c1369372c7238bd50 Mon Sep 17 00:00:00 2001 From: mprorockDate: Wed, 14 Jun 2023 08:12:16 -0600 Subject: [PATCH 14/32] fix: missing quotes in an example --- index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.html b/index.html index beb1fad11..4c8b92100 100644 --- a/index.html +++ b/index.html @@ -2688,7 +2688,7 @@ External Resource Integrity
An example of a resource integrity object referencing contexts
"resourceIntegrity": [{ - "resource: "https://www.w3.org/ns/credentials/v2", + "resource": "https://www.w3.org/ns/credentials/v2", "timestamp": "2023-06-07T19:23:24Z", "digest": "zMxXZRc9wGRgtsdFaCaqluKtZbyEz-emTp4Y1k1wBvgKNYguD7qTACwjWOTUgB-A", "method": "sha3-384" From 26e71e983f5d396b99aa28fac1be4366d8816127 Mon Sep 17 00:00:00 2001 From: mprorockDate: Thu, 15 Jun 2023 13:39:18 -0600 Subject: [PATCH 15/32] chore: bring resource integrity in line with SRI --- index.html | 77 +++++++++++++++++++++++++++--------------------------- 1 file changed, 39 insertions(+), 38 deletions(-) diff --git a/index.html b/index.html index 4c8b92100..9357991cc 100644 --- a/index.html +++ b/index.html @@ -2618,28 +2618,29 @@ External Resource Integrity
metadata about each resource referenced by the VC. IfresourceIntegrity
is present, there MUST be an object in the array for each remote - resource. + resource for each context used in the verifiable credential.Each object in the
resourceIntegrity
array MUST contain the following: - the [[URL]] to the resource namedresource
, the -digest
- of the resource, and themethod
which indicates what - hashing algorithm was used as listed as the 'Hash Name String' - property from the IANA - Named Information Hash Algorithm Registry. - Thedigest
property MUST be the base64url [[RFC 4648]] - encoded digest of the hash with no trailing characters. - Thetimestamp
property MUST be a string value of an - [[XMLSCHEMA11-2]] combined date-time string. An implementer MAY - include other fields in each object. + the [[URL]] to the resource namedid
and the +integrity
information for the resource + constructed using the method specified in Subresource + Integrity.- An object in the
+resourceIntegrity
array MAY contain - a property namedtimestamp
- that indicates the time at which the hash was computed. + There may be only one object in theresourceIntegrity
+ perid
. When performing integrity checking the + strongest hash algorithm available SHOULD be used to confirm + integrity of the resource. ++ An object in the
resourceIntegrity
array MAY + contain a property namedtimestamp
+ that indicates the time at which the hash was computed. The +timestamp
property if included MUST be a string + value of an [[XMLSCHEMA11-2]] combined date-time string.An object in the
resourceIntegrity
array MAY contain @@ -2655,6 +2656,13 @@External Resource Integrity
An object in theresourceIntegrity
array MAY contain additional properties. ++ In any object in the
credential.credentialSubject
+ that contains a [[URL]], a property named +integrity
may be included with the integrity + information as specified above, with the [[URL]] in the +id
property. +Implementers SHOULD consult appropriate sources, such as the IANA @@ -2663,13 +2671,7 @@
-External Resource Integrity
this writing `sha-256` SHOULD be considered the minimum strength hash algorithm for use by implemnters.- If there is more than one object in
+resourceIntegrity
- that refers to the sameresource
themethod
- MUST be different for each object. When performing integrity - checking the strongest hash algorithm available SHOULD be used - to confirm integrity of the resource. -The working group is discussing if we will adopt subresource integrity as defined in [[SRI]] is adopted into the [[JSON-LD]] @@ -2688,15 +2690,11 @@
External Resource Integrity
An example of a resource integrity object referencing contexts
"resourceIntegrity": [{ - "resource": "https://www.w3.org/ns/credentials/v2", - "timestamp": "2023-06-07T19:23:24Z", - "digest": "zMxXZRc9wGRgtsdFaCaqluKtZbyEz-emTp4Y1k1wBvgKNYguD7qTACwjWOTUgB-A", - "method": "sha3-384" - },{ - "resource": "https://www.w3.org/ns/credentials/examples/v2", - "timestamp": "2023-06-07T17:32:15Z", - "digest": "STCt_TVvy-QH6PCA8IDH7tw0dsBsgkewEl9VjCDwvUCVPz5M10dUhrMG9f2Q82MA", - "method": "sha2-256" + "id": "https://www.w3.org/ns/credentials/v2", + "integrity": "sha384-lHKDHh0msc6pRx8PhDOMkNtSI8bOfsp4giNbUrw71nXXLf13nTqNJoRp3Nx+ArVK", + },{ + "id": "https://www.w3.org/ns/credentials/examples/v2", + "integrity": "sha384-zNNbQTWCSUSi0bbz7dbua+RcENv7C6FvlmYJ1Y+I727HsPOHdzwELMYO9Mz68M26", }]@@ -2706,13 +2704,16 @@External Resource Integrity
class="example" title="resource integrity over image" > -An example of a resource integrity object refering to an image
+An example of a resource integrity object in a credentialSubject refering to an image
- "resourceIntegrity": [{ - "resource": "https://www.w3.org/Icons/w3c_home.png", - "digest": "1yfsvHgO9SsCngATZ3r6NsFODzGzDfttlGc5gA3Qkm_08yJb4fepTXbAK6IRZ2C-", - "method": "sha3-384" - }] + "credentialSubject": { + "id": "did:example:ebfeb1f712ebc6f1c276e12ec21", + "image": { + "id": "https://university.example/images/58473", + "integrity": "sha384-ZfAwuJmMgoX3s86L7x9XSPi3AEbiz6S/5SyGHJPCxWHs5NEth/c5S9QoS1zZft+J" + }, + ... + }From 84da94c185345b11db47b3b125a7cf36ad02a43f Mon Sep 17 00:00:00 2001 From: mprorockDate: Thu, 15 Jun 2023 13:45:36 -0600 Subject: [PATCH 16/32] chore: clean up some language --- index.html | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/index.html b/index.html index 9357991cc..8d6078fb5 100644 --- a/index.html +++ b/index.html @@ -2630,8 +2630,11 @@ External Resource Integrity
Integrity.- There may be only one object in the
+resourceIntegrity
- perid
. When performing integrity checking the + There MUST NOT be more than one object in the +resourceIntegrity
perid
. ++ When performing integrity checking the strongest hash algorithm available SHOULD be used to confirm integrity of the resource.
From 1843865c12fe1c66e9eecc5575f8d6280cb604a4 Mon Sep 17 00:00:00 2001 From: mprorockDate: Thu, 15 Jun 2023 13:47:37 -0600 Subject: [PATCH 17/32] chore: add language around selective disclosure --- index.html | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/index.html b/index.html index 8d6078fb5..8f68f7fd7 100644 --- a/index.html +++ b/index.html @@ -2666,6 +2666,11 @@ External Resource Integrity
information as specified above, with the [[URL]] in theid
property. ++ Any objects for which selective disclosure is desired SHOULD NOT + be included as an object in the
resourceIntegrity
+ array. +Implementers SHOULD consult appropriate sources, such as the IANA @@ -2674,7 +2679,6 @@
-External Resource Integrity
this writing `sha-256` SHOULD be considered the minimum strength hash algorithm for use by implemnters.The working group is discussing if we will adopt subresource integrity as defined in [[SRI]] is adopted into the [[JSON-LD]] From 4b8ffbf7b4623c9be5474601470f9d358c75071a Mon Sep 17 00:00:00 2001 From: Mike Prorock
Date: Fri, 16 Jun 2023 10:28:43 -0400 Subject: [PATCH 18/32] expand one example to include all optional properties --- index.html | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/index.html b/index.html index 8f68f7fd7..6a7a2e28b 100644 --- a/index.html +++ b/index.html @@ -2717,7 +2717,9 @@ External Resource Integrity
"id": "did:example:ebfeb1f712ebc6f1c276e12ec21", "image": { "id": "https://university.example/images/58473", - "integrity": "sha384-ZfAwuJmMgoX3s86L7x9XSPi3AEbiz6S/5SyGHJPCxWHs5NEth/c5S9QoS1zZft+J" + "integrity": "sha384-ZfAwuJmMgoX3s86L7x9XSPi3AEbiz6S/5SyGHJPCxWHs5NEth/c5S9QoS1zZft+J", + "mediaType": "application/svg+xml", + "timestamp": "2023-06-16T17:10:24Z" }, ... } From a15f29f42f30fc2ce4cb83f445ab6a82a543d0e1 Mon Sep 17 00:00:00 2001 From: Mike ProrockDate: Sun, 18 Jun 2023 13:09:21 -0400 Subject: [PATCH 19/32] Apply suggestions from code review from msporny improve normative language, grammar and links Co-authored-by: Manu Sporny --- index.html | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/index.html b/index.html index 6a7a2e28b..f778a0712 100644 --- a/index.html +++ b/index.html @@ -2598,24 +2598,24 @@ Data Schemas
External Resource Integrity
- When including a link to an external resource in a VC, it is + When including a link to an external resource in a verifiable credential, it is desirable to know whether the resource that is pointed to is the - same at signing time as at verification time. This applies + same at signing time as it is at verification time. This applies to cases where there is an external resource that is - remotely retrieved as well as to cases where the issuer and/or - verifier may have local cached copies of a resource. + remotely retrieved as well as to cases where the issuer and/or + verifier may have local cached copies of a resource.
It is also desirable to know that the contents of the - context(s) used in the verifiable credential are the same when - used by both the issuer and verifier. + context(s) used in the verifiable credential are the same when + used by both the issuer and verifier.
- To validate that a resource referenced by a Verifiable Credential is - the same at verification time as at issuing time, an implementer + To validate that a resource referenced by a verifiable credential is + the same at verification time as it is at issuing time, an implementer MAY include a property named
resourceIntegrity
that stores an array of objects that describe additional integrity - metadata about each resource referenced by the VC. If + metadata about each resource referenced by the verifiable credential. IfresourceIntegrity
is present, there MUST be an object in the array for each remote resource for each context used in the verifiable credential. @@ -2672,7 +2672,7 @@External Resource Integrity
array.- Implementers SHOULD consult appropriate sources, such as the + Implementers are urged to consult appropriate sources, such as the IANA Named Information Hash Algorithm Registry to ensure that they are chosing a current and reliable hash algorithm. At the time of @@ -2712,7 +2712,7 @@
External Resource Integrity
title="resource integrity over image" >An example of a resource integrity object in a credentialSubject refering to an image
-+"credentialSubject": { "id": "did:example:ebfeb1f712ebc6f1c276e12ec21", "image": { From 07fd10d8b5ea0cfa092be8f46694f03e363dd046 Mon Sep 17 00:00:00 2001 From: Mike ProrockDate: Sun, 18 Jun 2023 13:18:36 -0400 Subject: [PATCH 20/32] remove an un-needed statement Co-authored-by: Manu Sporny --- index.html | 4 ---- 1 file changed, 4 deletions(-) diff --git a/index.html b/index.html index f778a0712..385f2d903 100644 --- a/index.html +++ b/index.html @@ -2655,10 +2655,6 @@ External Resource Integrity
IANA Media Types registry. -- An object in the
resourceIntegrity
array MAY contain - additional properties. -In any object in the
credential.credentialSubject
that contains a [[URL]], a property named From 774d696d03d4f3f726437119115c5ee382accec0 Mon Sep 17 00:00:00 2001 From: Mike ProrockDate: Sun, 18 Jun 2023 13:22:15 -0400 Subject: [PATCH 21/32] change media type language from must to should --- index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.html b/index.html index 385f2d903..29dd8057c 100644 --- a/index.html +++ b/index.html @@ -2649,7 +2649,7 @@ External Resource Integrity
An object in theresourceIntegrity
array MAY contain a property namedmediaType
that indicates the expected media type for the indicatedresource
. - If amediaType
is included it must be a valid + If amediaType
is included it SHOULD be a valid media type as listed in the IANA Media Types From 6c1ac58f1398bd043e24768ed708a472ba515e01 Mon Sep 17 00:00:00 2001 From: Mike ProrockDate: Tue, 27 Jun 2023 09:02:40 -0400 Subject: [PATCH 22/32] updated name to relatedResource based on feedback Co-authored-by: Manu Sporny Co-authored-by: Ted Thibodeau Jr --- index.html | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/index.html b/index.html index 29dd8057c..3fc6c3162 100644 --- a/index.html +++ b/index.html @@ -2596,7 +2596,7 @@ Data Schemas
- External Resource Integrity
+Integrity of Related Resources
When including a link to an external resource in a verifiable credential, it is desirable to know whether the resource that is pointed to is the @@ -2607,22 +2607,22 @@
External Resource Integrity
It is also desirable to know that the contents of the - context(s) used in the verifiable credential are the same when + JSON-LD context(s) used in the verifiable credential are the same when used by both the issuer and verifier.
To validate that a resource referenced by a verifiable credential is the same at verification time as it is at issuing time, an implementer - MAY include a property named
resourceIntegrity
that + MAY include a property namedrelatedResource
that stores an array of objects that describe additional integrity metadata about each resource referenced by the verifiable credential. If -resourceIntegrity
+relatedResource
is present, there MUST be an object in the array for each remote resource for each context used in the verifiable credential.Each object in the -
resourceIntegrity
array MUST contain the following: +relatedResource
array MUST contain the following: the [[URL]] to the resource namedid
and theintegrity
information for the resource constructed using the method specified in External Resource Integrity integrity of the resource.- An object in the
resourceIntegrity
array MAY + An object in therelatedResource
array MAY contain a property namedtimestamp
that indicates the time at which the hash was computed. Thetimestamp
property if included MUST be a string value of an [[XMLSCHEMA11-2]] combined date-time string.- An object in the
resourceIntegrity
array MAY contain + An object in therelatedResource
array MAY contain a property namedmediaType
that indicates the expected media type for the indicatedresource
. If amediaType
is included it SHOULD be a valid @@ -2656,15 +2656,13 @@External Resource Integrity
registry.- In any object in the
credential.credentialSubject
- that contains a [[URL]], a property named -integrity
may be included with the integrity - information as specified above, with the [[URL]] in the -id
property. + Any object in the verifiable credential + that contains an `id` [[URL]] property MAY be annotated with + integrity information as specified in this section.Any objects for which selective disclosure is desired SHOULD NOT - be included as an object in the
resourceIntegrity
+ be included as an object in therelatedResource
array.From 73f9490f88cf2822839435c2f98f6ce41cdb32c0 Mon Sep 17 00:00:00 2001 From: mprorock
Date: Tue, 27 Jun 2023 07:05:34 -0600 Subject: [PATCH 23/32] remove timestamp from relatedResource --- index.html | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/index.html b/index.html index 3fc6c3162..61b119a1e 100644 --- a/index.html +++ b/index.html @@ -2631,19 +2631,7 @@ Integrity of Related Resources
There MUST NOT be more than one object in the -
-resourceIntegrity
perid
. -- When performing integrity checking the - strongest hash algorithm available SHOULD be used to confirm - integrity of the resource. -
-- An object in the
relatedResource
array MAY - contain a property namedtimestamp
- that indicates the time at which the hash was computed. The -timestamp
property if included MUST be a string - value of an [[XMLSCHEMA11-2]] combined date-time string. +relatedResource
perid
.An object in the
relatedResource
array MAY contain @@ -2713,7 +2701,6 @@Integrity of Related Resources
"id": "https://university.example/images/58473", "integrity": "sha384-ZfAwuJmMgoX3s86L7x9XSPi3AEbiz6S/5SyGHJPCxWHs5NEth/c5S9QoS1zZft+J", "mediaType": "application/svg+xml", - "timestamp": "2023-06-16T17:10:24Z" }, ... } From 1bd4309975d3d4dc10669d90242e18f52f4816b2 Mon Sep 17 00:00:00 2001 From: mprorockDate: Tue, 27 Jun 2023 07:16:50 -0600 Subject: [PATCH 24/32] chore: adjust to digestSRI --- index.html | 39 +++++++++++++++++++++------------------ 1 file changed, 21 insertions(+), 18 deletions(-) diff --git a/index.html b/index.html index 61b119a1e..024e9b335 100644 --- a/index.html +++ b/index.html @@ -2624,7 +2624,7 @@ Integrity of Related Resources
Each object in therelatedResource
array MUST contain the following: the [[URL]] to the resource namedid
and the -integrity
information for the resource +digestSRI
information for the resource constructed using the method specified in Subresource Integrity. @@ -2655,21 +2655,24 @@Integrity of Related Resources
Implementers are urged to consult appropriate sources, such as the - IANA - Named Information Hash Algorithm Registry to ensure that they - are chosing a current and reliable hash algorithm. At the time of - this writing `sha-256` SHOULD be considered the minimum strength - hash algorithm for use by implemnters. + + FIPS 180-4 Secure Hash Standard and the + + Commercial National Security Algorithm Suite 2.0 + to ensure that they are chosing a current and reliable hash + algorithm. At the time of this writing `sha384` SHOULD be + considered the minimum strength hash algorithm for use by + implemnters.
- The working group is discussing if we will adopt subresource - integrity as defined in [[SRI]] is adopted into the [[JSON-LD]] - specification as noted in that specifications current - security considerations of that specification, this hash in - the VC can serve as an additional check towards ensuring that a - cached context used when issuing the VC matches the remote - resource. + The working group is discussing if we will adopt more aspects + of subresource integrity as defined in [[SRI]] is adopted into + the [[JSON-LD]] specification as noted in that specifications + current + security considerations of that specification, this hash + in the VC can serve as an additional check towards ensuring + that a cached context used when issuing the VC matches the + remote resource.
@@ -2698,8 +2701,8 @@
Integrity of Related Resources
"credentialSubject": { "id": "did:example:ebfeb1f712ebc6f1c276e12ec21", "image": { - "id": "https://university.example/images/58473", - "integrity": "sha384-ZfAwuJmMgoX3s86L7x9XSPi3AEbiz6S/5SyGHJPCxWHs5NEth/c5S9QoS1zZft+J", + "id": "https://university.example.org/images/58473", + "digestSRI": "sha384-ZfAwuJmMgoX3s86L7x9XSPi3AEbiz6S/5SyGHJPCxWHs5NEth/c5S9QoS1zZft+J", "mediaType": "application/svg+xml", }, ... From 90a43b8cdfd7f67b266fc37c5c8ee1ea89270308 Mon Sep 17 00:00:00 2001 From: mprorockDate: Tue, 27 Jun 2023 07:18:44 -0600 Subject: [PATCH 25/32] chore: adjust line wrapping and format --- index.html | 53 +++++++++++++++++++++++++++++------------------------ 1 file changed, 29 insertions(+), 24 deletions(-) diff --git a/index.html b/index.html index 024e9b335..9d18fb7b7 100644 --- a/index.html +++ b/index.html @@ -2598,24 +2598,26 @@ Data Schemas
Integrity of Related Resources
- When including a link to an external resource in a verifiable credential, it is - desirable to know whether the resource that is pointed to is the - same at signing time as it is at verification time. This applies - to cases where there is an external resource that is - remotely retrieved as well as to cases where the issuer and/or + When including a link to an external resource in a + verifiable credential, it is desirable to know whether + the resource that is pointed to is the same at signing time as + it is at verification time. This applies to cases where there + is an external resource that is remotely retrieved as well as + to cases where the issuer and/or verifier may have local cached copies of a resource.
- It is also desirable to know that the contents of the - JSON-LD context(s) used in the verifiable credential are the same when - used by both the issuer and verifier. + It is also desirable to know that the contents of the JSON-LD + context(s) used in the verifiable credential are the + same when used by both the issuer and verifier.
- To validate that a resource referenced by a verifiable credential is - the same at verification time as it is at issuing time, an implementer - MAY include a property named
relatedResource
that - stores an array of objects that describe additional integrity - metadata about each resource referenced by the verifiable credential. If + To validate that a resource referenced by a verifiable + credential is the same at verification time as it is at + issuing time, an implementer MAY include a property named +relatedResource
that stores an array of objects + that describe additional integrity metadata about each + resource referenced by the verifiable credential. IfrelatedResource
is present, there MUST be an object in the array for each remote resource for each context used in the verifiable credential. @@ -2634,11 +2636,11 @@Integrity of Related Resources
relatedResource
perid
.- An object in the
relatedResource
array MAY contain - a property namedmediaType
that indicates the - expected media type for the indicatedresource
. - If amediaType
is included it SHOULD be a valid - media type as listed in the + An object in therelatedResource
array MAY + contain a property namedmediaType
that indicates + the expected media type for the indicated +resource
. If amediaType
is included + it SHOULD be a valid media type as listed in the IANA Media Types registry. @@ -2649,12 +2651,13 @@Integrity of Related Resources
integrity information as specified in this section.- Any objects for which selective disclosure is desired SHOULD NOT - be included as an object in the
relatedResource
- array. + Any objects for which selective disclosure is desired SHOULD + NOT be included as an object in the +relatedResource
array.- Implementers are urged to consult appropriate sources, such as the + Implementers are urged to consult appropriate sources, such as + the FIPS 180-4 Secure Hash Standard and the @@ -2679,7 +2682,8 @@
-Integrity of Related Resources
class="example" title="resource integrity" > -An example of a resource integrity object referencing contexts
+An example of a resource integrity object referencing + contexts
"resourceIntegrity": [{ "id": "https://www.w3.org/ns/credentials/v2", @@ -2696,7 +2700,8 @@.Integrity of Related Resources
class="example" title="resource integrity over image" > -An example of a resource integrity object in a credentialSubject refering to an image
+An example of a resource integrity object in a + credentialSubject refering to an image
"credentialSubject": { "id": "did:example:ebfeb1f712ebc6f1c276e12ec21", From 3ecd1b840f67fbec2a706131b6e2e0193023f256 Mon Sep 17 00:00:00 2001 From: mprorockDate: Tue, 27 Jun 2023 07:20:23 -0600 Subject: [PATCH 26/32] chore: adjust titles in examples --- index.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/index.html b/index.html index 9d18fb7b7..649402196 100644 --- a/index.html +++ b/index.html @@ -2680,9 +2680,9 @@ Integrity of Related Resources
+
+The Working Group is currently attempting to determine if cryptographic hash expression formats can be unified across all of the VCWG core specifications. Candidates for this mechanism include `digestSRI` and `digestMultibase`. There are arguments for and against unification that the WG is currently debating. +
There MUST NOT be more than one object in therelatedResource
perid
. From 4088c86c40aade9a0d220c15a71e48e614a65ae6 Mon Sep 17 00:00:00 2001 From: Mike ProrockDate: Tue, 27 Jun 2023 10:08:33 -0400 Subject: [PATCH 30/32] add some clarifying text --- index.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/index.html b/index.html index 53cf1b292..326f3ea18 100644 --- a/index.html +++ b/index.html @@ -2653,7 +2653,8 @@ Integrity of Related Resources
Any object in the verifiable credential that contains an `id` [[URL]] property MAY be annotated with - integrity information as specified in this section. + integrity information as specified in this section by inclusion + of
digestSRI
in the object.Any objects for which selective disclosure is desired SHOULD From afb5879c85a3732ab4db8de4fd471d5fcc704caf Mon Sep 17 00:00:00 2001 From: Mike Prorock
Date: Tue, 27 Jun 2023 11:17:01 -0400 Subject: [PATCH 31/32] correct typo Co-authored-by: David I. Lehn --- index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.html b/index.html index 326f3ea18..dfa3efe71 100644 --- a/index.html +++ b/index.html @@ -2671,7 +2671,7 @@ Integrity of Related Resources
to ensure that they are chosing a current and reliable hash algorithm. At the time of this writing `sha384` SHOULD be considered the minimum strength hash algorithm for use by - implemnters. + implementers.The working group is discussing if we will adopt more aspects From a4ef5eb00ea2cfee30713a4211ef26fc97b435a3 Mon Sep 17 00:00:00 2001 From: Mike Prorock
Date: Tue, 27 Jun 2023 12:05:09 -0400 Subject: [PATCH 32/32] remove some double spaces Co-authored-by: David I. Lehn --- index.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.html b/index.html index dfa3efe71..8ded11dd1 100644 --- a/index.html +++ b/index.html @@ -2601,7 +2601,7 @@ Integrity of Related Resources
When including a link to an external resource in a verifiable credential, it is desirable to know whether the resource that is pointed to is the same at signing time as - it is at verification time. This applies to cases where there + it is at verification time. This applies to cases where there is an external resource that is remotely retrieved as well as to cases where the issuer and/or verifier may have local cached copies of a resource. @@ -2669,7 +2669,7 @@Integrity of Related Resources
Commercial National Security Algorithm Suite 2.0 to ensure that they are chosing a current and reliable hash - algorithm. At the time of this writing `sha384` SHOULD be + algorithm. At the time of this writing `sha384` SHOULD be considered the minimum strength hash algorithm for use by implementers.