
Posted In: Spring, Spring Security
Example – Spring Boot – Security – Integrating With Apache Directory Server LDAP – SHA Password
Example shows how to implement login/logout using Apache Directory Server LDAP and Spring Boot. Password is encrypted SHA password. It will be authenticated using LdapShaPasswordEncoder 1. Create Spring boot project. Refer create-eclipse-spring-boot-application-step-by-step 2. Choose LDAP checkbox or add following maven entry 3. Add entry to application.properties […]
Read MoreTags: LDAP

Posted In: Spring, Spring REST, Spring Security
Spring REST – Difference in request parameter and path variable
We will talk about design level as well as organizational security/policy level differences in these two options. Example of Path Variable Example of Request Paramter You can pretty much use either path variable or request param to design your service. Though there are some organizational level restrictions that we may face while taking that […]
Read More
Posted In: Spring, Spring Security
Spring Security – How to get current authenticated user name
Use org.springframework.security.core.context.SecurityContextHolder class to get current principal Output auth.getPrincipal() will depend on authentication method. In this example it is LDAP
Read More
Posted In: Spring, Spring Boot, Spring Security
Example – Spring Boot – Security – Integrating With LDAP – SHA Password
Example shows how to implement login/logout using LDAP and Spring Boot. Password is encrypted SHA password. It will be authenticated using LdapShaPasswordEncoder 1. Create Spring boot project. Refer create-eclipse-spring-boot-application-step-by-step 2. Choose LDAP checkbox or add following maven entry 3a. Add unboundid maven entry for testing with in memory […]
Read MoreTags: CSRF, LDAP, MockMVC CSRF testing, Rest Template CSRF, Spring Boot, Spring Boot Security Login/Logout Example, Spring Security

Posted In: Spring, Spring Boot, Spring Security
Example – Spring Boot – Security – Integrating With LDAP
1. Create Spring boot project. Refer create-eclipse-spring-boot-application-step-by-step 2. Choose LDAP checkbox or add following maven entry 3a. Add unboundid maven entry for testing with in memory LDAP. Example is using unboundid 3b. Add entry to application.properties 3c. In case you do not want to use […]
Read MoreTags: LDAP, Spring Boot, Spring Boot Security Login Example, Spring Security

Posted In: Spring, Spring Boot, Spring Security
Example – Spring Boot – Security – Default Basic Authentication – SSL/HTTPS enabled
1. Create Spring boot project. Refer create-eclipse-spring-boot-application-step-by-step 2. Choose security checkbox or add following maven entry 3. Set up Spring Boot embedded Tomcat to use HTTPS port 8443 3a. Create certificate using following command. Use the same folder as your project E:\workspace_neon>cd Example201721>keytool -genkey -alias tomcat -storetype PKCS12 -keyalg […]
Read MoreTags: Enable HTTPS in Spring Boot, HTTP BASIC authentication headers, HTTPS, Spring Boot, Spring Security, SSL

Posted In: Spring, Spring Boot, Spring Security
Example – Spring Boot – Security – Default Basic Authentication
Note Basic authentication transmits the password as plain text so it should only really be used over an encrypted transport layer such as HTTPS when used in enterprise application. 1. Create Spring boot project. Refer create-eclipse-spring-boot-application-step-by-step 2. Choose security checkbox or add following maven entry 3. Start spring boot […]
Read MoreTags: HTTP BASIC authentication headers, Spring Boot, Spring Security
- Apache (13)
- Build Tools (2)
- Gradle (2)
- Caching (1)
- cpanel (1)
- cURL (1)
- Database (7)
- Hibernate (5)
- Java Core (38)
- Java Script (15)
- Bootstrap (1)
- File Upload (7)
- jQuery (3)
- React (3)
- JEE (13)
- JSON (41)
- GSON (13)
- Jackson 1X (1)
- Jackson 2X (12)
- jsoniter (1)
- Logging (2)
- Apache Commons Logging (1)
- Apache Log4J (1)
- Logback (1)
- SLF4J (1)
- MongoDB (1)
- OS (1)
- Linux (1)
- Security (5)
- Server (4)
- Tomcat (4)
- Service (2)
- Micro (2)
- Spring (46)
- Pattern (2)
- Spring Boot (20)
- Spring Data (4)
- Spring MVC (8)
- Spring REST (13)
- Spring Security (7)
- Testing (11)
- XML (5)
- JDOM XML Parser (1)