Spring Security is a framework for securing Java applications. It provides authentication, authorization and protection against common security vulnerabilities like CSRF, XSS and session fixation.
Key Features
- Integrates seamlessly with Spring Boot and Spring MVC.
- Supports multiple authentication methods (form login, JWT, OAuth2, LDAP).
- Provides role-based and permission-based access control.
- Includes built-in protection for CSRF, CORS and brute-force attacks.
1. Introduction to Spring Security
Learn the core concepts, architecture and basic setup of Spring Security, including annotations, authentication and auto-configuration.
- Introduction
- Architecture
- Annotations
- Spring Boot Security Auto-Configuration
- UserDetailsService and UserDetails
- Method Level
2. Securing Web Applications
Understand how to protect web applications using endpoints, filter chains, password storage and role-based access.
- Securing Endpoints Using antMatchers()
- Filter Chain with Example
- Password Storage
- Password Encoder
- Role-Based Authentication
- Secure Your Web Application
3. Authentication with Spring Security
Explore user login, registration, logout, password management and custom authentication workflows in Spring Security.
- Basic Authentication
- Authentication and Authorization in Spring Boot
- Registration and Login Process
- Logout Process
- Custom Login
- Custom Form Login with Database Authentication
- Activate a New Account by Email
- Updating Your Password
- Redirect to Different Pages After Login
- Making Registration API RESTful
- Authentication Failure Handler
4. Authorization and Access Control
Learn to manage access with roles, permissions, in-memory and database authentication and advanced control mechanisms.
- Role Based Authentication
- Role Based and Permission Based Access Control
- In-Memory Authentication
- JDBC Authentication
- Form Based Authentication
- Remember Me Functionality
5. JWT and API Security
Implement stateless authentication with JWTs, compare OAuth2 with JWT and secure REST APIs using tokens or API keys.
- JWT Authentication with Spring Boot
- Spring Security OAuth2 VS JWT(JSON Web Tokens)
- Securing Spring Boot API With API Key
6. CSRF and CORS In Spring Security
This section will show you how to set up both CSRF protection and CORS settings within Spring Security, keeping your online world secure and worry-free.
7. Advanced Topics of Spring Security
Enhance security with two-factor authentication, brute-force prevention, JUnit testing and advanced login customization features.