-
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
Do not store auth token in user home folder #2746
Comments
@StyleT Its possible that the token is only stored in |
This might be of interest: |
@jefferai @vishalnayak HI! I would say that current default behaviour it's very obvious & may compromise security. Is it possible to add some warning to the CLI output after default |
@StyleT Internally, we were discussing a Such an option would not make sense for the default For non-token authentication methods like
This is incorrect, unless I understood you wrong. CLI will fetch the token from the helper, and for the default internal helper, this means that the token will be fetched from disk. Once authenticated, Vault CLI commands should work across terminal sessions.
It might not be a bad idea to detect if the token helper is internal or external. If the helper is internal, we can add a warning to the output. Any chance you can PR this? |
I just ran into this and would like to suggest that if it's not considered a bug, it should at least be mentioned prominently in the documentation. I couldn't find a single mention in all of the vault documentation that using |
@thraxil It's kind of the point of the command; you have no need to use As Vishal said, we're considering adding a |
This is why I think it's a documentation issue. Going through the Getting Started guide, eg, the CLI is clearly the focus and the REST API is sort of an "oh, you can also do things this way if you want" aside at the end. There's a warning on this page about not putting real secrets on the CLI to avoid them getting into your shell history, so that gives the impression that there's been some thought put into that sort of thing. And If the official view is really that you should only use the APIs and the CLI is just a toy for getting started and that anyone using vault in production should write their own administrative interfaces against the API instead of using the included tools, the documentation does not give that impression. |
That's not the official view, but most users use something like |
If anyone wishes to control the vault token location with a |
Currently Vault uses user home folder in Linux to store it's authentication token after
vault auth
command. It may cause a case when root token will say there forever on some instance of Vault cluster. So attacker can easily pickup it.Maybe it's better to use shell session env vars for this.
The text was updated successfully, but these errors were encountered: