Platform Explorer / Nuxeo Platform 5.6

Contribution org.nuxeo.ecm.directory.ldap.storage.users--directories

This contribution is part of XML component org.nuxeo.ecm.directory.ldap.storage.users inside nuxeo-runtime-5.6.jar /opt/apidoc/nuxeo-cap-5.6-RC1-tomcat/nxserver/config/default-ldap-users-directory-bundle.xml

Extension point

Extension point directories of component LDAPDirectoryFactory.

Contributed items

  • <directory name="userLDAPDirectory">
          <server>default</server>
          <schema>user</schema>
          <idField>username</idField>
          <passwordField>password</passwordField>
    
          <searchBaseDn>ou=People,dc=nuxeo,dc=com</searchBaseDn>
          <searchClass>person</searchClass>
          <!-- To additionally restricte entries you can add an
            arbitrary search filter such as the following:
    
            <searchFilter>(&amp;(sn=toto*)(myCustomAttribute=somevalue))</searchFilter>
    
            Beware that "&" writes "&amp;" in XML.
          -->
    
          <!-- use subtree if the people branch is nested -->
          <searchScope>onelevel</searchScope>
    
          <!-- using 'subany', search will match *toto*. use 'subfinal' to
            match *toto and 'subinitial' to match toto*. subinitial is the
            default  behaviour-->
          <substringMatchType>subany</substringMatchType>
    
          <readOnly>true</readOnly>
    
          <!-- comment <cache* /> tags to disable the cache -->
          <!-- cache timeout in seconds -->
          <cacheTimeout>3600</cacheTimeout>
    
          <!-- maximum number of cached entries before global invalidation -->
          <cacheMaxSize>1000</cacheMaxSize>
    
          <creationBaseDn>ou=people,dc=example,dc=com</creationBaseDn>
          <creationClass>top</creationClass>
          <creationClass>person</creationClass>
          <creationClass>organizationalPerson</creationClass>
          <creationClass>inetOrgPerson</creationClass>
    
          <rdnAttribute>uid</rdnAttribute>
          <fieldMapping name="username">uid</fieldMapping>
          <fieldMapping name="password">********</fieldMapping>
          <fieldMapping name="firstName">givenName</fieldMapping>
          <fieldMapping name="lastName">sn</fieldMapping>
          <fieldMapping name="company">o</fieldMapping>
          <fieldMapping name="email">mail</fieldMapping>
    
          <references>
    
            <inverseReference directory="groupDirectory" dualReferenceField="members" field="groups"/>
    
          </references>
    
        </directory>

XML source

<extension point="directories" target="org.nuxeo.ecm.directory.ldap.LDAPDirectoryFactory">

    <directory name="userLDAPDirectory">
      <server>default</server>
      <schema>user</schema>
      <idField>username</idField>
      <passwordField>password</passwordField>

      <searchBaseDn>ou=People,dc=nuxeo,dc=com</searchBaseDn>
      <searchClass>person</searchClass>
      <!-- To additionally restricte entries you can add an
        arbitrary search filter such as the following:

        <searchFilter>(&amp;(sn=toto*)(myCustomAttribute=somevalue))</searchFilter>

        Beware that "&" writes "&amp;" in XML.
      -->

      <!-- use subtree if the people branch is nested -->
      <searchScope>onelevel</searchScope>

      <!-- using 'subany', search will match *toto*. use 'subfinal' to
        match *toto and 'subinitial' to match toto*. subinitial is the
        default  behaviour-->
      <substringMatchType>subany</substringMatchType>

      <readOnly>true</readOnly>

      <!-- comment <cache* /> tags to disable the cache -->
      <!-- cache timeout in seconds -->
      <cacheTimeout>3600</cacheTimeout>

      <!-- maximum number of cached entries before global invalidation -->
      <cacheMaxSize>1000</cacheMaxSize>

      <creationBaseDn>ou=people,dc=example,dc=com</creationBaseDn>
      <creationClass>top</creationClass>
      <creationClass>person</creationClass>
      <creationClass>organizationalPerson</creationClass>
      <creationClass>inetOrgPerson</creationClass>

      <rdnAttribute>uid</rdnAttribute>
      <fieldMapping name="username">uid</fieldMapping>
      <fieldMapping name="password">********</fieldMapping>
      <fieldMapping name="firstName">givenName</fieldMapping>
      <fieldMapping name="lastName">sn</fieldMapping>
      <fieldMapping name="company">o</fieldMapping>
      <fieldMapping name="email">mail</fieldMapping>

      <references>

        <inverseReference directory="groupDirectory" dualReferenceField="members" field="groups"/>

      </references>

    </directory>

  </extension>