3. 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.

3.1 Servlet

3.2 WebFlux

3.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