Spring security is nothing but a mechanism to apply the security on top of our web application or microservices. Spring security provides authentication and authorization to our application using simple servlet filters. We can use spring security to secure URLs. Spring Security is a security framework that secures J2EE-based enterprise applications, by providing powerful, customizable security features like authentication and authorization
1. Authentication
Used to verify if a user using an application by providing valid credentials used to verify who you are. Authentication is establishing identity of a principal (user, system, that can perform an action in an application).
2. Authorization
Authorization is a concept to validate a specific customer have righ access to perform action on the resouces which he provide the
information before the user tries to access a resource. It is a process of access control, deciding whether it allows a specific customer
to perform an action.
Example:
Making sure that our passwords are secure and difficult to hack is another primary goal of any security framework. Spring Security’s PasswordEncoder interface perform one way transform for the password (We can’t decrypt the password).Spring Security provides several PasswordEncoder, Here is a list for your reference:
Spring security uses the Java servlet filters to start the security check for our web application
Here are some important advantages of Spring Security: