Latest in branch 7.0
7.0.5
Released 20 Apr 2026
(1 month ago)
SoftwareSpring Security
Branch7.0
Supported
Java/Jakarta EE
Java 17+
Jakarta EE 9+ (Servlet 6.0+)
Initial release7.0.0
17 Nov 2025
(6 months ago)
Latest release7.0.5
20 Apr 2026
(1 month ago)
End of
OSS support
31 Dec 2026
(Ends in 7 months)
End of
enterprise support
31 Dec 2027
(Ends in 1 year, 7 months)
Release noteshttps://github.com/spring-projects/spring-security/releases/tag/7.0.5
Source codehttps://github.com/spring-projects/spring-security/tree/7.0.5
Downloadhttps://github.com/spring-projects/spring-security/releases/tag/7.0.5
Spring Security 7.0 ReleasesView full list

What Is New in Spring Security 7.0

Category Highlights
New Features Multi-Factor Authentication support, Password4j password encoders, OAuth2 client-side support, Dynamic Registration protocol, PKCE enabled by default, AuthorizationManagerFactory, Authentication.Builder, AllAuthoritiesAuthorizationManager, JWT JwkSource builder, Spring Security Kerberos and Authorization Server modules merged.
Improvements Modular servlet/WebFlux configuration, SPA-friendly CSRF DSL, binding of missing authorities, authorized-object support for Spring Data, LDAP now uses UnboundID, simplified expression migration, default login page shows MFA factors.
Breaking Changes Removed AuthorizationManager#check, removed HttpSecurity.and(), authorizeRequests renamed to authorizeHttpRequests, ApacheDsContainer dropped, password grant removed, OpenSAML 4 removed, MvcRequestMatcher and AntPathRequestMatcher replaced by PathPatternRequestMatcher, LoginUrlAuthenticationEntryPoint now prefers relative redirects.
Deprecations All APIs previously marked @Deprecated have been eliminated, including AuthorizationManager#check, HttpSecurity.and(), authorizeRequests, ApacheDsContainer, password grant, OpenSAML 4 support, MvcRequestMatcher, AntPathRequestMatcher.

How does Spring Security 7.0 enable Multi-Factor Authentication out of the box?

Spring Security 7.0 introduces first-class Multi-Factor Authentication (MFA) support through new authorization managers and a builder for mutating Authentication objects.

  • AllAuthoritiesAuthorizationManager lets you require a set of authorities that represent MFA factors.
  • Authentication.Builder enables merging of existing Authentication with additional MFA details without recreating the token.

In practice you can protect an endpoint like this:

http.authorizeHttpRequests(auth -> auth
    .requestMatchers("/admin/**").hasAuthority("ROLE_ADMIN")
    .anyRequest().access(new AllAuthoritiesAuthorizationManager("MFA_SMS", "MFA_TOTP"))

The default login page now renders factor information based on factor.type and factor.reason query parameters, making it easier for UI teams to display the correct challenge.

What are the major configuration API changes developers need to adopt?

Spring Security 7.0 replaces several long-standing DSL methods with more expressive lambda-based alternatives.

  • Removed: HttpSecurity.and() - chain calls now end with a lambda.
  • Removed: authorizeRequests() - use authorizeHttpRequests() instead.
  • Added: Modular configuration for both Servlet and WebFlux stacks, allowing separate HttpSecurity or ServerHttpSecurity beans per module.
  • Added: SPA-friendly CSRF DSL: http.csrf(csrf -> csrf.spa());

Example of the new style:

http
    .csrf(csrf -> csrf.spa())
    .authorizeHttpRequests(auth -> auth
        .requestMatchers("/public/**").permitAll()
        .anyRequest().authenticated())
    .formLogin(form -> form.loginPage("/login"));

This matters if you have existing security configuration files; the migration is straightforward but requires updating method names and removing the now-redundant and() calls.

How has OAuth 2.0 support been expanded in Spring Security 7.0?

Spring Security 7.0 adds several OAuth 2.0 enhancements that simplify client and server development.

  • Password grant removed - encourages use of more secure flows.
  • OAuth2 support for HTTP service clients via WebClient and RestTemplate builders.
  • Custom JwkSource can now be supplied to NimbusJwtDecoder using Nimbus's builder API.
  • Builder for NimbusJwtEncoder supports EC, RSA, or secret keys directly.
  • @ClientRegistrationId can be placed on a class, reducing repetitive annotations on each method.
  • Dynamic Registration protocol and PKCE are enabled by default in the Authorization Server.

Typical client configuration now looks like:

NimbusJwtDecoder decoder = NimbusJwtDecoder.withJwkSource(myJwkSource).build();

These changes reduce boilerplate and improve security posture for modern OAuth deployments.

What are the key changes for SAML 2.0 and Kerberos integrations?

Spring Security 7.0 modernizes SAML 2.0 and Kerberos support while removing legacy dependencies.

  • SAML: API methods based on AssertingPartyDetails replaced by AssertingPartyMetadata; GET support removed from Saml2AuthenticationTokenConverter; JDBC-based AssertingPartyMetadataRepository added; OpenSAML 4 dropped - migrate to OpenSAML 5.
  • Kerberos: The Kerberos extension is now part of the core Spring Security distribution, simplifying dependency management.
  • Single Logout (SLO) now returns an empty response body even when validation fails, making client handling more predictable.

When upgrading, ensure your SAML metadata handling switches to the new AssertingPartyMetadata interface and update any GET-based token conversion logic.

Frequently Asked Questions

What is the recommended way to replace authorizeRequests in Spring Security 7.0?
Use authorizeHttpRequests with a lambda expression, for example http.authorizeHttpRequests(auth -> auth.anyRequest().authenticated()).

Is the password grant still supported in Spring Security 7.0?
No, the password grant has been removed to encourage more secure authorization flows.

How can I enable SPA-friendly CSRF protection?
Call http.csrf(csrf -> csrf.spa()) in your HttpSecurity configuration.

Can I still use ApacheDsContainer for LDAP testing?
No, ApacheDsContainer was removed; switch to the UnboundID LDAP SDK.

How do I configure a custom JWK source for JWT decoding?
Instantiate NimbusJwtDecoder with NimbusJwtDecoder.withJwkSource(myJwkSource).build().

Do I need to change my SAML metadata handling after upgrading?
Yes, replace AssertingPartyDetails usage with the new AssertingPartyMetadata interface.

Releases In Branch 7.0

VersionRelease date
7.0.520 Apr 2026
(1 month ago)
7.0.416 Mar 2026
(2 months ago)
7.0.313 Feb 2026
(3 months ago)
7.0.215 Dec 2025
(5 months ago)
7.0.115 Dec 2025
(5 months ago)
7.0.017 Nov 2025
(6 months ago)
7.0.0-RC306 Nov 2025
(6 months ago)
7.0.0-RC204 Nov 2025
(6 months ago)
7.0.0-RC120 Oct 2025
(7 months ago)
7.0.0-M315 Sep 2025
(8 months ago)
7.0.0-M218 Aug 2025
(9 months ago)
7.0.0-M121 Jul 2025
(10 months ago)