2017-05-24 2 views
0

CAS 설정을 처음 사용하고 CAS 4.2.x 버전을 사용하기 시작했습니다. 아래의 도움으로 설정을하십시오. [https://apereo.github.io/cas/4.2.x/installation/LDAP-Authentication.html][1]CAS 4.2.x에서 ldaptive 스키마를 찾을 수 없습니다.

오류

Configuration problem: Unable to locate Spring Namespace handler for xml schema namespace [http://www.ldaptive.org/schema/spring-ext]

<beans xmlns="http://www.springframework.org/schema/beans" 
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
     xmlns:webflow="http://www.springframework.org/schema/webflow-config" 
     xmlns:p="http://www.springframework.org/schema/p" 
     xmlns:mvc="http://www.springframework.org/schema/mvc" 
     xmlns:c="http://www.springframework.org/schema/c" 
     xmlns:util="http://www.springframework.org/schema/util" 
     xmlns:context="http://www.springframework.org/schema/context" 
     xmlns:ldaptive="http://www.ldaptive.org/schema/spring-ext" 
     xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd 
     http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd 
     http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd 
     http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd 
     http://www.springframework.org/schema/webflow-config http://www.springframework.org/schema/webflow-config/spring-webflow-config-2.3.xsd 
     http://www.ldaptive.org/schema/spring-ext http://www.ldaptive.org/schema/spring-ext.xsd"> 

답변

0

내가 CAS 3.5.2 사용하고지고의 된 deployerConfigContext.xml 콩 참조 "http://www.ldaptive.org/schema/spring-ext"를 추가하고 같은 문제에 직면 한 후, ..... 아래 해결 방법은 나를 위해 일했습니다. 당신은 그것을 발사 할 수 있고 그것이 당신을 위해서도 효과가 있는지 볼 수 있습니다.

당신 된 deployerConfigContext.xml에서
xmlns:ldaptive="http://www.ldaptive.org/schema/spring-ext" 
http://www.ldaptive.org/schema/spring-ext http://www.ldaptive.org/schema/spring-ext.xsd 

가 ldaptive 선언을 제거하고 교체

<dependency> 
     <groupId>org.jasig.cas</groupId> 
     <artifactId>cas-server-support-ldap</artifactId> 
     <version>${cas.version}</version> 
    </dependency> 

다음 된 deployerConfigContext.xml에서 아래 줄을 제거하여 pom.xml 파일에 다음 종속성을 추가 아래 형식으로

<bean id="contextSource" class="org.springframework.ldap.core.support.LdapContextSource"> 
       <!-- DO NOT enable JNDI pooling for context sources that perform LDAP bind operations. --> 
       <property name="pooled" value="false"/> 

       <!-- 
       Although multiple URLs may defined, it's strongly recommended to avoid this configuration 
       since the implementation attempts hosts in sequence and requires a connection timeout 
       prior to attempting the next host, which incurs unacceptable latency on node failure. 
       A proper HA setup for LDAP directories should use a single virtual host that maps to multiple 
       real hosts using a hardware load balancer. 
       --> 
       <property name="url" value="your-ldap-url" /> 

       <!-- 
       Manager credentials are only required if your directory does not support anonymous searches. 
       Never provide these credentials for FastBindLdapAuthenticationHandler since the user's 
       credentials are used for the bind operation. 
       --> 
       <property name="userDn" value="your-userDn-info"/> 
       <property name="password" value="password-for-your-userDn"/> 

       <!-- Place JNDI environment properties here. --> 
       <property name="baseEnvironmentProperties"> 
       <map> 
        <!-- Three seconds is an eternity to users. --> 
        <entry key="com.sun.jndi.ldap.connect.timeout" value="3000" /> 
        <entry key="com.sun.jndi.ldap.read.timeout" value="3000" /> 

        <!-- Explained at http://docs.oracle.com/javase/jndi/tutorial/ldap/security/auth.html --> 
        <entry key="java.naming.security.authentication" value="simple" /> 
       </map> 
       </property> 
      </bean> 

또한 된 deployerConfigContext.xml에 ldapAuthenticationHandler 콩을 제거하고 난 그래서 당신이 좀 더 변경해야 할 수도 있습니다 CAS 3.5.2를 사용하고 있습니다 다음

<bean class="org.jasig.cas.adaptors.ldap.BindLdapAuthenticationHandler" 
       p:filter="your-ldap-filter" 
       p:searchBase="your-search-base" 
       p:contextSource-ref="contextSource" 
       p:ignorePartialResultException="true" /> 

로 교체하십시오. ..

관련 문제