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

Vault CLI copy-to-clipboard #7556

Open
jrdemasi opened this issue Oct 3, 2019 · 5 comments
Open

Vault CLI copy-to-clipboard #7556

jrdemasi opened this issue Oct 3, 2019 · 5 comments

Comments

@jrdemasi
Copy link

jrdemasi commented Oct 3, 2019

Is your feature request related to a problem? Please describe.
I used to use pass (https://www.passwordstore.org/) for both personal and professional purposes, and one of the best features of it (in my opinion) was the ability to copy a password directly to your clipboard for a limited amount of time. With pass, it was 45 seconds, then it cleared from your clipboard. Could we get this in the vault cli tool?

Describe the solution you'd like
I would like an easy way using the vault cli tool to easily copy a secret to my clipboard. Bonus points in my mind if it can be time limited so you don't accidentally paste a password somewhere 30 minutes later. Something like 30-60 seconds seems reasonable?

Describe alternatives you've considered
I know I could write a wrapper to accomplish these things, and if this gets rejected I probably will :-) I just think others could benefit and it seems reasonable for a piece of core functionality.

Please let me know if you all have any questions or if I can help contribute. Really love Vault as a product and all of the devs I've interacted with so far have been awesome. Keep doing what you do.

JD

@blhagadorn
Copy link

This is an interesting idea, however I would imagine this would be pretty OS-specific. On Mac OS - vault kv get -field=excited secret/hello | pbcopy will copy it to the clipboard (however there is no TTL). Perhaps this issue on a password manager offers more insight: lastpass/lastpass-cli#59

@jrdemasi
Copy link
Author

jrdemasi commented Oct 8, 2019

Well, there is at least one package for Go that implements this: https://github.com/atotto/clipboard. It does add optional deps for Linux, but I think that could be handled gracefully?

@aphorise
Copy link
Contributor

This is a reasonable request and may still be relevant.

Operators wishing to kv get or unwrap could for example have the data automatically set to pb without divulging values visually on CLI.

The question (after close to 3 years) is if it's likely to ever be delivered & if so when? 😝

Any other opinions would be welcome (@ncabatoff)

@coterobarros
Copy link

This is what I first missed when using vault CLI. When working side by side with someone who is not intended to read certain passwords, having them copied to to the clipboard is a convenient solution.

@coterobarros
Copy link

pbcopy is a work around on OS X an xclip on Linux.

@hsimon-hashicorp hsimon-hashicorp removed their assignment Mar 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants