-
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
vault auth should not show token in output #2758
Comments
What do you suggest should be done instead? While we could probably add a flag to suppress this output, novice users won't know to use it anyways. |
@jefferai I'd like a flag, so it's not stored in the log. I'm using vault CLI as part of a provisioning process that kicks off from TeamCity powershell script. TeamCity collects stdout / stderr to execution log. This information is valuable in case vault auth command fails for any reason. However, storing the succesfully generating token in the log file is something that I'd like to avoid. Currently it's quite binary, I can suppress the whole output (/dev/null) or I can include the whole output, including the token. I'd like to have a middle ground. |
I don't understand what you're asking for. The auth command is meant to be interactive. If it's not printed, what is the behavior you're looking for? Why not just use the API directly in that case? |
I'm supporting your idea of adding a flag to suppress the output of the token.
Vault cli is easy to use. Calling API directly with powershell can be problematic (not many examples around the net, not easy to get support, since it's not a mainstream use case) the powershell wrapper is less then ideal, since it tries to mimic the cli, which in my view a bit pointless. |
The output of the command is easily suppressed via normal shell mechanisms. |
Trivially manually tested Closes #2758
Trivially manually tested Closes #2758
Can we re-open this issue until there is documentation for this? The documentation for login doesn't mention this feature. |
It's in the output of |
What is the use of I would say hiding this should be the default. Usually you don't care about the token, as it is stored for you and you can interact with vault without actually knowing or accessing it. |
100% agree. It is really confusing seeing the extra added message |
Is it possible to login silently? |
The
vault auth
command returns the token to the console. This strikes me as an anti-pattern, especially when users don't grasp the importance and sensitivity of the Vault token: I've had more than one user share the output ofvault auth
with others.The text was updated successfully, but these errors were encountered: