Skip to main content

CSRF

Learn CSRF (Spring MVC Security Integration, Spring MVC) with worked examples, diagrams and interview questions. Free on JavaSchoolLab.

Fresher Notes CSRF (Cross-Site Request Forgery) is an attack where a malicious page makes the browser of a logged-in user send a request to your site, using the cookies the browser attaches automatically. Defense : Spring Security gives every session a secret token and rejects state-changing requests ( POST , PUT , DELETE ) that do not send it back. Default : CSRF protection is on by default for browser apps; GET , HEAD and OPTIONS are not checked.

More lessons in Spring MVC Security Integration