Skip to content

Commit

Permalink
Update vault crud zCaps, remove others.
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitrizagidulin committed Nov 11, 2021
1 parent eb7c999 commit ad4a447
Showing 1 changed file with 56 additions and 86 deletions.
142 changes: 56 additions & 86 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -558,14 +558,25 @@ <h4>
<pre class="example highlight"
title="Example authorization capability for a Create Vault operation.">
{
"@context": ["https://w3id.org/security/v2"],
"@context": [
"https://w3id.org/security/v2",
"https://w3id.org/security/suites/ed25519-2020/v1"
],
"id": "urn:zcap:root:https%3A%2F%2Fexample.com%2Fedvs",
"allowedAction": "write",
// entity on which the operation is performed
"invocationTarget": "https://example.com/edvs",
// DID used to prove possession (invoke the capability)
"controller": "did:example:abcd",
"invoker": "did:example:abcd#z6Mkje7QZCEUGCxTsxQjq4V37YGZoUrUc9cwJZ3gLHRTrixF",
"proof": {
// ...
"type": "Ed25519Signature2020",
"created": "2021-11-11T20:30:40Z",
"verificationMethod": "did:example:abcd#z6Mkje7QZCEUGCxTsxQjq4V37YGZoUrUc9cwJZ3gLHRTrixF",
"proofPurpose": "capabilityInvocation",
"capabilityChain": [
"urn:zcap:root:https%3A%2F%2Fexample.com%2Fedvs"
],
"proofValue": "z3sLGvhHU..."
}
}
</pre>
Expand All @@ -580,21 +591,6 @@ <h4>
This operation creates an encrypted resource (a Document with or without an
associated Stream), in a given vault instance.
</p>

<pre class="example highlight"
title="Example authorization capability for a Create Resource operation.">
{
"@context": ["https://w3id.org/security/v2"],
"allowedAction": "write",
// entity on which the operation is performed
"invocationTarget": "https://example.com/edvs/z4sRgBJJLnYy/documents",
// DID used to prove possession (invoke the capability)
"controller": "did:example:abcd",
"proof": {
// ...
}
}
</pre>
</section>
</section>

Expand All @@ -613,14 +609,25 @@ <h4>Read Vault Configuration</h4>
<pre class="example highlight"
title="Example authorization capability for a Read Vault Config operation.">
{
"@context": ["https://w3id.org/security/v2"],
"@context": [
"https://w3id.org/security/v2",
"https://w3id.org/security/suites/ed25519-2020/v1"
],
"id": "urn:zcap:root:https%3A%2F%2Fexample.com%2Fedvs/z4sRgBJJLnYy",
"allowedAction": "read",
// entity on which the operation is performed
"invocationTarget": "https://example.com/edvs/z4sRgBJJLnYy",
// DID used to prove possession (invoke the capability)
"controller": "did:example:abcd",
"invoker": "did:example:abcd#z6Mkje7QZCEUGCxTsxQjq4V37YGZoUrUc9cwJZ3gLHRTrixF",
"proof": {
// ...
"type": "Ed25519Signature2020",
"created": "2021-11-11T20:30:40Z",
"verificationMethod": "did:example:abcd#z6Mkje7QZCEUGCxTsxQjq4V37YGZoUrUc9cwJZ3gLHRTrixF",
"proofPurpose": "capabilityInvocation",
"capabilityChain": [
"urn:zcap:root:https%3A%2F%2Fexample.com%2Fedvs/z4sRgBJJLnYy"
],
"proofValue": "z3sLGvhHU..."
}
}
</pre>
Expand All @@ -632,21 +639,6 @@ <h4>Read Resource (Document or Stream)</h4>
<p>
Returns the requested encrypted resource.
</p>

<pre class="example highlight"
title="Example authorization capability for a Read Resource operation.">
{
"@context": ["https://w3id.org/security/v2"],
"allowedAction": "read",
// entity on which the operation is performed
"invocationTarget": "https://example.com/edvs/z4sRgBJJLnYy/documents/zMbxmSDn2Xzz",
// DID used to prove possession (invoke the capability)
"controller": "did:example:abcd",
"proof": {
// ...
}
}
</pre>
</section>
</section>

Expand All @@ -665,14 +657,25 @@ <h4>Update Vault Configuration</h4>
<pre class="example highlight"
title="Example authorization capability for an Update Vault operation.">
{
"@context": ["https://w3id.org/security/v2"],
"@context": [
"https://w3id.org/security/v2",
"https://w3id.org/security/suites/ed25519-2020/v1"
],
"id": "urn:zcap:root:https%3A%2F%2Fexample.com%2Fedvs/z4sRgBJJLnYy",
"allowedAction": "write",
// entity on which the operation is performed
"invocationTarget": "https://example.com/edvs/z4sRgBJJLnYy",
// DID used to prove possession (invoke the capability)
"controller": "did:example:abcd",
"invoker": "did:example:abcd#z6Mkje7QZCEUGCxTsxQjq4V37YGZoUrUc9cwJZ3gLHRTrixF",
"proof": {
// ...
"type": "Ed25519Signature2020",
"created": "2021-11-11T20:30:40Z",
"verificationMethod": "did:example:abcd#z6Mkje7QZCEUGCxTsxQjq4V37YGZoUrUc9cwJZ3gLHRTrixF",
"proofPurpose": "capabilityInvocation",
"capabilityChain": [
"urn:zcap:root:https%3A%2F%2Fexample.com%2Fedvs/z4sRgBJJLnYy"
],
"proofValue": "z3sLGvhHU..."
}
}
</pre>
Expand All @@ -685,21 +688,6 @@ <h4>Update Resource (Document or Stream)</h4>
Updates the encrypted resource (note that this is a "full replace" operation),
and any corresponding encrypted indexes.
</p>

<pre class="example highlight"
title="Example authorization capability for a Read Resource operation.">
{
"@context": ["https://w3id.org/security/v2"],
"allowedAction": "write",
// entity on which the operation is performed
"invocationTarget": "https://example.com/edvs/z4sRgBJJLnYy/documents/zMbxmSDn2Xzz",
// DID used to prove possession (invoke the capability)
"controller": "did:example:abcd",
"proof": {
// ...
}
}
</pre>
</section>
</section>

Expand All @@ -720,14 +708,25 @@ <h4>Delete Vault</h4>
<pre class="example highlight"
title="Example authorization capability for a Delete Vault operation.">
{
"@context": ["https://w3id.org/security/v2"],
"@context": [
"https://w3id.org/security/v2",
"https://w3id.org/security/suites/ed25519-2020/v1"
],
"id": "urn:zcap:root:https%3A%2F%2Fexample.com%2Fedvs/z4sRgBJJLnYy",
"allowedAction": "write",
// entity on which the operation is performed
"invocationTarget": "https://example.com/edvs/z4sRgBJJLnYy",
// DID used to prove possession (invoke the capability)
"controller": "did:example:abcd",
"invoker": "did:example:abcd#z6Mkje7QZCEUGCxTsxQjq4V37YGZoUrUc9cwJZ3gLHRTrixF",
"proof": {
// ...
"type": "Ed25519Signature2020",
"created": "2021-11-11T20:30:40Z",
"verificationMethod": "did:example:abcd#z6Mkje7QZCEUGCxTsxQjq4V37YGZoUrUc9cwJZ3gLHRTrixF",
"proofPurpose": "capabilityInvocation",
"capabilityChain": [
"urn:zcap:root:https%3A%2F%2Fexample.com%2Fedvs/z4sRgBJJLnYy"
],
"proofValue": "z3sLGvhHU..."
}
}
</pre>
Expand All @@ -742,21 +741,6 @@ <h4>Delete Resource (Document with or without an associated Stream)</h4>
Deletes the encrypted resource (note that a tombstone object should remain
behind for replication purposes).
</p>

<pre class="example highlight"
title="Example authorization capability for a Delete Resource operation.">
{
"@context": ["https://w3id.org/security/v2"],
"allowedAction": "write",
// entity on which the operation is performed
"invocationTarget": "https://example.com/edvs/z4sRgBJJLnYy/documents/zMbxmSDn2Xzz",
// DID used to prove possession (invoke the capability)
"controller": "did:example:abcd",
"proof": {
// ...
}
}
</pre>
</section>
</section>

Expand All @@ -772,20 +756,6 @@ <h4>Query all Resources in a Vault</h4>
Requests all resources in a vault.
</p>

<pre class="example highlight"
title="Example authorization capability for a Query All Resources in a Vault operation.">
{
"@context": ["https://w3id.org/security/v2"],
"allowedAction": "read",
// entity on which the operation is performed
"invocationTarget": "https://example.com/edvs/z4sRgBJJLnYy/query",
// DID used to prove possession (invoke the capability)
"controller": "did:example:abcd",
"proof": {
// ...
}
}
</pre>
</section>

<section class="normative">
Expand Down

0 comments on commit ad4a447

Please sign in to comment.