Hey guys this tutorial contains all the Spring security concepts, starting from basics and all the way up to connecting our application to the real-time database. Follow the tutorial step by step to understand the concepts completely.

Spring-Security-Tutorial

Spring Security is a Java/Java EE framework that provides authentication, authorization, and other security features for enterprise applications.

Spring Security is a powerful and highly customizable authentication and access-control framework. It is the de-facto standard for securing Spring-based applications.

Spring Security is a framework that focuses on providing both authentication and authorization to Java applications. Like all Spring projects, the real power of Spring Security is found in how easily it can be extended to meet custom requirements

Features


  • Comprehensive and extensible support for both Authentication and Authorization
  • Protection against attacks like session fixation, clickjacking, cross-site request forgery, etc
  • Servlet API integration
  • Optional integration with Spring Web MVC
  • Much more…

Read more about Spring boot in their official website

Examples


1. Add Spring Security to Spring boot application:

This is the example that shows you how to add spring security to the existing spring boot application with step by step example. Follow this tutorial and try to create the same example to understand more.

2. Customize the username and password in Spring Security:

This is the example where you will learn how to customize the username and password inside the property file. Follow this tutorial and try to create the same example to understand more.

3. Customize the URI mapping with Spring Security:

This is the example where shows you how to customize the different URIs with Spring security. Follow this tutorial and try to create the same example to understand more.

4. Customize the Spring Security to permit all the requests:

This is the example where you will learn how to permit all the requests to access content with authorizing the user. Follow this tutorial and try to create the same example to understand more.

5. Customize the Spring Security to deny all the requests:

This is the example where you will learn how to deny all the requests while accessing the content. Follow this tutorial and try to create the same example to understand more.

6. Configure users in Spring Security using inMemoryAuthentication:

This is the example where you will learn how to customize the multiple users in the spring container using inMemoryAuthentication. Follow this tutorial and try to create the same example to understand more.

7. Configure users in Spring Security using inMemoryUserDetailsManager:

This is the example where you will learn another way to configuring users using inMemoryUserDetailsManager. Follow this tutorial and try to create the same example to understand more.

8. Configure users in Spring Security using JdbcUserDetailsManager:

This is the example where you will learn how to implement Spring security in production-grade applications using JdbcUserDetailsManager. Follow this tutorial and try to create the same example to understand more.

9. Create our own custom implementation of UserDetailsService:

This is the example where you will learn how to create a custom implementation of UserDetailsService. Follow this tutorial and try to create the same example to understand more.

10. Implement password encoder using BCryptPasswordEncoder:

This is the example where we will implement password encryption using BCryptPasswordEncoder. Follow this tutorial and try to create the same example to understand more.

11. Customize authentication provider in Spring security application:

This is the example where we will customize the authentication provider in the existing spring security application. Follow this tutorial and try to create the same example to understand more.

12. Configure authorities in the Spring Security application:

This is the example where we will configure the authorities in the Spring security application. Follow this tutorial and try to create the same example to understand more.

13. Configure Roles in the Spring security application

This is the application where we will configure the roles in the Spring security application. Follow this tutorial and try to create the same example to understand more.

14. Spring security method level annotation @PreAuthorize

This is the example where we will learn about Spring security method level annotation @PreAuthorize. Follow this tutorial and try to create the same example to understand more.

15. JWT Token Based authentication with Spring security

This is the example where we will learn about JWT token based authentication with Spring boot application that connects with MySQL database. Follow this tutorial and try to create the same example to understand more.

More tutorials coming soon… keep an eye on this post. 🙂