【发布时间】:2018-11-03 15:48:14
【问题描述】:
通过 Apache Directory Studio 检索到的 LDAP 服务器层次结构:
根 DSE:
DC=公司,DC=com
OU=办公室
OU=地区办事处
OU=Region1 办事处
OU=用户
CN=贾耶什·穆尔瓦尼
WebSecurity 作为以下类的一部分启用:
public class LDAPSecurityConfig extends WebSecurityConfigurerAdapter{
protected void configure(AuthenticationManagerBuilder authenticationManagerBuilder) throws Exception {
authenticationManagerBuilder.ldapAuthentication()
.contextSource().url("ldap://server-url/CN=auth_support,OU=Misc,DC=company,DC=com")
.managerDn("username").managerPassword("password")
.and()
.userSearchBase("OU=Offices,DC=company,DC=com")
.userSearchFilter("(&(objectClass=user)(cn={0}))");
}
}
在tomcat上设置应用程序后,我输入用户名及其密码,但身份验证失败并且没有提示错误。
有人可以帮助我解决方法或指定我是否在这里遗漏了什么吗?
【问题讨论】:
-
没有提示错误但是能看到server.log中抛出的错误吗?
-
服务器是远程服务器,我无权访问它。
标签: spring spring-security ldap ldap-query