|
This version is still in development and is not considered stable yet. For the latest stable version, please use Spring Security 6.5.6! |
What’s New in Spring Security 7.0
Spring Security 7.0 provides a number of new features. Below are the highlights of the release, or you can view the release notes for a detailed listing of each feature and bug fix.
Removals
Being a major release, there are a number of deprecated APIs that are removed in Spring Security 7. Each section that follows will indicate the more notable removals as well as the new features in that module
Modules
-
The Spring Security Kerberos Extension is now part of Spring Security. See the Kerberos section of the reference for details.
-
Spring Authorization Server is now part of Spring Security. See the OAuth 2.0 Authorization Server section of the reference for details.
Core
-
Added Support for Multi-Factor Authentication
-
Removed
AuthorizationManager#checkin favor ofAuthorizationManager#authorize -
Added
AllAuthoritiesAuthorizationManagerandAllAuthoritiesReactiveAuthorizationManageralong with corresponding methods for AuthorizingHttpServletRequestsand method security expressions. -
Added
AuthorizationManagerFactoryfor creatingAuthorizationManagerinstances in request-based and method-based authorization components -
Added
Authentication.Builderfor mutating and mergingAuthenticationinstances -
Moved Access API (
AccessDecisionManager,AccessDecisionVoter, etc.) to a new module,spring-security-access
Config
-
Removed
and()from theHttpSecurityDSL in favor of using the lambda methods -
Removed
authorizeRequestsin favor ofauthorizeHttpRequests -
Simplified expression migration for
authorizeRequests -
Added support for SPA-based CSRF configuration
-
Added support for binding missing authorities to authentication mechanisms.
- Java
-
http.csrf((csrf) -> csrf.spa());
Crypto
-
Added Password4j-based password encoders providing alternative implementations for popular hashing algorithms:
-
Argon2Password4jPasswordEncoder- Argon2 -
BcryptPassword4jPasswordEncoder- BCrypt -
ScryptPassword4jPasswordEncoder- SCrypt -
Pbkdf2Password4jPasswordEncoder- PBKDF2 -
BalloonHashingPassword4jPasswordEncoder- Balloon Hashing
-
OAuth 2.0
-
Removed support for password grant
-
Added OAuth2 Support for HTTP Service Clients
-
Added support for custom
JwkSourceinNimbusJwtDecoder, allowing usage of Nimbus’sJwkSourceBuilderAPI -
Added builder for
NimbusJwtEncoder, supports specifying an EC or RSA key pair or a secret key -
Added support for
@ClientRegistrationIdat the type level, eliminating the need for method level repetition -
Added support for OAuth 2.0 Dynamic Registration Protocol
-
Enabled PKCE by default in OAuth 2.0 Authorization Server
SAML 2.0
-
Removed API methods based on
AssertingPartyDetailsclass in favor ofAssertingPartyMetadatainterface -
Removed GET request support from
Saml2AuthenticationTokenConverter -
Added JDBC-based
AssertingPartyMetadataRepository -
Made so that SLO still returns
<saml2:LogoutResponse>even when validation fails -
Removed Open SAML 4 support; applications should migrate to Open SAML 5
Web
-
Removed
MvcRequestMatcherandAntPathRequestMatcherin favor ofPathPatternRequestMatcher -
Added support for propagating exceptions in Authorized proxies through Spring MVC controllers
-
Added support to Authorized objects for Spring MVC types
-
Added support to Default Login Page to show factors based on
factor.typeandfactor.reasonparameters -
Changed LoginUrlAuthenticationEntryPoint to favor relative redirects by default