Description
I am going through an upgrade of a Spring Boot 2.6 to Boot 3.0 application. I found the documentation at https://docs.spring.io/spring-security/reference/5.8/migration/servlet/exploits.html to be incomplete. I have had a to spend many hours on trial and error different setting combinations to try and get my app to work, however, I still have one failing test case where on CSRF token is not getting generated when it was generated in 5.7.
I am looking for the migration docs to explain what the impact of the changes in CSRF defaults from both the client perspective and the server side spring perspective.
Ideally the CSRF docs:
- Review of the csrf behaviour in 5.7 and earlier, along with how single page and server side rendered apps typically dealt with it.
- How the CSRF behaviour changed in 5.8 and 6.0, and what the client needs to do to be compatible with the 5.8 / 6.0 behaviour (this is currently missing)
- Rational for why the changes were made in version 6, what benefits do I get in the app if I refactor the app to be compatible with spring security 6 defaults.
- How to configure the CSRF behaviour to be same as 5.7 in 6.0 if that is possible. The current docs at https://docs.spring.io/spring-security/reference/5.8/migration/servlet/exploits.html is only focused on what changed in the configuration code.
So far in my efforts to upgrade to Boot 3 the spring security changes in default behaviour have been the most problematic as I find myself having to trail and error configuration settings as opposed to being 100% clear on what I am changing and why I am changing it.