Skip to content

Add cross-references between CSRF and CORS filter #51290

@sithmein

Description

@sithmein

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions