whats-new.adoc 5.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. [[new]]
  2. = What's New in Spring Security 7.0
  3. Spring Security 7.0 provides a number of new features.
  4. Below are the highlights of the release, or you can view https://github.com/spring-projects/spring-security/releases[the release notes] for a detailed listing of each feature and bug fix.
  5. == Removals
  6. Being a major release, there are a number of deprecated APIs that are removed in Spring Security 7.
  7. Each section that follows will indicate the more notable removals as well as the new features in that module
  8. == Modules
  9. * The https://github.com/spring-projects/spring-security-kerberos[Spring Security Kerberos Extension] is now part of Spring Security. See the xref:servlet/authentication/kerberos/index.adoc[Kerberos] section of the reference for details.
  10. * https://github.com/spring-projects/spring-authorization-server[Spring Authorization Server] is now part of Spring Security. See the xref:servlet/oauth2/authorization-server/index.adoc[OAuth 2.0 Authorization Server] section of the reference for details.
  11. == Core
  12. * Added Support for xref:servlet/authentication/mfa.adoc[Multi-Factor Authentication]
  13. * Removed `AuthorizationManager#check` in favor of `AuthorizationManager#authorize`
  14. * Added javadoc:org.springframework.security.authorization.AllAuthoritiesAuthorizationManager[] and javadoc:org.springframework.security.authorization.AllAuthoritiesReactiveAuthorizationManager[] along with corresponding methods for xref:servlet/authorization/authorize-http-requests.adoc#authorize-requests[Authorizing `HttpServletRequests`] and xref:servlet/authorization/method-security.adoc#using-authorization-expression-fields-and-methods[method security expressions].
  15. * Added xref:servlet/authorization/architecture.adoc#authz-authorization-manager-factory[`AuthorizationManagerFactory`] for creating `AuthorizationManager` instances in xref:servlet/authorization/authorize-http-requests.adoc#customizing-authorization-managers[request-based] and xref:servlet/authorization/method-security.adoc#customizing-authorization-managers[method-based] authorization components
  16. * Added javadoc:org.springframework.security.core.Authentication$Builder[`Authentication.Builder`] for mutating and merging `Authentication` instances
  17. * Moved Access API (`AccessDecisionManager`, `AccessDecisionVoter`, etc.) to a new module, `spring-security-access`
  18. == Config
  19. * Support modular configuration in xref::servlet/configuration/java.adoc#modular-httpsecurity-configuration[Servlets] and xref::reactive/configuration/webflux.adoc#modular-serverhttpsecurity-configuration[WebFlux]
  20. * Removed `and()` from the `HttpSecurity` DSL in favor of using the lambda methods
  21. * Removed `authorizeRequests` in favor of `authorizeHttpRequests`
  22. * Simplified expression migration for `authorizeRequests`
  23. * Added support for SPA-based CSRF configuration
  24. * Added support for javadoc:org.springframework.security.web.access.DelegatingMissingAuthorityAccessDeniedHandler[binding missing authorities to authentication mechanisms].
  25. Java::
  26. +
  27. [source,java,role="primary"]
  28. ----
  29. http.csrf((csrf) -> csrf.spa());
  30. ----
  31. == Crypto
  32. * Added Password4j-based password encoders providing alternative implementations for popular hashing algorithms:
  33. ** `Argon2Password4jPasswordEncoder` - xref:features/authentication/password-storage.adoc#password4j-argon2[Argon2]
  34. ** `BcryptPassword4jPasswordEncoder` - xref:features/authentication/password-storage.adoc#password4j-bcrypt[BCrypt]
  35. ** `ScryptPassword4jPasswordEncoder` - xref:features/authentication/password-storage.adoc#password4j-scrypt[SCrypt]
  36. ** `Pbkdf2Password4jPasswordEncoder` - xref:features/authentication/password-storage.adoc#password4j-pbkdf2[PBKDF2]
  37. ** `BalloonHashingPassword4jPasswordEncoder` - xref:features/authentication/password-storage.adoc#password4j-balloon[Balloon Hashing]
  38. == Data
  39. * Added support to Authorized objects for Spring Data types
  40. == LDAP
  41. * Removed `ApacheDsContainer` and related Apache DS support in favor of UnboundID
  42. == OAuth 2.0
  43. * Removed support for password grant
  44. * Added OAuth2 Support for xref:features/integrations/rest/http-service-client.adoc[HTTP Service Clients]
  45. * Added support for custom `JwkSource` in `NimbusJwtDecoder`, allowing usage of Nimbus's `JwkSourceBuilder` API
  46. * Added builder for `NimbusJwtEncoder`, supports specifying an EC or RSA key pair or a secret key
  47. * Added support for `@ClientRegistrationId` at the xref:features/integrations/rest/http-service-client.adoc#type[type level], eliminating the need for method level repetition
  48. * Added support for https://github.com/spring-projects/spring-security/issues/17964[OAuth 2.0 Dynamic Registration Protocol]
  49. * Enabled https://github.com/spring-projects/spring-security/issues/18020[PKCE by default] in OAuth 2.0 Authorization Server
  50. == SAML 2.0
  51. * Removed API methods based on `AssertingPartyDetails` class in favor of `AssertingPartyMetadata` interface
  52. * Removed GET request support from `Saml2AuthenticationTokenConverter`
  53. * Added JDBC-based `AssertingPartyMetadataRepository`
  54. * Made so that SLO still returns `<saml2:LogoutResponse>` even when validation fails
  55. * Removed Open SAML 4 support; applications should migrate to Open SAML 5
  56. == Test
  57. * https://github.com/spring-projects/spring-security/issues/17974[Add SecurityMockMvcResultMatchers.withAuthorities(String...)]
  58. == Web
  59. * Removed `MvcRequestMatcher` and `AntPathRequestMatcher` in favor of `PathPatternRequestMatcher`
  60. * Added javadoc:org.springframework.security.web.authentication.preauth.x509.SubjectX500PrincipalExtractor[]
  61. * Added support for propagating exceptions in Authorized proxies through Spring MVC controllers
  62. * Added support to Authorized objects for Spring MVC types
  63. * Added support to Default Login Page to show factors based on `factor.type` and `factor.reason` parameters
  64. * Changed LoginUrlAuthenticationEntryPoint to favor relative redirects by default