我有和其他几个问题一样的问题,其中没有一个真正回答过;即使用CAS 4.x(实际为4.2.6),我无法获取LDAP属性以返回到客户端应用程序。CAS 4.x和LDAP属性
Question 1这似乎是矫枉过正;定制代码来解决什么是“简单”问题。
Question 2已经这样做了,它没有工作。
所以,现在轮到我问......有没有什么魔法让它工作?我们已经使用3.5很长一段时间没有任何问题。我试图将这些设置转换为4.x的Maven覆盖层和4.x的新的上下文配置,并且它不是做它。
我可以在日志中看到CAS正在请求,并从LDAP中获取我正在查找的属性。但是他们并没有把令牌放回应用程序。
除了Apereo文档规定的外,还需要做些什么?我认为这是属性库可能?如果有什么可以帮助你通过这个,请问:Config,Logs(当然是编辑)......任何东西。
谢谢。
更新#1。这是我的解析器列表。注:我保持代码/设置的地方注释掉,直到我得到它的工作,然后我清理东西。
<util:map id="authenticationHandlersResolvers">
<!--
<entry key-ref="proxyAuthenticationHandler" value-ref="proxyPrincipalResolver" />
<entry key-ref="primaryAuthenticationHandler" value-ref="primaryPrincipalResolver" />
-->
<!--<entry key-ref="ldapAuthenticationHandler" value-ref="primaryPrincipalResolver" /> -->
<entry key-ref="ldapAuthenticationHandler" value="#{null}" />
</util:map>
更新#2
我做更多的测试,仍然是不成功的。我认为,它归结于LdapAuthenticationHandler的principalAttributeMap无法正常工作,或者是serviceRegistryDao的attributeReleasePolicy ...任何人都可以在此配置中看到任何问题?
<bean id="ldapAuthenticationHandler" class="org.jasig.cas.authentication.LdapAuthenticationHandler"
p:principalIdAttribute="sAMAccountName"
c:authenticator-ref="authenticator"
>
<property name="principalAttributeMap">
<map>
<entry key="cn" value="cn" />
<entry key="mail" value="Email" />
<entry key="memberOf" value="Groups" />
<entry key="displayName" value="displayName" />
</map>
</property>
</bean>
<bean id="serviceRegistryDao" class="org.jasig.cas.services.InMemoryServiceRegistryDaoImpl">
<property name="registeredServices">
<list>
<bean class="org.jasig.cas.services.RegexRegisteredService"
p:id="5"
p:name="All Servicesxxx"
p:description="Allow connections for all services and protocols"
p:serviceId="^(http|https|imaps)://.*"
p:evaluationOrder="5"
>
<property name="attributeReleasePolicy">
<bean class="org.jasig.cas.services.ReturnAllAttributeReleasePolicy" />
</property>
</bean>
</list>
</property>
</bean>
您是否在第二个问题中讲过#{null}的事情?我建议你不要使用JSON。这导致我的CAS服务器出现问题。检查我的问题答案(问题1),看看它是否对你有帮助。 – Goldi
是的,我在Authentication Handler Resolvers列表中完成了#{null}更改。它没有帮助。 –
我回答了我的问题(问题1)。我写的那些东西除了我描述的东西外都适用于我。你使用这个文件吗? – Goldi