Platform Explorer / Nuxeo Platform 2021.54

Extension point directories


The directories extension point is used to register LDAP filtering parameters to identify which part of the LDAP branches are actually used by Nuxeo EP to fetch its entries.


    <directory name="userDirectory">
        <fieldMapping name="username">uid</fieldMapping>
        <fieldMapping name="password">userPassword</fieldMapping>
        <fieldMapping name="firstName">givenName</fieldMapping>
        <fieldMapping name="lastName">sn</fieldMapping>
        <fieldMapping name="company">o</fieldMapping>
        <fieldMapping name="email">mail</fieldMapping>
            <inverseReference directory="groupDirectory"
                dualReferenceField="members" field="groups"/>
    <directory name="groupDirectory">
        <!-- Special entry adaptor that makes entries in the ou=editable branch editable
          other entries have the readonly flag. This require adding a "dn" xs:string field
          to the group schema.
        <entryAdaptor class="">
            <parameter name="fieldName">dn</parameter>
            <parameter name="regexp">.*,ou=editable,ou=groups,dc=example,dc=com</parameter>
        <fieldMapping name="groupname">cn</fieldMapping>
            <!-- LDAP reference resolve DNs embedded in uniqueMember attributes

              If the target directory has no specific filtering policy, it is most
              of the time not necessary to enable the 'forceDnConsistencyCheck' policy.

              Enabling this option will fetch each reference entry to ensure its
              existence in the target directory.
            <ldapReference directory="userDirectory"
                dynamicAttributeId="memberURL" field="members"
                staticAttributeId="uniqueMember" staticAttributeIdIsDn="true"/>
            <ldapReference directory="groupDirectory"
                dynamicAttributeId="memberURL" field="subGroups"
                forceDnConsistencyCheck="false" staticAttributeId="uniqueMember"/>
            <inverseReference directory="groupDirectory"
                dualReferenceField="subGroups" field="parentGroups"/>
            <ldapTreeReference directory="groupDirectory"
                field="children" scope="onelevel"/>
            <inverseReference directory="groupDirectory"
                dualReferenceField="children" field="parents"/>

In the previous examples we configured two directories one for the users and one for the groups of users. Each directory uses a single schema which is to be registered as any core document schema and that will be used to build a DocumentModel for each matching entry of the directory.

Nuxeo EP provides group resolution for statically dn-referenced entries (in read and write mode) and for dynamically ldapUrl matched entries (readonly). You may also need to statically reference entries without a dn using the 'staticAttributeIdIsDn' attribute.

The references tags are used to dynamically build nxs:stringList fields of that schema that are to compute membership relationships between users and groups or between parent groups and sub groups. It can also resole children and parents following the ldap tree structure.

You have two ways for declaring a dynamic reference in a 'references' tag. You can use 'dynamicAttributeId' to point to an ldap attribute that contains an ldap url.

    <ldapReference directory="userDirectory"
        dynamicAttributeId="memberURL" field="members"/>

Or, you can use a subtag 'dynamicReference' to declare attributes that contain a DN, a filter and a type. This values will be used to selected the references.

    <ldapReference directory="userDirectory" field="members"/>
    <dynamicReference baseDN="ldapAttribute" filter="ldapAttribute" type="subtree/onelevel"/>

When using dynamic references, caching is advised since dynamic group resolution can be expensive.

The element "idCase" makes it possible to control the case of the identifier on Nuxeo side. It accepts values "upper", "lower" or "unchanged". It is useful when changing case on the LDAP without affecting Nuxeo (for rights management for instance which is case sensitive for instance).

Dependening on your LDAP Backend implementation, if you have some specific restriction (for example on password, or logins ...), you may want Nuxeo to handle the validation errors of your server on the Nuxeo side.

Since there error code and message may vary depending on the LDAP server provider, you may need to provide a custom class that knows how to handle the Exceptions returned by it.

For this you can specify a class that will be in charge of this task.


This class should implement and return a RecoverableClientException for any exception that should be displayed to the user.

By default, referrals will be automatically resolved, if you don't want that behavior (since 5.9.4) you can use the followReferrals tag

    <directory name="groupDirectory">

Contribution Descriptors

  • Class:


No known contributions.