-
Notifications
You must be signed in to change notification settings - Fork 3k
Description
Description
The current CSRF filter is stateful in that it requires the client to send back some server-generated value. However, there are other, stateless, ways to prevent CSRF such as the one mentioned in an OWASP Cheat Sheet about CSRF.
Therefore the quarkus-rest-csrf extension should also offer a stateless request filter.
I have the corresponding filter already available. However, I would need some pointers/discussion about how exactly it should be added to the extension. For example, how do you can (de)activate an ContainerRequestFilter via configuration such that it gets completely excluded if disabled.
Implementation ideas
Follow the approach outlined in https://cheatsheetseries.owasp.org/cheatsheets/Cross-Site_Request_Forgery_Prevention_Cheat_Sheet.html#using-standard-headers-to-verify-origin