The Aspire LDAP Connection component enables other Aspire components to access LDAP services. The component connects to LDAP and implements the AspireLDAP interface, allowing LDAP queries, look-ups and binds. The component provides no job processing.

Aspire LDAP Connection
Factory Namecom.searchtechnologies.aspire:aspire-ldap
subTypedefault
InputsN/A
OutputsN/A

Configuration

ElementTypeDefaultDescription
serverstring LDAP server host address. Example: ldap//10.10.44.82:389
protocolstring LDAP server protocol.
contextFactorystringcom.sun.jndi.ldap.LdapCtxFactoryThe java class to use as the context factory when connecting.
authenticationstringanonymousAuthentication type used for any LDAP request. Options are 'none', 'simple' and 'DIGEST-MD5'.
userstringN/AUsername used to authenticate against the given LDAP server. If 'none' authentication type was selected, you can ignore this.
passwordstringN/APassword used to authenticate against the given LDAP server. If 'none' authentication type was selected, you can ignore this.
readTimeoutint600000
(=60s)
Read timeout in ms. The period may be entered in milliseconds, or with the suffix ms, s, m, h, d to indicate the units
connectTimeoutint600000
(=60s)
Connection timeout in ms. The period may be entered in milliseconds, or with the suffix ms, s, m, h, d to indicate the units
connectionPoolbooleantrueIndicates if a connection pool to the LDAP server should be used.
referralstringignoreLDAP search referral type.
maxRetrieslong1The number of retries attempted, should an error occur, for an LDAP request before an Exception is thrown
retryDelaylong0The delay following an error before a retry is attempted. The period may be entered in milliseconds, or with the suffix ms, s, m, h, d to indicate the units
pageSizeint1000The page size of the search query (max 1000). If there are less results for a search than the page size, a single page will be returned. If there are more, the results will be returned in pages. This will be transparent to the client
binaryAttributeStringobjectSidThe name of an attribute that should be handled as bytes rather than a string

Example Configurations

Simple

  <component name="LDAPConnection" subType="default" factoryName="aspire-ldap" enable="${enableLdapConnector}">
    <debug>false</debug>
    <server>ldap://ldapserver:389</server>
     <authentication>simple</authentication>
    <user>contoso\user</user>
    <password>XXXXX</password>
    <readTimeout>15s</readTimeout>
    <pageSize>100</pageSize>
    <retries>3</retries>
    <retryDelay>5s</retryDelay>
  </component>

Accessing LDAP Cnnection from a Groovy component

If you may want to perform LDAP operations from Groovy components, you can use its public interface AspireLDAP to perform other operations.

For example, if you had installed an LDAP Connection component using the example configuration above, you could access if from a Groovy component as shown below:

  <component name="GroovyTest" subType="default" factoryName="aspire-groovy">
    <variable name="ldap" component="LDAPConnection"/>
      <script>
        println(ldap.lookup("cn=userXX,ou=people,dc=contoso,dc=com"));
      </script>
  </component>
  • No labels