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
configured Vault token contains non-printable characters and cannot be used #7288
Comments
Hello there! Would it be possible to trim the trailing characters in your code before attempting to use the token? Something like On the surface, it's really simple to add that to Vault's code and do it for you. At the same time, I'm hesitant to introduce code that modifies a users token input in an attempt to make the token be valid. I would prefer Vault not modify the supplied token value at all. (edited for spelling, wording) |
Additionally using "echo -n" would work around this in the first place. |
Hi there, Yes it totally makes sense to not "modify" the token. However, we could add a more explicit error message ? |
Hi @tormath1! What error message would you expect to see? I personally think the current error message explicitly defines the problem, doesn't it? Cheers, |
Hello - we haven't heard back in some time, so we're going to close this issue for now. If you have more information please let us know by opening a new issue, and optionally referencing this one. Thanks! |
Describe the bug
Hi, I am trying to use a Vault token stored in a tmp file:
To Reproduce
Steps to reproduce the behavior:
/tmp/my-token
/tmp/token
SetToken
to set the tokenExpected behavior
Get my request result
Environment:
github.com/hashicorp/vault/api v1.0.4 // indirect
Additional context
In the source, we run this kind of test:
vault/api/client.go
Lines 755 to 761 in 18aaf01
It could be nice to check if the last character is a
\n
and replace it by an empty character?The text was updated successfully, but these errors were encountered: