简体   繁体   English

在CAS 4.2.x中找不到ldaptive模式

[英]Unable to locate ldaptive schema in CAS 4.2.x

I am new to the CAS setup, started using CAS 4.2.x version. 我不熟悉CAS设置,开始使用CAS 4.2.x版本。 With help of the below , doing the setup. 在以下帮助下,进行设置。 [ https://apereo.github.io/cas/4.2.x/installation/LDAP-Authentication.html][1] [ https://apereo.github.io/cas/4.2.x/installation/LDAP-Authentication.html][1]

After adding bean reference " http://www.ldaptive.org/schema/spring-ext " in the deployerConfigcontext.xml, getting the error 在deployerConfigcontext.xml中添加Bean参考“ http://www.ldaptive.org/schema/spring-ext ”后,出现错误

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

I am using CAS 3.5.2 and was facing the same issue ..... the below workaround worked for me. 我正在使用CAS 3.5.2,并且遇到相同的问题..以下解决方法为我工作。 You can give it a shot and see if it works for you as well. 您可以试一试,看看它是否也适用。

Add the following dependency in your pom.xml file 在pom.xml文件中添加以下依赖项

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

then remove the below lines from your 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

In your deployerConfigcontext.xml remove the ldaptive declaration and replace it with the below format. 在您的deployerConfigcontext.xml中,删除ldaptive声明,并将其替换为以下格式。

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

Also in your deployerConfigcontext.xml remove your ldapAuthenticationHandler bean and replace it with the following 同样在您的deployerConfigcontext.xml文件中,删除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" />

Please note that i am using CAS 3.5.2 so you might have to make some more changes ... 请注意,我正在使用CAS 3.5.2,因此您可能必须进行更多更改...

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 CAS 4.2.x deployerConfigContext.xml连接到LDAP - CAS 4.2.x deployerConfigContext.xml to connect to LDAP 在JBoss 4.2.x上升级到Quartz 1.6 - Upgrade to Quartz 1.6 on JBoss 4.2.x spring-ws 2.2.2与spring 4.2.x兼容吗? - Is spring-ws 2.2.2 compatible with spring 4.2.x? Hibernate 4.3.x和4.2.x之间是否在对抽象实现的类进行水合的方式上有所变化 - Is there a change between Hibernate 4.3.x and 4.2.x in how they hydrate abstract implemented classes 使用JBoss 4.2.x,如何在不取消部署现有数据源的情况下部署新数据源? - Using JBoss 4.2.x, how can I deploy a new data source without undeploying existing ones? 从 JBoss 4.2.x 升级到 JBoss 5.x、6.x、7.x 和 WildFly 8.x 的好处(和提示)? - Benefits (and tips) of an upgrade from JBoss 4.2.x to JBoss 5.x, 6.x, 7.x and WildFly 8.x? Webjars-locator 不适用于基于 XML 的 Spring MVC 4.2.x 配置? - Webjars-locator doesn't work with XML based Spring MVC 4.2.x configuration? 将项目A(Spring 4.2.x)添加为项目B(Spring Boot 2,Spring 5)的依赖项 - Add Project A (Spring 4.2.x) as dependency of Project B (Spring Boot 2, Spring 5) 将Spring 4.1.X迁移到4.2.x,方法LocalSessionFactoryBean.setCacheRegionFactory(RegionFactory cacheRegionFactory)的第二级缓存问题 - Spring migration 4.1.X to 4.2.x 2nd level caching issue for method LocalSessionFactoryBean.setCacheRegionFactory(RegionFactory cacheRegionFactory) AWS Lambda-无法找到XML模式的NamespaceHandler - AWS lambda - Unable to locate NamespaceHandler for XML schema
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM