2. What’s New in Spring Security 5.1

Spring Security 5.1 provides a number of new features. Below are the highlights of the release.

2.1 Servlet

2.2 WebFlux

2.3 Integrations

  • Jackson Support works with BadCredentialsException
  • @WithMockUser supports customizing when the SecurityContext is setup in the test. For example, @WithMockUser(setupBefore = TestExecutionEvent.TEST_EXECUTION) will setup a user after JUnit’s @Before and before the test executes.
  • LDAP Authentication can be configured with custom environment variables
  • X.509 Authentication supports deriving the principal as a strategy