-
Notifications
You must be signed in to change notification settings - Fork 3
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
Polykey-Docs:polykey secrets env
command doesn't align with Development Environment Secrets how-to-guide
#176
Comments
Several issues with the @CryptoTotalWar can write his own comments here too.
|
I used the |
Another thing is that when running the This must work: polykey secrets env my-software-project:AWS_SECRET_ACCESS_KEY zsh -d -f -i |
No it may not, in which case you take 1 single variadic arguments, and you do a manual parse over it. In fact thinking about it, that would be the correct way to implement this. |
I think the issues I raised above need to be part of the 1.0.0 - if not unix cli commands wise too. Usability is a big pain right now. |
secrets env
commandpolykey secrets env
command doesn't align with Development Environment Secrets how-to-guide
polykey secrets env
command doesn't align with Development Environment Secrets how-to-guidepolykey secrets env
command doesn't align with Development Environment Secrets how-to-guide
Specification
I ran into a slight problem when testing the
polykey secrets env
command when executing an AWS CLI command to check credentials in a demonstration. In this case env variables are added to a vault as separate files. When creating these files it's very common for editors to add a newline the end of the file automatically. https://stackoverflow.com/questions/16222530/why-do-i-need-vim-in-binary-mode-for-noeol-to-work.This means the newline is added to the env variable when executing a command or printing out in a certain format. This is not the intended way to format the env variable and in the case of my demonstration actually caused an error. To solve this we need to trim the end of file newline from the variables when using them.
Superficially it's a very simple fix. But in some cases trailing whitespace may be intended or at the very least should be allowed. So applying
trimEnd()
string method might break in some cases. So we need to explore use cases and see what the best solution is.So far I fixed it in a monkey patch with the following code
The old spec is incorrect. Running unix
env
produces a newline at the end. All files must have a EOL as their EOF character. This is according to unix convention.Instead the problem is that we only have 1 command that puts a secret into vaults as of now. That is
polykey secrets create ...
.This is lacking alot of nuance, and we want to change this with #32.
Instead usability issues were discovered during a recent demo with @CryptoTotalWar in #176 (comment).
Refer to #176 (comment) and #176 (comment) and https://polykey.com/docs/how-to-guides/developers/development-environment-secrets for spec on how this needs to work.
Tasks
env
commandThe text was updated successfully, but these errors were encountered: