Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support spaces in secret paths #199

Closed
tegefaulkes opened this issue Jun 11, 2024 · 5 comments · Fixed by #217
Closed

Support spaces in secret paths #199

tegefaulkes opened this issue Jun 11, 2024 · 5 comments · Fixed by #217
Assignees
Labels
development Standard development r&d:polykey:core activity 1 Secret Vault Sharing and Secret History Management r&d:polykey:supporting activity Supporting core activity

Comments

@tegefaulkes
Copy link
Contributor

Specification

Attempting $ ~/Projects/Polykey-CLI/dist/polykey.js secrets create ./A\ B.md 'rippling:/A B.md' results in the following error error: command-argument value 'rippling:/A B.md' is invalid for argument 'secretPath'. rippling:/A B.md is not of the format <vaultName>:<directoryPath>.

We should be able to handle file paths with spaces within them.

Tasks

  1. Support spaces within secret paths.
  2. Added tests testing this functionality.
@tegefaulkes tegefaulkes added the development Standard development label Jun 11, 2024
Copy link

linear bot commented Jun 11, 2024

@CMCDragonkai
Copy link
Member

CMCDragonkai commented Jun 14, 2024 via email

@tegefaulkes
Copy link
Contributor Author

I'm re-opening this. We want to explore using a Constraint parser for parsing the vaults secret path. This should also allow for escaping certain characters we'd otherwise disallow such as '='. For example, vault:this/secret=name==valueshould be valid.vault:this/secret=name==valuewould be invalid for having two un-escaped=andvault:this/secret=name==value=for having an invalid=` in the value section.

That said, for the usage of secret env command, an = inside the secret name would be invalid since it would be an invalid environment variable name. Directory paths should be able to include = however.

Right now I'm pegging this expansion to the logic as a low priority. It's a lot of extra work just to allow = in the secret directory names.

On top of this, I think the error for failing to parse the vault secret path could be clearer and conditional. For example, if it failed to parse due to an invalid character, the exact reason needs to be defined.

@tegefaulkes tegefaulkes reopened this Jul 2, 2024
@CMCDragonkai
Copy link
Member

CMCDragonkai commented Jul 3, 2024

I think you should open up a new issue. The code of supporting spaces is done.

@tegefaulkes
Copy link
Contributor Author

Closing this out. New issue at #223.

@CMCDragonkai CMCDragonkai closed this as not planned Won't fix, can't repro, duplicate, stale Aug 15, 2024
@CMCDragonkai CMCDragonkai added r&d:polykey:core activity 1 Secret Vault Sharing and Secret History Management r&d:polykey:supporting activity Supporting core activity labels Aug 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
development Standard development r&d:polykey:core activity 1 Secret Vault Sharing and Secret History Management r&d:polykey:supporting activity Supporting core activity
3 participants