-
Notifications
You must be signed in to change notification settings - Fork 167
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
VaadinWebSecurity does not ignore CSRF for Flow PUSH connection request #19075
Comments
mcollovati
moved this from 🆕 Needs triage
to 🔖 Normal Priority (P2)
in Vaadin Flow bugs & maintenance (Vaadin 10+)
Apr 3, 2024
It looks like only ping requests are failing, since they are doing a POST. |
mcollovati
added a commit
that referenced
this issue
Apr 3, 2024
HandlerHelper is currently not considering Flow PUSH requests (/VAADIN/push) as internal, preventing VaadinWebSecurity to ignore CSRF checks. The issues happen only for ping requests; the connection request is not affected because it is a GET request. Fixes #19075
9 tasks
It might be related to the PUSH request error reported in vaadin/kubernetes-kit#111 |
tepi
pushed a commit
that referenced
this issue
Apr 4, 2024
HandlerHelper is currently not considering Flow PUSH requests (/VAADIN/push) as internal, preventing VaadinWebSecurity to ignore CSRF checks. The issues happen only for ping requests; the connection request is not affected because it is a GET request. Fixes #19075
github-project-automation
bot
moved this from 🔖 Normal Priority (P2)
to ✅ Closed
in Vaadin Flow bugs & maintenance (Vaadin 10+)
Apr 4, 2024
vaadin-bot
pushed a commit
that referenced
this issue
Apr 4, 2024
HandlerHelper is currently not considering Flow PUSH requests (/VAADIN/push) as internal, preventing VaadinWebSecurity to ignore CSRF checks. The issues happen only for ping requests; the connection request is not affected because it is a GET request. Fixes #19075
vaadin-bot
added a commit
that referenced
this issue
Apr 4, 2024
#19110) HandlerHelper is currently not considering Flow PUSH requests (/VAADIN/push) as internal, preventing VaadinWebSecurity to ignore CSRF checks. The issues happen only for ping requests; the connection request is not affected because it is a GET request. Fixes #19075 Co-authored-by: Marco Collovati <[email protected]>
This ticket/PR has been released with Vaadin 24.4.0.alpha21 and is also targeting the upcoming stable 24.4.0 version. |
This ticket/PR has been released with Vaadin 24.3.10. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description of the bug
Given a Vaadin 24.3 application with security configured through
VaadinWebSecurity
, the PUSH connections fail right after login with a 403 error after login, because of Spring Security complaining about an invalid CSRF token.However, when the protected page is reloaded the PUSH connections are correctly established
The issue seems to be that the Flow PUSH connections requests (
/VAADIN/push
) are no more identified as Framework requests byHandlerHelper.isFrameworkInternalRequest()
.To be noted For Hilla PUSH connections, there is a specific method (
HandlerHelper.isHillaPush()
) that checks for/HILLA/push
Expected behavior
Spring CSRF check should be skipped for Vaadin PUSH connection, since they have their own built-in protection mechanism.
Minimal reproducible example
Versions
The text was updated successfully, but these errors were encountered: