BranchStore/KeyStore/Permissions #229
Replies: 5 comments 5 replies
-
If we have a general branch store logic as follows:
Would we even need to track the keyloads/links specifically? Or would it not suffice that the act of separating out cursors and permissions into individual branches would permit that users would always be checking/updating permissions only for a specific subsection of the channel at any given time anyways? For example:
Any read or write action would first need to fetch (or create) a branch in the BranchStore, and the cursors and permissions would be reflected there. Are the links necessary to enforce this at all? |
Beta Was this translation helpful? Give feedback.
-
I think it would be useful to have a more abstract listing of what we need in terms of the state of an Streams client. In this comment I want to first recap on the capabilities we envision users will have in v2.0, and then translate those into abstract requirements for the "State". User CapabilitiesFrom a very high-level perspective, all a Streams user can do is:
State requirementsThe previous capabilities can be distilled into the following requirements from a State point of view:
Questionable requirements
|
Beta Was this translation helpful? Give feedback.
-
Comments on op given the abstract requirements described in the previous comment:
This covers requirement 5, 6 and 7, although we should consider if its really necessary to keep a cursor per publisher. I would explore further the possibility to keep a single cursor per branch, as the tuple (publisher, topic, branch-seq-num) is already unique within a stream
why is 2.a necessary?
This covers requirement 10
Besides the PSK, the other identity types will have the exchange keys inherent to their identifiers. In the case of ed25519 the x25519 can be directly derived, while in the case of DID, the exchange key will be referred to as a verification method. We still need to keep in state the set of subscribers and their permissions for each branch, as per requirement 9, but not another one specific for the exchange keys.
Not putting my foot down, but I feel it might have a chance of being more comprehensible and semantically expressive if all the state is kept in a single
Branches will be identified by topics, therefore the mapping will be topic/set{permissions}. Why do we need to track any link?
I feel having everything together enhances understanding the state management as a whole, which is a good thing imo
neither, although I hope I'm not missing anything
yes! map permissions to topic. although I hope I'm not missing anything... |
Beta Was this translation helpful? Give feedback.
-
This has evolved a lot since the last comment. Are we content with the current implementation? |
Beta Was this translation helpful? Give feedback.
-
Yes I think we're good |
Beta Was this translation helpful? Give feedback.
-
Currently we track Cursors, Psk's and Exchange Keys in a KeyStore for a channel-centric management of access control, but in v2.0 we intend to bring more granularity of access management to the data tree topology, making it more branch-centric.
While managing branches, there are 4 pieces of information that we will need to keep track of in v2.0 going forward:
a. Links connecting the message chains to the permission granting keyload message
b. Individual user permissions as seen in a keyload message (with a default as either Read Only or Read/Write)
PSK's and Exchange Keys make sense to be separated out into their own storage imo, but the cursors and permissions should likely stay together as they're so closely related. In the current state, permission storing requires a mapping of links to the permission granting keyload, which requires that we either keep track of the latest link in the chain (as is currently proposed, but carries limitations in utility) or keep track of all links above the keyload (bloats the user instance and decreases performance). Additionally, permissions need to be stored in the branch for access during each read/write operation.
Questions:
Beta Was this translation helpful? Give feedback.
All reactions