Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add context integrity capabilities to the core data model #1140

Merged
merged 32 commits into from
Jun 27, 2023
Merged
Changes from 1 commit
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
09103b2
chore: add context integrity capabilities
mprorock Jun 2, 2023
71960a5
correct issue
mprorock Jun 2, 2023
4d8bbde
Update index.html
mprorock Jun 2, 2023
c361bf7
incorporate a better example
mprorock Jun 3, 2023
94b5aa1
chore: update to broaden context integrity to remote resources in gen…
mprorock Jun 5, 2023
bab6c6f
Apply suggestions from code review
mprorock Jun 7, 2023
b226e77
update to clarify encoding of hash
mprorock Jun 7, 2023
67e936c
chore: add media types reference
mprorock Jun 12, 2023
610b911
Apply suggestions from code review
mprorock Jun 13, 2023
a53c272
Apply suggestions from code review
mprorock Jun 13, 2023
aaba294
clarify hash encoding around trailing characters
mprorock Jun 13, 2023
8c21cc8
chore: re-rename id to resource. add clarifiation on multiple hashes
mprorock Jun 14, 2023
9e571a3
chore: make timestamp optional for resourceIntegrity objects
mprorock Jun 14, 2023
8694f7d
fix: missing quotes in an example
mprorock Jun 14, 2023
26e71e9
chore: bring resource integrity in line with SRI
mprorock Jun 15, 2023
84da94c
chore: clean up some language
mprorock Jun 15, 2023
1843865
chore: add language around selective disclosure
mprorock Jun 15, 2023
4b8ffbf
expand one example to include all optional properties
mprorock Jun 16, 2023
a15f29f
Apply suggestions from code review from msporny
mprorock Jun 18, 2023
07fd10d
remove an un-needed statement
mprorock Jun 18, 2023
774d696
change media type language from must to should
mprorock Jun 18, 2023
6c1ac58
updated name to relatedResource based on feedback
mprorock Jun 27, 2023
73f9490
remove timestamp from relatedResource
mprorock Jun 27, 2023
1bd4309
chore: adjust to digestSRI
mprorock Jun 27, 2023
90a43b8
chore: adjust line wrapping and format
mprorock Jun 27, 2023
3ecd1b8
chore: adjust titles in examples
mprorock Jun 27, 2023
91c514a
add advisement around mandatory context inclusion
mprorock Jun 27, 2023
abeba96
fixing one more example issue
mprorock Jun 27, 2023
8da92be
add a note regarding hash digest representations
mprorock Jun 27, 2023
4088c86
add some clarifying text
mprorock Jun 27, 2023
afb5879
correct typo
mprorock Jun 27, 2023
a4ef5eb
remove some double spaces
mprorock Jun 27, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
68 changes: 68 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2595,6 +2595,74 @@ <h3>Data Schemas</h3>

</section>

<section>
<h2>Context Integrity</h2>
<p>
In some cases it is desirable to know that the contents of the
context(s) utilized in the verifiable credential are the same as
mprorock marked this conversation as resolved.
Show resolved Hide resolved
used by both the issuer and verifier.
</p>
<p>
To validate that a context included in a Verifiable Credential is
the same at verification time as at issuing time an implementer
mprorock marked this conversation as resolved.
Show resolved Hide resolved
MAY include a property named <code>contextIntegrity</code> that
stores an array of objects that describe additional integrity
metadata about each context used by the VC. If
<code>contextIntegrity</code>
is present there MUST be an object in the array for each remote
mprorock marked this conversation as resolved.
Show resolved Hide resolved
context.
</p>
<p>
mprorock marked this conversation as resolved.
Show resolved Hide resolved
Each object in the
<code>contextIntegrity</code> array MUST contain the following:
the URL to the context named <code>context</code>, a
<code>timestamp</code>
that indicates the time at which the hash was computed, the
<code>hash</code>
mprorock marked this conversation as resolved.
Show resolved Hide resolved
mprorock marked this conversation as resolved.
Show resolved Hide resolved
of the context, and the <code>method</code> which indicates what
hashing algorithm was used as listed as the 'Hash Name String'
property from the <a
href="https://www.iana.org/assignments/named-information/named-information.xhtml">IANA
Named Information Hash Algorithm Registry</a>.
The <code>timestamp</code> property MUST be a string value of an
mprorock marked this conversation as resolved.
Show resolved Hide resolved
[[XMLSCHEMA11-2]] combined date-time string. An implementer may
mprorock marked this conversation as resolved.
Show resolved Hide resolved
include other fields in each object.
</p>
<p>
Implementers should consult appropriate sources, such as the <a
mprorock marked this conversation as resolved.
Show resolved Hide resolved
href="https://www.iana.org/assignments/named-information/named-information.xhtml">IANA
Named Information Hash Algorithm Registry</a> 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
mprorock marked this conversation as resolved.
Show resolved Hide resolved
hash algorithm for use by implemnters.
</p>
<p class="note">
mprorock marked this conversation as resolved.
Show resolved Hide resolved
If at a later date subresource integrity as defined in [[SRI]] is
mprorock marked this conversation as resolved.
Show resolved Hide resolved
adopted into the [[JSON-LD]] specification as noted in that
specifications <a
href="https://www.w3.org/TR/json-ld11/#security">current security
considerations</a> 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.
</p>
<p>
<aside
class="example"
title="context integrity"
>
<p>An example of a context integrity object</p>
<pre>
"contextIntegrity": [{
"context":"https://example.org/v1/context",
mprorock marked this conversation as resolved.
Show resolved Hide resolved
"timestamp": "2020-01-01T19:23:24Z",
mprorock marked this conversation as resolved.
Show resolved Hide resolved
"hash": "0c63a75b845e4f7d01107d852e4c2485c51a50aaaa94fc61995e71bbee983a2ac3713831264adb47fb6bd1e058d5f004",
mprorock marked this conversation as resolved.
Show resolved Hide resolved
"method": "sha3-384"
}]
</pre>
</aside>
</p>
</section>

<section>
<h3>Refreshing</h3>

Expand Down