From eb7c9991633ab7e491f103fc052bef08c283519e Mon Sep 17 00:00:00 2001
From: Dmitri Zagidulin
Data vaults allow for the classic set of CRUD (Create, Read, Update and Delete)
operations on its data models.
+All operations performed by an Encrypted Data Vault must carry appropriate
+authorization. This section considers the structure (data model) of
+authorizations in the context of operations they're authorizing.
+This operation creates/provisions an Encrypted Data Vault instance by specifying
+a
+This operation creates an encrypted resource (a Document with or without an
+associated Stream), in a given vault instance.
+
+Returns the
+Returns the requested encrypted resource.
+
-Does an Update Index operation make sense?
-
+ Modifies the
+Updates the encrypted resource (note that this is a "full replace" operation),
+and any corresponding encrypted indexes.
+
+Deletes a vault.
+
+Deletes the encrypted resource (note that a tombstone object should remain
+behind for replication purposes).
+
+ Requests all resources in a vault.
+
- Operations
+ Operations and Authorization Structure
Create Operation
-
-
+ DataVaultConfiguration
structure. This includes Replication configuration.
-
+ Create Vault
+
+
+ DataVaultConfiguration
structure (see the Encrypted Data Vault
+Data Model section). This includes Replication configuration.
+
+{
+ "@context": ["https://w3id.org/security/v2"],
+ "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",
+ "proof": {
+ // ...
+ }
+}
+
+
+ Create Resource
+
+
+
+{
+ "@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": {
+ // ...
+ }
+}
+
+
Read Operation
-
-
+ DataVaultConfiguration
object
-for a given Vault.
- Read Vault Configuration
+
+ DataVaultConfiguration
object for a given Vault.
+
+{
+ "@context": ["https://w3id.org/security/v2"],
+ "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",
+ "proof": {
+ // ...
+ }
+}
+
+ Read Resource (Document or Stream)
+
+
+{
+ "@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": {
+ // ...
+ }
+}
+
+
Update Operation
- Update Vault Configuration
-
-
+ DataVaultConfiguration
-object for a given Vault.
- DataVaultConfiguration
object for a given Vault.
+
+{
+ "@context": ["https://w3id.org/security/v2"],
+ "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",
+ "proof": {
+ // ...
+ }
+}
+
+ Update Resource (Document or Stream)
+
+
+{
+ "@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": {
+ // ...
+ }
+}
+
+
Delete Operation
-
+ Delete Vault
-
-
+
+
+
+{
+ "@context": ["https://w3id.org/security/v2"],
+ "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",
+ "proof": {
+ // ...
+ }
+}
+
+ Delete Resource (Document with or without an associated Stream)
+
+
+
+
+{
+ "@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": {
+ // ...
+ }
+}
+
+
+ Query Operation
+
+
+ Query all Resources in a Vault
+
+
+{
+ "@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": {
+ // ...
+ }
+}
+
+ Query on an Encrypted Index Value
+
+
+
{
- "@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..."
}
}
@@ -580,21 +591,6 @@
This operation creates an encrypted resource (a Document with or without an
associated Stream), in a given vault instance.
-{ - "@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": { - // ... - } -} -@@ -613,14 +609,25 @@
{ - "@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..." } }@@ -632,21 +639,6 @@
Returns the requested encrypted resource.
- --{ - "@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": { - // ... - } -} -@@ -665,14 +657,25 @@
{ - "@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..." } }@@ -685,21 +688,6 @@
-{ - "@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": { - // ... - } -} -@@ -720,14 +708,25 @@
{ - "@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..." } }@@ -742,21 +741,6 @@
-{ - "@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": { - // ... - } -} -@@ -772,20 +756,6 @@
-{ - "@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": { - // ... - } -} -