The Aspire LDAP Lookup stage performs a search against the configured LDAP server, returns success if at least one result is found on the directory.

LDAP Lookup
Factory Namecom.accenture.aspire:aspire-ldap
subType

lookup

InputsAny number of parameters inside the Aspire Document. Those parameters are fetched using a simple template.
OutputsA configurable tag name with the value "true" if the look up was successful, "false" otherwise.

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.
searchBasestringdc=search,dc=localBase for directory searches. Normally this is the domain of the LDAP server.
searchQuerystring(samaccountname={TAG:username})Search filter template. May be changed to fit costumer LDAP settings, for example, if the user ID is in a different attribute. '
pageSize  (2.0.3 Release)  int1000The page size of the search query (max 1000)
outputTagNamestringlookupResult;Specified the name of the tag where the result is placed. Useful if you have multiple lookups in the same pipeline.
referralstringfollowLDAP search referral type.
readTimeoutint600000
(=60s)
Read timeout in ms.
connectTimeoutint600000
(=60s)
Connection timeout in ms.
connectionPoolbooleantrueIndicates if a connection pool to the LDAP server should be used.

Example Configurations

Simple

<component name="LdapLookup" subType="lookup" factoryName="aspire-ldap">
  <host>ldap://ldapserver:389</host>
  <authentication>simple</authentication>
  <adminUser>contoso\user</adminUser>
  <adminPassword>XXXXX</adminPassword>
  <searchBase>dc=contoso, dc=com</searchBase>
  <pageSize>1000</pageSize>
  <searchQuery>(samaccountname={TAG:username})</searchQuery>
  <outputTagName>lookupResult</outputTagName>
</component>

Accessing LDAP Lookup connection from a Groovy component

Under certain circumstances you may want to reuse the LDAP Lookup connection. For example if you want to perform updates to the LDAP server or different queries without having to configure another component. You can use LDAP Lookup from another component, by using its public interface AspireLDAP to perform other operations.

<component name="LdapLookup" subType="lookup" factoryName="aspire-ldap">
  <host>ldap://ldapserver:389</host>
  <authentication>simple</authentication>
  <adminUser>contoso\user</adminUser>
  <adminPassword>XXXXX</adminPassword>
  <searchBase>dc=contoso, dc=com</searchBase>
  <pageSize>1000</pageSize>
  <searchQuery>(samaccountname={TAG:username})</searchQuery>
  <outputTagName>lookupResult</outputTagName>
</component>

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