Hi together,

 

I've a problem to release Attributes from my LDAP.

All works fine, I can login and in my Debug mode I can see that all
attributes are mapped.

But when it comes to relapses them I get the message:

<No resolver configured for LdapAuthenticationHandler. Falling back to
handler principal

 

How can I release this attributes?

Here is my ldapContextConfig.xml

 

<?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:p="http://www.springframework.org/schema/p";

       xmlns:c="http://www.springframework.org/schema/c";

       xmlns:context="http://www.springframework.org/schema/context";

       xmlns:util="http://www.springframework.org/schema/util";

       xsi:schemaLocation="http://www.springframework.org/schema/beans

       http://www.springframework.org/schema/beans/spring-beans.xsd

       http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context.xsd

       http://www.springframework.org/schema/util
http://www.springframework.org/schema/util/spring-util.xsd";>

       

                    <context:component-scan base-package="org.jasig.cas" />

                    <context:annotation-config />

 

                               <bean id="authenticator"
class="org.ldaptive.auth.Authenticator"

                                               c:resolver-ref="dnResolver"
c:handler-ref="authHandler"

 
p:entryResolver-ref="entryResolver">

                                               <property
name="authenticationResponseHandlers">

                                                               <list>

 
<bean
class="org.ldaptive.auth.ext.ActiveDirectoryAuthenticationResponseHandler"
/>

                                                               </list>

                                               </property>

                               </bean>

                                <bean id="ldapAuthenticationHandler"
class="org.jasig.cas.authentication.LdapAuthenticationHandler"

 
p:principalIdAttribute="memberOf" c:authenticator-ref="authenticator">

                                               <property
name="principalAttributeMap">

                                                               <map>

 
<entry key="displayName" value="displayName" />

 
<entry key="cn" value="cn" />

 
<entry key="userPrincipalName" value="userPrincipalName" />

 
<entry key="memberOf" value="memberOf" />

 
<entry key="givenName" value="givenName" />

 
<entry key="sn" value="sn" />

 
<entry key="sAMAccountName" value="sAMAccountName" />

                                                               </map>

                                               </property>

                               </bean>

   

                <bean id="dnResolver"
class="org.ldaptive.auth.FormatDnResolver"

 
c:format="${ldap.authn.format}" />

 

                               <bean id="entryResolver"
class="org.ldaptive.auth.SearchEntryResolver"

 
p:baseDn="${ldap.service.baseDn}" p:userFilter="${ldap.authn.searchFilter}"

                                               p:subtreeSearch="true"
p:connectionFactory-ref="searchPooledLdapConnectionFactory" />      

 

       <bean id="searchPooledLdapConnectionFactory"

             class="org.ldaptive.pool.PooledConnectionFactory"

             p:connectionPool-ref="searchConnectionPool" />

 

       <bean id="searchConnectionPool" parent="abstractConnectionPool"

             p:connectionFactory-ref="searchConnectionFactory" />

 

       <bean id="searchConnectionFactory"

             class="org.ldaptive.DefaultConnectionFactory"

             p:connectionConfig-ref="searchConnectionConfig" />

 

       <bean id="searchConnectionConfig" parent="abstractConnectionConfig"

             p:connectionInitializer-ref="bindConnectionInitializer" />

 

       <bean id="bindConnectionInitializer"

             class="org.ldaptive.BindConnectionInitializer"

             p:bindDn="${ldap.managerDn}">

              <property name="bindCredential">

                     <bean class="org.ldaptive.Credential"

                           c:password="${ldap.managerPassword}" />

              </property>

       </bean>

 

       <bean id="abstractConnectionPool" abstract="true"

             class="org.ldaptive.pool.BlockingConnectionPool"

             init-method="initialize"

             destroy-method="close"

             p:poolConfig-ref="ldapPoolConfig"

             p:blockWaitTime="${ldap.pool.blockWaitTime}"

             p:validator-ref="searchValidator"

             p:pruneStrategy-ref="pruneStrategy" />

 

       <bean id="abstractConnectionConfig" abstract="true"

             class="org.ldaptive.ConnectionConfig"

             p:ldapUrl="${ldap.url}"

             p:connectTimeout="${ldap.connectTimeout}"

             p:useStartTLS="${ldap.useStartTLS}" 

             p:sslConfig-ref="sslConfig"/>

 

                               <bean id="sslConfig"
class="org.ldaptive.ssl.SslConfig">

                                               <property
name="credentialConfig">

                                                               <bean
class="org.ldaptive.ssl.X509CredentialConfig"

 
p:trustCertificates="true" />

                                               </property>

                               </bean>

 

       <bean id="ldapPoolConfig" class="org.ldaptive.pool.PoolConfig"

             p:minPoolSize="${ldap.pool.minSize}"

             p:maxPoolSize="${ldap.pool.maxSize}"

             p:validateOnCheckOut="${ldap.pool.validateOnCheckout}"

             p:validatePeriodically="${ldap.pool.validatePeriodically}"

             p:validatePeriod="${ldap.pool.validatePeriod}" />

 

 

       <bean id="pruneStrategy" class="org.ldaptive.pool.IdlePruneStrategy"

             p:prunePeriod="${ldap.pool.prunePeriod}"

             p:idleTime="${ldap.pool.idleTime}" />

 

       <bean id="searchValidator" class="org.ldaptive.pool.SearchValidator"
/>

 

       <bean id="authHandler"
class="org.ldaptive.auth.PooledBindAuthenticationHandler"

             p:connectionFactory-ref="bindPooledLdapConnectionFactory" />

 

       <bean id="bindPooledLdapConnectionFactory"

             class="org.ldaptive.pool.PooledConnectionFactory"

             p:connectionPool-ref="bindConnectionPool" />

 

       <bean id="bindConnectionPool" parent="abstractConnectionPool"

             p:connectionFactory-ref="bindConnectionFactory" />

 

       <bean id="bindConnectionFactory"

             class="org.ldaptive.DefaultConnectionFactory"

             p:connectionConfig-ref="bindConnectionConfig" />

 

       <bean id="bindConnectionConfig" parent="abstractConnectionConfig" />

       

      

    <context:component-scan base-package="org.jasig.cas"
/><context:annotation-config/>

    

                <bean id="ldapPersonAttributeDao"

 
class="org.jasig.cas.persondir.LdapPersonAttributeDao"

 
p:connectionFactory-ref="bindPooledLdapConnectionFactory"

                      p:baseDN="${ldap.role.baseDn}"

                      p:searchFilter="${ldap.authn.searchFilter}">

                      <property name="queryAttributeMapping">

                        <map>

                            <entry key="sAMAccountName"
value="sAMAccountName" />

                        </map>

                    </property>

                    <property name="resultAttributeMapping">

                        <map>

                            <!--

                               | Key is LDAP attribute name, value is
principal attribute name.

                               -->

                                                               <entry
key="displayName" value="displayName" />

                                                               <entry
key="cn" value="cn" />

                                                               <entry
key="userPrincipalName" value="userPrincipalName" />

                                                               <entry
key="memberOf" value="memberOf" />

                                                               <entry
key="givenName" value="givenName" />

                                                               <entry
key="sn" value="sn" />

                        </map>

                    </property>

                    <property name="searchControls">

            <bean class="javax.naming.directory.SearchControls"
p:timeLimit="${ldap.searchControl.timeLimit}"

                p:countLimit="${ldap.searchControl.countLimit}"
p:searchScope="${ldap.searchControl.searchScope}" />

        </property>

                </bean>

 

</beans>

 

Kind regards

 

Carsten

 


-- 
You are currently subscribed to [email protected] as: 
[email protected]
To unsubscribe, change settings or access archives, see 
http://www.ja-sig.org/wiki/display/JSG/cas-user

Reply via email to