Add Default Filters for CSRF Tokens
- Dominant language
- Groovy
- Stars
- 2.9k
- Forks
- 975
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 92
Description
Grails web profile is lacking in a lot of areas that could be some nice default enhancements to help developers prevent surprises down the line in their development. One of these is the use of CSRF tokens. There is a built in feature with the `withForm` method in a controller as well as `useToken="true"` on a form but this really should be automatic. By turning on the Spring Boot CSRF Filter and providing some default beans for matchers this could be easily automated in a way that the user doesn't have to explicitly think about CSRF.
Contributor guide
Research direction
Start by reviewing the Grails web profile's existing CSRF support and Spring Boot's CSRF filter and matcher configuration. Determine how default matcher beans could enable protection without explicit withForm or useToken settings, then verify the behavior for controllers and forms covered by the web profile.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- groovy, spring-boot
- Domain
- backend, security
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100