-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Run vault as a service with password protected private key #3844
Comments
Also confirmed that running in foreground gives me the same error: while |
Hi @JoostvdB94, thank you for the bug report. I can confirm that you've identified a bug. When support for password protected keys was introduced, there were two code paths added. The first is used for the interactive case where we have a tty, in which case we change the tty's mode so that the password isn't echoed as it's being typed, then read it in. That case works fine. The second case is meant to handle your scenario, where the password is piped in to stdin. That code path code relies on the BasicUi.Reader field being populated, and we get the nil pointer panic because it hasn't been set. Until a fix is available, the only workaround I can think of would be to use something like expect. |
Hi @ncabatoff , |
Feature request?
Environment:
Vault v0.9.1
Vault Config File:
Startup Log Output:
None, see error in Actual behaviour
Expected Behavior:
TLS password can be passed using a pipe when starting vault process in background
like:
read -s password | ( echo $password | vault server -config /etc/vault/vault.conf &> ./vaultout &)
Actual Behavior:
When i run the command above, the following error get outputted to
./vaultout
Steps to Reproduce:
run
read -s password | ( echo $password | vault server -config /etc/vault/vault.conf &> ./vaultout &)
with a password protected private key
Important Factoids:
None
I think piping input to a process should not fail. Especially because this is used for many other applications that run in background. Running vault as a service when using a password protected priavte key is made (nearly) impossible.
If there is already a way to run vault as a service with a password protected private key, i would love to hear it.
The text was updated successfully, but these errors were encountered: