ArticleslgStudy

computer science

Spring Security

Spring Security is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Spring Security rather than just read about it. In short: 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 , whose letters are the first, third, fifth, seventh, and ninth characters from the English alphabet, in order to prevent name conflicts) by Ben Alex, with it being publicly released under the A…

Spring Security — main illustration
Spring Security — illustration

Key takeaways

  • Spring Security belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Spring Security to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Spring Security from memory before moving on to harder problems.

Reference excerpt

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 , whose letters are the first, third, fifth, seventh, and ninth characters from the English alphabet, in order to prevent name conflicts) 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.

Authentication flow 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.

Key authentication features LDAP (using both bind-based and password comparison strategies) for centralization of authentication information. Single sign-on capabilities using the popular Central Authentication Service. Java Authentication and Authorization Service (JAAS) LoginModule, a standards-based method for authentication used within Java. Note this feature is only a delegation to a JAAS Loginmodule. Basic access authentication as defined through RFC 1945. Digest access authentication as defined through RFC 2617 and RFC 2069. X.509 client certificate presentation over the Secure Sockets Layer standard. CA, Inc SiteMinder for authentication (a popular commercial access management product). Su (Unix)-like support for switching principal identity over a HTTP or HTTPS connection. Run-as replacement, which enables an operation to assume a different security identity. Anonymous authentication, which means that even unauthenticated principals are allocated a security identity. Container adapter (custom realm) support for Apache Tomcat, Resin, JBoss and Jetty (web server). Windows NTLM to enable browser integration (experimental). Web form authentication, similar to the servlet container specification. "Remember-me" support via HTTP cookies. Concurrent session support, which limits the number of simultaneous logins permitted by a principal. Full support for customization and plugging in custom authentication implementations.

Key authorization features AspectJ method invocation authorization. HTTP authorization of web request URLs using a choice of Apache Ant paths or regular expressions.

Instance-based security features Used for specifying access control lists applicable to domain objects. Spring Security offers a repository for storing, retrieving, and modifying ACLs in a database. Authorization features are provided to enforce policies before and after method invocations.

Other features Software localization so user interface messages can be in any language. Channel security, to automatically switch between HTTP and HTTPS upon meeting particular rules. Caching in all database-touching areas of the framework. Publishing of messages to facilitate event-driven programming. Support for performing integration testing via JUnit. Spring Security itself has comprehensive JUnit isolation tests. Several sample applications, detailed JavaDocs and a reference guide. Web framework independence.

Releases 2.0.0 (April 2008) 3.0.0 (December 2009) 3.1.0 (December 7, 2011) 3.1.2 (August 10, 2012) 3.2.0 (December 16, 2013) 4.0.0 (March 26, 2015) 4.1.3 (August 24, 2016) 4.2.0 (November 10, 2016) 3.2.10, 4.1.4, 4.2.1 (December 22, 2016) 4.2.2 (March 2, 2017) 4.2.3 (June 8, 2017) 5.0.0 (November 28, 2017) 5.0.8, 4.2.8 (September 11, 2018) 5.1.0 GA (September 27, 2018) 5.1.1, 5.0.9, 4.2.9 (October 16, 2018) 5.1.2, 5.0.10, 4.2.10 (November 29, 2018) 5.1.3, 5.0.11, 4.2.11 (January 11, 2019) 5.1.4 (February 14, 2019) 5.1.5, 5.0.12, 4.2.12 (April 3, 2019)

Citations

References Deinum, Marten; Rubio, Daniel; Long, Josh; Mak, Gary (September 1, 2014). Spring Recipes: A Problem-Solution Approach (Second ed.). Apress. p. 1104. ISBN 978-1-4302-2499-0. "Why the name Acegi?". spring.io.

External links Official website

Worked examples

Example 1 — a first encounter with Spring Security

Start with the simplest possible case. Write down what Spring Security claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Spring Security before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Spring Security ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Spring Security

In research
Spring Security appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Spring Security in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Spring Security is common in secondary-school and first-year university syllabi. It links to neighbouring topics Computer access control, Java enterprise platform, so understanding it makes those chapters shorter.
In everyday life
Look for Spring Security outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Spring Security” →

How to study Spring Security in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Spring Security means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Spring Security out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Spring Security in simple terms?

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 , whose letters are the first, third, fifth, seventh, and ninth characters…

Why does Spring Security matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Spring Security?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Spring Security.

Tags

  • Computer access control
  • Java enterprise platform

Keep exploring