1

我们有几个带有 LDAP 服务器的服务,我们将 JASIG 作为主要入口,我们在 Jboss7 上部署 JASIG,并且在 SSL 上运行良好,但是我们的 LDAP 服务器在 TLS 上运行。我的问题是任何经过身份验证的用户都通过 TLS 运行任何用户密码,无论对错。

不知道为什么登录用户名敏感,对密码不敏感,随便输入一个密码。

谢谢你。

显示我的 DeployConfigContex.xml 文件中有趣的部分。

这是我们的 AuthenticationManager:

    <bean id="authenticationManager" 
            class="org.jasig.cas.authentication.AuthenticationManagerImpl">                
            <property name="credentialsToPrincipalResolvers">
                    <list>                

                            <bean 

                                    class="org.jasig.cas.authentication.principal.CredentialsToLDAPAttributePrincipalResolver">


                                    <property name="credentialsToPrincipalResolver">
                                            <bean 
                                                    class="org.jasig.cas.authentication.principal.UsernamePasswordCredentialsToPrincipalResolver" />
                                    </property>

                                    <property name="filter" value="(cn=%u)" />
                                    <property name="principalAttributeName" value="cn" />
                                    <property name="searchBase" value="ou=ServiciosCentrales,ou=Usuarios,dc=educacion,dc=es" />
                                    <property name="contextSource" ref="contextSource" />

                                    <property name="attributeRepository">
                                            <ref bean="attributeRepository" />
                                    </property>

                            </bean>                

                    </list>
            </property>
            <property name="authenticationHandlers">
                    <list>
                            <bean class="org.jasig.cas.authentication.handler.support.HttpBasedServiceCredentialsAuthenticationHandler" 
                                    p:httpClient-ref="httpClient" />                                
                            <bean class="org.jasig.cas.adaptors.ldap.BindLdapAuthenticationHandler">
                              <property name="filter" value="cn=%u" />
                              <property name="searchBase" value="ou=ServiciosCentrales,ou=Usuarios,dc=educacion,dc=es" />
                              <property name="contextSource" ref="contextSource" />
                              <property name="ignorePartialResultException" value="yes" />  
                            </bean>                                                                                                          
                    </list>
            </property>

    </bean>

这是我们的上下文源:

            <property name="pooled" value="false" />

            <property name="userDn" value="cn=secret,dc=educacion,dc=es"/>
            <property name="password" value="secret"/>


            <property name="url" value="ldap://192.168.0.100:389"/>             
            <qualifier value="secured"/>                                

            <property name="authenticationStrategy">
                    <bean class="org.springframework.ldap.core.support.DefaultTlsDirContextAuthenticationStrategy">
                            <property name="sslSocketFactory">
                                    <bean class="com.cein.educa.ldap.LDAPSocketFactory" />
                            </property>  
                            <property name="hostnameVerifier">
                                    <bean class="com.cein.educa.ldap.LDAPHostNameVerifier" />
                            </property>  

                            <property name="shutdownTlsGracefully" value="true" />
                    </bean>
            </property>

    <property name="baseEnvironmentProperties">                
                    <map>  
                            <entry key="java.naming.security.authentication" value="simple" />
                    </map>  
            </property>                                

    </bean>
4

0 回答 0