- Main configuration is located in
- Custom extended
Form.javais used to add hidden field with CSRF token.
- Ajax client configuration is done in
MidPointApplication.javawhere we inject CSRF token for all POST AJAX requests.
MidPointAccessDeniedHandler.javais used for simple redirect to login page when session is invalid or doesn't contain correct CSRF token.
Web services are not protected by CSRF. Configuration is located in
WebSecurityConfig.java, in fact spring security ignores web services URL's. Security for services is handled manually via CXF interceptors.
To disable CSRF protection one has to create
midpoint.home folder. Add following key to this configuration file.