Skip to content

Attempt to modify a remote vault throws an error instead of creating a clone #365

Description

@aryanjassal

Describe the bug

Polykey's design disallows modification of remote vaults. The intended usage in this case is to clone the vault, then modify it with the relevant secrets. This way, both vaults will maintain their separate histories and not interfere with each other. However, this is not the current behaviour. If the vault is a remote vault, then any modification operation will throw an error and exit the command instead of creating a clone.

To Reproduce

  1. Create a vault on N1
  2. Pull the vault on N2
  3. Attempt to modify the vault contents on N2
  4. Observe error

Expected behavior

The vault should create a clone of itself and perform the changes in the cloned vault instead.

Additional context

Notify maintainers

@aryanjassal

Activity

  1. self-assigned this
    on Feb 3, 2025
  2. linear commented on Feb 3, 2025

    @linear
  3. aryanjassal commented on Feb 24, 2025

    @aryanjassal
    ContributorAuthor

    The authority of modifying the vault shouldn't belong to a single node, but should belong to a gestalt. I have not tested this behaviour, but in @CMCDragonkai's experience, only the node which created the vault has authority to write secrets. The authority should be granted to all nodes within a gestalt without the need to fork the vault to modify its contents instead.

  4. CMCDragonkai commented on Feb 25, 2025

    @CMCDragonkai
    Member

    No we don't want all nodes to be able to write to the vault. At any moment in time, any of the nodes can take the write lock of the vault. But that means it has to broadcast that across to the rest of the nodes in the gestalt as part of gestalt synchronisation. We need the gossip-like protocol to repeat for nodes that are temporarily offline.

  5. aryanjassal commented on Mar 5, 2025

    @aryanjassal
    ContributorAuthor

    How will we create a gossip-like protocol for this when we are using a decentralised system? Apps like whatsapp can temporarily buffer messages on their server until it is received. How can we do that? A gestalt might go completely offline at a point, so we cannot rely on other nodes in a gestalt storing this 'gossip' for buffering.

  6. CMCDragonkai commented on Mar 5, 2025

    @CMCDragonkai
    Member

    How will we create a gossip-like protocol for this when we are using a decentralised system? Apps like whatsapp can temporarily buffer messages on their server until it is received. How can we do that? A gestalt might go completely offline at a point, so we cannot rely on other nodes in a gestalt storing this 'gossip' for buffering.

    Let's ignore the case of an entire gestalt going offline. Gossip is for config sync. And technically it's not entirely fully consistent. We actually need a sort of inbetween that ensures complete consistency for online only nodes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions