-
Notifications
You must be signed in to change notification settings - Fork 5
Closed
Labels
designRequires designRequires designdevelopmentStandard developmentStandard developmentr&d:polykey:core activity 1Secret Vault Sharing and Secret History ManagementSecret Vault Sharing and Secret History Management
Description
Specification
When the root keypair is changed, this needs to be propagated to other places that rely on knowing this information. In particular, the new Node Id generated by a new keypair needs to be propagated to the NodeManager and Status, among other places. This can be achieved either through the use of the Observer Pattern, or by using Event Emitters (preferred due to looser coupling).
Additional context
- Example implementation of the Observer Pattern for this purpose: f097671
- Discussion of Observer Pattern vs. Event Emitters (Pub/Sub Pattern): CLI and Client & Agent Service test splitting #311 (comment)
- Discussion of dependency injection + coupling issues: CLI and Client & Agent Service test splitting #311 (comment)
- Discussion of propagation of keypair renewal: https://gitlab.com/MatrixAI/Engineering/Polykey/js-polykey/-/merge_requests/209#note_676525054
Tasks
- Find all places where keypair renewal/resetting must be propagated to
- Expose a property in
KeyManagerthat allows events to be propagated to dependent classes - Register keypair renewal and resetting as such events
- Ensure that errors are correctly handled asynchronously
Metadata
Metadata
Assignees
Labels
designRequires designRequires designdevelopmentStandard developmentStandard developmentr&d:polykey:core activity 1Secret Vault Sharing and Secret History ManagementSecret Vault Sharing and Secret History Management