Security is one of the first priorities for the enterprise, e-commerce, and banking projects. These projects need to create a security system since they exchange millions of dollars and store the protected resources of an organization.
Spring Security is a sub-task of the immense Spring Framework portfolio. It has been upgraded to be utilized with a Spring MVC web application framework, yet can similarly be utilized with Java servlets. This supports authentication incorporation with a long list of other technologies, such as Lightweight Directory Access Protocol (LDAP), Java Authentication and Authorization Service (JAAS), and OpenID. It was developed as a complete security solution for Java-based enterprise environments.
In this chapter, we'll learn about Spring Security and its modules and learn how to implement security in a Spring-based project. The following topics will be covered in this chapter:
- Spring Security architecture
- The advantages of Spring Security
- Spring Security features
- Spring Security modules
- Implementing Spring Security
- Securing REST with Spring Security basic authentication
- Securing REST with Spring Security OAuth2