<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: LDAPS: Nuxeo performing too many bind in Nuxeo Forum</title>
    <link>https://connect.hyland.com/t5/nuxeo-forum/ldaps-nuxeo-performing-too-many-bind/m-p/321132#M8133</link>
    <description>&lt;P&gt;Thank you to Pierre Bouvret for providing the solution:
As described &lt;A href="http://docs.oracle.com/javase/jndi/tutorial/ldap/connect/config.html"&gt;in the Java/JNDI documentation&lt;/A&gt;: To allow both plain and SSL connections to be pooled, set the "com.sun.jndi.ldap.connect.pool.protocol" system property to the string "plain ssl". How strange this default JNDI setup...&lt;/P&gt;
&lt;P&gt;I can confirm it fixes our problem; there is now a reasonable amount of LDAPS bind.&lt;/P&gt;</description>
    <pubDate>Thu, 09 Feb 2017 08:52:39 GMT</pubDate>
    <dc:creator>Olivier_Salaün</dc:creator>
    <dc:date>2017-02-09T08:52:39Z</dc:date>
    <item>
      <title>LDAPS: Nuxeo performing too many bind</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/ldaps-nuxeo-performing-too-many-bind/m-p/321131#M8132</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;While setting up our Nuxeo LTS2015 Test server we've realized that Nuxeo does not have a proper LDAPS client behavior (whereas it's fine wile using the LDAP protocol). Our LDAP servers logs show Nuxeo performing a new LDAP Bind for each Search operation. This was observed while doing a User search from the Admin&amp;gt;User and Groups menu. This leads to bad LDAP search performances and overloads the LDAP server. I provide details below with OpenLDAP log samples and our LDAP configuration file.&lt;/P&gt;
&lt;P&gt;Is this a known problem of Nuxeo with LDAPS servers? (I could not find anything related in your bug tracker)&lt;/P&gt;
&lt;P&gt;Is there a workaround?&lt;/P&gt;
&lt;P&gt;Another option for us would be to use STARTTLS over LDAP, but I could not find any documentation related to Nuxeo and STARTTLS. Is STARTTLS implemented in Nuxeo? If so, is there a related documentation?&lt;/P&gt;
&lt;P&gt;Here is what we find in our unsecured LDAP server logs when configured in Nuxeo; please note the connexion ID (conn=) that remains the same in all log entries :&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;Feb  8 14:58:26 vmldap-pro3 slapd[1757]: conn=51353 op=86 SRCH base="ou=people,dc=univ-rennes1,dc=fr" scope=1 deref=3 filter="(&amp;amp;(&amp;amp;(objectClass=person)(uid=*))(displayName=redon))"
Feb  8 14:58:26 vmldap-pro3 slapd[1757]: conn=51353 op=87 SRCH base="ou=people,dc=univ-rennes1,dc=fr" scope=1 deref=3 filter="(&amp;amp;(&amp;amp;(objectClass=person)(uid=*))(uid=redon))"
Feb  8 14:58:26 vmldap-pro3 slapd[1757]: conn=51353 op=88 SRCH base="ou=people,dc=univ-rennes1,dc=fr" scope=1 deref=3 filter="(&amp;amp;(&amp;amp;(objectClass=person)(uid=*))(mail=redon))"
Feb  8 14:58:26 vmldap-pro3 slapd[1757]: conn=51353 op=89 SRCH base="ou=people,dc=univ-rennes1,dc=fr" scope=1 deref=3 filter="(&amp;amp;(&amp;amp;(objectClass=person)(uid=*))(sn=*redon*))"
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Here is what we find in our secured LDAPS server logs when configured in Nuxeo; please note the connexion ID (conn=) that is different in all log entries :&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;Feb  8 15:39:43 vmldap-pro2 slapd[14842]: conn=1116702 op=1 SRCH base="ou=people,dc=univ-rennes1,dc=fr" scope=1 deref=3 filter="(&amp;amp;(&amp;amp;(objectClass=person)(uid=*))(displayName=redon))"
Feb  8 15:39:43 vmldap-pro2 slapd[14842]: conn=1116707 op=1 SRCH base="ou=people,dc=univ-rennes1,dc=fr" scope=1 deref=3 filter="(&amp;amp;(&amp;amp;(objectClass=person)(uid=*))(mail=redon))"
Feb  8 15:39:43 vmldap-pro2 slapd[14842]: conn=1116711 op=1 SRCH base="ou=people,dc=univ-rennes1,dc=fr" scope=1 deref=3 filter="(&amp;amp;(&amp;amp;(objectClass=person)(uid=*))(sn=*redon*))"
Feb  8 15:39:52 vmldap-pro2 slapd[14842]: conn=1116977 op=1 SRCH base="ou=grouper,dc=univ-rennes1,dc=fr" scope=1 deref=3 filter="(&amp;amp;(cn=mredon)(&amp;amp;(&amp;amp;(objectClass=groupOfNames))(cn=*)))"
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;An additional research in the LDAPS server log on one connexion ID confirms that Nuxeo performs a single LDAP Search query before Unbinding :&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class="language-grep"&gt;Feb  8 15:39:43 vmldap-pro2 slapd[14842]: conn=1116702 fd=425 ACCEPT from IP=129.20.123.2:36256 (IP=0.0.0.0:636)
Feb  8 15:39:43 vmldap-pro2 slapd[14842]: conn=1116702 fd=425 TLS established tls_ssf=128 ssf=128
Feb  8 15:39:43 vmldap-pro2 slapd[14842]: conn=1116702 op=0 BIND dn="XX" method=128
Feb  8 15:39:43 vmldap-pro2 slapd[14842]: conn=1116702 op=0 BIND dn="XX" mech=SIMPLE ssf=0
Feb  8 15:39:43 vmldap-pro2 slapd[14842]: conn=1116702 op=0 RESULT tag=97 err=0 text=
Feb  8 15:39:43 vmldap-pro2 slapd[14842]: conn=1116702 op=1 SRCH base="ou=people,dc=univ-rennes1,dc=fr" scope=1 deref=3 filter="(&amp;amp;(&amp;amp;(objectClass=person)(uid=*))(displayName=redon))"
Feb  8 15:39:43 vmldap-pro2 slapd[14842]: conn=1116702 op=1 SEARCH RESULT tag=101 err=0 nentries=0 text=
Feb  8 15:39:43 vmldap-pro2 slapd[14842]: conn=1116702 op=2 UNBIND
Feb  8 15:39:43 vmldap-pro2 slapd[14842]: conn=1116702 fd=425 closed
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;An extract from our default-ldap-users-directory-bundle.xml configuration file:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;  &amp;lt;extension target="org.nuxeo.ecm.directory.ldap.LDAPDirectoryFactory"
    point="servers"&amp;gt;

    &amp;lt;!-- Configuration of a server connection

      A single server declaration can point to a cluster of replicated
      servers (using OpenLDAP's slapd + sluprd for instance). To leverage
      such a cluster and improve availability, please provide one
      &amp;lt;ldapUrl/&amp;gt; tag for each replica of the cluster.
    --&amp;gt;
    &amp;lt;server name="default"&amp;gt;

      &amp;lt;ldapUrl&amp;gt;ldaps://ldap.univ-rennes1.fr:636&amp;lt;/ldapUrl&amp;gt;
      &amp;lt;bindDn&amp;gt;XX&amp;lt;/bindDn&amp;gt;
      &amp;lt;bindPassword&amp;gt;XX&amp;lt;/bindPassword&amp;gt;
   
      &amp;lt;retries&amp;gt;5&amp;lt;/retries&amp;gt;
    &amp;lt;/server&amp;gt;

  &amp;lt;/extension&amp;gt;

  &amp;lt;extension target="org.nuxeo.ecm.directory.ldap.LDAPDirectoryFactory"
    point="directories"&amp;gt;

    &amp;lt;directory name="ldapUserDirectory"&amp;gt;
      &amp;lt;server&amp;gt;default&amp;lt;/server&amp;gt;
      &amp;lt;schema&amp;gt;user&amp;lt;/schema&amp;gt;
      &amp;lt;idField&amp;gt;username&amp;lt;/idField&amp;gt;
      &amp;lt;passwordField&amp;gt;password&amp;lt;/passwordField&amp;gt;

      &amp;lt;searchBaseDn&amp;gt;ou=people,dc=univ-rennes1,dc=fr&amp;lt;/searchBaseDn&amp;gt;
      &amp;lt;searchClass&amp;gt;person&amp;lt;/searchClass&amp;gt;
      &amp;lt;searchScope&amp;gt;onelevel&amp;lt;/searchScope&amp;gt;
      &amp;lt;substringMatchType&amp;gt;subany&amp;lt;/substringMatchType&amp;gt;
      &amp;lt;readOnly&amp;gt;true&amp;lt;/readOnly&amp;gt;
      &amp;lt;cacheEntryName&amp;gt;ldap-user-entry-cache&amp;lt;/cacheEntryName&amp;gt;
      &amp;lt;cacheEntryWithoutReferencesName&amp;gt;ldap-user-entry-cache-without-references&amp;lt;/cacheEntryWithoutReferencesName&amp;gt;

      &amp;lt;missingIdFieldCase&amp;gt;lower&amp;lt;/missingIdFieldCase&amp;gt;
      &amp;lt;querySizeLimit&amp;gt;200&amp;lt;/querySizeLimit&amp;gt;
      &amp;lt;queryTimeLimit&amp;gt;0&amp;lt;/queryTimeLimit&amp;gt;
      &amp;lt;creationBaseDn&amp;gt;ou=people,dc=example,dc=com&amp;lt;/creationBaseDn&amp;gt;
      &amp;lt;creationClass&amp;gt;top&amp;lt;/creationClass&amp;gt;
      &amp;lt;creationClass&amp;gt;person&amp;lt;/creationClass&amp;gt;
      &amp;lt;creationClass&amp;gt;organizationalPerson&amp;lt;/creationClass&amp;gt;
      &amp;lt;creationClass&amp;gt;inetOrgPerson&amp;lt;/creationClass&amp;gt;

      &amp;lt;rdnAttribute&amp;gt;uid&amp;lt;/rdnAttribute&amp;gt;
      &amp;lt;fieldMapping name="username"&amp;gt;uid&amp;lt;/fieldMapping&amp;gt;
      &amp;lt;fieldMapping name="password"&amp;gt;password&amp;lt;/fieldMapping&amp;gt;
      &amp;lt;fieldMapping name="firstName"&amp;gt;givenName&amp;lt;/fieldMapping&amp;gt;
      &amp;lt;fieldMapping name="lastName"&amp;gt;sn&amp;lt;/fieldMapping&amp;gt;
      &amp;lt;fieldMapping name="company"&amp;gt;supannEtablissement&amp;lt;/fieldMapping&amp;gt;
      &amp;lt;fieldMapping name="email"&amp;gt;mail&amp;lt;/fieldMapping&amp;gt;
      &amp;lt;fieldMapping name="displayName"&amp;gt;displayName&amp;lt;/fieldMapping&amp;gt;

      &amp;lt;references&amp;gt;
        &amp;lt;inverseReference field="groups" directory="multiGroupDirectory"
          dualReferenceField="members" /&amp;gt;
      &amp;lt;/references&amp;gt;

    &amp;lt;/directory&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 08 Feb 2017 16:18:52 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/ldaps-nuxeo-performing-too-many-bind/m-p/321131#M8132</guid>
      <dc:creator>Olivier_Salaün</dc:creator>
      <dc:date>2017-02-08T16:18:52Z</dc:date>
    </item>
    <item>
      <title>Re: LDAPS: Nuxeo performing too many bind</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/ldaps-nuxeo-performing-too-many-bind/m-p/321132#M8133</link>
      <description>&lt;P&gt;Thank you to Pierre Bouvret for providing the solution:
As described &lt;A href="http://docs.oracle.com/javase/jndi/tutorial/ldap/connect/config.html"&gt;in the Java/JNDI documentation&lt;/A&gt;: To allow both plain and SSL connections to be pooled, set the "com.sun.jndi.ldap.connect.pool.protocol" system property to the string "plain ssl". How strange this default JNDI setup...&lt;/P&gt;
&lt;P&gt;I can confirm it fixes our problem; there is now a reasonable amount of LDAPS bind.&lt;/P&gt;</description>
      <pubDate>Thu, 09 Feb 2017 08:52:39 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/ldaps-nuxeo-performing-too-many-bind/m-p/321132#M8133</guid>
      <dc:creator>Olivier_Salaün</dc:creator>
      <dc:date>2017-02-09T08:52:39Z</dc:date>
    </item>
  </channel>
</rss>

