title: Cas Ldap authentication failed : attributes are empty
body: <p>I'm trying to authenticate users on cas using LDAP connexion.
  LDAP says ok but he doesn't send me attributes...</p>
  
  <p>Here is the transaction :</p>
  
  <pre><code>2015-01-14 10:52:34,353 DEBUG [org.jasig.cas.authentication.LdapAuthenticationHandler] - &lt;Attempting LDAP authentication for ffischer+password&gt;
  2015-01-14 10:52:34,354 DEBUG [org.ldaptive.auth.FormatDnResolver] - &lt;Formatting DN for ffischer with %s@AGADIR-DEV&gt;
  2015-01-14 10:52:34,354 DEBUG [org.ldaptive.auth.Authenticator] - &lt;authenticate dn=ffischer@AGADIR-DEV with request=[org.ldaptive.auth.AuthenticationRequest@1009044935::user=ffischer, retAttrs=[sAMAccountName, name]]&gt;
  2015-01-14 10:52:34,355 DEBUG [org.ldaptive.auth.PooledBindAuthenticationHandler] - &lt;authenticate criteria=[org.ldaptive.auth.AuthenticationCriteria@339862186::dn=ffischer@AGADIR-DEV, authenticationRequest=[org.ldaptive.auth.AuthenticationRequest@1009044935::user=ffischer, retAttrs=[sAMAccountName, name]]]&gt;
  2015-01-14 10:52:34,359 DEBUG [org.ldaptive.BindOperation] - &lt;execute request=[org.ldaptive.BindRequest@1445552746::bindDn=ffischer@AGADIR-DEV, saslConfig=null, controls=null] with connection=[org.ldaptive.DefaultConnectionFactory$DefaultConnection@291843681::config=[org.ldaptive.ConnectionConfig@172930161::ldapUrl=ldap://192.168.1.93, connectTimeout=3000, responseTimeout=-1, sslConfig=[org.ldaptive.ssl.SslConfig@891841536::credentialConfig=[org.ldaptive.ssl.X509CredentialConfig@-1559905052::trustCertificates=classpath:todo, authenticationCertificate=null, authenticationKey=null], trustManagers=null, enabledCipherSuites=null, enabledProtocols=null, handshakeCompletedListeners=null], useSSL=false, useStartTLS=false, connectionInitializer=null], providerConnectionFactory=[org.ldaptive.provider.jndi.JndiConnectionFactory@922503511::connectionCount=1, environment={java.naming.factory.initial=com.sun.jndi.ldap.LdapCtxFactory, com.sun.jndi.ldap.connect.timeout=3000, java.naming.ldap.version=3}, providerConfig=[org.ldaptive.provider.jndi.JndiProviderConfig@1832061684::operationExceptionResultCodes=[PROTOCOL_ERROR, SERVER_DOWN], properties={}, connectionStrategy=DEFAULT, environment=null, tracePackets=null, removeDnUrls=true, searchIgnoreResultCodes=[TIME_LIMIT_EXCEEDED, SIZE_LIMIT_EXCEEDED, PARTIAL_RESULTS], sslSocketFactory=null, hostnameVerifier=null, controlProcessor=org.ldaptive.provider.ControlProcessor@3214512e]], providerConnection=org.ldaptive.provider.jndi.JndiConnection@53ddbcb1]&gt;
  2015-01-14 10:52:34,365 DEBUG [org.ldaptive.BindOperation] - &lt;execute response=[org.ldaptive.Response@2061991076::result=null, resultCode=SUCCESS, message=null, matchedDn=null, responseControls=null, referralURLs=null, messageId=-1] for request=[org.ldaptive.BindRequest@1445552746::bindDn=ffischer@AGADIR-DEV, saslConfig=null, controls=null] with connection=[org.ldaptive.DefaultConnectionFactory$DefaultConnection@291843681::config=[org.ldaptive.ConnectionConfig@172930161::ldapUrl=ldap://192.168.1.93, connectTimeout=3000, responseTimeout=-1, sslConfig=[org.ldaptive.ssl.SslConfig@891841536::credentialConfig=[org.ldaptive.ssl.X509CredentialConfig@-1559905052::trustCertificates=classpath:todo, authenticationCertificate=null, authenticationKey=null], trustManagers=null, enabledCipherSuites=null, enabledProtocols=null, handshakeCompletedListeners=null], useSSL=false, useStartTLS=false, connectionInitializer=null], providerConnectionFactory=[org.ldaptive.provider.jndi.JndiConnectionFactory@922503511::connectionCount=1, environment={java.naming.factory.initial=com.sun.jndi.ldap.LdapCtxFactory, com.sun.jndi.ldap.connect.timeout=3000, java.naming.ldap.version=3}, providerConfig=[org.ldaptive.provider.jndi.JndiProviderConfig@1832061684::operationExceptionResultCodes=[PROTOCOL_ERROR, SERVER_DOWN], properties={}, connectionStrategy=DEFAULT, environment=null, tracePackets=null, removeDnUrls=true, searchIgnoreResultCodes=[TIME_LIMIT_EXCEEDED, SIZE_LIMIT_EXCEEDED, PARTIAL_RESULTS], sslSocketFactory=null, hostnameVerifier=null, controlProcessor=org.ldaptive.provider.ControlProcessor@3214512e]], providerConnection=org.ldaptive.provider.jndi.JndiConnection@53ddbcb1]&gt;
  2015-01-14 10:52:34,366 DEBUG [org.ldaptive.auth.PooledBindAuthenticationHandler] - &lt;authenticate response=[org.ldaptive.auth.AuthenticationHandlerResponse@1940402693::connection=[org.ldaptive.DefaultConnectionFactory$DefaultConnection@291843681::config=[org.ldaptive.ConnectionConfig@172930161::ldapUrl=ldap://192.168.1.93, connectTimeout=3000, responseTimeout=-1, sslConfig=[org.ldaptive.ssl.SslConfig@891841536::credentialConfig=[org.ldaptive.ssl.X509CredentialConfig@-1559905052::trustCertificates=classpath:todo, authenticationCertificate=null, authenticationKey=null], trustManagers=null, enabledCipherSuites=null, enabledProtocols=null, handshakeCompletedListeners=null], useSSL=false, useStartTLS=false, connectionInitializer=null], providerConnectionFactory=[org.ldaptive.provider.jndi.JndiConnectionFactory@922503511::connectionCount=1, environment={java.naming.factory.initial=com.sun.jndi.ldap.LdapCtxFactory, com.sun.jndi.ldap.connect.timeout=3000, java.naming.ldap.version=3}, providerConfig=[org.ldaptive.provider.jndi.JndiProviderConfig@1832061684::operationExceptionResultCodes=[PROTOCOL_ERROR, SERVER_DOWN], properties={}, connectionStrategy=DEFAULT, environment=null, tracePackets=null, removeDnUrls=true, searchIgnoreResultCodes=[TIME_LIMIT_EXCEEDED, SIZE_LIMIT_EXCEEDED, PARTIAL_RESULTS], sslSocketFactory=null, hostnameVerifier=null, controlProcessor=org.ldaptive.provider.ControlProcessor@3214512e]], providerConnection=org.ldaptive.provider.jndi.JndiConnection@53ddbcb1], result=true, resultCode=SUCCESS, message=null, controls=null] for criteria=[org.ldaptive.auth.AuthenticationCriteria@339862186::dn=ffischer@AGADIR-DEV, authenticationRequest=[org.ldaptive.auth.AuthenticationRequest@1009044935::user=ffischer, retAttrs=[sAMAccountName, name]]]&gt;
  2015-01-14 10:52:34,367 DEBUG [org.jasig.cas.authentication.support.UpnSearchEntryResolver] - &lt;resolve criteria=[org.ldaptive.auth.AuthenticationCriteria@339862186::dn=ffischer@AGADIR-DEV, authenticationRequest=[org.ldaptive.auth.AuthenticationRequest@1009044935::user=ffischer, retAttrs=[sAMAccountName, name]]]&gt;
  2015-01-14 10:52:34,368 DEBUG [org.ldaptive.SearchOperation] - &lt;execute request=[org.ldaptive.SearchRequest@1446887226::baseDn=dc=AGADIR-DEV,dc=lan, searchFilter=[org.ldaptive.SearchFilter@-523261394::filter=userPrincipalName={0}, parameters={0=ffischer@AGADIR-DEV}], returnAttributes=[sAMAccountName, name], searchScope=SUBTREE, timeLimit=0, sizeLimit=0, derefAliases=null, typesOnly=false, binaryAttributes=null, sortBehavior=UNORDERED, searchEntryHandlers=null, searchReferenceHandlers=null, controls=null, followReferrals=false, intermediateResponseHandlers=null] with connection=[org.ldaptive.DefaultConnectionFactory$DefaultConnection@291843681::config=[org.ldaptive.ConnectionConfig@172930161::ldapUrl=ldap://192.168.1.93, connectTimeout=3000, responseTimeout=-1, sslConfig=[org.ldaptive.ssl.SslConfig@891841536::credentialConfig=[org.ldaptive.ssl.X509CredentialConfig@-1559905052::trustCertificates=classpath:todo, authenticationCertificate=null, authenticationKey=null], trustManagers=null, enabledCipherSuites=null, enabledProtocols=null, handshakeCompletedListeners=null], useSSL=false, useStartTLS=false, connectionInitializer=null], providerConnectionFactory=[org.ldaptive.provider.jndi.JndiConnectionFactory@922503511::connectionCount=1, environment={java.naming.factory.initial=com.sun.jndi.ldap.LdapCtxFactory, com.sun.jndi.ldap.connect.timeout=3000, java.naming.ldap.version=3}, providerConfig=[org.ldaptive.provider.jndi.JndiProviderConfig@1832061684::operationExceptionResultCodes=[PROTOCOL_ERROR, SERVER_DOWN], properties={}, connectionStrategy=DEFAULT, environment=null, tracePackets=null, removeDnUrls=true, searchIgnoreResultCodes=[TIME_LIMIT_EXCEEDED, SIZE_LIMIT_EXCEEDED, PARTIAL_RESULTS], sslSocketFactory=null, hostnameVerifier=null, controlProcessor=org.ldaptive.provider.ControlProcessor@3214512e]], providerConnection=org.ldaptive.provider.jndi.JndiConnection@53ddbcb1]&gt;
  2015-01-14 10:52:34,375 DEBUG [org.ldaptive.SearchOperation] - &lt;execute response=[org.ldaptive.Response@565100753::result=[[]], resultCode=SUCCESS, message=null, matchedDn=null, responseControls=null, referralURLs=[ldap://ForestDnsZones.AGADIR-DEV.lan/DC=ForestDnsZones,DC=AGADIR-DEV,DC=lan], messageId=-1] for request=[org.ldaptive.SearchRequest@1446887226::baseDn=dc=AGADIR-DEV,dc=lan, searchFilter=[org.ldaptive.SearchFilter@-523261394::filter=userPrincipalName={0}, parameters={0=ffischer@AGADIR-DEV}], returnAttributes=[sAMAccountName, name], searchScope=SUBTREE, timeLimit=0, sizeLimit=0, derefAliases=null, typesOnly=false, binaryAttributes=null, sortBehavior=UNORDERED, searchEntryHandlers=null, searchReferenceHandlers=null, controls=null, followReferrals=false, intermediateResponseHandlers=null] with connection=[org.ldaptive.DefaultConnectionFactory$DefaultConnection@291843681::config=[org.ldaptive.ConnectionConfig@172930161::ldapUrl=ldap://192.168.1.93, connectTimeout=3000, responseTimeout=-1, sslConfig=[org.ldaptive.ssl.SslConfig@891841536::credentialConfig=[org.ldaptive.ssl.X509CredentialConfig@-1559905052::trustCertificates=classpath:todo, authenticationCertificate=null, authenticationKey=null], trustManagers=null, enabledCipherSuites=null, enabledProtocols=null, handshakeCompletedListeners=null], useSSL=false, useStartTLS=false, connectionInitializer=null], providerConnectionFactory=[org.ldaptive.provider.jndi.JndiConnectionFactory@922503511::connectionCount=1, environment={java.naming.factory.initial=com.sun.jndi.ldap.LdapCtxFactory, com.sun.jndi.ldap.connect.timeout=3000, java.naming.ldap.version=3}, providerConfig=[org.ldaptive.provider.jndi.JndiProviderConfig@1832061684::operationExceptionResultCodes=[PROTOCOL_ERROR, SERVER_DOWN], properties={}, connectionStrategy=DEFAULT, environment=null, tracePackets=null, removeDnUrls=true, searchIgnoreResultCodes=[TIME_LIMIT_EXCEEDED, SIZE_LIMIT_EXCEEDED, PARTIAL_RESULTS], sslSocketFactory=null, hostnameVerifier=null, controlProcessor=org.ldaptive.provider.ControlProcessor@3214512e]], providerConnection=org.ldaptive.provider.jndi.JndiConnection@53ddbcb1]&gt;
  2015-01-14 10:52:34,375 DEBUG [org.jasig.cas.authentication.support.UpnSearchEntryResolver] - &lt;resolved result=[[]] for criteria=[org.ldaptive.auth.AuthenticationCriteria@339862186::dn=ffischer@AGADIR-DEV, authenticationRequest=[org.ldaptive.auth.AuthenticationRequest@1009044935::user=ffischer, retAttrs=[sAMAccountName, name]]]&gt;
  2015-01-14 10:52:34,376 INFO [org.ldaptive.auth.Authenticator] - &lt;Authentication succeeded for dn: ffischer@AGADIR-DEV&gt;
  2015-01-14 10:52:34,377 DEBUG [org.ldaptive.auth.Authenticator] - &lt;authenticate response=[org.ldaptive.auth.AuthenticationHandlerResponse@1940402693::connection=[org.ldaptive.DefaultConnectionFactory$DefaultConnection@291843681::config=[org.ldaptive.ConnectionConfig@172930161::ldapUrl=ldap://192.168.1.93, connectTimeout=3000, responseTimeout=-1, sslConfig=[org.ldaptive.ssl.SslConfig@891841536::credentialConfig=[org.ldaptive.ssl.X509CredentialConfig@-1559905052::trustCertificates=classpath:todo, authenticationCertificate=null, authenticationKey=null], trustManagers=null, enabledCipherSuites=null, enabledProtocols=null, handshakeCompletedListeners=null], useSSL=false, useStartTLS=false, connectionInitializer=null], providerConnectionFactory=[org.ldaptive.provider.jndi.JndiConnectionFactory@922503511::connectionCount=1, environment={java.naming.factory.initial=com.sun.jndi.ldap.LdapCtxFactory, com.sun.jndi.ldap.connect.timeout=3000, java.naming.ldap.version=3}, providerConfig=[org.ldaptive.provider.jndi.JndiProviderConfig@1832061684::operationExceptionResultCodes=[PROTOCOL_ERROR, SERVER_DOWN], properties={}, connectionStrategy=DEFAULT, environment=null, tracePackets=null, removeDnUrls=true, searchIgnoreResultCodes=[TIME_LIMIT_EXCEEDED, SIZE_LIMIT_EXCEEDED, PARTIAL_RESULTS], sslSocketFactory=null, hostnameVerifier=null, controlProcessor=org.ldaptive.provider.ControlProcessor@3214512e]], providerConnection=org.ldaptive.provider.jndi.JndiConnection@53ddbcb1], result=true, resultCode=SUCCESS, message=null, controls=null] for dn=ffischer@AGADIR-DEV with request=[org.ldaptive.auth.AuthenticationRequest@1009044935::user=ffischer, retAttrs=[sAMAccountName, name]]&gt;
  2015-01-14 10:52:34,378 DEBUG [org.jasig.cas.authentication.LdapAuthenticationHandler] - &lt;LDAP response: [org.ldaptive.auth.AuthenticationResponse@274142856::authenticationResultCode=AUTHENTICATION_HANDLER_SUCCESS, ldapEntry=[dn=ffischer@AGADIR-DEV[]], accountState=null, result=true, resultCode=SUCCESS, message=null, controls=null]&gt;
  2015-01-14 10:52:34,378 INFO [org.jasig.cas.authentication.PolicyBasedAuthenticationManager] - &lt;LdapAuthenticationHandler failed authenticating ffischer+password&gt;
  </code></pre>
  
  <p>Is a problem of AD configuration ?
  I use AD 2008 R2
  Cas server 4.0.0</p>
  
  <p>Thanks for help</p>