-
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 to return only token #2855
Comments
The reason there isn't a format flag right now is that we return a lot of other textual information to clients, since it's meant to be for humans. One possibility would be a pretty trivial grep/sed to pull the token out, since there is known text in front and a newline after. Another might be to add a flag specifically to the AWS CLI helper that will return the encoded JSON that needs to be sent to Vault. Then you could use the CLI to get the headers and pipe that into a |
This will be useful to other golang clients so they can manage the login process themselves. Also helps for hashicorp#2855
* Let AWS auth CLI helper only generate login data This will be useful to other golang clients so they can manage the login process themselves. Also helps for #2855 * Respond to PR feedback
This works nowadays:
|
Hi,
Is there a way to make
vault auth
return only the token in output? I'd like to use Vault CLI to authenticate my EC2 instance using AWS Backend, but I'd like to avoid writing custom code for this particular use case. I'm aware that Vault API could be used, however with AWS Auth backend it's not so trivial.Perhaps it would be possible to add some sort of flag, that would just return the token, or add a flag using which the output would be machine readable?
The text was updated successfully, but these errors were encountered: