From 64ca8f1b6412ba3b06b190602b9ce882a7a90cc2 Mon Sep 17 00:00:00 2001 From: Andor Kesselman Date: Wed, 28 Jun 2023 21:28:50 +0530 Subject: [PATCH 01/15] last changed at Jun 9, 2023 6:36 PM, pushed by Andor Kesselman (#232) Co-authored-by: HackMD <37423+hackmd-hub[bot]@users.noreply.github.com> --- docs/agenda.md | 47 +++++++++++++++++++++++++++-------------------- 1 file changed, 27 insertions(+), 20 deletions(-) diff --git a/docs/agenda.md b/docs/agenda.md index d75362b..85f5ed6 100644 --- a/docs/agenda.md +++ b/docs/agenda.md @@ -22,6 +22,33 @@ Bi-weekly DIF call notes on DWN specifications. - Andor Kesselman @andorsk email: andor@benri.io - Liran Cohen @lirancohen +- Alan Karp +- Kirill (mee.foundation) + +## DIF Meeting May 31, 2023 + +* [Recording](https://us02web.zoom.us/rec/share/UYcdp_7UO1ebQ4uFc84AnasAhSmW9Laxs1s2kVRgs48PLywyV12NqoyF800nHEV7.d0hxy8WiCovW8c_j) + + +| Item | Segment | Time | Owner | Description | +| ----------------------------------------- | ----------------------- | ------ | --------------- | ------------------------------------------------------------------------------- | +| Intro | Intro | 5 min | @liran | Quick Intro. New Members. DIF IPR agreement. | +| Agenda | Companion Guide Updates | 10 min | @andorsk/Moises | [added dwn and peergos to the comparison guide #229](https://github.com/decentralized-identity/decentralized-web-node/pull/229)
[Local, Remote, and Relay Nodes. #225](https://github.com/decentralized-identity/decentralized-web-node/pull/225) | +| [Ecosystem Updates]() | Updates | 10 min | @andorsk | protocols.preview.benri.io | +| Agenda | Spec PR Review | 10 min | @csuwildcat | [update the Service Endpoint section of the spec #228](https://github.com/decentralized-identity/decentralized-web-node/pull/228)
[added JSON schemas for DWN specification #209](https://github.com/decentralized-identity/decentralized-web-node/pull/209) | +| Spec Alignment | Spec Alignment | 10 min | @andorsk | Alignment | +| Issue Alignment | Issue Alignment | 10 min | @liran | Alignment | +| Calls To Action | Closing | 5 min | @andorsk | | + +### Issues Discussed: + +- [Authorization layer should limit the amount of data permitted to be stored by a application #96](https://github.com/decentralized-identity/decentralized-web-node/issues/96) +- [Add use cases link #83](https://github.com/decentralized-identity/decentralized-web-node/issues/83) +- [Test Suite Design #213](https://github.com/decentralized-identity/decentralized-web-node/issues/213) +- [Revocation Subtleties #138](https://github.com/decentralized-identity/decentralized-web-node/issues/138) +- [Requiring fine-grained capabilities #142](https://github.com/decentralized-identity/decentralized-web-node/issues/142) +- [as a developer, I can follow docs to run the reference implmentation, so I can test it out and then contribute improvements or passing test-suites #144](https://github.com/decentralized-identity/decentralized-web-node/issues/144) +- [Support both folder based and schema based object storage #190](https://github.com/decentralized-identity/decentralized-web-node/issues/190) ## DIF Meeting May 17, 2023 @@ -53,8 +80,6 @@ Bi-weekly DIF call notes on DWN specifications. * [Recording](https://us02web.zoom.us/rec/share/hGruCrcoOs9FaNuryuQlCLTFIOONSNC98-BTCqg1uypG5kD9NY0lT4CQFRlxTO34.gBW6RZlFYRb_Nbf0) -## DIF Meeting April 19, 2023 - ### Attendees - Andor Kesselman @andorsk @@ -101,24 +126,6 @@ Again this week we are overbooked with content. That's because we have a lot of - Liran Cohen - Dan Buchner @csuwildcat -### Agenda - -Hopefully we can get spec alignment today. - -| Item | Segment | Time | Owner | Description | -| --------------- | ----------------------- | ------ | --------------- | ------------------------------------------------------------------------------- | -| Intro | Intro | 5 min | @liran | Quick Intro. New Members. DIF IPR agreement. | -| Agenda | Companion Guide Updates | 10 min | @andorsk/Moises | Merge https://github.com/decentralized-identity/decentralized-web-node/pull/226 | -| [TBD Updates]() | Updates | 10 min | @csuwildcat | | -| Spec Alignment | Spec Alignment | 10 min | @andorsk | Alignment | -| Issue Alignment | Issue Alignment | 10 min | @liran | Alignment | -| Calls To Action | Closing | 5 min | @andorsk | | - -### Notes - -- Discussed: How we get TBD's updates into issues. -- We called this meeting short as there were not enough participants. - ## DIF Meeting March 22, 2023 * [Recording](https://us02web.zoom.us/rec/share/SW5VZtYayd21HDKOQcGcPJJRsSvvwzHCcrxfJXm55iK94QoZ4who5cnCdW47pYC9.vCyjDuKgDCLCXoxw) From 8386d241b44348acd7c9fa45590a529366a395a5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 28 Jun 2023 21:56:35 +0530 Subject: [PATCH 02/15] Bump terser from 4.8.0 to 4.8.1 (#191) Bumps [terser](https://github.com/terser/terser) from 4.8.0 to 4.8.1. - [Release notes](https://github.com/terser/terser/releases) - [Changelog](https://github.com/terser/terser/blob/master/CHANGELOG.md) - [Commits](https://github.com/terser/terser/commits) --- updated-dependencies: - dependency-name: terser dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index 215d280..1a12a59 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12078,9 +12078,9 @@ } }, "node_modules/terser": { - "version": "4.8.0", - "resolved": "https://registry.npmjs.org/terser/-/terser-4.8.0.tgz", - "integrity": "sha512-EAPipTNeWsb/3wLPeup1tVPaXfIaU68xMnVdPafIL1TV05OhASArYyIfFvnvJCNrR2NIOvDVNNTFRa+Re2MWyw==", + "version": "4.8.1", + "resolved": "https://registry.npmjs.org/terser/-/terser-4.8.1.tgz", + "integrity": "sha512-4GnLC0x667eJG0ewJTa6z/yXrbLGv80D9Ru6HIpCQmO+Q4PfEtBFi0ObSckqwL6VyQv/7ENJieXHo2ANmdQwgw==", "dev": true, "dependencies": { "commander": "^2.20.0", @@ -23207,9 +23207,9 @@ } }, "terser": { - "version": "4.8.0", - "resolved": "https://registry.npmjs.org/terser/-/terser-4.8.0.tgz", - "integrity": "sha512-EAPipTNeWsb/3wLPeup1tVPaXfIaU68xMnVdPafIL1TV05OhASArYyIfFvnvJCNrR2NIOvDVNNTFRa+Re2MWyw==", + "version": "4.8.1", + "resolved": "https://registry.npmjs.org/terser/-/terser-4.8.1.tgz", + "integrity": "sha512-4GnLC0x667eJG0ewJTa6z/yXrbLGv80D9Ru6HIpCQmO+Q4PfEtBFi0ObSckqwL6VyQv/7ENJieXHo2ANmdQwgw==", "dev": true, "requires": { "commander": "^2.20.0", From e24b814dd6647b7810af53443ccf518e5c31fc57 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 28 Jun 2023 21:56:47 +0530 Subject: [PATCH 03/15] Bump parse-url from 6.0.0 to 6.0.5 (#196) Bumps [parse-url](https://github.com/IonicaBizau/parse-url) from 6.0.0 to 6.0.5. - [Release notes](https://github.com/IonicaBizau/parse-url/releases) - [Commits](https://github.com/IonicaBizau/parse-url/compare/6.0.0...6.0.5) --- updated-dependencies: - dependency-name: parse-url dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index 1a12a59..02adaf3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9650,9 +9650,9 @@ } }, "node_modules/parse-url": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/parse-url/-/parse-url-6.0.0.tgz", - "integrity": "sha512-cYyojeX7yIIwuJzledIHeLUBVJ6COVLeT4eF+2P6aKVzwvgKQPndCBv3+yQ7pcWjqToYwaligxzSYNNmGoMAvw==", + "version": "6.0.5", + "resolved": "https://registry.npmjs.org/parse-url/-/parse-url-6.0.5.tgz", + "integrity": "sha512-e35AeLTSIlkw/5GFq70IN7po8fmDUjpDPY1rIK+VubRfsUvBonjQ+PBZG+vWMACnQSmNlvl524IucoDmcioMxA==", "dev": true, "dependencies": { "is-ssh": "^1.3.0", @@ -21270,9 +21270,9 @@ } }, "parse-url": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/parse-url/-/parse-url-6.0.0.tgz", - "integrity": "sha512-cYyojeX7yIIwuJzledIHeLUBVJ6COVLeT4eF+2P6aKVzwvgKQPndCBv3+yQ7pcWjqToYwaligxzSYNNmGoMAvw==", + "version": "6.0.5", + "resolved": "https://registry.npmjs.org/parse-url/-/parse-url-6.0.5.tgz", + "integrity": "sha512-e35AeLTSIlkw/5GFq70IN7po8fmDUjpDPY1rIK+VubRfsUvBonjQ+PBZG+vWMACnQSmNlvl524IucoDmcioMxA==", "dev": true, "requires": { "is-ssh": "^1.3.0", From 531dcdc52e88f67901a82c1582066ce371995d4f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 28 Jun 2023 21:57:00 +0530 Subject: [PATCH 04/15] Bump decode-uri-component from 0.2.0 to 0.2.2 (#202) Bumps [decode-uri-component](https://github.com/SamVerschueren/decode-uri-component) from 0.2.0 to 0.2.2. - [Release notes](https://github.com/SamVerschueren/decode-uri-component/releases) - [Commits](https://github.com/SamVerschueren/decode-uri-component/compare/v0.2.0...v0.2.2) --- updated-dependencies: - dependency-name: decode-uri-component dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index 02adaf3..60dadf0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3297,9 +3297,9 @@ } }, "node_modules/decode-uri-component": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", - "integrity": "sha512-hjf+xovcEn31w/EUYdTXQh/8smFL/dzYjohQGEIgjyNavaJfBY2p5F527Bo1VPATxv0VYTUC2bOcXvqFwk78Og==", + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.2.tgz", + "integrity": "sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ==", "dev": true, "engines": { "node": ">=0.10" @@ -16005,9 +16005,9 @@ } }, "decode-uri-component": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", - "integrity": "sha512-hjf+xovcEn31w/EUYdTXQh/8smFL/dzYjohQGEIgjyNavaJfBY2p5F527Bo1VPATxv0VYTUC2bOcXvqFwk78Og==", + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.2.tgz", + "integrity": "sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ==", "dev": true }, "dedent": { From 43986f16a9b517a16a5fd49eea072581e7fb660f Mon Sep 17 00:00:00 2001 From: Dr Ian Preston Date: Wed, 12 Jul 2023 17:26:38 +0100 Subject: [PATCH 05/15] Update peergos description in companion_guide (#231) --- docs/companion_guide.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/companion_guide.md b/docs/companion_guide.md index e6ed09e..f31d3f2 100644 --- a/docs/companion_guide.md +++ b/docs/companion_guide.md @@ -415,13 +415,13 @@ billion transactions per second (tps). | Peergos | https://https://peergos.org/ | | -------------- | ---------------------------------------------------------- | | Description | Peergos is a decentralised protocol and open-source platform for storage, social media and applications | -| Specification | Proprietary specification | -| Deployment | Offered as a SaaS solution. Can be self hosted. | -| Identity | [PKI](https://book.peergos.org/security/pki.html) + [Centralized password management, with password based keypairs(password + username + public salt)](https://book.peergos.org/security/login.html) | -| Authentication | Self-authenticated & [S3 V4 Signatures](https://book.peergos.org/security/bats.html)| +| Specification | Open source [specification and implementations](https://book.peergos.org/architecture/spec.html) | +| Deployment | Self Hosted or as a SaaS Multi-Tenant Service | +| Identity | [PKI](https://book.peergos.org/security/pki.html) + [random keypairs](https://book.peergos.org/security/login.html) | +| Authentication | Self-authenticated (signed and content addressed) & [S3 V4 Signatures for block level access control](https://book.peergos.org/security/bats.html)| | Authorization | [Cryptree](https://book.peergos.org/security/cryptree.html) based encryption and [Block access controls](https://book.peergos.org/security/bats.html) | -| Transport | [HTTP RESTful APIs](https://book.peergos.org/features/apps.html) | -| Schema / Data Representation | [DAG CBOR Encoded IPLD Objects and Raw Objects](https://book.peergos.org/security/bats.html). JSON Schema for configuration. | +| Transport | Transport agnostic. Apps have a local [HTTP RESTful API](https://book.peergos.org/features/apps.html) served from a ServiceWorker| +| Schema / Data Representation | [DAG CBOR Encoded IPLD Objects and Raw Objects](https://book.peergos.org/security/bats.html). JSON Schema for app configuration. | | Query Capabilities | Peergos offers a RESTFul API with various capabilities described [here](https://book.peergos.org/features/apps.html). A few endpoints are directly specified. | From 7ec1a54cde8e522aa4e557530174c66458bdda9e Mon Sep 17 00:00:00 2001 From: Daniel Buchner Date: Wed, 12 Jul 2023 11:30:55 -0500 Subject: [PATCH 06/15] update the Service Endpoint section of the spec (#228) * update the Service Endpoint section of the spec * clean up rest of section * Update spec/spec.md Co-authored-by: Ted Thibodeau Jr * Update spec/spec.md Co-authored-by: Ted Thibodeau Jr * Update spec/spec.md Co-authored-by: Andor Kesselman * Update spec/spec.md Co-authored-by: Ted Thibodeau Jr * Update spec/spec.md Co-authored-by: Ted Thibodeau Jr --------- Co-authored-by: Ted Thibodeau Jr Co-authored-by: Andor Kesselman --- spec/spec.md | 40 +++++++++++++++++++++------------------- 1 file changed, 21 insertions(+), 19 deletions(-) diff --git a/spec/spec.md b/spec/spec.md index 66d709a..6a7d641 100644 --- a/spec/spec.md +++ b/spec/spec.md @@ -133,12 +133,12 @@ The following DID Document Service Endpoint entries ****MUST**** be present in t ```json { - "id": "did:example:123", + "id": "did:example:alice", "service": [{ "id":"#dwn", "type": "DecentralizedWebNode", "serviceEndpoint": { - "nodes": ["https://dwn.example.com", "https://example.org/dwn"] + "nodes": ["did:example:host", "https://dwn.example.com"] } }] } @@ -159,16 +159,16 @@ The following process defines how a DID-Relative URL is composed to address a De 1. Let the base URI authority portion of the DID URL string be the target DID being addressed. 2. Append a `service` parameter to the DID URL string with the value `DecentralizedWebNode`. -3. Assemble an array of the [Message Descriptor](#message-descriptors) objects as desired for encoding in the DID-relative URL -4. JSON stringify the array of [Message Descriptor](#message-descriptors) objects from Step 3, then Base64Url encode the stringified output. -5. Append a `queries` parameter to the DID URL string with the value set to the JSON stringified, Base64Url encoded output of Step 4. +3. Assemble the desired [Message Descriptor](#message-descriptors) object. +4. JSON stringify the [Message Descriptor](#message-descriptors) object from Step 3, then Base64Url encode the stringified output. +5. Append a `message` parameter to the DID URL string with the value set to the JSON stringified, Base64Url encoded output of Step 4. **DID-relative URLs are composed of the following segments** -`did:example:123` + `?service=DecentralizedWebNode` + `&queries=` + `toBase64Url( JSON.stringify( [{ DESCRIPTOR_1 }, { DESCRIPTOR_N }] ) )` +`did:example:alice` + `?service=DecentralizedWebNode` + `&message=` + `toBase64Url( JSON.stringify( { MESSAGE } ) )` ```json -did:example:123?service=DecentralizedWebNode&queries=W3sgTUVTU0FHRV8xIH0sIHsgTUVTU0FHRV9OIH1d... +did:example:alice?service=DecentralizedWebNode&message=W3sgTUVTU0FHRV8xIH0sIHsgTUVTU0FHRV9OIH1d... ``` #### Resolution @@ -183,33 +183,35 @@ The following process defines how a DID-Relative URL for a Decentralized Web Nod #### Request Construction -**DID-Relative URL example for passing multiple messages:** +**DID-Relative URL example for passing messages:** -::: note -For example purposes, the `queries` parameter value below is neither JSON stringified nor Base64Url encoded, but should be when using Decentralized Web Node URLs in practice (see the [DID-relative URL Composition](#composition) instructions above). -::: +***Note:** For example purposes, the `message` parameter value below is neither JSON stringified nor Base64Url encoded, but should be when using Decentralized Web Node URLs in practice (see the [DID-relative URL Composition](#composition) instructions above).* ```json -did:example:123?service=DecentralizedWebNode&queries=[{ "interface": "Records", "method": "Query", "schema": "https://schema.org/SocialMediaPosting" }] +did:example:alice?service=DecentralizedWebNode&message={ "interface": "Records", "method": "Query", "schema": "https://schema.org/SocialMediaPosting" } ``` ```json -did:example:123?service=DecentralizedWebNode&queries=W3sgTUVTU0FHRV8xIH0sIHsgTUVTU0FHRV9OIH1d... +did:example:alice?service=DecentralizedWebNode&message=W3sgTUVTU0FHRV8xIH0sIHsgTUVTU0FHRV9OIH1d... ``` **Resolve DID to locate its Decentralized Web Node URIs:** -`did:example:123` --> resolve to Decentralized Web Node endpoint(s) --> `https://dwn.example.com/` +`did:example:alice --> resolve DWN endpoint(s) --> `https://dwn.example.com` + +`did:example:alice`--> resolve DWN endpoint(s) --> `did:example:host` --> resolve DWN endpoint(s) --> `https://dwn.did-relative-host.com` + +::: note +Only DID URIs in the `nodes` array will be allowed to initiate [sync](https://identity.foundation/decentralized-web-node/spec/#sync) activities with other DWeb Node instances. +::: **Construct the *Request Object*{id=request-object}:** 1. Create a JSON object for the request. -2. The *Request Object* ****MUST**** include a `messages` property, and its value ****MUST**** be an array composed of [Message](#messages) objects that are generated by parsing the DID-relative URL's `queries` parameter value as a JSON array and performing the following steps for each entry: +2. The *Request Object* ****MUST**** include a `messages` property, and its value ****MUST**** be a [Message](#messages) object that is generated by parsing the DID-relative URL's `message` parameter value by performing the following steps: 1. Construct a [Message](#messages) object. - 2. Set the `descriptor` property of the [Message](#messages) object to the entry, ensuring it is a valid [Message Descriptor](#message-descriptors) object. - 3. Set the `recordId` property of the [Message](#messages) object corresponding with the record being addressed. - 3. Augment the [Message](#messages) object with any signing and authorization values required, as described in the [Messages](#messages) section. - 4. Append the object to the [Request Object](#request-objects)'s `messages` array. + 2. Set the `descriptor` property of the [Message](#messages) object to the `message` parameter's value, ensuring it is a valid [Message Descriptor](#message-descriptors) object. + 3. Append the object to the [Request Object](#request-objects)'s `message` property. *HTTP POST example:* From 6226410bdc8ed702a6c93a3c5db90311e89e11b1 Mon Sep 17 00:00:00 2001 From: Andor Kesselman Date: Fri, 21 Jul 2023 06:13:07 -0700 Subject: [PATCH 07/15] last changed at Jul 12, 2023 9:27 AM, pushed by Andor Kesselman (#249) notes from the meeting Co-authored-by: HackMD <37423+hackmd-hub[bot]@users.noreply.github.com> --- docs/agenda.md | 155 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 155 insertions(+) diff --git a/docs/agenda.md b/docs/agenda.md index 85f5ed6..b2cb523 100644 --- a/docs/agenda.md +++ b/docs/agenda.md @@ -30,6 +30,161 @@ Bi-weekly DIF call notes on DWN specifications. * [Recording](https://us02web.zoom.us/rec/share/UYcdp_7UO1ebQ4uFc84AnasAhSmW9Laxs1s2kVRgs48PLywyV12NqoyF800nHEV7.d0hxy8WiCovW8c_j) +| Item | Segment | Time | Owner | Description | +| ----------------------------------------- | ----------------------- | ------ | --------------- | ------------------------------------------------------------------------------- | +| Intro | Intro | 5 min | @liran | Quick Intro. New Members. DIF IPR agreement. | +| Agenda | Companion Guide Updates | 10 min | @andorsk/Moises | [added dwn and peergos to the comparison guide #229](https://github.com/decentralized-identity/decentralized-web-node/pull/229)
[Local, Remote, and Relay Nodes. #225](https://github.com/decentralized-identity/decentralized-web-node/pull/225) | +| [Ecosystem Updates]() | Updates | 10 min | @andorsk | protocols.preview.benri.io | +| Agenda | Spec PR Review | 10 min | @csuwildcat | [update the Service Endpoint section of the spec #228](https://github.com/decentralized-identity/decentralized-web-node/pull/228)
[added JSON schemas for DWN specification #209](https://github.com/decentralized-identity/decentralized-web-node/pull/209) | +| Spec Alignment | Spec Alignment | 10 min | @andorsk | Alignment | +| Issue Alignment | Issue Alignment | 10 min | @liran | Alignment | +| Calls To Action | Closing | 5 min | @andorsk | | + +### Issues Discussed: + +- [Authorization layer should limit the amount of data permitted to be stored by a application #96](https://github.com/decentralized-identity/decentralized-web-node/issues/96) +- [Add use cases link #83](https://github.com/decentralized-identity/decentralized-web-node/issues/83) +- [Test Suite Design #213](https://github.com/decentralized-identity/decentralized-web-node/issues/213) +- [Revocation Subtleties #138](https://github.com/decentralized-identity/decentralized-web-node/issues/138) +- [Requiring fine-grained capabilities #142](https://github.com/decentralized-identity/decentralized-web-node/issues/142) +- [as a developer, I can follow docs to run the reference implmentation, so I can test it out and then contribute improvements or passing test-suites #144](https://github.com/decentralized-identity/decentralized-web-node/issues/144) +- [Support both folder based and schema based object storage #190](https://github.com/decentralized-identity/decentralized-web-node/issues/190) + + +## DIF Meeting July 12, 2023 + +* [Recording]() + +- Ian Preston +- Dan Buchner +- Andor Kesselman +- Alan Karp +- Liran Cohen + + +| Item | Segment | Time | Owner | Description | +| ----------------------------------------- | ----------------------- | ------ | --------------- | ------------------------------------------------------------------------------- | +| Intro | Intro | 5 min | @liran | Quick Intro. New Members. DIF IPR agreement. | +| Agenda | Companion Guide Updates | 10 min | @andorsk || +| [Ecosystem Updates]() | Updates | 10 min | @andorsk | | +| [Peergos Discussion]() | Updates | 10 min | @ian | | +| Spec Alignment | Spec Alignment | 10 min | @andorsk | Alignment | +| Issue Alignment | Issue Alignment | 10 min | @liran | Alignment | +| Calls To Action | Closing | 5 min | @andorsk | | +### Issues Diccussed: + +### Notes: + +- Peergos Discussion: + - 2013: + - Before IPFS + - Identity/Fine Grained Access Control/Encryption + - Global Access Control File System + - Grant: Read|Write access to individual files or folders + - Conventional login (username + password). Key derivation is from there. + - Hide metadata + - Server can't tell if blob is directory of file + - Technical Difficult: + - Don't want to depend on DNS + - 2018: Decided HTTP over P2P Streams + - Peergos Implementation: + - Peergos + - Question: Alan + - Correlation Inference? + - Don't consider server based timing attacks are not in scope. + - Liran: Identity Portion: + - Node identity + - User identity <- least happy with PKI global append only log signed statements of username. Add people by username over UX. Considering removing PKI entirely. + - Question: Capability based. + - Everthing split into writing subspaces. + - KP Control + - W/e Changes you write are atomic. + - Sandbox application. + - Not sure if it makes sense in Peergos + - Dan: + - How can apps expose public information in public way? Champs. Maps to encrypted blobs.Keep capability of Champ in sync with real data. Look up and do traversal. Web interface. Can publish a website. Can view in any gateway. + - Henry: + - Were there challenges around encryption, e.g. + 1. Sharing keys to friends/external participants + 2. Key rolling + - Cryptree + - Voila <- 2008 + - Care alot about being post quantum. + - Grant a read capability is basically sharing a key. + - Expensive: Revoke write access, rotate all the keys. + - Sharing capabilities: each person has an inbox. Public encryption key. People write to that to share capabilities. + - How many? + - 10 Self Hosters + +### Issues Discussed: + +- [Requiring fine-grained capabilities #142 +](https://github.com/decentralized-identity/decentralized-web-node/issues/142) To revisit after Spec alignment. Milestone 1. +- [Revocation Subtleties #138 +](https://github.com/decentralized-identity/decentralized-web-node/issues/138) - To revisit after spec alignment. Milestone 1. + + +## DIF Meeting June 28, 2023 + +* [Recording]() + +- Alan Karp +- Liran Cohen +- Andor Kesselman +- Henry Tsai +- Drummond Reed + +| Item | Segment | Time | Owner | Description | +| ----------------------------------------- | ----------------------- | ------ | --------------- | ------------------------------------------------------------------------------- | +| Intro | Intro | 5 min | @liran | Quick Intro. New Members. DIF IPR agreement. | +| Agenda | Companion Guide Updates | 10 min | @andorsk | [Update peergos description in companion_guide #231](https://github.com/decentralized-identity/decentralized-web-node/pull/231) | +| Peergos Discussion with Ian? | Companion Guide Updates | 5 min | | | +| [Ecosystem Updates]() | Updates | 10 min | @andorsk | | +| Agenda | Spec PR Review | 10 min | | | +| Spec Alignment | Spec Alignment | 10 min | @andorsk | Alignment | +| Issue Alignment | Issue Alignment | 10 min | @liran | Alignment | +| Calls To Action | Closing | 5 min | @andorsk | | + +### Issues Discussed: + +- [Requiring fine-grained capabilities #142 +](https://github.com/decentralized-identity/decentralized-web-node/issues/142) To revisit after Spec alignment. Milestone 1. +- [Revocation Subtleties #138 +](https://github.com/decentralized-identity/decentralized-web-node/issues/138) - To revisit after spec alignment. Milestone 1. + +## DIF Meeting June 14, 2023 + +* [Recording](https://us02web.zoom.us/rec/share/Vjsy2TkDWy8TxBeBsXCp5ebw6tH2cFwm6OEVoKpK8tzXng6oxI0oC9MPHjm830xS.Z-fnRwAFjPBx2BP7) + + +| Item | Segment | Time | Owner | Description | +| ----------------------------------------- | ----------------------- | ------ | --------------- | ------------------------------------------------------------------------------- | +| Intro | Intro | 5 min | @liran | Quick Intro. New Members. DIF IPR agreement. | +| Agenda | Companion Guide Updates | 10 min | @andorsk | [Update peergos description in companion_guide #231](https://github.com/decentralized-identity/decentralized-web-node/pull/231) | +| Peergos Discussion | Companion Guide Updates | 10 min | | | +| [Ecosystem Updates]() | Updates | 10 min | @andorsk | | +| Agenda | Spec PR Review | 10 min | | | +| Spec Alignment | Spec Alignment | 10 min | @andorsk | Alignment | +| Issue Alignment | Issue Alignment | 10 min | @liran | Alignment | +| Calls To Action | Closing | 5 min | @andorsk | | + +### Issues Discussed: + +- https://github.com/decentralized-identity/decentralized-web-node/pull/228 : Dan to Look at +- https://github.com/decentralized-identity/decentralized-web-node/issues/234 : Andor +- https://github.com/decentralized-identity/decentralized-web-node/pull/231 : Going to see if we can get Ian to comment on this. @andorsk to draft a response. +- https://github.com/decentralized-identity/decentralized-web-node/pull/233 +- Skipping Service Endpoint Section For Next Call +Andor: add something about scalability in abstract +TODO: Check status on spec +- Section 8 and 9 will be re-written in the near future. +- Alignment Issues: https://github.com/decentralized-identity/decentralized-web-node/issues?q=is%3Aissue+is%3Aopen+label%3A%22attr%3A+alignment-effort%22 + +## DIF Meeting May 31, 2023 + +* [Recording](https://us02web.zoom.us/rec/share/UYcdp_7UO1ebQ4uFc84AnasAhSmW9Laxs1s2kVRgs48PLywyV12NqoyF800nHEV7.d0hxy8WiCovW8c_j) + + | Item | Segment | Time | Owner | Description | | ----------------------------------------- | ----------------------- | ------ | --------------- | ------------------------------------------------------------------------------- | | Intro | Intro | 5 min | @liran | Quick Intro. New Members. DIF IPR agreement. | From eccfa5dcaa0ffc20e618c5b9cee33d24f942b028 Mon Sep 17 00:00:00 2001 From: LiranCohen Date: Wed, 26 Jul 2023 12:35:34 -0400 Subject: [PATCH 08/15] initial pass at updating the protocols section of the spec (#252) --- spec/spec.md | 115 ++++++++++++++++++++++----------------------------- 1 file changed, 49 insertions(+), 66 deletions(-) diff --git a/spec/spec.md b/spec/spec.md index 6a7d641..67c3a1f 100644 --- a/spec/spec.md +++ b/spec/spec.md @@ -971,11 +971,8 @@ DWeb Nodes are designed to act the substrate upon which a wide variety of decent { "interface": "Protocols", // required "method": "Configure", // required - "protocol": "identity.foundation/protocols/credential-issuance", // required "protocolVersion": "1.0.0", // required "definition": { PROTOCOL_DEFINITION_OBJ }, // optional - "lastConfiguration": CID_OF_PREVIOUS_CONFIG, // required if previous exists - "retainedRecords": CHAMP_OF_INCLUDED_ENTRIES // optional } ``` @@ -983,12 +980,7 @@ DWeb Nodes are designed to act the substrate upon which a wide variety of decent - The message object ****MUST**** contain a `descriptor` property, and its value ****MUST**** be a JSON object composed as follows: - The object ****MUST**** contain an `interface` property, and its value ****MUST**** be the string `Protocols`. - The object ****MUST**** contain a `method` property, and its value ****MUST**** be the string `Configure`. - - The object ****MUST**** contain a `protocol` property, and its value ****Must**** be a URI that denotes the Protocol the configuration pertains to. - - The object ****MUST**** contain a `protocolVersion` property, and its value ****Must**** be a [SemVer](https://semver.org/) string that denotes the version of the Protocol the configuration pertains to. - - The object ****MAY**** contain a `description` property, and its value ****Must**** be a string that describes what the protocol is designed to do. - The object ****MUST**** contain a `definition` property, and its value ****Must**** be a [Protocol Definition](#protocol-definitions) object. - - The object ****Must**** include a `lastConfiguration` property, and its value ****MUST**** be the stringified [Version 1 CID](https://docs.ipfs.io/concepts/content-addressing/#identifier-formats) of the [DAG CBOR](https://github.com/ipld/specs/blob/master/block-layer/codecs/dag-cbor.md) encoded generated record ID of the previous `ProtocolsConfigure` for that matches the `protocol` and `protocolVersion` tuple. - - The object ****MUST**** contain a `retainedRecords` property, and if present its value ****Must**** be a CHAMP encoded as a string. #### Protocol Definitions @@ -998,85 +990,76 @@ Protocol Definition objects are declarative rules within `ProtocolConfigure` mes { "interface": "Protocols", "method": "Configure", - "protocol": "https://decentralized-social-example.org/protocol/", - "protocolVersion": "1.0.0", - "description": "...", "definition": { - "labels": { + "protocol": "https://decentralized-social-example.org/protocol/", + "published": true, + "types": { "post": { "schema": "https://decentralized-social-example.org/schemas/post", "dataFormat": ["application/json"], - "purpose": "Enables you to post social messages others can read" }, "reply": { "schema": "https://decentralized-social-example.org/schemas/reply", "dataFormat": ["application/json"], - "purpose": "Allows others to reply to your social posts" }, "image": { "dataFormat": ["image/jpeg", "image/png", "image/gif"], - "purpose": "Attach images to posts and replies" } }, - "records": { + "structure": { "post": { - "records": { - "image": {}, - "reply": { - "recursive": true, - "records": { - "image": { - "allow": { - "author": { - "of": "post.reply", - "to": { - "create": { - "publication": "required" - } - } - } - } - } - }, - "allow": { - "anyone": { - "to": { - "create": { - "publication": "required" - } - } - } - } + "$actions": [{ + "who": "anyone", + "can": "read", + }], + "reply": { + "$actions":[{ + "who": "anyone", + "can": "write", + }], + "image": { + "$actions": [{ + "who": "anyone", + "can": "read", + },{ + "who": "author", + "of": "reply", + "can": "write", + }] } + }, + "image": { + "$actions":[{ + "who": "anyone", + "can": "read", + }, { + "who": "author", + "of": "post", + "can": "write", + }] } } } } } ``` - -- The _Protocols Definition_ object ****MUST**** contain a `labels` property, and its value ****MUST**** be an object composed as follows: - - The object ****MUST**** contain a `dataFormat` property, and its value ****MUST**** be an array of strings that indicate the format of the data in accordance with its MIME type designation. The most common format is JSON, which is indicated by setting the value of the `dataFormat` property to `application/json`. - - The object ****MAY**** contain a `schema` property, and if present its value ****MUST**** be a valid URI string that identifies the protocol the definition pertains to. - - The object ****MAY**** contain a `purpose` property, and if present its value ****MUST**** be a string that provides a description for how the data is being used in the protocol. This information will often be used by User Agent applications to display in user consent UI. - -- The _Protocols Definition_ object ****MUST**** contain a `records` property, and its value ****MUST**** be a _Record Rules_ object whose keys match the labels defined in the _Protocols Definition_ object. This object is recursive, allowing subsequent record relationships to be defined within. Labeled members of the object are composed as follows: - - The object ****may**** contain an `allow` property, and its value ****MUST**** be an object that defines access, interaction, and data relationship rules. The object is composed as follows: - - The object ****MAY**** contain an `author` property, and if present its value ****must**** be an _Actor Object_ composed as follows: - - The object ****MAY**** contain an `of` property, and if present its value ****must**** be a dot delimited path reference to another record entry in the _Record Rules_ tree. A conforming implementer ****MUST**** regard the absence of this property as a reference to the author of the labeled member object of the _Record Rule_ it is contained within. - - The object ****MUST**** contain a `to` property, and if present its value ****must**** be an _Allowed Activity_ object composed as follows: - - The object ****MAY**** contain a `create` property, and if present its value ****MUST**** be an object composed as follows: - - The object ****MAY**** contain a `publication` property, and if present its value ****MUST**** be a boolean. - - The object ****MAY**** contain an `encryption` property, and if present its value ****MUST**** be one of the following string values: - - `optional` - the object ****MAY**** be encrypted using the key provided by the owner of a Decentralized Web Node in the [[spec:rfc7516]] JSON Web Encryption (JWE) format. - - `required` - the object ****MUST**** be encrypted using the key provided by the owner of a Decentralized Web Node in the [[spec:rfc7516]] JSON Web Encryption (JWE) format. - - The object ****MAY**** contain a `update` property, and if present its value ****MUST**** be an object composed as follows: - - ... - - The object ****MAY**** contain a `delete` property, and if present its value ****MUST**** be an object composed as follows: - - ... - - The object ****MAY**** contain a `recipient` property, and if present its value ****must**** be an _Actor Object_ composed as follows: - - The object ****MAY**** contain an `of` property, and if present its value ****must**** be a dot delimited path reference to another record entry in the _Record Rules_ tree. A conforming implementer ****MUST**** regard the absence of this property as a reference to the recipient of the labeled member object of the _Record Rule_ it is contained within. - +- The _Protocols Definition_ object ****MUST**** contain a `protocol` property, and its value ****Must**** be a URI that denotes the Protocol the configuration pertains to. +- The _Protocols Definition_ ****MUST**** contain a `published` property, and its value ****Must**** be a boolean indicating the `ProtocolConfiguration`'s publication state. +- The _Protocols Definition_ object ****MUST**** contain a `types` property, and its value ****MUST**** be an object composed as follows: + - The keys of the object ****MUST**** be a string that represents the underlying type. + - The values representing those keys within the object ****MUST**** be an object composed as follows: + - The object ****MUST**** contain a `dataFormats` property, and its value ****MUST**** be an array of strings that indicate the format of the data in accordance with its MIME type designation. The most common format is JSON, which is indicated by setting the value of the `dataFormats` property to `['application/json]`. + - The object ****MAY**** contain a `schema` property, and if present its value ****MUST**** be a valid URI string that identifies the protocol the definition pertains to. +- The _Protocols Definition_ object ****MUST**** contain a `structure` property, and its value ****MUST**** be a _Record Rules_ object whose keys match the labels defined in the _Protocols Definition_ object. This object is recursive, allowing subsequent record relationships to be defined within. Labeled members of the object are composed as follows: + - The keys of the object ****MUST**** be a string that matches one of the `types` + - The values representing those keys within the object ****MUST**** be an object composed as follows: + - The object ****MAY**** contain an `$actions` property and its value ****MUST**** be an array of rule set objects described as follows: + - The object ****MUST**** contain a `who` property and it ****MUST**** have one of the following values: + - `anyone` + - `author` + - `recipient` + - The object ****MUST**** contain a `can` property and it ****MUST**** have a value of either `read` or `write` + - The object ****MAY**** contain a `of` property and it ****MUST**** have a string value that references one of the `types` ::: todo From 9c7f57b2590856d1ad76802bd208d4a2868211c4 Mon Sep 17 00:00:00 2001 From: Andor Kesselman Date: Wed, 26 Jul 2023 09:35:55 -0700 Subject: [PATCH 09/15] updated definitions (#254) --- .../base-authorization-payload.json | 17 ++ .../records-write-authorization-payload.json | 27 ++ schemas/json-schemas/events/events-get.json | 6 +- schemas/json-schemas/hooks/hooks-write.json | 4 +- .../interface-methods/messages-get.json | 48 ++++ .../permissions-definitions.json | 41 +++ .../interface-methods/permissions-grant.json | 74 +++++ .../permissions-request.json | 66 +++++ .../interface-methods/permissions-revoke.json | 45 +++ .../protocol-definition.json | 49 ++++ .../interface-methods/protocol-rule-set.json | 71 +++++ .../protocols-configure.json | 45 +++ .../interface-methods/protocols-query.json | 53 ++++ .../interface-methods/records-delete.json | 45 +++ .../interface-methods/records-query.json | 94 ++++++ .../interface-methods/records-read.json | 44 +++ .../interface-methods/records-write.json | 269 ++++++++++++++++++ .../interface-methods/snapshots-create.json | 45 +++ 18 files changed, 1040 insertions(+), 3 deletions(-) create mode 100644 schemas/json-schemas/authorization-payloads/base-authorization-payload.json create mode 100644 schemas/json-schemas/authorization-payloads/records-write-authorization-payload.json create mode 100644 schemas/json-schemas/interface-methods/messages-get.json create mode 100644 schemas/json-schemas/interface-methods/permissions-definitions.json create mode 100644 schemas/json-schemas/interface-methods/permissions-grant.json create mode 100644 schemas/json-schemas/interface-methods/permissions-request.json create mode 100644 schemas/json-schemas/interface-methods/permissions-revoke.json create mode 100644 schemas/json-schemas/interface-methods/protocol-definition.json create mode 100644 schemas/json-schemas/interface-methods/protocol-rule-set.json create mode 100644 schemas/json-schemas/interface-methods/protocols-configure.json create mode 100644 schemas/json-schemas/interface-methods/protocols-query.json create mode 100644 schemas/json-schemas/interface-methods/records-delete.json create mode 100644 schemas/json-schemas/interface-methods/records-query.json create mode 100644 schemas/json-schemas/interface-methods/records-read.json create mode 100644 schemas/json-schemas/interface-methods/records-write.json create mode 100644 schemas/json-schemas/interface-methods/snapshots-create.json diff --git a/schemas/json-schemas/authorization-payloads/base-authorization-payload.json b/schemas/json-schemas/authorization-payloads/base-authorization-payload.json new file mode 100644 index 0000000..3676458 --- /dev/null +++ b/schemas/json-schemas/authorization-payloads/base-authorization-payload.json @@ -0,0 +1,17 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "https://identity.foundation/dwn/json-schemas/authorization-payloads/base-authorization-payload.json", + "type": "object", + "additionalProperties": false, + "required": [ + "descriptorCid" + ], + "properties": { + "descriptorCid": { + "type": "string" + }, + "permissionsGrantId": { + "type": "string" + } + } +} \ No newline at end of file diff --git a/schemas/json-schemas/authorization-payloads/records-write-authorization-payload.json b/schemas/json-schemas/authorization-payloads/records-write-authorization-payload.json new file mode 100644 index 0000000..670d806 --- /dev/null +++ b/schemas/json-schemas/authorization-payloads/records-write-authorization-payload.json @@ -0,0 +1,27 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "https://identity.foundation/dwn/json-schemas/authorization-payloads/records-write-authorization-payload.json", + "type": "object", + "additionalProperties": false, + "required": [ + "descriptorCid", + "recordId" + ], + "properties": { + "descriptorCid": { + "type": "string" + }, + "recordId": { + "type": "string" + }, + "contextId": { + "type": "string" + }, + "attestationCid": { + "type": "string" + }, + "encryptionCid": { + "type": "string" + } + } +} \ No newline at end of file diff --git a/schemas/json-schemas/events/events-get.json b/schemas/json-schemas/events/events-get.json index ccb77da..93429ef 100644 --- a/schemas/json-schemas/events/events-get.json +++ b/schemas/json-schemas/events/events-get.json @@ -16,7 +16,8 @@ "additionalProperties": false, "required": [ "interface", - "method" + "method", + "messageTimestamp" ], "properties": { "interface": { @@ -31,6 +32,9 @@ ], "type": "string" }, + "messageTimestamp": { + "type": "string" + }, "watermark": { "type": "string" } diff --git a/schemas/json-schemas/hooks/hooks-write.json b/schemas/json-schemas/hooks/hooks-write.json index 808893b..ac8e215 100644 --- a/schemas/json-schemas/hooks/hooks-write.json +++ b/schemas/json-schemas/hooks/hooks-write.json @@ -17,7 +17,7 @@ "required": [ "interface", "method", - "dateCreated", + "messageTimestamp", "uri", "filter" ], @@ -34,7 +34,7 @@ ], "type": "string" }, - "dateCreated": { + "messageTimestamp": { "$ref": "https://identity.foundation/dwn/json-schemas/defs.json#/definitions/date-time" }, "schema": { diff --git a/schemas/json-schemas/interface-methods/messages-get.json b/schemas/json-schemas/interface-methods/messages-get.json new file mode 100644 index 0000000..3126ff5 --- /dev/null +++ b/schemas/json-schemas/interface-methods/messages-get.json @@ -0,0 +1,48 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "https://identity.foundation/dwn/json-schemas/messages-get.json", + "type": "object", + "additionalProperties": false, + "required": [ + "authorization", + "descriptor" + ], + "properties": { + "authorization": { + "$ref": "https://identity.foundation/dwn/json-schemas/general-jws.json" + }, + "descriptor": { + "type": "object", + "additionalProperties": false, + "required": [ + "interface", + "method", + "messageTimestamp" + ], + "properties": { + "interface": { + "enum": [ + "Messages" + ], + "type": "string" + }, + "method": { + "enum": [ + "Get" + ], + "type": "string" + }, + "messageTimestamp": { + "type": "string" + }, + "messageCids": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 1 + } + } + } + } +} \ No newline at end of file diff --git a/schemas/json-schemas/interface-methods/permissions-definitions.json b/schemas/json-schemas/interface-methods/permissions-definitions.json new file mode 100644 index 0000000..66f07fc --- /dev/null +++ b/schemas/json-schemas/interface-methods/permissions-definitions.json @@ -0,0 +1,41 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "https://identity.foundation/dwn/json-schemas/permissions/defs.json", + "type": "object", + "definitions": { + "grantedTo": { + "$ref": "https://identity.foundation/dwn/json-schemas/defs.json#/definitions/did" + }, + "grantedBy": { + "$ref": "https://identity.foundation/dwn/json-schemas/defs.json#/definitions/did" + }, + "grantedFor": { + "$ref": "https://identity.foundation/dwn/json-schemas/defs.json#/definitions/did" + }, + "scope": { + "type": "object", + "additionalProperties": false, + "required": [ + "interface", + "method" + ], + "properties": { + "interface": { + "type": "string" + }, + "method": { + "type": "string" + } + } + }, + "conditions": { + "type": "object", + "additionalProperties": false, + "properties": { + "publication": { + "type": "boolean" + } + } + } + } +} \ No newline at end of file diff --git a/schemas/json-schemas/interface-methods/permissions-grant.json b/schemas/json-schemas/interface-methods/permissions-grant.json new file mode 100644 index 0000000..8b75f8d --- /dev/null +++ b/schemas/json-schemas/interface-methods/permissions-grant.json @@ -0,0 +1,74 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "https://identity.foundation/dwn/json-schemas/permissions-grant.json", + "type": "object", + "required": [ + "authorization", + "descriptor" + ], + "additionalProperties": false, + "properties": { + "authorization": { + "$ref": "https://identity.foundation/dwn/json-schemas/general-jws.json" + }, + "delegationChain": { + "description": "the parent grant", + "$ref": "#" + }, + "descriptor": { + "type": "object", + "additionalProperties": false, + "required": [ + "interface", + "method", + "messageTimestamp", + "dateExpires" + ], + "properties": { + "messageTimestamp": { + "$ref": "https://identity.foundation/dwn/json-schemas/defs.json#/definitions/date-time" + }, + "dateExpires": { + "$ref": "https://identity.foundation/dwn/json-schemas/defs.json#/definitions/date-time" + }, + "description": { + "type": "string" + }, + "grantedTo": { + "description": "DID of the grantee", + "$ref": "https://identity.foundation/dwn/json-schemas/permissions/defs.json#/definitions/grantedTo" + }, + "grantedBy": { + "description": "DID of the grantor", + "$ref": "https://identity.foundation/dwn/json-schemas/permissions/defs.json#/definitions/grantedBy" + }, + "grantedFor": { + "description": "DID of the DWN to which the grantee is given access", + "$ref": "https://identity.foundation/dwn/json-schemas/permissions/defs.json#/definitions/grantedFor" + }, + "permissionsRequestId": { + "description": "CID of an associated PermissionsRequest message", + "type": "string" + }, + "interface": { + "enum": [ + "Permissions" + ], + "type": "string" + }, + "method": { + "enum": [ + "Grant" + ], + "type": "string" + }, + "scope": { + "$ref": "https://identity.foundation/dwn/json-schemas/permissions/defs.json#/definitions/scope" + }, + "conditions": { + "$ref": "https://identity.foundation/dwn/json-schemas/permissions/defs.json#/definitions/conditions" + } + } + } + } +} \ No newline at end of file diff --git a/schemas/json-schemas/interface-methods/permissions-request.json b/schemas/json-schemas/interface-methods/permissions-request.json new file mode 100644 index 0000000..f1442fa --- /dev/null +++ b/schemas/json-schemas/interface-methods/permissions-request.json @@ -0,0 +1,66 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "https://identity.foundation/dwn/json-schemas/permissions-request.json", + "additionalProperties": false, + "type": "object", + "required": [ + "authorization", + "descriptor" + ], + "properties": { + "authorization": { + "$ref": "https://identity.foundation/dwn/json-schemas/general-jws.json" + }, + "descriptor": { + "type": "object", + "additionalProperties": false, + "required": [ + "interface", + "method", + "messageTimestamp", + "grantedBy", + "grantedTo", + "grantedFor", + "scope" + ], + "properties": { + "interface": { + "enum": [ + "Permissions" + ], + "type": "string" + }, + "method": { + "enum": [ + "Request" + ], + "type": "string" + }, + "messageTimestamp": { + "type": "string" + }, + "description": { + "type": "string" + }, + "grantedTo": { + "description": "DID of the grantee", + "$ref": "https://identity.foundation/dwn/json-schemas/permissions/defs.json#/definitions/grantedTo" + }, + "grantedBy": { + "description": "DID of the grantor", + "$ref": "https://identity.foundation/dwn/json-schemas/permissions/defs.json#/definitions/grantedBy" + }, + "grantedFor": { + "description": "DID of the DWN to which the grantee is given access", + "$ref": "https://identity.foundation/dwn/json-schemas/permissions/defs.json#/definitions/grantedFor" + }, + "scope": { + "$ref": "https://identity.foundation/dwn/json-schemas/permissions/defs.json#/definitions/scope" + }, + "conditions": { + "$ref": "https://identity.foundation/dwn/json-schemas/permissions/defs.json#/definitions/conditions" + } + } + } + } +} \ No newline at end of file diff --git a/schemas/json-schemas/interface-methods/permissions-revoke.json b/schemas/json-schemas/interface-methods/permissions-revoke.json new file mode 100644 index 0000000..d86ac2f --- /dev/null +++ b/schemas/json-schemas/interface-methods/permissions-revoke.json @@ -0,0 +1,45 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "https://identity.foundation/dwn/json-schemas/permissions-revoke.json", + "type": "object", + "required": [ + "authorization", + "descriptor" + ], + "additionalProperties": false, + "properties": { + "authorization": { + "$ref": "https://identity.foundation/dwn/json-schemas/general-jws.json" + }, + "descriptor": { + "type": "object", + "additionalProperties": false, + "required": [ + "interface", + "method", + "messageTimestamp", + "permissionsGrantId" + ], + "properties": { + "messageTimestamp": { + "type": "string" + }, + "permissionsGrantId": { + "type": "string" + }, + "interface": { + "enum": [ + "Permissions" + ], + "type": "string" + }, + "method": { + "enum": [ + "Revoke" + ], + "type": "string" + } + } + } + } +} \ No newline at end of file diff --git a/schemas/json-schemas/interface-methods/protocol-definition.json b/schemas/json-schemas/interface-methods/protocol-definition.json new file mode 100644 index 0000000..225fd52 --- /dev/null +++ b/schemas/json-schemas/interface-methods/protocol-definition.json @@ -0,0 +1,49 @@ +{ + "$id": "https://identity.foundation/dwn/json-schemas/protocol-definition.json", + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [ + "protocol", + "published", + "types", + "structure" + ], + "properties": { + "protocol": { + "type": "string" + }, + "published": { + "type": "boolean" + }, + "types": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": false, + "properties": { + "schema": { + "type": "string" + }, + "dataFormats": { + "type": "array", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + } + }, + "structure": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "https://identity.foundation/dwn/json-schemas/protocol-rule-set.json" + } + } + } + } +} \ No newline at end of file diff --git a/schemas/json-schemas/interface-methods/protocol-rule-set.json b/schemas/json-schemas/interface-methods/protocol-rule-set.json new file mode 100644 index 0000000..f0bb701 --- /dev/null +++ b/schemas/json-schemas/interface-methods/protocol-rule-set.json @@ -0,0 +1,71 @@ +{ + "$id": "https://identity.foundation/dwn/json-schemas/protocol-rule-set.json", + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "properties": { + "$actions": { + "type": "array", + "minItems": 1, + "items": { + "type": "object", + "anyOf": [ + { + "required": [ + "who", + "can" + ], + "additionalProperties": false, + "properties": { + "who": { + "type": "string", + "enum": [ + "anyone" + ] + }, + "can": { + "type": "string", + "enum": [ + "read", + "write" + ] + } + } + }, + { + "required": [ + "who", + "of", + "can" + ], + "additionalProperties": false, + "properties": { + "who": { + "type": "string", + "enum": [ + "author", + "recipient" + ] + }, + "of": { + "type": "string" + }, + "can": { + "type": "string", + "enum": [ + "read", + "write" + ] + } + } + } + ] + } + } + }, + "patternProperties": { + "^[^$].*": { + "$ref": "https://identity.foundation/dwn/json-schemas/protocol-rule-set.json" + } + } +} \ No newline at end of file diff --git a/schemas/json-schemas/interface-methods/protocols-configure.json b/schemas/json-schemas/interface-methods/protocols-configure.json new file mode 100644 index 0000000..5c99cfc --- /dev/null +++ b/schemas/json-schemas/interface-methods/protocols-configure.json @@ -0,0 +1,45 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "https://identity.foundation/dwn/json-schemas/protocols-configure.json", + "type": "object", + "additionalProperties": false, + "required": [ + "authorization", + "descriptor" + ], + "properties": { + "authorization": { + "$ref": "https://identity.foundation/dwn/json-schemas/general-jws.json" + }, + "descriptor": { + "type": "object", + "additionalProperties": false, + "required": [ + "interface", + "method", + "messageTimestamp", + "definition" + ], + "properties": { + "interface": { + "enum": [ + "Protocols" + ], + "type": "string" + }, + "method": { + "enum": [ + "Configure" + ], + "type": "string" + }, + "messageTimestamp": { + "$ref": "https://identity.foundation/dwn/json-schemas/defs.json#/definitions/date-time" + }, + "definition": { + "$ref": "https://identity.foundation/dwn/json-schemas/protocol-definition.json" + } + } + } + } +} \ No newline at end of file diff --git a/schemas/json-schemas/interface-methods/protocols-query.json b/schemas/json-schemas/interface-methods/protocols-query.json new file mode 100644 index 0000000..f37818c --- /dev/null +++ b/schemas/json-schemas/interface-methods/protocols-query.json @@ -0,0 +1,53 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "https://identity.foundation/dwn/json-schemas/protocols-query.json", + "type": "object", + "additionalProperties": false, + "required": [ + "descriptor" + ], + "properties": { + "authorization": { + "$ref": "https://identity.foundation/dwn/json-schemas/general-jws.json" + }, + "descriptor": { + "type": "object", + "additionalProperties": false, + "required": [ + "interface", + "method", + "messageTimestamp" + ], + "properties": { + "interface": { + "enum": [ + "Protocols" + ], + "type": "string" + }, + "method": { + "enum": [ + "Query" + ], + "type": "string" + }, + "messageTimestamp": { + "type": "string" + }, + "filter": { + "type": "object", + "minProperties": 1, + "additionalProperties": false, + "properties": { + "protocol": { + "type": "string" + }, + "recipient": { + "$ref": "https://identity.foundation/dwn/json-schemas/defs.json#/definitions/did" + } + } + } + } + } + } +} \ No newline at end of file diff --git a/schemas/json-schemas/interface-methods/records-delete.json b/schemas/json-schemas/interface-methods/records-delete.json new file mode 100644 index 0000000..7f3b48d --- /dev/null +++ b/schemas/json-schemas/interface-methods/records-delete.json @@ -0,0 +1,45 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "https://identity.foundation/dwn/json-schemas/records-delete.json", + "type": "object", + "additionalProperties": false, + "required": [ + "authorization", + "descriptor" + ], + "properties": { + "authorization": { + "$ref": "https://identity.foundation/dwn/json-schemas/general-jws.json" + }, + "descriptor": { + "type": "object", + "additionalProperties": false, + "required": [ + "interface", + "method", + "messageTimestamp", + "recordId" + ], + "properties": { + "interface": { + "enum": [ + "Records" + ], + "type": "string" + }, + "method": { + "enum": [ + "Delete" + ], + "type": "string" + }, + "messageTimestamp": { + "type": "string" + }, + "recordId": { + "type": "string" + } + } + } + } +} \ No newline at end of file diff --git a/schemas/json-schemas/interface-methods/records-query.json b/schemas/json-schemas/interface-methods/records-query.json new file mode 100644 index 0000000..19cfe68 --- /dev/null +++ b/schemas/json-schemas/interface-methods/records-query.json @@ -0,0 +1,94 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "https://identity.foundation/dwn/json-schemas/records-query.json", + "type": "object", + "additionalProperties": false, + "required": [ + "descriptor" + ], + "properties": { + "authorization": { + "$ref": "https://identity.foundation/dwn/json-schemas/general-jws.json" + }, + "descriptor": { + "type": "object", + "additionalProperties": false, + "required": [ + "interface", + "method", + "messageTimestamp", + "filter" + ], + "properties": { + "interface": { + "enum": [ + "Records" + ], + "type": "string" + }, + "method": { + "enum": [ + "Query" + ], + "type": "string" + }, + "messageTimestamp": { + "$ref": "https://identity.foundation/dwn/json-schemas/defs.json#/definitions/date-time" + }, + "filter": { + "type": "object", + "minProperties": 1, + "additionalProperties": false, + "properties": { + "protocol": { + "type": "string" + }, + "attester": { + "$ref": "https://identity.foundation/dwn/json-schemas/defs.json#/definitions/did" + }, + "recipient": { + "$ref": "https://identity.foundation/dwn/json-schemas/defs.json#/definitions/did" + }, + "contextId": { + "type": "string" + }, + "schema": { + "type": "string" + }, + "recordId": { + "type": "string" + }, + "parentId": { + "type": "string" + }, + "dataFormat": { + "type": "string" + }, + "dateCreated": { + "type": "object", + "minProperties": 1, + "additionalProperties": false, + "properties": { + "from": { + "$ref": "https://identity.foundation/dwn/json-schemas/defs.json#/definitions/date-time" + }, + "to": { + "$ref": "https://identity.foundation/dwn/json-schemas/defs.json#/definitions/date-time" + } + } + } + } + }, + "dateSort": { + "enum": [ + "createdAscending", + "createdDescending", + "publishedAscending", + "publishedDescending" + ], + "type": "string" + } + } + } + } +} \ No newline at end of file diff --git a/schemas/json-schemas/interface-methods/records-read.json b/schemas/json-schemas/interface-methods/records-read.json new file mode 100644 index 0000000..e31b120 --- /dev/null +++ b/schemas/json-schemas/interface-methods/records-read.json @@ -0,0 +1,44 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "https://identity.foundation/dwn/json-schemas/records-read.json", + "type": "object", + "additionalProperties": false, + "required": [ + "descriptor" + ], + "properties": { + "authorization": { + "$ref": "https://identity.foundation/dwn/json-schemas/general-jws.json" + }, + "descriptor": { + "type": "object", + "additionalProperties": false, + "required": [ + "interface", + "method", + "messageTimestamp", + "recordId" + ], + "properties": { + "interface": { + "enum": [ + "Records" + ], + "type": "string" + }, + "method": { + "enum": [ + "Read" + ], + "type": "string" + }, + "messageTimestamp": { + "type": "string" + }, + "recordId": { + "type": "string" + } + } + } + } +} \ No newline at end of file diff --git a/schemas/json-schemas/interface-methods/records-write.json b/schemas/json-schemas/interface-methods/records-write.json new file mode 100644 index 0000000..adef376 --- /dev/null +++ b/schemas/json-schemas/interface-methods/records-write.json @@ -0,0 +1,269 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "https://identity.foundation/dwn/json-schemas/records-write.json", + "type": "object", + "additionalProperties": false, + "required": [ + "authorization", + "descriptor", + "recordId" + ], + "properties": { + "recordId": { + "type": "string" + }, + "contextId": { + "type": "string" + }, + "attestation": { + "$ref": "https://identity.foundation/dwn/json-schemas/general-jws.json" + }, + "authorization": { + "$ref": "https://identity.foundation/dwn/json-schemas/general-jws.json" + }, + "encryption": { + "type": "object", + "properties": { + "algorithm": { + "type": "string", + "enum": [ + "A256CTR" + ] + }, + "initializationVector": { + "$ref": "https://identity.foundation/dwn/json-schemas/defs.json#/definitions/base64url" + }, + "keyEncryption": { + "type": "array", + "minItems": 1, + "items": { + "type": "object", + "properties": { + "rootKeyId": { + "type": "string" + }, + "derivationScheme": { + "type": "string", + "enum": [ + "dataFormats", + "protocols", + "schemas" + ] + }, + "algorithm": { + "type": "string", + "enum": [ + "ECIES-ES256K" + ] + }, + "encryptedKey": { + "$ref": "https://identity.foundation/dwn/json-schemas/defs.json#/definitions/base64url" + }, + "initializationVector": { + "$ref": "https://identity.foundation/dwn/json-schemas/defs.json#/definitions/base64url" + }, + "ephemeralPublicKey": { + "$ref": "https://identity.foundation/dwn/json-schemas/public-jwk.json" + }, + "messageAuthenticationCode": { + "$ref": "https://identity.foundation/dwn/json-schemas/defs.json#/definitions/base64url" + } + }, + "additionalProperties": false, + "required": [ + "rootKeyId", + "derivationScheme", + "algorithm", + "encryptedKey", + "initializationVector", + "ephemeralPublicKey", + "messageAuthenticationCode" + ] + } + } + }, + "additionalProperties": false, + "required": [ + "algorithm", + "initializationVector", + "keyEncryption" + ] + }, + "descriptor": { + "type": "object", + "properties": { + "interface": { + "enum": [ + "Records" + ], + "type": "string" + }, + "method": { + "enum": [ + "Write" + ], + "type": "string" + }, + "recipient": { + "$ref": "https://identity.foundation/dwn/json-schemas/defs.json#/definitions/did" + }, + "protocol": { + "type": "string" + }, + "protocolPath": { + "type": "string", + "pattern": "^[a-zA-Z]+(\/[a-zA-Z]+)*$" + }, + "schema": { + "type": "string" + }, + "parentId": { + "type": "string" + }, + "dataCid": { + "type": "string" + }, + "dataSize": { + "type": "number" + }, + "dateCreated": { + "$ref": "https://identity.foundation/dwn/json-schemas/defs.json#/definitions/date-time" + }, + "messageTimestamp": { + "$ref": "https://identity.foundation/dwn/json-schemas/defs.json#/definitions/date-time" + }, + "published": { + "type": "boolean" + }, + "datePublished": { + "$ref": "https://identity.foundation/dwn/json-schemas/defs.json#/definitions/date-time" + }, + "dataFormat": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "interface", + "method", + "dataCid", + "dataSize", + "dateCreated", + "messageTimestamp", + "dataFormat" + ], + "dependencies": { + "parentId": [ + "protocol" + ] + }, + "allOf": [ + { + "$comment": "rule defining `published` and `datePublished` relationship", + "anyOf": [ + { + "properties": { + "published": { + "type": "boolean", + "enum": [ + true + ] + } + }, + "required": [ + "published", + "datePublished" + ] + }, + { + "properties": { + "published": { + "type": "boolean", + "enum": [ + false + ] + } + }, + "not": { + "required": [ + "datePublished" + ] + } + }, + { + "allOf": [ + { + "not": { + "required": [ + "published" + ] + } + }, + { + "not": { + "required": [ + "datePublished" + ] + } + } + ] + } + ] + } + ] + } + }, + "$comment": "rule defining `protocol` and `contextId` relationship", + "anyOf": [ + { + "properties": { + "descriptor": { + "type": "object", + "required": [ + "protocol", + "protocolPath", + "schema" + ] + } + }, + "required": [ + "contextId" + ] + }, + { + "allOf": [ + { + "not": { + "required": [ + "contextId" + ] + } + }, + { + "properties": { + "descriptor": { + "type": "object", + "not": { + "required": [ + "protocol" + ] + } + } + } + }, + { + "properties": { + "descriptor": { + "type": "object", + "not": { + "required": [ + "protocolPath" + ] + } + } + } + } + ] + } + ] +} \ No newline at end of file diff --git a/schemas/json-schemas/interface-methods/snapshots-create.json b/schemas/json-schemas/interface-methods/snapshots-create.json new file mode 100644 index 0000000..7ebaed7 --- /dev/null +++ b/schemas/json-schemas/interface-methods/snapshots-create.json @@ -0,0 +1,45 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "https://identity.foundation/dwn/json-schemas/snapshots-create.json", + "type": "object", + "additionalProperties": false, + "required": [ + "authorization", + "descriptor" + ], + "properties": { + "authorization": { + "$ref": "https://identity.foundation/dwn/json-schemas/general-jws.json" + }, + "descriptor": { + "type": "object", + "additionalProperties": false, + "required": [ + "interface", + "method", + "messageTimestamp", + "definitionCid" + ], + "properties": { + "interface": { + "enum": [ + "Snapshots" + ], + "type": "string" + }, + "method": { + "enum": [ + "Create" + ], + "type": "string" + }, + "messageTimestamp": { + "$ref": "https://identity.foundation/dwn/json-schemas/defs.json#/definitions/date-time" + }, + "definitionCid": { + "type": "string" + } + } + } + } +} \ No newline at end of file From 0f51b709dec332b0c8710f5e7ada23136ae754b9 Mon Sep 17 00:00:00 2001 From: Andor Kesselman Date: Wed, 23 Aug 2023 15:03:51 +0530 Subject: [PATCH 10/15] updated recordsDelete --- spec/spec.md | 79 ++++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 74 insertions(+), 5 deletions(-) diff --git a/spec/spec.md b/spec/spec.md index 67c3a1f..99a9c45 100644 --- a/spec/spec.md +++ b/spec/spec.md @@ -902,21 +902,90 @@ Get all objects of a given schema type: `RecordsDelete` messages are JSON objects that include general [Message Descriptor](#message-descriptors) properties and the following additional properties, which ****must**** be composed as follows: -- The message object ****MUST**** contain a `recordId` property, and its value ****MUST**** be the `recordId` of the logical record the entry corresponds with. - If the message object is attached to a Protocol, and its value ****MUST**** be a [_Computed Context ID_](#computed-context-ids). If the message is not attached to a Protocol, it ****MUST NOT**** contain a `contextId` property. - The message object ****MUST**** contain a `descriptor` property, and its value ****MUST**** be a JSON object composed as follows: - The object ****MUST**** contain an `interface` property, and its value ****MUST**** be the string `Records`. - The object ****MUST**** contain a `method` property, and its value ****MUST**** be the string `Delete`. + - The message object ****MUST**** contain a `recordId` property, and its value ****MUST**** be the `recordId` of the logical record the entry corresponds with. + - [ ] The object ****MUST**** contain a `messageTimestamp` property, and its value + ****MUST**** be of type string property, and its value ****MUST**** be an [[spec:rfc3339]] ISO 8601 timestamp that ****MUST**** be set and interpreted + as the time the `RecordsRead` record itself was created by the requester. + + + + +
+ +::: Sample Records Delete ```json -{ // Message - "descriptor": { // Message Descriptor +{ + "descriptor": { + "recordId": "b65b7r8n7bewv5w6eb7r8n7t78yj7hbevsv567n8r77bv65b7e6vwvd67b6", + "messageTimestamp": 2002-10-02T10:00:00-05:00Z", "interface": "Records", - "method": "Delete", - "recordId": "b6464162-84af-4aab-aff5-f1f8438dfc1e" + "method": "Delete" + } +} +``` +
+ +
+ +::: example Records Delete - JSON Schema + +```json +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "https://identity.foundation/dwn/json-schemas/records-delete.json", + "type": "object", + "additionalProperties": false, + "required": [ + "authorization", + "descriptor" + ], + "properties": { + "authorization": { + "$ref": "https://identity.foundation/dwn/json-schemas/general-jws.json" + }, + "descriptor": { + "type": "object", + "additionalProperties": false, + "required": [ + "interface", + "method", + "messageTimestamp", + "recordId" + ], + "properties": { + "interface": { + "enum": [ + "Records" + ], + "type": "string" + }, + "method": { + "enum": [ + "Delete" + ], + "type": "string" + }, + "messageTimestamp": { + "type": "string" + }, + "recordId": { + "type": "string" + } + } + } } } ``` +
+
#### Computed Context IDs From fb1a412350efcc61c4c550a0caae46a9746acd17 Mon Sep 17 00:00:00 2001 From: Andor Kesselman Date: Wed, 23 Aug 2023 21:45:09 +0530 Subject: [PATCH 11/15] Update spec/spec.md Co-authored-by: LiranCohen --- spec/spec.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/spec.md b/spec/spec.md index 99a9c45..64cbb84 100644 --- a/spec/spec.md +++ b/spec/spec.md @@ -909,7 +909,7 @@ Get all objects of a given schema type: - The message object ****MUST**** contain a `recordId` property, and its value ****MUST**** be the `recordId` of the logical record the entry corresponds with. - [ ] The object ****MUST**** contain a `messageTimestamp` property, and its value ****MUST**** be of type string property, and its value ****MUST**** be an [[spec:rfc3339]] ISO 8601 timestamp that ****MUST**** be set and interpreted - as the time the `RecordsRead` record itself was created by the requester. + as the time the `RecordsDelete` record itself was created by the requester.