0
我正在使用Spring Security(基本身份驗證)+ LDAP身份驗證,它與嵌入式測試ldif很好地協作,但與我的域LDAP不兼容。 然而,我可以使用瀏覽器的LDAP /編輯工具使用相同的過濾器(Sam帳戶=那坡)Spring Security和企業LDAP身份驗證錯誤
@Override
public void addServiceAuthenticationManager(AuthenticationManagerBuilder authBuilder) throws Exception {
authBuilder
.ldapAuthentication()
.ldapAuthoritiesPopulator(ldapAppAuthoritiesPopulator())
.userSearchBase("OU=Users,DC=napo,DC=com")
.userSearchFilter("(SamAccountName={0})")
.contextSource()
.root("dc=napo,dc=com")
.managerDn("[email protected]")
.managerPassword("XXX")
.url("ldap://ldap.napo.com/OU=Users,dc=napo,dc=com");
該錯誤消息是搜索我的賬戶:LDAP:錯誤代碼32 - 0000208D:NameErr:DSID- 0310020A,問題2001(NO_OBJECT)