spring-ldap

Best practice for configuring Spring LdapTemplate via annotations instead of XML?

狂风中的少年 提交于 2019-11-27 05:22:06
问题 For a Spring Boot application, I successfully configured a Spring LdapTemplate using annotations , including the LdapContextSource dependency with @Value s from application.properties. (Woot! I couldn't find an example, so maybe this will help others.) The snippets (below) setup the context source, inject it into an LdapTemplate , and autowire that into my DirectoryService. Is there a better/cleaner way to setup the ContextSource in a Spring Boot app? application.properties (on the classpath)

LDAP: How to authenticate user with connection details

醉酒当歌 提交于 2019-11-26 19:32:01
问题 I am not able to authenticate a user using LDAP. I have got following details: URL=ldap://10.10.10.10:389 LDAP BASE:DC=lab2,DC=ins LDAP Bind Account: CN=Ldap Bind,OU=Service Accounts,OU=TECH,DC=lab2,DC=ins LDAP Bind Account Pw: secret I can search a sAMAccountName value using above details, but how to authenticate a user with user name and password? If you follow my previous questions then you will understand that, I am successfully able to connect to LDAP server but not able to authenticate

PartialResultException when authenticating with Spring Security and JavaConfig

∥☆過路亽.° 提交于 2019-11-26 14:26:47
问题 I am currently creating a new web application using Spring Boot and began the process of integrating Spring Security for authentication. After successfully following the Spring Boot-based LDAP tutorial, I wanted to point my JavaConfig-based configuration to my Active Directory instance. My application now handles bad credentials as expected, but valid credentials now result in javax.naming.PartialResultException: Unprocessed Continuation Reference(s); remaining name '' This is a common