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

Enable storage of records with other authors/recipients without clobbering authorship/recipient attribution #439

Closed
csuwildcat opened this issue Jul 13, 2023 · 2 comments
Assignees

Comments

@csuwildcat
Copy link
Member

No description provided.

@diehuxx
Copy link

diehuxx commented Jul 13, 2023

Writing down our thoughts from our chat this afternoon:

What use case does this solve?

It allows a given protocol context tree to be shared between multiple DWNs.

Example

If Alice and Bob have a context tree of records with some contextId, they may want to invite Carol into the fold. Carol needs to establish a protocol context with the same contextId that Alice and Bob have, meaning she needs the exact same root RecordsWrite message that Alice and Bob have.

But how will Carol's DWN accept such a message if Alice/Bob pass her the exact message that they have? Alice signed the message as author, but Carol's protocol definition doesn't necessarily say "allow anyone to write a root record". I suppose Carol could create a PermissionsGrant to accept the root RecordsWrite, but that's heavy-handed. We can do better.

So we propose this flow:

  1. Alice sends a RecordsWrite to Bob
  2. Bob sends the RecordsWrite to Carol
  3. Carol adds her own signature to the authorization. Now Alice's signature is in the author JWS, and Carol's signature is in the owner JWS.
  4. Carol passes this updated RecordsWrite to her DWN, which sees that owner === tenant and accepts the message.

How does Carol decide whether she wants to add a signature and pass it to her DWN? We leave that to the application level.

@thehenrytsai thehenrytsai added this to DWN Sep 7, 2023
@thehenrytsai thehenrytsai moved this to High Priority Backlog in DWN Sep 7, 2023
@csuwildcat csuwildcat changed the title Add JWS for 'owner', and separate it from existing 'author' JWS attribution Enable storage of records with other authors/recipients without clobbering authorship/recipient attribution Sep 21, 2023
@csuwildcat csuwildcat moved this to Backlog in Web5 Roadmap Sep 21, 2023
@thehenrytsai thehenrytsai moved this from High Priority Backlog to In Progress in DWN Sep 26, 2023
thehenrytsai added a commit that referenced this issue Sep 28, 2023
…ject (#518)

* #439 - Turned authorization property from a JWS into a container object
thehenrytsai added a commit that referenced this issue Sep 28, 2023
* #439 - Return authorization in queries and reads
diehuxx pushed a commit to flothjl/dwn-sdk-js that referenced this issue Sep 29, 2023
* main:
  decentralized-identity#439 - Return `authorization` in queries and reads (decentralized-identity#523)
  decentralized-identity#439 - Turned `authorization` property from a JWS into a container object (decentralized-identity#518)
  npm audit fix get-func-name (decentralized-identity#521)
@csuwildcat
Copy link
Member Author

@thehenrytsai has a PR out for this as of today.

diehuxx pushed a commit that referenced this issue Oct 4, 2023
* main:
  #439 - Appended 'Signature' to` author` and `owner` under `authorization` (#536)
  #439 - Added `RecordsWrite` support for retainer signature (#531)
diehuxx pushed a commit to adarsh-a-tw/dwn-sdk-js that referenced this issue Oct 4, 2023
* main:
  decentralized-identity#439 - Appended 'Signature' to` author` and `owner` under `authorization` (decentralized-identity#536)
thehenrytsai added a commit that referenced this issue Oct 5, 2023
* #439 - Added ownerSignature authentication
* Updated naming for consistency
diehuxx pushed a commit that referenced this issue Oct 5, 2023
* main:
  #439 - Added `ownerSignature` authentication & corrected naming (#538)
  Removed hooks and snapshots code (#537)
  Normalize schema and protocol in create method of permission-grant (#532)
@github-project-automation github-project-automation bot moved this from Backlog to Done in Web5 Roadmap Oct 24, 2023
@github-project-automation github-project-automation bot moved this from In Progress to Done in DWN Oct 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants