简体   繁体   English

CAS 4.2.x deployerConfigContext.xml连接到LDAP

[英]CAS 4.2.x deployerConfigContext.xml to connect to LDAP

Can anyone of you please share CAS 4.2.x deployerConfigContext.xml to connect to LDAP? 你们任何人都可以共享CAS 4.2.x deployerConfigContext.xml来连接到LDAP吗?

I am using the below configuration but its failing with LDAP authentication: 我正在使用以下配置,但其LDAP认证失败:

ERROR [org.ldaptive.pool.BlockingConnectionPool] - <[org.ldaptive.pool.BlockingConnectionPool@1473822750::name=search-pool, poolConfig=[org.ldaptive.pool.PoolConfig@338070642::minPoolSize=1, maxPoolSize=10, validateOnCheckIn=false, validateOnCheckOut=false, validatePeriodically=true, validatePeriod=300], activator=null, passivator=null, validator=[org.ldaptive.pool.SearchValidator@1077644989::searchRequest=[org.ldaptive.SearchRequest@-1624038438::baseDn=, searchFilter=[org.ldaptive.SearchFilter@1642584434::filter=(objectClass=*), parameters={}], returnAttributes=[1.1], searchScope=OBJECT, timeLimit=0, sizeLimit=1, derefAliases=null, typesOnly=false, binaryAttributes=null, sortBehavior=UNORDERED, searchEntryHandlers=null, searchReferenceHandlers=null, controls=null, referralHandler=null, intermediateResponseHandlers=null]] pruneStrategy=[org.ldaptive.pool.IdlePruneStrategy@742722732::prunePeriod=300, idleTime=600], connectOnCreate=true, connectionFactory=[org.ldaptive.DefaultConnectionF 错误[org.ldaptive.pool.BlockingConnectionPool]-<[org.ldaptive.pool.BlockingConnectionPool@1473822750 :: name = search-pool,poolConfig = [org.ldaptive.pool.PoolConfig@338070642 :: minPoolSize = 1,maxPoolSize = 10,validateOnCheckIn = false,validateOnCheckOut = false,validatePeriodically = true,validatePeriod = 300],激活器=空,钝化器=空,验证器= [org.ldaptive.pool.SearchValidator@1077644989 :: searchRequest = [org.ldaptive.SearchRequest @ -1624038438 :: baseDn =,searchFilter = [org.ldaptive.SearchFilter@1642584434 :: filter =(objectClass = *),parameters = {}],returnAttributes = [1.1],searchScope = OBJECT,timeLimit = 0,sizeLimit = 1 ,derefAliases = null,typesOnly = false,binaryAttributes = null,sortBehavior = UNORDERED,searchEntryHandlers = null,searchReferenceHandlers = null,controls = null,referralHandler = null,intermediateResponseHandlers = null]] pruneStrategyy = [org.ldaptive.pool.IdlePrune742 :: prunePeriod = 300,idleTime = 600],connectOnCreate = true,connectionFactory = [org.ldaptive.DefaultConnectionF actory@47665555::provider=org.ldaptive.provider.jndi.JndiProvider@1bbee59c, config=[org.ldaptive.ConnectionConfig@620183::ldapUrl=xxxx, connectTimeout=3000, responseTimeout=-1, sslConfig=null, useSSL=false, useStartTLS=false, connectionInitializer=[org.ldaptive.BindConnectionInitializer@1374011571::bindDn=cn=Directory Manager,dc=uss,dc=net, bindSaslConfig=null, bindControls=null]]], initialized=false, availableCount=0, activeCount=0] unable to connect to the ldap> actory @ 47665555 :: provider=org.ldaptive.provider.jndi.JndiProvider@1bbee59c,config = [org.ldaptive.ConnectionConfig@620183 :: ldapUrl = xxxx,connectTimeout = 3000,responseTimeout = -1,sslConfig = null,useSSL = false,useStartTLS = false,connectionInitializer = [org.ldaptive.BindConnectionInitializer@1374011571 :: bindDn = cn =目录管理器,dc = uss,dc = net,bindSaslConfig = null,bindControls = null]]],已初始化= false,availableCount = 0,activeCount = 0]无法连接到ldap>

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:context="http://www.springframework.org/schema/context"
       xmlns:p="http://www.springframework.org/schema/p"
       xmlns:c="http://www.springframework.org/schema/c"
       xmlns:aop="http://www.springframework.org/schema/aop"
       xmlns:tx="http://www.springframework.org/schema/tx"
       xmlns:util="http://www.springframework.org/schema/util"
       xmlns:sec="http://www.springframework.org/schema/security"
       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/tx http://www.springframework.org/schema/tx/spring-tx.xsd
       http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop.xsd
       http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd
       http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security.xsd
       http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd
       http://www.ldaptive.org/schema/spring-ext http://www.ldaptive.org/schema/spring-ext.xsd">

    <bean id="ldapAuthenticationHandler"
        class="org.jasig.cas.authentication.LdapAuthenticationHandler"
              p:principalIdAttribute="sAMAccountName"
              c:authenticator-ref="authenticator">
            <property name="principalAttributeMap">
                <map>
                    <entry key="displayName" value="simpleName" />
                    <entry key="mail" value="email" />
                    <entry key="memberOf" value="membership" />
                </map>
            </property>
    </bean>

    <ldaptive:ad-authenticator id="authenticator"
        ldapUrl="xxxx"
        userFilter="uid={user}"
        bindDn="cn=Directory Manager,dc=uss,dc=net"
        bindCredential="xxxx"
        allowMultipleDns="false"
        connectTimeout="3000"
        validateOnCheckOut="false"
        failFastInitialize="true"
        blockWaitTime="3000"
        idleTime="600"
        baseDn="ou=Users,ou=Unsorted,ou=xxxx,dc=uss,dc=net"
        maxPoolSize="10"
        minPoolSize="1"
        validatePeriodically="true"
        validatePeriod="300"
        prunePeriod="300"
        useSSL="false"
        subtreeSearch="true"
        useStartTLS="false" />


    <util:map id="authenticationHandlersResolvers">
        <entry key-ref="proxyAuthenticationHandler" value-ref="proxyPrincipalResolver" />
        <entry key-ref="ldapAuthenticationHandler" value-ref="primaryPrincipalResolver" />
        <!-- <entry key-ref="primaryAuthenticationHandler" value-ref="primaryPrincipalResolver" /> -->
    </util:map>

    <util:list id="authenticationMetadataPopulators">
        <ref bean="successfulHandlerMetaDataPopulator" />
        <ref bean="rememberMeAuthenticationMetaDataPopulator" />
    </util:list>

    <bean id="attributeRepository" class="org.jasig.services.persondir.support.NamedStubPersonAttributeDao"
          p:backingMap-ref="attrRepoBackingMap" />

    <alias name="acceptUsersAuthenticationHandler" alias="primaryAuthenticationHandler" />
    <alias name="personDirectoryPrincipalResolver" alias="primaryPrincipalResolver" />

    <util:map id="attrRepoBackingMap">
        <entry key="uid" value="uid" />
        <entry key="eduPersonAffiliation" value="eduPersonAffiliation" />
        <entry key="groupMembership" value="groupMembership" />
        <entry>
            <key><value>memberOf</value></key>
            <list>
                <value>faculty</value>
                <value>staff</value>
                <value>org</value>
            </list>
        </entry>
    </util:map>

    <alias name="serviceThemeResolver" alias="themeResolver" />

    <alias name="jsonServiceRegistryDao" alias="serviceRegistryDao" />

    <alias name="defaultTicketRegistry" alias="ticketRegistry" />

    <alias name="ticketGrantingTicketExpirationPolicy" alias="grantingTicketExpirationPolicy" />
    <alias name="multiTimeUseOrTimeoutExpirationPolicy" alias="serviceTicketExpirationPolicy" />

    <alias name="anyAuthenticationPolicy" alias="authenticationPolicy" />
    <alias name="acceptAnyAuthenticationPolicyFactory" alias="authenticationPolicyFactory" />

    <bean id="auditTrailManager"
          class="org.jasig.inspektr.audit.support.Slf4jLoggingAuditTrailManager"
          p:entrySeparator="${cas.audit.singleline.separator:|}"
          p:useSingleLine="${cas.audit.singleline:false}"/>

    <alias name="neverThrottle" alias="authenticationThrottle" />

    <util:list id="monitorsList">
        <ref bean="memoryMonitor" />
        <ref bean="sessionMonitor" />
    </util:list>

    <alias name="defaultPrincipalFactory" alias="principalFactory" />
    <alias name="defaultAuthenticationTransactionManager" alias="authenticationTransactionManager" />
    <alias name="defaultPrincipalElectionStrategy" alias="principalElectionStrategy" />
    <alias name="tgcCipherExecutor" alias="defaultCookieCipherExecutor" />
</beans>

That generally means connection to ldap has failed. 这通常意味着与ldap的连接已失败。 Make sure your credentials, URLs, and other settings are correct. 确保您的凭据,URL和其他设置正确。

暂无
暂无

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

相关问题 在CAS 4.2.x中找不到ldaptive模式 - Unable to locate ldaptive schema in CAS 4.2.x 在JBoss 4.2.x上升级到Quartz 1.6 - Upgrade to Quartz 1.6 on JBoss 4.2.x Webjars-locator 不适用于基于 XML 的 Spring MVC 4.2.x 配置? - Webjars-locator doesn't work with XML based Spring MVC 4.2.x configuration? 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 将项目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) 使用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? 将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) LDAP与CAS + Spring集成 - LDAP Integration with CAS + Spring
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM