Spring Boot Security – Form Based Authentication – Remember Me

Authentication – Remember Me The example Spring Boot Security form based authentication remember me will show you how to use custom login form with Spring’s j_spring_security_check to authenticate a user with remember me option. You may also look into form based authentication – remember me – on Spring MVC framework. The similar example we will implement here but using Spring Boot framework. We will…

Spring Boot Security – Form Based JDBC Authentication using UserDetailsService

Form Based Auth Using UserDetailsService The example Spring Boot Security form based JDBC authentication using UserDetailsService will show you how to use custom login form with Spring’s j_spring_security_check to authenticate a user. You may also look into form based JDBC authentication using UserDetailsService on Spring MVC framework. In this example, I will implement the form based authentication system using Spring Boot framework.

Spring Boot Security – Form Based JDBC Authentication

JDBC Based Authentication The example, Spring Boot Security form based JDBC authentication, will show you how to use custom login form with Spring’s j_spring_security_check to authenticate a user. You may also look into form based jdbc authentication on Spring MVC framework. The similar example I will implement here but using Spring Boot framework. In the previous example I had used Resource Bundle that will…

Spring Boot Security – Form Based Authentication

Form Based Authentication The example Spring Boot Security form based authentication will show you how to use custom login form with Spring’s j_spring_security_check to authenticate a user. You may also look into form based authentication on Spring MVC framework. The similar example I will implement here but using Spring Boot framework. In the previous example I have used Resource Bundle…

Spring Boot Security Example – Single Sign On Using OAuth 2

Introduction Here you will see Spring Boot Security Example – Single Sign On using OAuth 2. Single Sign On or simply SSO is a property of access control of multiple related, yet independent, software systems, where a user logs in with a single set of credentials (username and password) to gain access. Here I will use Spring Boot 2.14/2.7.0. I…

Spring Boot Actuator – Securing HTTP Endpoints

Secure Actuator HTTP Endpoints Here you will see example on securing HTTP endpoints in Spring Boot application. Like other sensitive URLs, you should take care to secure HTTP endpoints. If Spring Security is present, endpoints are secured by default using Spring Security’s content-negotiation strategy. If you wish to configure custom security for HTTP endpoints, for example, only allow users with…

Spring EnableEncryptableProperties with Jasypt

EnableEncryptableProperties – Jasypt Spring EnableEncryptableProperties with Jasypt shows an example how to avoid clear text password for database connection’s credentials in properties file. Jasypt means Java simplified encryption. Here I am going to use Spring Boot with Jasypt (Java simplified encryption). Here I am also going to use Spring Data JPA to perform the data layer activities with database. If…

@PreAuthorize annotation – hasPermission Example In Spring Security

Spring Security Has Permission In this tutorial I will show you an example on @PreAuthorize annotation – hasPermission() example in Spring Security. The most useful annotation @PreAuthorize, which decides whether a method can actually be invoked or not based on user’s role and permission. hasRole() method returns true if the current principal has the specified role and hasPermission() method returns…

@PreAuthorize Annotation – hasRole Example In Spring Security

Spring Security Has-Role In this tutorial I will show you an example on @PreAuthorize annotation – hasRole() example in Spring Security. @PreAuthorize is the most useful annotation that decides whether a method can actually be invoked or not based on user’s role. hasRole() method returns true if the current principal has the specified role. By default if the supplied role…

Spring Boot Security Pre-authentication Example

Spring Security Pre Authentication Here you will see an example on Spring Security Pre-authentication. There are situations where you want to use Spring Security for authorization, but the user has already been reliably authenticated by some external system prior to accessing the application. In such situations where Spring Security Pre-authentication comes into picture I refer to these situations as “pre-authenticated”…