-
Notifications
You must be signed in to change notification settings - Fork 105
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add protocol update action #569
Conversation
Review or Edit in CodeSandboxOpen the branch in Web Editor • VS Code • Insiders |
Is this distinction necessary? Can't you just use capabilities for this? Say that Alice creates some record. As I understand it, the DWN node can't create a capability to return to her, but it does know she is the owner. That means Alice can create a "write" capability that she can use. She can also delegate that capability to someone else. The upshot is that you only need one "write" method at the expense of the owner having to create a root capability. An added advantage is that Alice won't be vulnerable to a confused deputy attack as she would be if she used her ambient authority. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM and test coverage is super thorough!! Just a few superficial comment.
@csuwildcat Any thoughts? |
Codecov Report
@@ Coverage Diff @@
## main #569 +/- ##
=======================================
Coverage 97.70% 97.70%
=======================================
Files 66 66
Lines 7757 7769 +12
Branches 1129 1132 +3
=======================================
+ Hits 7579 7591 +12
Misses 170 170
Partials 8 8
|
Yes, you could technically build the same type of behavior with delegation for other aspects of the protocol rules, but it would be difficult to enforce these as a 'protocol' with other implementations. Say you have a protocol with the following rules:
Instead of each implementation of this social protocol front-end app explicitly delegating the write capability of the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
In that case, allow the creator of the
Using the |
@diehuxx looks good to me |
* main: Add protocol update action (#569)
The
update
action allows an actor to update an existing record. This contrasts with thewrite
action which allows only the creator of a record to update it. In other words:write
allows a DID to create a record and update the record they have createdupdate
allows a DID to update a record, regardless of initial author