whats-new.adoc 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. [[new]]
  2. == What's New in Spring Security 5.1
  3. Spring Security 5.1 provides a number of new features.
  4. Below are the highlights of the release.
  5. === Servlet
  6. * https://github.com/spring-projects/spring-security/tree/master/samples/boot/oauth2webclient[OAuth 2.0 Client]
  7. ** Customizable Authorize and Token requests
  8. ** `authorization_code` grant support
  9. ** `client_credentials` grant support
  10. * OAuth 2.0 Resource Server - support for https://github.com/spring-projects/spring-security/tree/master/samples/boot/oauth2resourceserver[JWT-encoded bearer tokens]
  11. * https://github.com/spring-projects/spring-security/tree/master/samples/boot/oauth2webclient[OAuth 2.0 Web Client Extensions] - Supports `authorization_code`, `client_credentials`, and `refresh_token` grants
  12. * <<core-services-password-encoding>> - New service to support password upgrades
  13. * <<request-matching>> - Protection against HTTP Verb Tampering and Cross-site Tracing
  14. * <<exception-translation-filter>> - Support for selecting an `AccessDeniedHandler` by `RequestMatcher`
  15. * <<csrf>> - Support for disabling csrf by `RequestMatcher`
  16. * <<headers>> - Support for `Feature-Policy`
  17. * <<session-mgmt>> - Support for `@Transient` authentication tokens
  18. * A modern look-and-feel for the default log in page
  19. === WebFlux
  20. * https://github.com/spring-projects/spring-security/tree/master/samples/boot/oauth2webclient-webflux[OAuth 2.0 Client]
  21. ** Customizable Authorize requests
  22. ** `authorization_code` grant support
  23. ** `client_credentials` grant support
  24. * OAuth 2.0 Resource Server - support for https://github.com/spring-projects/spring-security/tree/master/samples/boot/oauth2resourceserver-webflux[JWT-encoded bearer tokens]
  25. * https://github.com/spring-projects/spring-security/tree/master/samples/boot/oauth2webclient-webflux[OAuth 2.0 Web Client Extensions] - Supports `authorization_code`, `client_credentials`, and `refresh_token` grants
  26. * <<test-method>> - `@WithUserDetails` now works with `ReactiveUserDetailsService`
  27. * <<cors>> - Support for CORS was added
  28. * <<headers>> - Support for `Content-Security-Policy`, `Feature-Policy`, and `Referrer-Policy`
  29. * Support for redirecting to HTTPS
  30. === Integrations
  31. * <<jackson>> - Support for `BadCredentialsException`
  32. * <<test-method>> - Support for customizing when the `SecurityContext` is setup in the test.
  33. For example, `@WithMockUser(setupBefore = TestExecutionEvent.TEST_EXECUTION)` will setup a user after JUnit's `@Before` and before the test executes.
  34. * <<ldap>> - Support for setting up an `LdapContext` from custom environment variables
  35. * <<x509>> - Support for deriving the X.509 principal via a strategy
  36. * <<mvc-authentication-principal>>
  37. ** Support for resolving beans in WebFlux (support already exists for Spring MVC)
  38. ** Support for resolving `errorOnInvalidType` in WebFlux (support already exists for Spring MVC)