-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Confusing error message when looking up invalid tokens #2020
Comments
@xh3b4sd I do understand the reasoning behind your suggestion, but In comparison, a combination of |
@vishalnayak you say you understand the issue but then you close it. I don't understand this behaviour. |
@xh3b4sd There is a difference between not caring and disagreeing. It is not that we do not care about your opinion, but we disagree that returning a success error code when an invalid token is provided is the right thing to do. You're looking at it purely from a human perspective, but Vault is API-driven, and when a program thinks it has a valid token and tries to look up its properties, the right behavior if the token is actually invalid is to send a This behavior will not be changed. |
I did not suggest to return a success status code. The |
I don't follow that at all. That would be an internal server error which is very clearly not returned here.
Not quite. 404 means that the endpoint can't be found. You're using an old client, but current Vault CLI uses a POST with the token in the body. The endpoint is found; it's the data that's bad. (Current Vault also returns 403 here, not 400, to better reflect that it's not an invalid request per se, it's just that the data supplied does not correspond to an actual authentication token).
All Vault errors respond the same way. It's not debug output, it's giving the user the information needed to figure it out. |
Ok, got you. I had a walk and thought about what you said. Your arguments make sense though. It is only that I am as the dumbest user are confused about this. Though I don't really know how to improve this now. Lets move on wth our lives. Thanks for your time @vishalnayak and @jefferai anyway. And thanks for bearing with me. |
I create a token.
I lookup the token.
I revoke the token. The message is cool. All good.
When I lookup the token again after it was revoked I get an error message. I as a user am not sure if I did something wrong.
When I lookup
foo
I get the same error.IMO an error should only be shown in case something went wrong with the system. Currently the system gives me the impression I did something wrong. I would rather expect something like this.
The text was updated successfully, but these errors were encountered: