MatrixAI / Polykey-CLI

Polykey CLI - Open Source Decentralized Secret Sharing System for Zero Trust Workflows
https://polykey.com
GNU General Public License v3.0
6 stars 3 forks source link

Specify only the vault path and infer the secret path to point to root #304

Open aryanjassal opened 1 week ago

aryanjassal commented 1 week ago

Specification

Currently, we have a parser which parses the input path to ensure valid parameters. In the case of vault paths, the parser check if the path follows the format like vaultName:secretPath. This is not always ideal, as we want to allow specifying the vault's root directory by simply writing vaultName.

This is already partially implemented in the secrets ls command, but this needs to be made a standard. For command which do not operate on directories, like secrets write, this should be another error thrown from within the command, but this shouldn't be an error thrown at the parsing stage.

Additional context

Tasks

  1. Update parser to allow returning undefined secret paths, which is to refer to the root directory
  2. Raise errors where the command should not accept directories as an argument
  3. Make tests for every single command ensuring regression testing against this behaviour
linear[bot] commented 1 week ago

ENG-425 Specify only the vault path and infer the secret path to point to root

tegefaulkes commented 1 day ago

@aryanjassal this is done right? Linear might have re-opened it.