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

sctl add: check for valid key URI before accepting user input #57

Open
edaniszewski opened this issue Jan 21, 2020 · 1 comment
Open
Labels
good first issue Good for newcomers

Comments

@edaniszewski
Copy link
Contributor

When running sctl add for a new key, I was prompted to input the secret in interactive prompt. After the secret was added, I got the warning and error for missing key. I think it makes sense to do this check before input is accepted so the user knows upfront that a required arg is missing before they attempt to input any secret.

$ sctl add FOO_BAR
Enter the data you want to encrypt.. END with Enter and Ctrl+D
foob4r
WARN[0021] No KeyURI found in envelope. Required usage of flag/env config. 
FATA[0021] missing configuration for key     
@edaniszewski
Copy link
Contributor Author

also related to this, when a key is not in envelope (e.g. no scuttle file yet) and something is being added with key passed as flag (and probably also via ENV), the warning shows up even if the key is passed in. this feels wrong, since I don't think we should be warning the user about needing to pass in the key when the key is already being passed in?

sctl add --key=project-key FOO_BAR
Enter the data you want to encrypt.. END with Enter and Ctrl+D
foob4r
WARN[0012] No KeyURI found in envelope. Required usage of flag/env config. 

@lazypower lazypower added this to the Sprint 4/7/2020-05/01/2020 milestone Apr 7, 2020
@lazypower lazypower removed this from the Sprint 4/7/2020-05/01/2020 milestone Mar 15, 2021
@lazypower lazypower added the good first issue Good for newcomers label Mar 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants