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 More

Tags:

by , on July 25th, 2017

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

by , on July 12th, 2017

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

by , on July 12th, 2017

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 More

Tags: , , , , , ,

by , on February 19th, 2017

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 More

Tags: , , ,

by , on February 18th, 2017

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 More

Tags: , , , , ,

by , on February 17th, 2017

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 More

Tags: , ,

by , on February 16th, 2017

  • Categories