In this article, we will explore the topic of Spring Security in detail, analyzing its origins, impact on society, and possible implications for the future. Spring Security has been the subject of interest and debate for a long time, and its relevance remains significant today. Through different perspectives and approaches, we seek to shed light on the various aspects surrounding Spring Security, in order to offer a comprehensive and enriching vision for our readers. From its historical importance to its influence on contemporary culture, we'll take a closer look at what Spring Security means and how it has evolved over time.
| Spring Security | |
|---|---|
| Developer | 4 |
| Stable release | 6.5.1
/ June 16, 2025 [1] |
| Written in | Java |
| Operating system | Cross-platform |
| Type | web application framework security |
| License | Apache License 2.0 |
| Website | projects |
Spring Security is a Java/Java EE framework that provides authentication, authorization and other security features for enterprise applications. The project was started in late 2003 as 'Acegi Security' (pronounced Ah-see-gee /ɑːsiːdʒiː/, whose letters are the first, third, fifth, seventh, and ninth characters from the English alphabet, in order to prevent name conflicts[2]) by Ben Alex, with it being publicly released under the Apache License in March 2004. Subsequently, Acegi was incorporated into the Spring portfolio as Spring Security, an official Spring sub-project. The first public release under the new name was Spring Security 2.0.0 in April 2008, with commercial support and training available from SpringSource.
Diagram 1 shows the basic flow of an authentication request using the Spring Security system. It shows the different filters and how they interact from the initial browser request, to either a successful authentication or an HTTP 403 error.
| Browser submits "authentication credentials" | |
| "Authentication mechanism" collects the details | |
| An "authentication request" object is built | |
| Authentication request sent to an AuthenticationManager | |
| AuthenticationManager (this is responsible for passing requests through a chain of AuthenticationProviders) | |
"Authentication provider" will ask a UserDetailsService to provide a UserDetails object
| |
The resultant UserDetails object (which also contains the GrantedAuthoritys) will be used to build the fully populated Authentication object.
| |
If "Authentication mechanism" receives back the fully populated Authentication object, it will deem the request valid, put the Authentication into the SecurityContextHolder; and cause the original request to be retried.If, on the other hand, the AuthenticationProvider rejected the request, the authentication mechanism will ask the user agent to retry.
| |
AbstractSecurityInterceptor authorizes the regenerated request and throws Java exceptions. (Asks AccessDecisionManager for decision.)
| |
ExceptionTranslationFilter translates the exceptions thrown by AbstractSecurityInterceptor into HTTP related error codes
| |
| Error code 403 – if the principal has been authenticated and therefore simply lacks sufficient access Launch an AuthenticationEntryPoint – if the principal has not been authenticated which is an authentication mechanism
| |