Polykey icon indicating copy to clipboard operation
Polykey copied to clipboard

Vaults Push Dataflow

Open amydevs opened this issue 1 year ago • 1 comments

Specification

Where We're At

Currently Vaults can only be pulled by Nodes that have been shared it. This is encapsulated in the polykey vaults pull command that exists within PK-CLI. This pull dataflow means that responsibility to synchronize secrets is always left up to the consumer of a shared vault.

Bootstrapping

The vaults push flow will require a bootstrapping stage to configure the initial registration. The initial vault cloning process should signify to the node that houses the vault that another node will actively seek for changes to the vault. Hence, register it as a node to push to when polykey vaults push is called. The registration list should be shared with all nodes that are registered to that vault, allowing them to push if they are given the correct permissions

Untitled-2023-10-23-0424 excalidraw(13)

Vault Pushing

polykey vaults push will look for all registered nodes for the given vault, and push the changes to those nodes. Nodes that are shared that vault with permissions to push, should also be able to run polykey vaults push, given that they have derived the registration list from the node that the vault originated from.

Untitled-2023-10-23-0424 excalidraw(14)

Untitled-2023-10-23-0424 excalidraw(15)

Additional context

Tasks

  1. Implement state to store registered nodes to given shared vaults.
  2. Add logic to clone vault handler to register it as a push target.
  3. Implement polykey vaults push in PK-CLI

amydevs avatar Jan 10 '24 00:01 amydevs

@amydevs in the future can you reduce the size of the circles, makes it hard to see in the issue review.

CMCDragonkai avatar Aug 17 '24 10:08 CMCDragonkai