-
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
Error code 500 when looking up bad token #16102
Comments
Hi @qlaut I'm having trouble reproducing this using Vault built from the main branch. All of my errors are the 403 one would expect. I'll try with 1.10.x as well. |
I'm also unable to repro using the latest commit from the |
I'm able to repro now. I see the error with my earlier attempts. |
Howdy. I am getting bit by this on Vault 1.10.3. I searched the Changelog, and only 1.11.X (and the unreleased 1.12.0) apparently have the fix applied. Is there a way I can follow these specific PR merges and release for the 1.10.X series? Thanks. |
Describe the bug
When using the lookup endpoint to check a bad service token following the new format introduced in vault 1.10, vault returns an error code 500 due to the server side consistent token check failing. Starting from a valid service token, two different errors happen.
When adding or removing a character to the token :
server side consistent token check failed: error occurred when unmarshalling ssc token: proto: cannot parse invalid wire-format data
When replacing characters (thus making the token bad but keeping it the same length) :
server side consistent token check failed: token mac for token_version:1 hmac:"\x1e\xbf\x95\xfbuP/\xc8lf*U_\x06\xd4\xcd0\xdc-c\x07\x00\x16\xc4;=\xdbC;\xb6\xf3M" token:"\n\x1chvs.77tWHeLVpiBwPGUByWfGXgXL" is incorrect: err %!w(<nil>)
Removing two characters produces the expected error code 403 with the
bad token
message.To Reproduce
Steps to reproduce the behavior:
vault server -dev
vault token create -policy="default"
vault token lookup <token>
Expected behavior
Always getting an error code 403 and message
bad token
.Environment:
vault status
): 1.10.4 (found also for 1.10.3, 1.11.0 and the main branch)vault version
): 1.10.4 (found also for 1.10.3, 1.11.0 and the main branch)Vault server configuration file(s):
Using the default configuration of the dev server.
The text was updated successfully, but these errors were encountered: