Spring Security
Open SourceAuthentication and authorization for the Spring ecosystem.
Published 27 September 2026
Scores
About Spring Security
Spring Security is the official security framework for the Spring ecosystem, covering authentication, authorization, and protection against common exploits like CSRF and session fixation. Spring Boot's spring-boot-starter-security auto-configures a working, secured application the moment the dependency is added: every endpoint requires login by default until access rules are defined.
It supports form login, HTTP Basic, OAuth2 and OpenID Connect login, SAML 2.0, passkeys (WebAuthn), and one-time-token login, and applications can act as OAuth2 resource servers that validate JWTs. Multi-factor authentication, added in Spring Security 7, treats each factor as an authority, so a rule can require a password plus a one-time token or a passkey with little more than an annotation. Method security annotations (@PreAuthorize, @Secured) keep authorization rules next to the code they protect.
Because it is built around a filter chain, custom authentication providers or token schemes plug in alongside the built-in ones rather than replacing the framework. The same security model applies whether an app uses Spring MVC, WebFlux, or Spring Cloud Gateway, which keeps authorization logic portable across a Spring-based stack as it grows.
Key Features
- Auto-configured security the moment the starter dependency is added
- Form login, HTTP Basic, OAuth2/OIDC login, and SAML 2.0
- Passkeys (WebAuthn) and one-time-token login built in
- Multi-factor authentication modelled as factor authorities
- OAuth2 resource server with JWT and opaque token validation
- Method-level authorization annotations and request-level rules
- CSRF, session fixation, and security header protection by default
- Servlet and reactive (WebFlux) support
Pros
- Official Spring project, tightly integrated and versioned with Spring Boot releases
- Same security model across Spring MVC, WebFlux, and the wider Spring ecosystem
- Extensible filter chain accepts custom auth providers and token schemes like JWT
Cons
- Steep learning curve, the filter chain and configuration DSL take real time to internalize
- Auto-configuration locks every endpoint by default, which surprises teams new to Spring Security
- Heavier than lightweight alternatives for a project that only needs basic auth
Spring Security Pricing
Open SourceTools Related to Spring Security
Part of(1)
Spring Security is the official security framework for the Spring ecosystem, auto-configured into any Spring Boot app via its starter dependency.
Learning Resources
No resources yet — check back soon.
Vendor
Broadcom
Website →Details
- Maintained
- Yes
- Primary language
- Java
- Domain
- Auth
- GitHub stars
- 9.6k
- Stars updated
- 2026-09-23