Spring security Spring Security AD LDAP:错误代码1-00000 4DC:LDAPPER:DSID-0C0906E8
我试图从spring security连接Ldap,但出现连接错误。有人能告诉我这个配置有什么问题吗 UsernamePasswordAuthenticationFilter-尝试验证用户时发生内部错误。 org.springframework.security.authentication.InternalAuthenticationServiceException:LDAP处理过程中发生未分类的异常;嵌套异常为javax.naming.NamingException:[LDAP:错误代码1-000004DC:LDAPPER:DSID-0C0906E8,注释:为了执行此操作,必须在连接上完成成功绑定,数据0,v1db1];剩余名称“ou=用户,dc=aaa,dc=bbb,dc=ccc,dc=dddd” 位于org.springframework.security.ldap.authentication.ldapaauthenticationprovider.doAuthentication(ldapaauthenticationprovider.java:191) 配置文件Spring security Spring Security AD LDAP:错误代码1-00000 4DC:LDAPPER:DSID-0C0906E8,spring-security,spring-ldap,Spring Security,Spring Ldap,我试图从spring security连接Ldap,但出现连接错误。有人能告诉我这个配置有什么问题吗 UsernamePasswordAuthenticationFilter-尝试验证用户时发生内部错误。 org.springframework.security.authentication.InternalAuthenticationServiceException:LDAP处理过程中发生未分类的异常;嵌套异常为javax.naming.NamingException:[LDAP:错误代码1-
<sec:authentication-manager alias="myAuthenticationManager">
<sec:authentication-provider ref="myAuthenticationProvider"/>
</sec:authentication-manager>
<bean id="myAuthenticationProvider" class="org.springframework.security.ldap.authentication.LdapAuthenticationProvider">
<constructor-arg ref="ldapBindAuthenticator"/>
<constructor-arg ref="ldapAuthoritiesPopulator"/>
</bean>
<bean id="ldapBindAuthenticator" class="org.springframework.security.ldap.authentication.BindAuthenticator">
<constructor-arg ref="contextSource" />
<property name="userSearch" ref="userSearch"/>
</bean>
<bean id="userSearch" class="org.springframework.security.ldap.search.FilterBasedLdapUserSearch">
<constructor-arg index="0" value="ou=Users,dc=aaa,dc=bbb,dc=ccc,dc=dddd"/>
<constructor-arg index="1" value="(sAMAccountName={0})"/>
<constructor-arg index="2" ref="contextSource"/>
<property name="searchSubtree" value="true"/>
</bean>
<bean id="ldapAuthoritiesPopulator" class="com.xxxx.MyLdapAuthoritiesPopulator">
<property name="userDao" ref="userDao"/>
</bean>
<bean id="contextSource" class="org.springframework.security.ldap.DefaultSpringSecurityContextSource">
<constructor-arg value="ldaps://aaa.com:123/DC=aa,DC=bb,DC=cc,DC=dd"/>
<property name="base" value="DC=aa,DC=bb,DC=cc,DC=dd" />
<!-- <property name="anonymousReadOnly" value="true"/> -->
</bean>
假设用户试图使用用户名XXX和密码YYY登录。LDAP身份验证通常是这样工作的:
Hi,很抱歉调试旧线程。但我正在尝试理解此LDAP过程。我正在使用liferay和LDAP。请您理解第1点“使用技术帐户绑定到LDAP”好吗?这必须是一个单独的帐户吗?我们不能使用相同的用户名XXX发送请求,并绑定和获取其他详细信息吗?我已经发布了一个关于这个问题的问题,任何关于这个问题的建议都会很有帮助。谢谢
<bean id="contextSource"
class="org.springframework.security.ldap.DefaultSpringSecurityContextSource">
<constructor-arg value="ldap://monkeymachine:389/dc=springframework,dc=org"/>
<property name="userDn" value="cn=manager,dc=springframework,dc=org"/>
<property name="password" value="password"/>
</bean>