2017-05-24 4 views
0

私はCAS 4.2.xバージョンを使用してCASセットアップを初めて利用しました。以下の助けを借りて、セットアップを行ってください。私はCAS 3.5.2を使用していますし、同じ問題に直面していたエラーに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

を取得し、deployerConfigcontext.xmlでBean参照 "http://www.ldaptive.org/schema/spring-ext" を追加した後 [https://apereo.github.io/cas/4.2.x/installation/LDAP-Authentication.html][1]

.....以下の回避策が私のために働いた。あなたはそれを撃つことができ、それがあなたのために働くかどうかを見ることができます。

その後、ldaptive宣言を削除し、それを置き換えるあなたのdeployerConfigcontext.xmlであなたの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 

から以下の行を削除し、あなたのpom.xmlファイルに

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

を以下の依存関係を追加します。以下の形式で入力します。あなたのdeployerConfigcontext.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> 

あなたldapAuthenticationHandler Beanを削除し、以下の

<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" /> 

に置き換えるので、あなたには、いくつかのより多くの変更を加える必要があります、私はCAS 3.5.2を使用していますのでご注意ください。 ..

関連する問題