Spring / Spring7 Intermediate to Advanced Interview questions
What is the difference between Spring Security 6 and Spring Security 7?
Spring Security 7 (paired with Spring Framework 7) makes several changes that go beyond a routine dependency bump.
| Aspect | Spring Security 6 | Spring Security 7 |
| Multi-factor auth | No first-class support | Native MFA authorization managers |
| OAuth2 password grant | Present, discouraged | Removed entirely |
| PKCE / dynamic registration | Opt-in on the Authorization Server | Enabled by default |
| Null safety | Spring's own annotations | JSpecify |
| SAML2 / Kerberos | Legacy dependency chains | Modernized, legacy deps removed |
The MFA support is the headline feature - it was one of the most long-requested capabilities in the project's history - while the OAuth2 defaults changes reflect a broader push toward secure-by-default configuration rather than secure-if-configured-correctly.
More Related questions...