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
Response code 404 not defined in swagger spec for /oauth2/revoke #2350
Comments
|
Thank you for the report, PRs and fixes appreciated! |
|
The server endpoint specified is incorrect in your command to Hydra server logs: |
|
Ah, that is my mistake, I must have misunderstood the help texts. Is there anything to do on the admin server then? I guess 404 makes sense if the endpoint is unknown to the admin server, but the swagger spec does not allow that. |
|
That's alright, the five minute guide might not be too clear on which command requires which endpoint - admin or public. Will need to look at making it more clear. Yes the admin endpoints are used for a couple of things, here is the documentation for the admin endpoints:
Regarding the swagger spec - @aeneasr ? Just for extra clarification, the server runs two endpoints, one being public (4444) and the other admin (4445). Here is the documentation specifying where the revoke endpoint is mounted to. |
|
The reference API documentation actually explains is pretty good I think. I used the For some reason I though to my self that revocation would be an admin concern, but with the reference docs it is pretty clear that it is a client concern. |
|
Thank you for clearing that up! We generally have a problem with the swagger responses in the CLI commands. The problem is that unspecified error codes (such as 404 - see example), or error responses which are not JSON but instead text (the default httprouter 404 handler in go just prints This has lead to several bug reports in the past while actually the problem was a bad error response. Maybe you have some ideas how we could improve this? |


Crevil commentedFeb 11, 2021
Describe the bug
Thank you for a great project and documentation. I ran into a bug (I think) while playing with the 5 minute tutorial.
When revoking an access token that is not found the hydra server returns a 404 response but this is not a defined response in the swagger specification. This leads to an error like
response status code does not match any response statuses defined for this endpointinstead of just indicating that the token was not found (or whatever makes sense to disclose security wise).Reproducing the bug
Start hydra
In a new terminal revoke any fake token value.
Server logs
Server configuration
From
contrib/quickstart/5-min/hydra.ymlExpected behavior
Expected no error but instead just an acknowledgement of the revocation.
Environment
The text was updated successfully, but these errors were encountered: