cas+ldap

dalianlhy 2009-12-18 02:03:51
cas中deployerConfigContext.xml配置如下:

<beans default-lazy-init="false" default-autowire="no" default-dependency-check="none">

<bean id="authenticationManager" class="org.jasig.cas.authentication.AuthenticationManagerImpl" lazy-init="default" autowire="default" dependency-check="default">
<property name="credentialsToPrincipalResolvers">
<list>
<bean class="org.jasig.cas.authentication.principal.UsernamePasswordCredentialsToPrincipalResolver" lazy-init="default" autowire="default" dependency-check="default"></bean>
<bean class="org.jasig.cas.authentication.principal.HttpBasedServiceCredentialsToPrincipalResolver" lazy-init="default" autowire="default" dependency-check="default"></bean>
</list>
</property>
<property name="authenticationHandlers">
<list>
<bean class="org.jasig.cas.authentication.handler.support.HttpBasedServiceCredentialsAuthenticationHandler" lazy-init="default" autowire="default" dependency-check="default"></bean>
<bean class="org.jasig.cas.adaptors.ldap.FastBindLdapAuthenticationHandler">
<property name="filter" value="sAMAccountName=%u,ou=xxgs,dc=lt,dc=com" />
<!-- <property name="searchBase" value="ou=xxgs,dc=lt,dc=com" /> -->
<property name="contextSource" ref="contextSource" />
<property name="ignorePartialResultException" value="yes" />
</bean>
</list>
</property>
</bean>

<bean id="contextSource" class="org.jasig.cas.adaptors.ldap.util.AuthenticatedLdapContextSource">
<property name="pooled" value="true" />
<property name="urls">
<list>
<value>ldap://10.187.28.221:389</value>
</list>
</property>
<property name="userName" value="cn=administrator,cn=Users,dc=lt,dc=com"/>
<property name="password" value="926"/>
<property name="baseEnvironmentProperties">
<map>
<entry>
<key><value>java.naming.security.protocol</value></key>
<value>none</value>
</entry>
<entry>
<key>
<value>java.naming.security.authentication</value>
</key>
<value>simple</value>
</entry>
</map>
</property>
</bean>
</beans>

现在遇到的问题是在输入用户名密码后无法登录,服务器的信息是
2009-12-18 06:02:23,640 INFO [org.jasig.cas.authentication.AuthenticationManagerImpl] - <AuthenticationHandler: org.jasig.cas.adaptors.ldap.FastBindLdapAuthenticationHandler failed to authenticate the
user which provided the following credentials: admin>
...全文
243 7 打赏 收藏 转发到动态 举报
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
dalianlhy 2009-12-18
  • 打赏
  • 举报
回复
问题解决了,是filter的值不对,谢谢大家帮忙
meadking 2009-12-18
  • 打赏
  • 举报
回复
INFO 信息.没有错误...

FastBindLdapAuthenticationHandle看看你的验证代码.是否有错误
dalianlhy 2009-12-18
  • 打赏
  • 举报
回复
先谢谢回复,现在我有点搞不清是我配置的问题还是ldap有问题
Kevin-anycode 2009-12-18
  • 打赏
  • 举报
回复
帮顶。。。
boboo_2000_0 2009-12-18
  • 打赏
  • 举报
回复
没有做过cas+ldap登陆,只用过Acegi作单点登陆,不过看楼主的错误应该是配置不正确,因为Acegi实现的配置也会有类似的错误。
dalianlhy 2009-12-18
  • 打赏
  • 举报
回复
高手帮帮忙啊~~~~
dalianlhy 2009-12-18
  • 打赏
  • 举报
回复
自己先顶一下,

50,523

社区成员

发帖
与我相关
我的任务
社区描述
Java相关技术讨论
javaspring bootspring cloud 技术论坛(原bbs)
社区管理员
  • Java相关社区
  • 小虚竹
  • 谙忆
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧