2016-08-01 5 views
0

누구든지 LDAP 4.2.x deployerConfigContext.xml을 공유하여 LDAP에 연결할 수 있습니까?CAS 4.2.x LDAP에 연결하는 deployerConfigContext.xml

나는 아래의 구성을 사용하지만 LDAP 인증에 실패하고있다 :

ERROR [org.ldaptive.pool.BlockingConnectionPool] - < [[email protected] : 이름 = 검색 -pool, poolConfig = [email protected] minPoolSize :: = 1 maxPoolSize = 10 validateOnCheckIn = 거짓 validateOnCheckOut = TRUE, FALSE validatePeriodically = validatePeriod = 300] = NULL 활성제, passivator = NULL, validator = [[email protected] :: searchRequest = [[email protected] :: baseDn =, searchFilter = [[email protected] :: filter = (objectClass = *), 매개 변수 = {}], returnAttributes = [1.1], searchScope = OBJECT, t imeLimit = 0 sizeLimit = 1 derefAliases = NULL, typesOnly = 거짓 binaryAttributes = NULL, sortBehavior = UNORDERED, searchEntryHandlers = NULL, searchReferenceHandlers = NULL이 제어 = NULL, referralHandler = NULL, intermediateResponseHandlers = NULL] pruneStrategy = 조직도. [email protected] :: prunePeriod = 300, idleTime = 600], connectOnCreate = true, connectionFactory = [[email protected] :: [email protected], config = [[email protected] LDAPURL :: = XXXX,에 ConnectTimeout = 3000 responseTimeout = -1, sslConfig = NULL, useSSL = 거짓 useStartTLS = 거짓 connectionInitializer = [email protected] :: = CN에서 binddn = 0, activeCount = 0] ldap에 연결할 수 없습니다.>

일반적으로 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> 

답변

1

실패했습니다. 자격 증명, URL 및 기타 설정이 올바른지 확인하십시오.

+0

변경된 userFilter = "sAMAccountName = {user}" – Ani