Prevent CSRF Filter from verifying token for a specific path #44582
Unanswered
egorsivenko
asked this question in
Q&A
Replies: 1 comment 4 replies
-
@egorsivenko You can tell CSRF filter to look at specific paths only, thus avoiding it checking OAuth handler paths, please check the config, there could be a few more properties there which can help |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm making a custom OAuth authorization server with Quarkus Renarde.
It includes
quarkus-rest-csrf
dependency which is used for securing endpoints that accept application/x-www-form-urlencoded such as/login
,/register
,/oauth2/clients/new
, etc.As follows from the OAuth specs, the client sends POST request of type application/x-www-form-urlencoded to get the token after previously obtaining the authorization code.
As the client represents an external application, the authorization server doesn't need to verify CSRF token upon receiving token POST request, because otherwise it's basically impossible to communicate with it.
The only thing I have found in the docs is to restrict CSRF token creation after GET request, but it doesn't seem to fit the case. Is there a way to disable CSRF filter for such a specific endpoint?
Beta Was this translation helpful? Give feedback.
All reactions