0
我正在使用SpringSecurity,我有两种配置可供选择。在我的security-config.xml中,我有以下内容来根据LDAP对用户进行身份验证。这两种配置有什么区别?
<authentication-manager alias="authenticationManager">
<ldap-authentication-provider server-ref="ldapLocal"
user-search-filter="(| (userPrincipalName={0}) (sAMAccountName={0}))" user-search-base="CN=particion1,DC=prueba,DC=com">
</ldap-authentication-provider>
但我收到以下错误
[LDAP: error code 49 - 8009030C: LdapErr: DSID-0C0903A9, comment: AcceptSecurityContext error, data 2030, v1db1}
我有这个配置在我的属性文件
app.ad-domain=prueba
app.ad-server=ldap://localhost/
app.ad-rootdn=CN=particion1,DC=prueba,DC=com
app.service-principal=HTTP/[email protected]
app.keytab-location=/tmp/tomcat.keytab
app.ldap-search-base=CN=particion1,DC=prueba,DC=com
app.ldap-search-filter="(| (userPrincipalName={0}) (sAMAccountName={0}))"
我可以以某种方式调用这些属性吗?或者任何人都可以帮助我在XML文件中使用此配置?
UPDATE
现在我有这个配置
<authentication-manager alias="authenticationManager">
<ldap-authentication-provider
user-search-filter="(| (userPrincipalName={0}) (sAMAccountName={0}))" user-search-base="CN=particion1,DC=prueba,DC=com"></ldap-authentication-provider>
</authentication-manager>
<ldap-server url="ldap://192.168.5.2"
manager-dn="CN=part1,DC=test,DC=com" manager-password="" />
我收到以下错误
Configuration problem: You must specify the manager-password if you supply a CN=test,DC=prueba,DC=com
感谢您的回答,但我没有LDAP中的任何密码进行身份验证我需要禁用此选项我认为这样.. – jc1992