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 Name | com.accenture.aspire:aspire-ldap |
subType | lookup |
Inputs | Any number of parameters inside the Aspire Document. Those parameters are fetched using a simple template. |
Outputs | A configurable tag name with the value "true" if the look up was successful, "false" otherwise. |
Element | Type | Default | Description |
---|---|---|---|
server | string | LDAP server host address. Example: ldap//10.10.44.82:389 | |
protocol | string | LDAP server protocol. | |
contextFactory | string | com.sun.jndi.ldap.LdapCtxFactory | The java class to use as the context factory when connecting. |
authentication | string | anonymous | Authentication type used for any LDAP request. Options are 'none', 'simple' and 'DIGEST-MD5'. |
user | string | N/A | Username used to authenticate against the given LDAP server. If 'none' authentication type was selected, you can ignore this. |
password | string | N/A | Password used to authenticate against the given LDAP server. If 'none' authentication type was selected, you can ignore this. |
searchBase | string | dc=search,dc=local | Base for directory searches. Normally this is the domain of the LDAP server. |
searchQuery | string | (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) | int | 1000 | The page size of the search query (max 1000) |
outputTagName | string | lookupResult; | Specified the name of the tag where the result is placed. Useful if you have multiple lookups in the same pipeline. |
referral | string | follow | LDAP search referral type. |
readTimeout | int | 600000 (=60s) | Read timeout in ms. |
connectTimeout | int | 600000 (=60s) | Connection timeout in ms. |
connectionPool | boolean | true | Indicates if a connection pool to the LDAP server should be used. |
<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>
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>