# mulesoft LDAP Connector - Full Documentation --- product: LDAP Connector version: 3.6 --- # LDAP Connector 3.6 > For the full documentation index, see: https://docs.mulesoft.com/llms.txt Anypoint Connector for Lightweight Directory Access Protocol (LDAP) is a public standard that facilitates maintenance and access to distributed directories (such as network user privilege information) over an Internet Protocol (IP) network. LDAP Connector supports both LDAP over SSL and LDAP over TLS. Many LDAP servers are included in free-use open source projects and packages. The particulars of installing, running, and configuring LDAP servers fall outside the scope of this document. For information about compatibility and fixed issues, see the LDAP Connector Release Notes. ## Before You Begin To use this connector, you must be familiar with: - The LDAP Connector’s API - Anypoint Connectors - Mule runtime engine (Mule) - Elements and global elements in a Mule flow - How to create a Mule app using Anypoint Studio Before creating an app, you must have: - Credentials to access an OpenLDAP instance that supports LDAP v3 - Anypoint Platform - Anypoint Studio version 7.0 or later ## Common Use Cases For the Connector Common use cases for LDAP Connector include: - Adding user accounts to Active Directory You can add business users to Active Directory groups defined on the base distinguished name (DN). - Retrieving user attributes You can retrieve the basic attributes of a business user such as a user’s e-mail or phone number. ## Connection Types LDAP connector supports three types of connections: - Basic Communications are not encrypted. **Note:** If running in an instance configured with mule.security.model=fips140-2, attempting to use a Basic connection will result in an LDAP:SECURITY error. - SSL Communications are encrypted using Secure Sockets Layer (SSL). - TLS Communications are encrypted using Transport Layer Security (TLS). You can use Basic (username and password) authentication for each of these connection types. For more information about configuring connection types and authentication, see [Using Studio to Configure LDAP Connector](https://docs.mulesoft.com/ldap-connector/3.6/ldap-connector-use-studio). ## See Also - [Introduction to Anypoint Connectors](https://docs.mulesoft.com/connectors/introduction/introduction-to-anypoint-connectors) - [Use Exchange to Discover Connectors, Templates, and Examples](https://docs.mulesoft.com/connectors/introduction/intro-use-exchange) - [LDAP Connector Reference](https://docs.mulesoft.com/ldap-connector/3.6/ldap-connector-reference) - [Salesforce Help](https://help.salesforce.com) --- product: LDAP Connector version: 3.6 --- # LDAP Connector 3.6 - XML and Maven Support > For the full documentation index, see: https://docs.mulesoft.com/llms.txt Although you can manually code a Mule app in XML, it is more efficient to use Anypoint Studio: - If you manually code a Mule runtime engine (Mule) app in XML (either from the Anypoint Studio XML editor or from a text editor), you can access the connector from your app by adding reference statements to both your XML Mule flow and the Apache Maven `pom.xml` file. - If you add the connector in Studio, Studio automatically populates the XML code with the connector’s namespace and schema location and adds a dependency to the `pom.xml` file. ## Add a Namespace for the Connector Paste the following code inside the `mule` tag of the header of your configuration XML: ```xml http://www.mulesoft.org/schema/mule/ldap http://www.mulesoft.org/schema/mule/ldap/current/mule-ldap.xsd ``` This example shows how the namespace statements are placed in the XML: ```xml ``` ## Add a POM File Dependency The Apache Maven `pom.xml` file generated by Anypoint Studio contains dependencies for a Mule app. When you code a Mule app manually, include this XML snippet in your `pom.xml` file to enable access to this connector: ```xml com.mulesoft.connectors mule-ldap-connector x.x.x mule-plugin ``` Replace `` with the version that corresponds to the connector you are using. To obtain the most up-to-date `pom.xml` file information: 1. Go to [Anypoint Exchange](https://www.mulesoft.com/exchange/). 2. In Exchange, click **Login** and supply your Anypoint Platform username and password. 3. In Exchange, search for `ldap`. 4. Select the connector. 5. Click **Dependency Snippets** near the upper right of the screen. ## Next Step After completing your namespace and `pom.xml` file, you can try the [Examples](https://docs.mulesoft.com/ldap-connector/3.6/ldap-connector-examples). ## See Also - [Introduction to Anypoint Connectors](https://docs.mulesoft.com/connectors/introduction/introduction-to-anypoint-connectors) - [Salesforce Help](https://help.salesforce.com) --- product: LDAP Connector version: 3.6 --- # LDAP Connector 3.6 Examples > For the full documentation index, see: https://docs.mulesoft.com/llms.txt The following examples show how to use Anypoint Connector for Lightweight Directory Access Protocol Connector (LDAP Connector) to: - Add a group and user to an organizational unit and then delete that user and group - Set up a common truststore ## Add and Delete Groups and Users from an Organizational Unit This example shows how to use the LDAP **Add entry** operation to add a group and user to an organizational unit and the **Delete entry** operation to delete a user and group from that organizational unit. The following screenshot shows the Studio app flow for this example: ![Flow for adding and deleting users](/mulesoft/current/en-us/ldap-connector/3.6/_images/ldap-usecase-flow.png) ### Add a Group and User to an Organizational Unit To add a group and user to an organizational unit: 1. Create a new Mule Project in Anypoint Studio. 2. Add these properties to the `mule-artifact.properties` file: ```text config.principal.dn= config.password= config.url= ``` 3. Place the `mule-artifact.properties` file into the project’s `src/main/resources` directory. 4. From the **Mule Palette** view, click **HTTP** and drag the **Listener** source to the canvas. 5. In the Listener properties window, change the display name of the **Listener** source to `HTTP`. 6. Click **+** next to the **Connector configuration** field to add a global element. 7. Accept the defaults. 8. In the Listener properties window, set the **Path** field value to `/`. 9. From the **Mule Palette** view, select **Core** and drag the **Transform Message** component next to **HTTP**. 10. In the **Output** section, replace the existing text with the following DataWeave script: ```java %dw 2.0 output application/java --- { dn : "ou=DevOpsGroup," ++ attributes.queryParams.dn, ou : "DevOpsGroup", objectclass : ["top", "organizationalUnit"] } ``` 11. From the **Mule Palette** view, select **LDAP** and drag the **Add entry** operation next to the **Transform Message** component to start adding an LDAP group. 12. Click **+** next to the connector configuration field to add a new global element. 13. Configure the global element as follows:
ParameterDescriptionValue

Name

Name of the configuration

LDAP_Configuration

Principal DN

User distinguished name (DN)

${config.principal.dn}

Password

User password

${config.password}

URL

URL that connects to the LDAP server

${config.url}

14. Click **Test Connection** to confirm that Mule can connect to the LDAP server instance. 15. Process the connection results as follows: - If the connection succeeds, click **OK** to save the configuration. - If the connection fails, review and correct any incorrect field values and test again. 16. Return to the LDAP Connector properties window and configure the parameters required for the **Add entry** operation:
ParameterValue

Display Name

Add Group Entry to LDAP Directory

Basic Settings

Connector configuration

LDAP Connector global element that you created previously

General

Entry

payload (the default value)

17. From the **Mule Palette** view, select **Core** and drag the **Transform Message** component next to **Add Group Entry to the LDAP directory**. 18. In the **Output** section, replace the existing text with the following DataWeave script: ```java %dw 2.0 output application/java --- { dn : "cn=Test User,ou=DevOpsGroup," ++ attributes.queryParams.dn, uid : "testUser", cn : "Test User", sn : "User", userPassword : "test1234", objectclass : ["top", "person", "organizationalPerson", "inetOrgPerson"] } ``` 19. From the **Mule Palette** view, select **LDAP** and drag the **Add entry** operation next to **Transform Message** to start adding an LDAP user. 20. In the LDAP Connector properties editor, configure the parameters as follows:
ParameterValue

Display Name

Add User Entry to LDAP Directory

Basic Settings

Connector configuration

LDAP Connector global element that you created previously

General

Entry

payload (the default value)

### Delete a Group and User from an Organizational Unit After you successfully add a group and user to an organizational unit, delete them using LDAP Connector: 1. From the **Mule Palette** view, select **LDAP** and drag the **Delete entry** operation next to the **Add User Entry to LDAP Directory** on the canvas. 2. In the LDAP Connector properties editor, configure the parameters as follows:
ParameterValue

Display Name

Delete User Entry from LDAP Directory

Basic Settings

Connector configuration

LDAP Connector global element that you created previously

General

DN

#['cn=Test User,ou=DevOpsGroup,' ++ attributes.queryParams.dn]

3. Drag another **Delete entry** operation next to the first one to start deleting the LDAP group entry.
ParameterValue

Display Name

Delete Group Entry from LDAP Directory

Basic Settings

Connector configuration

LDAP Connector global element that you created previously

General

DN

#['ou=DevOpsGroup,' ++ attributes.queryParams.dn]

4. Drag the **Transform Message** component next to **Delete Group Entry from LDAP Directory**. 5. Set the payload to "Flow Successfully Completed". ### Test the App To test the app: 1. Save the project. 2. Run the project as a Mule app. 3. Send a PUT command to this URL: `http://localhost:8081/?dn=mulesoft,dc=orgrequest` ### XML for the Example Paste this code into the Studio XML editor to quickly load the flow for this example into your Mule app: ```xml ``` ## Set Up a Common Truststore This example shows how to change the previous example so that it has a TLS configuration that uses a custom truststore. > [!NOTE] The custom truststore feature is not FIPS compliant. To set up a custom truststore: 1. Follow the steps in the previous example. 2. Add these properties to the `mule-artifact.properties` file to hold your LDAP credentials: ```text config.principal.dn= config.password= config.url= ``` 3. Place the `mule-artifact.properties` file into the project’s `src/main/resources` directory. 4. Locate the following element in the XML code: ```xml ``` ### Test the App To test the app: 1. Save the project. 2. Run the project as a Mule app. 3. Send a PUT command to this URL: `http://localhost:8081/?dn=mulesoft,dc=orgrequest` ## See Also - [Salesforce Help](https://help.salesforce.com) --- product: LDAP Connector version: 3.6 --- # LDAP Connector 3.6 Reference > For the full documentation index, see: https://docs.mulesoft.com/llms.txt Anypoint Connector for Lightweight Directory Access Protocol (LDAP) enables you to interface with LDAP servers. ## Default Configuration ### Parameters
NameTypeDescriptionDefault ValueRequired

Name

String

The name for this configuration. Connectors reference the configuration with this name.

x

Connection

  • Basic Configuration

  • SSL Configuration

  • TLS Configuration

The connection types to provide to this configuration.

x

Expiration Policy

ExpirationPolicy

Configures the minimum amount of time that a dynamic configuration instance can remain idle before Mule considers it eligible for expiration. This does not mean that the instance expires at the exact moment that it becomes eligible. Mule purges the instances as appropriate.

Show attributes as Objects

boolean

If set to true, the queries display the entity attributes as objects, containing the definition type, a flag to indicate wether or not the attribute is multi-value, and the value of the attribute. If set to false, the queries only display the attribute values.

false

## Basic Configuration Type For the Basic Configuration Type connection, the communications are not encrypted. If LDAP Connector runs in an instance configured with `mule.security.model=fips140-2`, attempting to use a Basic Configuration Type connection returns the `LDAP:SECURITY` error. ### Parameters
NameTypeDescriptionDefault ValueRequired

Principal DN

String

The DN (distinguished name) of the user.

x

Password

String

The password of the user.

Authentication

String

Specifies the authentication mechanism to use. Valid values are:

  • simple - Authenticates using the user DN and password

  • none - Does not authenticate

simple

URL

String

The connection URL to the LDAP server.

You can configure URL to specify multiple LDAP hosts, for example, ldap://ldap1.example.com ldap2.example.com/ou=intern-users,dc=acc,o=myorg.

x

Reconnection

Reconnection

When the application is deployed, a connectivity test is performed on all connectors. If set to true, deployment fails if the test doesn’t pass after exhausting the associated reconnection strategy.

Type

Enumeration, one of:

** JNDI

The implementation of the connection to use.

JNDI

Schema Enabled

Boolean

If set to true, the LDAP connector uses the LDAP schema (only works for LDAP v3) to define the structure of the LDAP entry or map. This must be 'true' to use DataSense because it affects the implementing class of org.mule.module.ldap.api.LDAPEntry attributes.

false

Referral

Enumeration, one of:

  • IGNORE

  • THROW

  • FOLLOW

Constant that holds the name of the environment property for specifying how referrals encountered by the service provider are to be processed (follow, ignore, throw).

IGNORE

Extended Configuration

Object

This is a Map instance holding extended configuration attributes to use in the Context environment. When working with TLS connections make sure that the native LDAP pooling functionality is turned off. For example, if using JNDI, do not use attributes such as com.sun.jndi.ldap.connect.pool=true, which causes problems when using TLS.

Initial Pool Size

Number

The string representation of an integer that represents the number of connections per connection identity to create when initially creating a connection for the identity. To disable pooling, just set this value to 0 (zero).

1

Max Pool Size

Number

The string representation of an integer that represents the maximum number of connections per connection identity that can be maintained concurrently.

5

Pool Timeout

Number

The string representation of an integer that represents the number of milliseconds that an idle connection may remain in the pool without being closed and removed from the pool.

60000

> [!NOTE] To see more logs related to connection pools, use > `com.sun.jndi.ldap.connect.pool.debug=all`. ## SSL Configuration Type ### Parameters
NameTypeDescriptionDefault ValueRequired

Principal DN

String

The DN (distinguished name) of the user.

x

Password

String

The password of the user.

Authentication

String

Specifies the authentication mechanism to use. Valid values are:

  • simple - Authenticates using the user DN and password

  • none - Does not authenticate

simple

URL

String

The connection URL to the LDAP server.

You can configure URL to specify multiple LDAP hosts, for example, ldap://ldap1.example.com ldap2.example.com/ou=intern-users,dc=acc,o=myorg.

x

Reconnection

When the application is deployed, a connectivity test is performed on all connectors. If set to true, deployment will fail if the test doesn’t pass after exhausting the associated reconnection strategy.

Type

Enumeration, one of:

  • JNDI

The implementation of the connection to use.

JNDI

Schema Enabled

Boolean

If set to true, the LDAP connector will use the LDAP schema (works only for LDAP v3) to define the structure of the LDAP entry or map. This parameter must be set to true to use DataSense, as it affects the implementing class of org.mule.module.ldap.api.LDAPEntry attributes.

false

Referral

Enumeration, one of:

  • IGNORE

  • THROW

  • FOLLOW

A constant that consists of the name of the environment property to specify how referrals encountered by the service provider must be processed (FOLLOW, IGNORE, THROW).

IGNORE

Extended Configuration

Object

A map instance that consists of extended configuration attributes used in the context environment. When working with TLS connections, ensure that the native LDAP pooling functionality is turned off. For example, if using JNDI, do not use attributes such as com.sun.jndi.ldap.connect.pool=true, as it will cause problems when using TLS.

Custom TrustStore Path

String

Path to the truststore that contains the certificates for secure authentication. To be FIPS 140-2 compliant, the keystore, truststore, and any custom truststore paths you are using, must be in PKCS#12 format.

Custom TrustStore Password

String

Password for the custom truststore.

## TLS Configuration Type ### Parameters
NameTypeDescriptionDefault ValueRequired

Principal DN

String

The DN (distinguished name) of the user.

x

Password

String

The password of the user.

Authentication

String

Specifies the authentication mechanism to use. Valid values are:

  • simple - Authenticates using the user DN and password

  • none - Does not authenticate

simple

URL

String

The connection URL to the LDAP server.

You can configure URL to specify multiple LDAP hosts, for example, ldap://ldap1.example.com ldap2.example.com/ou=intern-users,dc=acc,o=myorg.

x

Reconnection

Reconnection

When the application is deployed, a connectivity test is performed on all connectors. If set to true, deployment fails if the test doesn’t pass after exhausting the associated reconnection strategy.

Type

Enumeration, one of:

  • JNDI

The implementation of the connection to use.

JNDI

Schema Enabled

Boolean

If set to true, the LDAP connector uses the LDAP schema (only works for LDAP v3) to define the structure of the LDAP entry (or map). This needs to be 'true' to use DataSense as it affects the implementing class of org.mule.module.ldap.api.LDAPEntry attributes.

false

Referral

Enumeration, one of:

  • IGNORE

  • THROW

  • FOLLOW

Constant that holds the name of the environment property for specifying how referrals encountered by the service provider are to be processed (follow, ignore, throw).

IGNORE

Extended Configuration

Object

This is a Map instance holding extended configuration attributes to use in the Context environment. When working with TLS connections, you need to ensure that the native LDAP pooling functionality is turned off. For example if using JNDI, do not use attributes such as com.sun.jndi.ldap.connect.pool=true, which causes problems when using TLS.

Custom TrustStore Path

String

Path to the truststore that contains the certificates needed for secure authentication. The custom truststore feature is not FIPS-compliant.

Custom TrustStore Password

String

Password for the custom truststore.

## Supported Operations - [Add Entry](#add) - [Add Multi Value Attribute](#addMultiValueAttribute) - [Add Single Value Attribute](#addSingleValueAttribute) - [Bind](#bind) - [Delete Entry](#delete) - [Delete Multi Value Attribute](#deleteMultiValueAttribute) - [Delete Single Value Attribute](#deleteSingleValueAttribute) - [Exists](#exists) - [LDAPEntry To LDIF](#ldapEntryToLdif) - [Lookup](#lookup) - [Modify Entry](#modify) - [Modify Multi Value Attribute](#modifyMultiValueAttribute) - [Modify Single Value Attribute](#modifySingleValueAttribute) - [Paged Result Search](#pagedResultSearch) - [Rename entry](#rename) - [Search](#ldapsearch) - [Search One](#searchOne) - [Unbind](#unbind) ## Operations ## Add Entry `` Creates a new LDAPEntry in the LDAP server. The entry should contain the distinguished name (DN), the objectClass attributes that define its structure and at least a value for all the required attributes. Required attributes depend on the object classes assigned to the entry. Refer to RFC 4519 for standard object classes and attributes. ### Parameters
NameTypeDescriptionDefault ValueRequired

Configuration

String

The name of the configuration to use.

x

Entry

Object

The LDAPEntry that should be added.

#[payload]

Structural Object Class

String

The type of entry to add. If the entry doesn’t have the objectClass attribute set, then this one is used to retrieve the whole objectClass hierarchy. If performance is a requirement, don’t rely on this functionality, as several calls to the LDAP server are done to traverse the object class hierarchy.

Reconnection Strategy

  • reconnect

  • reconnect-forever

A retry strategy in case of connectivity errors.

### For Configurations - config ### Throws - LDAP:COMMUNICATION - LDAP:CONNECTIVITY - LDAP:SECURITY - LDAP:CONTEXT\_NOT\_EMPTY - LDAP:INVALID\_ATTRIBUTE - LDAP:INVALID\_ENTRY - LDAP:NAME\_ALREADY\_BOUND - LDAP:NAME\_NOT\_FOUND - LDAP:OPERATION\_NOT\_SUPPORTED - LDAP:OPERATION\_NOT\_COMPLETED - LDAP:PERMISSION - LDAP:RETRY\_EXHAUSTED - LDAP:UNKNOWN ## Add Multi Value Attribute `` Adds all the values for an attribute in an existing LDAP entry. If the entry already contains a value (or values) for an attributeName, then these values are added. The attribute should allow multiple values, or an exception is raised. ### Parameters
NameTypeDescriptionDefault ValueRequired

Configuration

String

The name of the configuration to use.

x

DN

String

The DN of the LDAP entry to modify.

x

Attribute Name

String

The name of the attribute to add values to.

x

Attribute Values

Array of Any

The values for the attribute.

#[payload]

Ignore Invalid Attribute

Boolean

If the attribute value to add is already present, then don’t throw the INVALID_ATTRIBUTE error.

false

Reconnection Strategy

  • reconnect

  • reconnect-forever

A retry strategy in case of connectivity errors.

### For Configurations - config ### Throws - LDAP:COMMUNICATION - LDAP:CONNECTIVITY - LDAP:SECURITY - LDAP:CONTEXT\_NOT\_EMPTY - LDAP:INVALID\_ATTRIBUTE - LDAP:INVALID\_ENTRY - LDAP:NAME\_ALREADY\_BOUND - LDAP:NAME\_NOT\_FOUND - LDAP:OPERATION\_NOT\_SUPPORTED - LDAP:OPERATION\_NOT\_COMPLETED - LDAP:PERMISSION - LDAP:RETRY\_EXHAUSTED - LDAP:UNKNOWN ## Add Single Value Attribute `` Adds a value for an attribute in an existing LDAP entry. If the entry already contains a value for the given attributeName, then this value is added (only if the attribute is multi value and the entry didn’t have the value already). If you want to add a value with a type different than String, then you can use the add-multi-value-attribute operation and define a single element list with the value. ### Parameters
NameTypeDescriptionDefault ValueRequired

Configuration

String

The name of the configuration to use.

x

DN

String

The DN of the LDAP entry to modify.

x

Attribute Name

String

The name of the attribute to add a value to.

x

Attribute Value

String

The value for the attribute.

x

Ignore Invalid Attribute

Boolean

If the attribute value to add is already present, then don’t throw InvalidAttributeException.

false

Reconnection Strategy

  • reconnect

  • reconnect-forever

A retry strategy in case of connectivity errors.

### For Configurations - config ### Throws - LDAP:COMMUNICATION - LDAP:CONNECTIVITY - LDAP:SECURITY - LDAP:CONTEXT\_NOT\_EMPTY - LDAP:INVALID\_ATTRIBUTE - LDAP:INVALID\_ENTRY - LDAP:NAME\_ALREADY\_BOUND - LDAP:NAME\_NOT\_FOUND - LDAP:OPERATION\_NOT\_SUPPORTED - LDAP:OPERATION\_NOT\_COMPLETED - LDAP:PERMISSION - LDAP:RETRY\_EXHAUSTED - LDAP:UNKNOWN ## Bind `` Performs an LDAP bind (login) operation. After login there will be an LDAP connection pool ready to use for other operations using the authenticated user. If no values are provided to override authDn and authPassword then using this operation will just re-bind (re-authenticate) the user/password defined in the config element. If new values are provided for authDn and authPassword, then authentication will be performed. Re-authenticating and returning the LDAP entry using config level credentials (authDn & authPassword). ### Parameters
NameTypeDescriptionDefault ValueRequired

Configuration

String

The name of the configuration to use.

x

Principal DN

String

The Principal DN of the user.

Password

String

The Password for Principal DN.

Authentication

String

Specifies the authentication mechanism to use. Valid values are:

  • simple - Authenticates using the user DN and password

  • none - Does not authenticate

simple

Target Variable

String

The name of a variable in which the operation’s output is placed

Target Value

String

An expression to evaluate against the operation’s output and the outcome of that expression stored in the target variable.

#[payload]

Reconnection Strategy

  • reconnect

  • reconnect-forever

A retry strategy in case of connectivity errors.

### Output

Type

Object

### For Configurations - config ### Throws - LDAP:COMMUNICATION - LDAP:CONNECTIVITY - LDAP:SECURITY - LDAP:CONTEXT\_NOT\_EMPTY - LDAP:INVALID\_ATTRIBUTE - LDAP:INVALID\_ENTRY - LDAP:NAME\_ALREADY\_BOUND - LDAP:NAME\_NOT\_FOUND - LDAP:OPERATION\_NOT\_SUPPORTED - LDAP:OPERATION\_NOT\_COMPLETED - LDAP:PERMISSION - LDAP:RETRY\_EXHAUSTED - LDAP:UNKNOWN ## Delete Entry `` Deletes the LDAP entry represented by the provided distinguished name (DN). The entry should not have child entries, in which case a CONTEXT\_NOT\_EMPTY error is thrown. This operation is idempotent. The operations succeeds even if the terminal atomic name is not bound in the target context, but throws NAME\_NOT\_FOUND error if any of the intermediate contexts do not exist. ### Parameters
NameTypeDescriptionDefault ValueRequired

Configuration

String

The name of the configuration to use.

x

DN

String

The DN of the LDAP entry to delete.

x

Reconnection Strategy

  • reconnect

  • reconnect-forever

A retry strategy in case of connectivity errors.

### For Configurations - config ### Throws - LDAP:COMMUNICATION - LDAP:CONNECTIVITY - LDAP:SECURITY - LDAP:CONTEXT\_NOT\_EMPTY - LDAP:INVALID\_ATTRIBUTE - LDAP:INVALID\_ENTRY - LDAP:NAME\_ALREADY\_BOUND - LDAP:NAME\_NOT\_FOUND - LDAP:OPERATION\_NOT\_SUPPORTED - LDAP:OPERATION\_NOT\_COMPLETED - LDAP:PERMISSION - LDAP:RETRY\_EXHAUSTED - LDAP:UNKNOWN ## Delete Multi Value Attribute `` Deletes all the values matching attributeValues of the attribute defined by attributeName. Values that are not present in the entry are ignored. If no values are specified, then the whole attribute is deleted from the entry. ### Parameters
NameTypeDescriptionDefault ValueRequired

Configuration

String

The name of the configuration to use.

x

DN

String

The DN of the LDAP entry to modify.

x

Attribute Name

String

The name of the attribute to delete its values.

x

Attribute Values

Array of Any

The values that should be deleted.

#[payload]

Ignore Invalid Attribute

Boolean

If the attribute or value to delete is not present, then don’t throw the INVALID_ATTRIBUTE error.

false

Reconnection Strategy

  • reconnect

  • reconnect-forever

A retry strategy in case of connectivity errors.

### For Configurations - config ### Throws - LDAP:COMMUNICATION - LDAP:CONNECTIVITY - LDAP:SECURITY - LDAP:CONTEXT\_NOT\_EMPTY - LDAP:INVALID\_ATTRIBUTE - LDAP:INVALID\_ENTRY - LDAP:NAME\_ALREADY\_BOUND - LDAP:NAME\_NOT\_FOUND - LDAP:OPERATION\_NOT\_SUPPORTED - LDAP:OPERATION\_NOT\_COMPLETED - LDAP:PERMISSION - LDAP:RETRY\_EXHAUSTED - LDAP:UNKNOWN ## Delete Single Value Attribute `` Deletes the value matching attributeValue of the attribute defined by attributeName. If the entry didn’t have the value, then the entry stays the same. If no value is specified, then the whole attribute is deleted from the entry. If you want to delete a value with a type different than String, then you can use the delete-multi-value-attribute operation and define a single element list with the value. ### Parameters
NameTypeDescriptionDefault ValueRequired

Configuration

String

The name of the configuration to use.

x

DN

String

The DN of the LDAP entry to modify.

x

Attribute Name

String

The name of the attribute to delete its value.

x

Attribute Value

String

The value that should be deleted.

Ignore Invalid Attribute

Boolean

If the attribute or value to delete is not present, then don’t throw the INVALID_ATTRIBUTE error.

false

Reconnection Strategy

  • reconnect

  • reconnect-forever

A retry strategy in case of connectivity errors.

### For Configurations - config ### Throws - LDAP:COMMUNICATION - LDAP:CONNECTIVITY - LDAP:SECURITY - LDAP:CONTEXT\_NOT\_EMPTY - LDAP:INVALID\_ATTRIBUTE - LDAP:INVALID\_ENTRY - LDAP:NAME\_ALREADY\_BOUND - LDAP:NAME\_NOT\_FOUND - LDAP:OPERATION\_NOT\_SUPPORTED - LDAP:OPERATION\_NOT\_COMPLETED - LDAP:PERMISSION - LDAP:RETRY\_EXHAUSTED - LDAP:UNKNOWN ## Exists `` Checks whether an LDAP entry exists in the LDAP server or not. ### Parameters
NameTypeDescriptionDefault ValueRequired

Configuration

String

The name of the configuration to use.

x

DN

String

The DN of the LDAP entry to retrieve.

x

Target Variable

String

The name of a variable in which the operation’s output is placed.

Target Value

String

An expression to evaluate against the operation’s output and the outcome of that expression stored in the target variable.

#[payload]

Reconnection Strategy

  • reconnect

  • reconnect-forever

A retry strategy in case of connectivity errors.

### Output

Type

Boolean

### For Configurations - config ### Throws - LDAP:COMMUNICATION - LDAP:CONNECTIVITY - LDAP:SECURITY - LDAP:CONTEXT\_NOT\_EMPTY - LDAP:INVALID\_ATTRIBUTE - LDAP:INVALID\_ENTRY - LDAP:NAME\_ALREADY\_BOUND - LDAP:NAME\_NOT\_FOUND - LDAP:OPERATION\_NOT\_SUPPORTED - LDAP:OPERATION\_NOT\_COMPLETED - LDAP:PERMISSION - LDAP:RETRY\_EXHAUSTED - LDAP:UNKNOWN ## LDAPEntry To LDIF `` Transforms an LDAPEntry to a String in LDIF representation (RFC 2849). ### Parameters
NameTypeDescriptionDefault ValueRequired

Configuration

String

The name of the configuration to use.

x

Entry

Object

The LDAPEntry to transform to LDIF.

#[payload]

Target Variable

String

The name of a variable in which the operation’s output is placed.

Target Value

String

An expression to evaluate against the operation’s output and the outcome of that expression stored in the target variable.

#[payload]

Reconnection Strategy

  • reconnect

  • reconnect-forever

A retry strategy in case of connectivity errors.

### Output

Type

String

### For Configurations - config ### Throws - LDAP:COMMUNICATION - LDAP:CONNECTIVITY - LDAP:SECURITY - LDAP:CONTEXT\_NOT\_EMPTY - LDAP:INVALID\_ATTRIBUTE - LDAP:INVALID\_ENTRY - LDAP:NAME\_ALREADY\_BOUND - LDAP:NAME\_NOT\_FOUND - LDAP:OPERATION\_NOT\_SUPPORTED - LDAP:OPERATION\_NOT\_COMPLETED - LDAP:PERMISSION - LDAP:RETRY\_EXHAUSTED - LDAP:UNKNOWN ## Lookup `` Retrieves an entry from the LDAP server based on its distinguished name (DN). Distinguished Names are the unique identifiers of an LDAP entry, so this method performs a search based on this ID and returns a single entry as the result, or throws an exception if the DN is invalid or doesn’t exist. When you know the DN of the object you want to retrieve, use this operation: `#searchOne(LDAPConfiguration, LDAPConnectionWrapper, String, String, List, SearchScope, int, long, boolean, String)` ### Parameters
NameTypeDescriptionDefault ValueRequired

Configuration

String

The name of the configuration to use.

x

DN

String

The DN of the LDAP entry to retrieve.

x

Attributes

Array of String

A list of the attributes to return in the result. If the attributes list is empty or null, then by default all LDAP entry attributes are returned.

Structural Object Class

String

The type of entry to return. This is used for DataSense in Anypoint Studio IDE and has no impact on Mule.

Target Variable

String

The name of a variable in which the operation’s output is placed.

Target Value

String

An expression to evaluate against the operation’s output and the outcome of that expression stored in the target variable.

#[payload]

Reconnection Strategy

  • reconnect

  • reconnect-forever

A retry strategy in case of connectivity errors.

### Output

Type

Object

### For Configurations - config ### Throws - LDAP:COMMUNICATION - LDAP:CONNECTIVITY - LDAP:SECURITY - LDAP:CONTEXT\_NOT\_EMPTY - LDAP:INVALID\_ATTRIBUTE - LDAP:INVALID\_ENTRY - LDAP:NAME\_ALREADY\_BOUND - LDAP:NAME\_NOT\_FOUND - LDAP:OPERATION\_NOT\_SUPPORTED - LDAP:OPERATION\_NOT\_COMPLETED - LDAP:PERMISSION - LDAP:RETRY\_EXHAUSTED - LDAP:UNKNOWN ## Modify Entry `` Updates an existing LDAPEntry in the LDAP server. The entry should contain an existing distinguished name (DN), and at least a value for all the required attributes. Required attributes depend on the object classes assigned to the entry. You can refer to RFC 4519 for standard object classes and attributes. When updating an LDAP entry, only the attributes in the entry passed as parameters are updated or added. If you need to delete an attribute, you should use the delete attribute operation. Example: Updating one attribute and adding another. Original LDAP server entry: ```text dn: cn=entry,ou=group,dc=company,dc=org cn: entry attr1: Value1 attr2: Value2 multi1: Value3 multi1: Value4 objectclass: top objectclass: myentry ``` Entry map passed as a parameter: ```text dn: cn=entry,ou=group,dc=company,dc=org attr1: NewValue attr3: NewAttributeValue ` ``` Resulting LDAP server entry: ```text dn: cn=entry,ou=group,dc=company,dc=org cn: entry attr1: NewValue attr2: Value2 multi1: Value3 multi1: Value4 attr3: NewAttributeValue objectclass: top objectclass: myentry ``` ### Parameters
NameTypeDescriptionDefault ValueRequired

Configuration

String

The name of the configuration to use.

x

Entry

Object

The LDAPEntry that should be updated.

#[payload]

Structural Object Class

String

The type of entry to update. This is used for DataSense in Anypoint Studio IDE and has no impact on Mule.

Reconnection Strategy

  • reconnect

  • reconnect-forever

A retry strategy in case of connectivity errors.

### For Configurations - config ### Throws - LDAP:COMMUNICATION - LDAP:CONNECTIVITY - LDAP:SECURITY - LDAP:CONTEXT\_NOT\_EMPTY - LDAP:INVALID\_ATTRIBUTE - LDAP:INVALID\_ENTRY - LDAP:NAME\_ALREADY\_BOUND - LDAP:NAME\_NOT\_FOUND - LDAP:OPERATION\_NOT\_SUPPORTED - LDAP:OPERATION\_NOT\_COMPLETED - LDAP:PERMISSION - LDAP:RETRY\_EXHAUSTED - LDAP:UNKNOWN ## Modify Multi Value Attribute `` Updates (replaces) the value or values of the attribute defined by attributeName with the new values defined by attributeValues. If the attribute is not present in the entry, then the value is added. ### Parameters
NameTypeDescriptionDefault ValueRequired

Configuration

String

The name of the configuration to use.

x

DN

String

The DN of the LDAP entry to modify.

x

Attribute Name

String

The name of the attribute to update its values.

x

Attribute Values

Array of Any

The new values for the attribute.

#[payload]

Ignore Invalid Attribute

Boolean

If the attribute value to modify is already present, then don’t throw the INVALID_ATTRIBUTE error.

false

Reconnection Strategy

  • reconnect

  • reconnect-forever

A retry strategy in case of connectivity errors.

### For Configurations - config ### Throws - LDAP:COMMUNICATION - LDAP:CONNECTIVITY - LDAP:SECURITY - LDAP:CONTEXT\_NOT\_EMPTY - LDAP:INVALID\_ATTRIBUTE - LDAP:INVALID\_ENTRY - LDAP:NAME\_ALREADY\_BOUND - LDAP:NAME\_NOT\_FOUND - LDAP:OPERATION\_NOT\_SUPPORTED - LDAP:OPERATION\_NOT\_COMPLETED - LDAP:PERMISSION - LDAP:RETRY\_EXHAUSTED - LDAP:UNKNOWN ## Modify Single Value Attribute `` Updates (replaces) the value or values of the attribute defined by attributeName with the new value defined by attributeValue. If the attribute is not present in the entry, then the value is added. To update a value with a type different than String, use the update-multi-value-attribute operation and define a single element list with the value. ### Parameters
NameTypeDescriptionDefault ValueRequired

Configuration

String

The name of the configuration to use.

x

DN

String

The DN of the LDAP entry to modify.

x

Attribute Name

String

The name of the attribute to update its value.

x

Attribute Value

String

The new value for the attribute.

x

Ignore Invalid Attribute

Boolean

If the attribute value to modify is already present, then don’t throw the INVALID_ATTRIBUTE error.

false

Reconnection Strategy

  • reconnect

  • reconnect-forever

A retry strategy in case of connectivity errors.

### For Configurations - config ### Throws - LDAP:COMMUNICATION - LDAP:CONNECTIVITY - LDAP:SECURITY - LDAP:CONTEXT\_NOT\_EMPTY - LDAP:INVALID\_ATTRIBUTE - LDAP:INVALID\_ENTRY - LDAP:NAME\_ALREADY\_BOUND - LDAP:NAME\_NOT\_FOUND - LDAP:OPERATION\_NOT\_SUPPORTED - LDAP:OPERATION\_NOT\_COMPLETED - LDAP:PERMISSION - LDAP:RETRY\_EXHAUSTED - LDAP:UNKNOWN ## Paged Result Search `` Performs an LDAP search and streams the result to the rest of the flow. This means that if the LDAP server supports paging, this operation chunks the LDAP search request in pages, and then returns a list with all the results to the rest of the flow. For queries returning large results, it is best to use pagination, however, not all LDAP servers support this or are configured to support it. To use pagination, provide a page size value that’s less than or equal to the **Max Results** (count limit). If you get a size limit exceeded exception, ensure that the authenticated user has sufficient privileges, or that the LDAP server is not limited by its configuration, in which case, you should reduce the value of the fetch size. ### Parameters
NameTypeDescriptionDefault ValueRequired

Configuration

String

The name of the configuration to use.

x

Base DN

String

The base DN of the LDAP search.

x

Filter

String

A valid LDAP filter. LDAP connector supports LDAP search filters as defined in RFC 2254.

x

Attributes

Array of String

A list of the attributes to return in the result. If the attributes list is empty or null then, by default, all LDAP entry attributes are returned.

Scope

Enumeration, one of:

  • OBJECT

  • ONE_LEVEL

  • SUB_TREE

The scope of the search. Valid attributes are:

* OBJECT: Searches only the entry at the base DN so that only results from that entry are returned. This must meet the search filter criteria. * ONE_LEVEL: Searches all entries one level under the base DN and does not include entries in the base DN or any entries one level under the base DN. * SUB_TREE: Searches all entries at all levels under and including the specified base DN.

ONE_LEVEL

Timeout

Number

Search timeout in milliseconds. If the value is 0, this means to wait indefinitely.

0

Max Results

Number

The maximum number of entries to return as a result of the search. 0 indicates to return all entries.

0

Return Object

Boolean

Enables or disables returning objects that are returned as part of the result. If disabled, only the name and class of the object is returned. If enabled, the object is returned.

false

Page Size

Number

If the LDAP server supports paging results, set this attribute to the size of the page. If the pageSize is less than or equal to 0, paging is disabled.

0

Order by attribute

String

Name of the LDAP attribute used to sort results.

Ascending order?

Boolean

If orderBy is set, indicates whether to sort in ascending or descending order.

true

Structural Object Class

String

The type of entry to return. This is used for DataSense in Anypoint Studio IDE and has no impact on Mule.

Fetch Size

Number

The maximum number of LDAP entries retrieved at once per page.

200

Streaming Strategy

  • repeatable-in-memory-iterable

  • repeatable-file-store-iterable

  • non-repeatable-iterable

Configures how Mule processes streams. The default is to use repeatable streams.

Target Variable

String

Name of the variable that stores the operation’s output.

Target Value

String

Expression that evaluates the operation’s output. The outcome of the expression is stored in Target Variable.

#[payload]

Reconnection Strategy

  • reconnect

  • reconnect-forever

A retry strategy in case of connectivity errors.

### Output

Type

Array of Object

### For Configurations - config ### Throws - LDAP:COMMUNICATION - LDAP:CONNECTIVITY - LDAP:SECURITY - LDAP:CONTEXT\_NOT\_EMPTY - LDAP:INVALID\_ATTRIBUTE - LDAP:INVALID\_ENTRY - LDAP:NAME\_ALREADY\_BOUND - LDAP:NAME\_NOT\_FOUND - LDAP:OPERATION\_NOT\_SUPPORTED - LDAP:OPERATION\_NOT\_COMPLETED - LDAP:PERMISSION - LDAP:UNKNOWN ## Rename entry `` Renames an existing LDAP entry (moves an entry from a DN to another one). ### Parameters
NameTypeDescriptionDefault ValueRequired

Configuration

String

The name of the configuration to use.

x

Current DN

String

DN of the existing entry to rename.

x

New DN

String

Destination DN

x

Reconnection Strategy

  • reconnect

  • reconnect-forever

A retry strategy in case of connectivity errors.

### For Configurations - config ### Throws - LDAP:COMMUNICATION - LDAP:CONNECTIVITY - LDAP:SECURITY - LDAP:CONTEXT\_NOT\_EMPTY - LDAP:INVALID\_ATTRIBUTE - LDAP:INVALID\_ENTRY - LDAP:NAME\_ALREADY\_BOUND - LDAP:NAME\_NOT\_FOUND - LDAP:OPERATION\_NOT\_SUPPORTED - LDAP:OPERATION\_NOT\_COMPLETED - LDAP:PERMISSION - LDAP:RETRY\_EXHAUSTED - LDAP:UNKNOWN ## Search `` Performs an LDAP search that returns a list of all resulting LDAP entries. For queries returning large results, use pagination; however, not all LDAP servers support this or are configured to support it. To use pagination, provide a page size value that’s less than or equal to the max results (count limit). If you get a size limit exceeded exception, ensure that the authenticated user has sufficient privileges, or that the LDAP server is not limited by its configuration. ### Parameters
NameTypeDescriptionDefault ValueRequired

Configuration

String

The name of the configuration to use.

x

Base DN

String

The base DN of the LDAP search.

x

Filter

String

A valid LDAP filter. The LDAP connector supports LDAP search filters as defined in RFC 2254.

x

Attributes

Array of String

A list of the attributes to return in the result. If the attributes list is empty or null, by default all LDAP entry attributes are returned.

Scope

Enumeration, one of:

  • OBJECT

  • ONE_LEVEL

  • SUB_TREE

The scope of the search. Valid attributes are:

* OBJECT: This value is used to indicate searching only the entry at the base DN, resulting in only that entry being returned (keeping in mind that it also has to meet the search filter criteria) * ONE_LEVEL: This value is used to indicate searching all entries one level under the base DN - but not including the base DN and not including any entries under that one level under the base DN. * SUB_TREE: This value is used to indicate searching of all entries at all levels under and including the specified base DN.

ONE_LEVEL

Timeout

Number

Search timeout in milliseconds. If the value is 0, this means to wait indefinitely.

0

Max Results

Number

The maximum number of entries to return as a result of the search. 0 indicates to return all entries.

0

Return Object

Boolean

Enables or disables objects returned as part of the result. If disabled, only the name and class of the object is returned. If enabled, the object is also returned.

false

Page Size

Number

If the LDAP server supports paging results, set this attribute to the size of the page. If the pageSize is less than or equal to 0, then paging is disabled.

0

Structural Object Class

String

The type of entry to return. This is used for DataSense in Anypoint Studio IDE and has no impact on Mule.

Target Variable

String

The name of a variable in which the operation’s output is placed.

Target Value

String

An expression to evaluate against the operation’s output and the outcome of that expression stored in the target variable.

#[payload]

Reconnection Strategy

  • reconnect

  • reconnect-forever

A retry strategy in case of connectivity errors.

### Output

Type

Array of Object

### For Configurations - config ### Throws - LDAP:COMMUNICATION - LDAP:CONNECTIVITY - LDAP:SECURITY - LDAP:CONTEXT\_NOT\_EMPTY - LDAP:INVALID\_ATTRIBUTE - LDAP:INVALID\_ENTRY - LDAP:NAME\_ALREADY\_BOUND - LDAP:NAME\_NOT\_FOUND - LDAP:OPERATION\_NOT\_SUPPORTED - LDAP:OPERATION\_NOT\_COMPLETED - LDAP:PERMISSION - LDAP:RETRY\_EXHAUSTED - LDAP:UNKNOWN ## Search One `` Performs an LDAP search that is supposed to return a unique result. If the search returns more than one result, a warning log message is generated and the first element of the result is returned. Use this operation over `#lookup(LDAPConfiguration, LDAPConnectionWrapper, String, List, String)` when you don’t know the DN of the entry you need to retrieve but have a set of attributes that you know should return a single entry (for example an email address). ### Parameters
NameTypeDescriptionDefault ValueRequired

Configuration

String

The name of the configuration to use.

x

Base DN

String

The base DN of the LDAP search.

x

Filter

String

A valid LDAP filter. The LDAP connector supports LDAP search filters as defined in RFC 2254.

x

Attributes

Array of String

A list of the attributes to return in the result. If the attributes list is empty or null, then by default all LDAP entry attributes are returned.

Scope

Enumeration, one of:

  • OBJECT

  • ONE_LEVEL

  • SUB_TREE

The scope of the search. Valid attributes are:

* OBJECT: Indicates to search only for the entry at the base DN, resulting in only that entry being returned (keep in mind that it also has to meet the search filter criteria). * ONE_LEVEL: Indicates to search for all entries one level under the base DN - but not including the base DN and not including any entries under that one level under the base DN. * SUB_TREE: Indicates to search for all entries at all levels under and including the specified base DN.

ONE_LEVEL

Timeout

Number

Search timeout in milliseconds. If the value is 0, this means to wait indefinitely.

0

Max Results

Number

The maximum number of entries to return as a result of the search. 0 indicates to return all entries.

0

Return Object

Boolean

Enables or disables returning objects returned as part of the result. If disabled, only the name and class of the object is returned. If enabled, the object also returns.

false

Structural Object Class

String

The type of entry to return. This is used for DataSense in Anypoint Studio IDE and has no impact on Mule.

Target Variable

String

The name of a variable in which the operation’s output is placed.

Target Value

String

An expression to evaluate against the operation’s output and the outcome of that expression stored in the target variable.

#[payload]

Reconnection Strategy

  • reconnect

  • reconnect-forever

A retry strategy in case of connectivity errors.

### Output

Type

Object

### For Configurations - config ### Throws - LDAP:COMMUNICATION - LDAP:CONNECTIVITY - LDAP:SECURITY - LDAP:CONTEXT\_NOT\_EMPTY - LDAP:INVALID\_ATTRIBUTE - LDAP:INVALID\_ENTRY - LDAP:NAME\_ALREADY\_BOUND - LDAP:NAME\_NOT\_FOUND - LDAP:OPERATION\_NOT\_SUPPORTED - LDAP:OPERATION\_NOT\_COMPLETED - LDAP:PERMISSION - LDAP:RETRY\_EXHAUSTED - LDAP:UNKNOWN ## Unbind `` Closes the current connection, forcing the login operation (bind) the next time it is used. ### Parameters
NameTypeDescriptionDefault ValueRequired

Configuration

String

The name of the configuration to use.

x

Reconnection Strategy

  • reconnect

  • reconnect-forever

A retry strategy in case of connectivity errors.

### For Configurations - config ### Throws - LDAP:COMMUNICATION - LDAP:CONNECTIVITY - LDAP:SECURITY - LDAP:CONTEXT\_NOT\_EMPTY - LDAP:INVALID\_ATTRIBUTE - LDAP:INVALID\_ENTRY - LDAP:NAME\_ALREADY\_BOUND - LDAP:NAME\_NOT\_FOUND - LDAP:OPERATION\_NOT\_SUPPORTED - LDAP:OPERATION\_NOT\_COMPLETED - LDAP:PERMISSION - LDAP:RETRY\_EXHAUSTED - LDAP:UNKNOWN ## Reconnection
FieldTypeDescriptionDefault ValueRequired

Fails Deployment

Boolean

When the application is deployed, a connectivity test is performed on all connectors. If set to true, deployment fails if the test doesn’t pass after exhausting the associated reconnection strategy.

Reconnection Strategy

  • reconnect

  • reconnect-forever

The reconnection strategy to use.

### Reconnect
FieldTypeDescriptionDefault ValueRequired

Frequency

Number

How often in milliseconds to reconnect.

Count

Number

How many reconnection attempts to make.

blocking

Boolean

If false, the reconnection strategy runs in a separate, non-blocking thread.

true

### Reconnect Forever
FieldTypeDescriptionDefault ValueRequired

Frequency

Number

How often in milliseconds to reconnect.

blocking

Boolean

If false, the reconnection strategy runs in a separate, non-blocking thread.

true

## Expiration Policy Type
FieldTypeDescriptionDefault ValueRequired

Max Idle Time

Number

A scalar time value for the maximum amount of time a dynamic configuration instance should be allowed to be idle before it’s considered eligible for expiration.

Time Unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

A time unit that qualifies the maxIdleTime attribute.

## Repeatable In-Memory Iterable Type
FieldTypeDescriptionDefault ValueRequired

Initial Buffer Size

Number

The amount of instances to initially allow to be kept in memory to consume the stream and provide random access to it. If the stream contains more data than can fit into this buffer, the buffer expands according to the bufferSizeIncrement attribute, with an upper limit of maxInMemorySize. Default value is 100 instances.

Buffer Size Increment

Number

This is by how much the buffer size expands if it exceeds its initial size. Setting a value of zero or lower means that the buffer should not expand, and to raise a STREAM_MAXIMUM_SIZE_EXCEEDED error when the buffer gets full. Default value is 100 instances.

Max Buffer Size

Number

The maximum amount of memory to use. If more than that is used, then a STREAM_MAXIMUM_SIZE_EXCEEDED error is raised. A value lower than or equal to zero means no limit.

## Repeatable File Store Iterable Type
FieldTypeDescriptionDefault ValueRequired

Max In Memory Size

Number

The maximum amount of instances to keep in memory. If more than that is required, then it starts to buffer the content on disk.

Buffer Unit

Enumeration, one of:

  • BYTE

  • KB

  • MB

  • GB

The unit in which maxInMemorySize is expressed.

## See Also - [Using Anypoint Studio to Configure a Connector](https://docs.mulesoft.com/connectors/introduction/intro-config-use-studio) - [Salesforce Help](https://help.salesforce.com) --- product: LDAP Connector version: 3.7 is-latest-version: true --- # LDAP Connector 3.7 > For the full documentation index, see: https://docs.mulesoft.com/llms.txt Anypoint Connector for Lightweight Directory Access Protocol (LDAP) is a public standard that facilitates maintenance and access to distributed directories (such as network user privilege information) over an Internet Protocol (IP) network. LDAP Connector supports LDAP over SSL (Deprecated), LDAP over TLS, and a Secure SSL connection type for FIPS 140-3 compliant deployments. Many LDAP servers are included in free-use open source projects and packages. The particulars of installing, running, and configuring LDAP servers fall outside the scope of this document. For information about compatibility and fixed issues, see the LDAP Connector Release Notes. ## Before You Begin To use this connector, you must be familiar with: - The LDAP Connector’s API - Anypoint Connectors - Mule runtime engine (Mule) - Elements and global elements in a Mule flow - How to create a Mule app using Anypoint Studio Before creating an app, you must have: - Credentials to access an OpenLDAP instance that supports LDAP v3 - Anypoint Platform - Anypoint Studio version 7.0 or later ## Common Use Cases For the Connector Common use cases for LDAP Connector include: - Adding user accounts to Active Directory You can add business users to Active Directory groups defined on the base distinguished name (DN). - Retrieving user attributes You can retrieve the basic attributes of a business user such as a user’s e-mail or phone number. ## Connection Types LDAP Connector supports four types of connections: - Basic Communications are not encrypted. > [!NOTE] If running in an instance configured with `mule.security.model=fips140-2`, attempting to > use a Basic connection returns an `LDAP:SECURITY` error. - SSL (Deprecated) Communications are encrypted using Secure Sockets Layer (SSL). Accepts a custom truststore path for certificate validation. The SSL connection type is deprecated. Use the Secure SSL connection type instead. - Secure SSL Communications are encrypted using SSL and accept a Mule TLS context factory for trust store configuration. This connection type is required for FIPS 140-3 compliant deployments, and is also supported in non-FIPS environments with any trust store type provided via **TLS Context**. - TLS Communications are encrypted using Transport Layer Security (TLS). You can use Basic (username and password) authentication for each of these connection types. For more information about configuring connection types and authentication, see [Using Studio to Configure LDAP Connector](https://docs.mulesoft.com/ldap-connector/latest/ldap-connector-use-studio). ## See Also - [Introduction to Anypoint Connectors](https://docs.mulesoft.com/connectors/introduction/introduction-to-anypoint-connectors) - [Use Exchange to Discover Connectors, Templates, and Examples](https://docs.mulesoft.com/connectors/introduction/intro-use-exchange) - [LDAP Connector Reference](https://docs.mulesoft.com/ldap-connector/latest/ldap-connector-reference) - [Salesforce Help](https://help.salesforce.com) --- product: LDAP Connector version: 3.7 is-latest-version: true --- # LDAP Connector 3.7 - XML and Maven Support > For the full documentation index, see: https://docs.mulesoft.com/llms.txt Although you can manually code a Mule app in XML, it is more efficient to use Anypoint Studio: - If you manually code a Mule runtime engine (Mule) app in XML (either from the Anypoint Studio XML editor or from a text editor), you can access the connector from your app by adding reference statements to both your XML Mule flow and the Apache Maven `pom.xml` file. - If you add the connector in Studio, Studio automatically populates the XML code with the connector’s namespace and schema location and adds a dependency to the `pom.xml` file. ## Add a Namespace for the Connector Paste the following code inside the `mule` tag of the header of your configuration XML: ```xml http://www.mulesoft.org/schema/mule/ldap http://www.mulesoft.org/schema/mule/ldap/current/mule-ldap.xsd ``` This example shows how the namespace statements are placed in the XML: ```xml ``` ## Add a POM File Dependency The Apache Maven `pom.xml` file generated by Anypoint Studio contains dependencies for a Mule app. When you code a Mule app manually, include this XML snippet in your `pom.xml` file to enable access to this connector: ```xml com.mulesoft.connectors mule-ldap-connector x.x.x mule-plugin ``` Replace `` with the version that corresponds to the connector you are using. To obtain the most up-to-date `pom.xml` file information: 1. Go to [Anypoint Exchange](https://www.mulesoft.com/exchange/). 2. In Exchange, click **Login** and supply your Anypoint Platform username and password. 3. In Exchange, search for `ldap`. 4. Select the connector. 5. Click **Dependency Snippets** near the upper right of the screen. ## Next Step After completing your namespace and `pom.xml` file, you can try the [Examples](https://docs.mulesoft.com/ldap-connector/latest/ldap-connector-examples). ## See Also - [Introduction to Anypoint Connectors](https://docs.mulesoft.com/connectors/introduction/introduction-to-anypoint-connectors) - [Salesforce Help](https://help.salesforce.com) --- product: LDAP Connector version: 3.7 is-latest-version: true --- # LDAP Connector 3.7 Examples > For the full documentation index, see: https://docs.mulesoft.com/llms.txt The following examples show how to use Anypoint Connector for Lightweight Directory Access Protocol Connector (LDAP Connector) to: - Add a group and user to an organizational unit and then delete that user and group - Set up a common truststore ## Add and Delete Groups and Users from an Organizational Unit This example shows how to use the LDAP **Add entry** operation to add a group and user to an organizational unit and the **Delete entry** operation to delete a user and group from that organizational unit. The following screenshot shows the Studio app flow for this example: ![Flow for adding and deleting users](/mulesoft/current/en-us/ldap-connector/latest/_images/ldap-usecase-flow.png) ### Add a Group and User to an Organizational Unit To add a group and user to an organizational unit: 1. Create a new Mule Project in Anypoint Studio. 2. Add these properties to the `mule-artifact.properties` file: ```text config.principal.dn= config.password= config.url= ``` 3. Place the `mule-artifact.properties` file into the project’s `src/main/resources` directory. 4. From the **Mule Palette** view, click **HTTP** and drag the **Listener** source to the canvas. 5. In the Listener properties window, change the display name of the **Listener** source to `HTTP`. 6. Click **+** next to the **Connector configuration** field to add a global element. 7. Accept the defaults. 8. In the Listener properties window, set the **Path** field value to `/`. 9. From the **Mule Palette** view, select **Core** and drag the **Transform Message** component next to **HTTP**. 10. In the **Output** section, replace the existing text with the following DataWeave script: ```java %dw 2.0 output application/java --- { dn : "ou=DevOpsGroup," ++ attributes.queryParams.dn, ou : "DevOpsGroup", objectclass : ["top", "organizationalUnit"] } ``` 11. From the **Mule Palette** view, select **LDAP** and drag the **Add entry** operation next to the **Transform Message** component to start adding an LDAP group. 12. Click **+** next to the connector configuration field to add a new global element. 13. Configure the global element as follows:
ParameterDescriptionValue

Name

Name of the configuration

LDAP_Configuration

Principal DN

User distinguished name (DN)

${config.principal.dn}

Password

User password

${config.password}

URL

URL that connects to the LDAP server

${config.url}

14. Click **Test Connection** to confirm that Mule can connect to the LDAP server instance. 15. Process the connection results as follows: - If the connection succeeds, click **OK** to save the configuration. - If the connection fails, review and correct any incorrect field values and test again. 16. Return to the LDAP Connector properties window and configure the parameters required for the **Add entry** operation:
ParameterValue

Display Name

Add Group Entry to LDAP Directory

Basic Settings

Connector configuration

LDAP Connector global element that you created previously

General

Entry

payload (the default value)

17. From the **Mule Palette** view, select **Core** and drag the **Transform Message** component next to **Add Group Entry to the LDAP directory**. 18. In the **Output** section, replace the existing text with the following DataWeave script: ```java %dw 2.0 output application/java --- { dn : "cn=Test User,ou=DevOpsGroup," ++ attributes.queryParams.dn, uid : "testUser", cn : "Test User", sn : "User", userPassword : "test1234", objectclass : ["top", "person", "organizationalPerson", "inetOrgPerson"] } ``` 19. From the **Mule Palette** view, select **LDAP** and drag the **Add entry** operation next to **Transform Message** to start adding an LDAP user. 20. In the LDAP Connector properties editor, configure the parameters as follows:
ParameterValue

Display Name

Add User Entry to LDAP Directory

Basic Settings

Connector configuration

LDAP Connector global element that you created previously

General

Entry

payload (the default value)

### Delete a Group and User from an Organizational Unit After you successfully add a group and user to an organizational unit, delete them using LDAP Connector: 1. From the **Mule Palette** view, select **LDAP** and drag the **Delete entry** operation next to the **Add User Entry to LDAP Directory** on the canvas. 2. In the LDAP Connector properties editor, configure the parameters as follows:
ParameterValue

Display Name

Delete User Entry from LDAP Directory

Basic Settings

Connector configuration

LDAP Connector global element that you created previously

General

DN

#['cn=Test User,ou=DevOpsGroup,' ++ attributes.queryParams.dn]

3. Drag another **Delete entry** operation next to the first one to start deleting the LDAP group entry.
ParameterValue

Display Name

Delete Group Entry from LDAP Directory

Basic Settings

Connector configuration

LDAP Connector global element that you created previously

General

DN

#['ou=DevOpsGroup,' ++ attributes.queryParams.dn]

4. Drag the **Transform Message** component next to **Delete Group Entry from LDAP Directory**. 5. Set the payload to "Flow Successfully Completed". ### Test the App To test the app: 1. Save the project. 2. Run the project as a Mule app. 3. Send a PUT command to this URL: `http://localhost:8081/?dn=mulesoft,dc=orgrequest` ### XML for the Example Paste this code into the Studio XML editor to quickly load the flow for this example into your Mule app: ```xml ``` ## Set Up a Common Truststore This example shows how to change the previous example so that it has a TLS configuration that uses a custom truststore. > [!NOTE] The custom truststore feature is not FIPS compliant. To set up a custom truststore: 1. Follow the steps in the previous example. 2. Add these properties to the `mule-artifact.properties` file to hold your LDAP credentials: ```text config.principal.dn= config.password= config.url= ``` 3. Place the `mule-artifact.properties` file into the project’s `src/main/resources` directory. 4. Locate the following element in the XML code: ```xml ``` ### Test the App To test the app: 1. Save the project. 2. Run the project as a Mule app. 3. Send a PUT command to this URL: `http://localhost:8081/?dn=mulesoft,dc=orgrequest` ## See Also - [Salesforce Help](https://help.salesforce.com) --- product: LDAP Connector version: 3.7 is-latest-version: true --- # LDAP Connector 3.7 Reference > For the full documentation index, see: https://docs.mulesoft.com/llms.txt Anypoint Connector for Lightweight Directory Access Protocol (LDAP) enables you to interface with LDAP servers. ## Default Configuration ### Parameters
NameTypeDescriptionDefault ValueRequired

Name

String

The name for this configuration. Connectors reference the configuration with this name.

x

Connection

The connection types to provide to this configuration.

x

Expiration Policy

ExpirationPolicy

Configures the minimum amount of time that a dynamic configuration instance can remain idle before Mule considers it eligible for expiration. This does not mean that the instance expires at the exact moment that it becomes eligible. Mule purges the instances as appropriate.

Show Attributes As Objects

boolean

If set to true, the queries display the entity attributes as objects, containing the definition type, a flag to indicate whether or not the attribute is multi-value, and the value of the attribute. If set to false, the queries only display the attribute values.

false

## Basic Configuration Type For the Basic Configuration Type connection, the communications are not encrypted. If LDAP Connector runs in an instance configured with `mule.security.model=fips140-2`, attempting to use a Basic Configuration Type connection returns the `LDAP:SECURITY` error. ### Parameters
NameTypeDescriptionDefault ValueRequired

Principal DN

String

The DN (distinguished name) of the user.

x

Password

String

The password of the user.

Authentication

String

Specifies the authentication mechanism to use. Valid values are:

  • simple - Authenticates using the user DN and password

  • none - Does not authenticate

simple

URL

String

The connection URL to the LDAP server.

You can configure URL to specify multiple LDAP hosts, for example, ldap://ldap1.example.com ldap2.example.com/ou=intern-users,dc=acc,o=myorg.

x

Reconnection

Reconnection

When the application is deployed, a connectivity test is performed on all connectors. If set to true, deployment fails if the test doesn’t pass after exhausting the associated reconnection strategy.

Type

Enumeration, one of:

** JNDI

The implementation of the connection to use.

JNDI

Schema Enabled

Boolean

If set to true, the LDAP connector uses the LDAP schema (only works for LDAP v3) to define the structure of the LDAP entry or map. This must be 'true' to use DataSense because it affects the implementing class of org.mule.module.ldap.api.LDAPEntry attributes.

false

Referral

Enumeration, one of:

  • IGNORE

  • THROW

  • FOLLOW

Constant that holds the name of the environment property for specifying how referrals encountered by the service provider are to be processed (follow, ignore, throw).

IGNORE

Extended Configuration

Object

This is a Map instance holding extended configuration attributes to use in the Context environment. When working with TLS connections make sure that the native LDAP pooling functionality is turned off. For example, if using JNDI, do not use attributes such as com.sun.jndi.ldap.connect.pool=true, which causes problems when using TLS.

Initial Pool Size

Number

The string representation of an integer that represents the number of connections per connection identity to create when initially creating a connection for the identity. To disable pooling, just set this value to 0 (zero).

1

Max Pool Size

Number

The string representation of an integer that represents the maximum number of connections per connection identity that can be maintained concurrently.

5

Pool Timeout

Number

The string representation of an integer that represents the number of milliseconds that an idle connection may remain in the pool without being closed and removed from the pool.

60000

> [!NOTE] To see more logs related to connection pools, use > `com.sun.jndi.ldap.connect.pool.debug=all`. ## SSL Configuration Type (Deprecated) > [!IMPORTANT] The **SSL Configuration** type is deprecated. Use the > [Secure SSL Configuration Type](#secure-ssl-configuration-type) instead, which accepts a Mule TLS > context factory and supports FIPS 140-3 compliant deployments. ### Parameters
NameTypeDescriptionDefault ValueRequired

Principal DN

String

The DN (distinguished name) of the user.

x

Password

String

The password of the user.

Authentication

String

Specifies the authentication mechanism to use. Valid values are:

  • simple - Authenticates using the user DN and password

  • none - Does not authenticate

simple

URL

String

The connection URL to the LDAP server.

You can configure URL to specify multiple LDAP hosts, for example, ldap://ldap1.example.com ldap2.example.com/ou=intern-users,dc=acc,o=myorg.

x

Reconnection

When the application is deployed, a connectivity test is performed on all connectors. If set to true, deployment will fail if the test doesn’t pass after exhausting the associated reconnection strategy.

Type

Enumeration, one of:

  • JNDI

The implementation of the connection to use.

JNDI

Schema Enabled

Boolean

If set to true, the LDAP connector will use the LDAP schema (works only for LDAP v3) to define the structure of the LDAP entry or map. This parameter must be set to true to use DataSense, as it affects the implementing class of org.mule.module.ldap.api.LDAPEntry attributes.

false

Referral

Enumeration, one of:

  • IGNORE

  • THROW

  • FOLLOW

A constant that consists of the name of the environment property to specify how referrals encountered by the service provider must be processed (FOLLOW, IGNORE, THROW).

IGNORE

Extended Configuration

Object

A map instance that consists of extended configuration attributes used in the context environment. When working with TLS connections, ensure that the native LDAP pooling functionality is turned off. For example, if using JNDI, do not use attributes such as com.sun.jndi.ldap.connect.pool=true, as it will cause problems when using TLS.

TrustStore Path

String

Custom path to the truststore that contains the certificates needed for a secure authentication. The supported formats are JKS and PKCS12.

TrustStore Password

String

Custom password for the custom truststore file.

## Secure SSL Configuration Type SSL connection provider that accepts a Mule TLS context factory for trust store configuration. This connection type is required for FIPS 140-3 compliant deployments, and is also usable in non-FIPS environments with any trust store type supplied via **TLS Context** field. ### Parameters
NameTypeDescriptionDefault ValueRequired

TLS Context

The TLS context used to configure secure communication.

x

Principal DN

String

The DN (distinguished name) of the user.

x

Password

String

The password of the user.

Authentication

String

Specifies the authentication mechanism to use. Valid values are:

  • simple - Authenticates using the user DN and password

  • none - Does not authenticate

simple

URL

String

The connection URL to the LDAP server.

You can configure URL to specify multiple LDAP hosts, for example, ldap://ldap1.example.com ldap2.example.com/ou=intern-users,dc=acc,o=myorg.

x

Reconnection

When the application is deployed, a connectivity test is performed on all connectors. If set to true, deployment will fail if the test doesn’t pass after exhausting the associated reconnection strategy.

Type

Enumeration, one of:

  • JNDI

The implementation of the connection to use.

JNDI

Schema Enabled

Boolean

If set to true, the LDAP connector will use the LDAP schema (works only for LDAP v3) to define the structure of the LDAP entry or map. This parameter must be set to true to use DataSense, as it affects the implementing class of org.mule.module.ldap.api.LDAPEntry attributes.

false

Referral

Enumeration, one of:

  • IGNORE

  • THROW

  • FOLLOW

A constant that consists of the name of the environment property to specify how referrals encountered by the service provider must be processed (FOLLOW, IGNORE, THROW).

IGNORE

Extended Configuration

Object

A map instance that consists of extended configuration attributes used in the context environment. When working with TLS connections, ensure that the native LDAP pooling functionality is turned off. For example, if using JNDI, do not use attributes such as com.sun.jndi.ldap.connect.pool=true, as it will cause problems when using TLS.

## TLS Configuration Type ### Parameters
NameTypeDescriptionDefault ValueRequired

Principal DN

String

The DN (distinguished name) of the user.

x

Password

String

The password of the user.

Authentication

String

Specifies the authentication mechanism to use. Valid values are:

  • simple - Authenticates using the user DN and password

  • none - Does not authenticate

simple

URL

String

The connection URL to the LDAP server.

You can configure URL to specify multiple LDAP hosts, for example, ldap://ldap1.example.com ldap2.example.com/ou=intern-users,dc=acc,o=myorg.

x

Reconnection

Reconnection

When the application is deployed, a connectivity test is performed on all connectors. If set to true, deployment fails if the test doesn’t pass after exhausting the associated reconnection strategy.

Type

Enumeration, one of:

  • JNDI

The implementation of the connection to use.

JNDI

Schema Enabled

Boolean

If set to true, the LDAP connector uses the LDAP schema (only works for LDAP v3) to define the structure of the LDAP entry (or map). This needs to be 'true' to use DataSense as it affects the implementing class of org.mule.module.ldap.api.LDAPEntry attributes.

false

Referral

Enumeration, one of:

  • IGNORE

  • THROW

  • FOLLOW

Constant that holds the name of the environment property for specifying how referrals encountered by the service provider are to be processed (follow, ignore, throw).

IGNORE

Extended Configuration

Object

This is a Map instance holding extended configuration attributes to use in the Context environment. When working with TLS connections, you need to ensure that the native LDAP pooling functionality is turned off. For example if using JNDI, do not use attributes such as com.sun.jndi.ldap.connect.pool=true, which causes problems when using TLS.

TrustStore Path

String

Custom path to the truststore that contains the certificates needed for a secure authentication. The supported formats are JKS and PKCS12.

TrustStore Password

String

Custom password for the custom truststore file.

## Supported Operations - [Add Entry](#add) - [Add Multi Value Attribute](#addMultiValueAttribute) - [Add Single Value Attribute](#addSingleValueAttribute) - [Bind](#bind) - [Delete Entry](#delete) - [Delete Multi Value Attribute](#deleteMultiValueAttribute) - [Delete Single Value Attribute](#deleteSingleValueAttribute) - [Exists](#exists) - [LDAPEntry To LDIF](#ldapEntryToLdif) - [Lookup](#lookup) - [Modify Entry](#modify) - [Modify Multi Value Attribute](#modifyMultiValueAttribute) - [Modify Single Value Attribute](#modifySingleValueAttribute) - [Paged Result Search](#pagedResultSearch) - [Rename entry](#rename) - [Search](#ldapsearch) - [Search One](#searchOne) - [Unbind](#unbind) ## Associated Sources - [On Modified Objects](#modifiedObjects) - [On New Objects](#newObjects) ## Operations ## Add Entry `` Creates a new LDAPEntry in the LDAP server. The entry should contain the distinguished name (DN), the objectClass attributes that define its structure and at least a value for all the required attributes. Required attributes depend on the object classes assigned to the entry. Refer to RFC 4519 for standard object classes and attributes. ### Parameters
NameTypeDescriptionDefault ValueRequired

Configuration

String

The name of the configuration to use.

x

Entry

Object

The LDAPEntry that should be added.

#[payload]

Structural Object Class

String

The type of entry to add. If the entry doesn’t have the objectClass attribute set, then this one is used to retrieve the whole objectClass hierarchy. If performance is a requirement, don’t rely on this functionality, as several calls to the LDAP server are done to traverse the object class hierarchy.

Reconnection Strategy

  • reconnect

  • reconnect-forever

A retry strategy in case of connectivity errors.

### For Configurations - config ### Throws - LDAP:COMMUNICATION - LDAP:CONNECTIVITY - LDAP:SECURITY - LDAP:CONTEXT\_NOT\_EMPTY - LDAP:INVALID\_ATTRIBUTE - LDAP:INVALID\_ENTRY - LDAP:NAME\_ALREADY\_BOUND - LDAP:NAME\_NOT\_FOUND - LDAP:OPERATION\_NOT\_SUPPORTED - LDAP:OPERATION\_NOT\_COMPLETED - LDAP:PERMISSION - LDAP:RETRY\_EXHAUSTED - LDAP:UNKNOWN ## Add Multi Value Attribute `` Adds all the values for an attribute in an existing LDAP entry. If the entry already contains a value (or values) for an attributeName, then these values are added. The attribute should allow multiple values, or an exception is raised. ### Parameters
NameTypeDescriptionDefault ValueRequired

Configuration

String

The name of the configuration to use.

x

DN

String

The DN of the LDAP entry to modify.

x

Attribute Name

String

The name of the attribute to add values to.

x

Attribute Values

Array of Any

The values for the attribute.

#[payload]

Ignore Invalid Attribute

Boolean

If the attribute value to add is already present, then don’t throw the INVALID_ATTRIBUTE error.

false

Reconnection Strategy

  • reconnect

  • reconnect-forever

A retry strategy in case of connectivity errors.

### For Configurations - config ### Throws - LDAP:COMMUNICATION - LDAP:CONNECTIVITY - LDAP:SECURITY - LDAP:CONTEXT\_NOT\_EMPTY - LDAP:INVALID\_ATTRIBUTE - LDAP:INVALID\_ENTRY - LDAP:NAME\_ALREADY\_BOUND - LDAP:NAME\_NOT\_FOUND - LDAP:OPERATION\_NOT\_SUPPORTED - LDAP:OPERATION\_NOT\_COMPLETED - LDAP:PERMISSION - LDAP:RETRY\_EXHAUSTED - LDAP:UNKNOWN ## Add Single Value Attribute `` Adds a value for an attribute in an existing LDAP entry. If the entry already contains a value for the given attributeName, then this value is added (only if the attribute is multi value and the entry didn’t have the value already). If you want to add a value with a type different than String, then you can use the add-multi-value-attribute operation and define a single element list with the value. ### Parameters
NameTypeDescriptionDefault ValueRequired

Configuration

String

The name of the configuration to use.

x

DN

String

The DN of the LDAP entry to modify.

x

Attribute Name

String

The name of the attribute to add a value to.

x

Attribute Value

String

The value for the attribute.

x

Ignore Invalid Attribute

Boolean

If the attribute value to add is already present, then don’t throw InvalidAttributeException.

false

Reconnection Strategy

  • reconnect

  • reconnect-forever

A retry strategy in case of connectivity errors.

### For Configurations - config ### Throws - LDAP:COMMUNICATION - LDAP:CONNECTIVITY - LDAP:SECURITY - LDAP:CONTEXT\_NOT\_EMPTY - LDAP:INVALID\_ATTRIBUTE - LDAP:INVALID\_ENTRY - LDAP:NAME\_ALREADY\_BOUND - LDAP:NAME\_NOT\_FOUND - LDAP:OPERATION\_NOT\_SUPPORTED - LDAP:OPERATION\_NOT\_COMPLETED - LDAP:PERMISSION - LDAP:RETRY\_EXHAUSTED - LDAP:UNKNOWN ## Bind `` Performs an LDAP bind (login) operation. After login there will be an LDAP connection pool ready to use for other operations using the authenticated user. If no values are provided to override authDn and authPassword then using this operation will just re-bind (re-authenticate) the user/password defined in the config element. If new values are provided for authDn and authPassword, then authentication will be performed. Re-authenticating and returning the LDAP entry using config level credentials (authDn & authPassword). ### Parameters
NameTypeDescriptionDefault ValueRequired

Configuration

String

The name of the configuration to use.

x

Principal DN

String

The Principal DN of the user.

Password

String

The Password for Principal DN.

Authentication

String

Specifies the authentication mechanism to use. Valid values are:

  • simple - Authenticates using the user DN and password

  • none - Does not authenticate

simple

Target Variable

String

The name of a variable in which the operation’s output is placed

Target Value

String

An expression to evaluate against the operation’s output and the outcome of that expression stored in the target variable.

#[payload]

Reconnection Strategy

  • reconnect

  • reconnect-forever

A retry strategy in case of connectivity errors.

### Output

Type

Object

### For Configurations - config ### Throws - LDAP:COMMUNICATION - LDAP:CONNECTIVITY - LDAP:SECURITY - LDAP:CONTEXT\_NOT\_EMPTY - LDAP:INVALID\_ATTRIBUTE - LDAP:INVALID\_ENTRY - LDAP:NAME\_ALREADY\_BOUND - LDAP:NAME\_NOT\_FOUND - LDAP:OPERATION\_NOT\_SUPPORTED - LDAP:OPERATION\_NOT\_COMPLETED - LDAP:PERMISSION - LDAP:RETRY\_EXHAUSTED - LDAP:UNKNOWN ## Delete Entry `` Deletes the LDAP entry represented by the provided distinguished name (DN). The entry should not have child entries, in which case a CONTEXT\_NOT\_EMPTY error is thrown. This operation is idempotent. The operations succeeds even if the terminal atomic name is not bound in the target context, but throws NAME\_NOT\_FOUND error if any of the intermediate contexts do not exist. ### Parameters
NameTypeDescriptionDefault ValueRequired

Configuration

String

The name of the configuration to use.

x

DN

String

The DN of the LDAP entry to delete.

x

Reconnection Strategy

  • reconnect

  • reconnect-forever

A retry strategy in case of connectivity errors.

### For Configurations - config ### Throws - LDAP:COMMUNICATION - LDAP:CONNECTIVITY - LDAP:SECURITY - LDAP:CONTEXT\_NOT\_EMPTY - LDAP:INVALID\_ATTRIBUTE - LDAP:INVALID\_ENTRY - LDAP:NAME\_ALREADY\_BOUND - LDAP:NAME\_NOT\_FOUND - LDAP:OPERATION\_NOT\_SUPPORTED - LDAP:OPERATION\_NOT\_COMPLETED - LDAP:PERMISSION - LDAP:RETRY\_EXHAUSTED - LDAP:UNKNOWN ## Delete Multi Value Attribute `` Deletes all the values matching attributeValues of the attribute defined by attributeName. Values that are not present in the entry are ignored. If no values are specified, then the whole attribute is deleted from the entry. ### Parameters
NameTypeDescriptionDefault ValueRequired

Configuration

String

The name of the configuration to use.

x

DN

String

The DN of the LDAP entry to modify.

x

Attribute Name

String

The name of the attribute to delete its values.

x

Attribute Values

Array of Any

The values that should be deleted.

#[payload]

Ignore Invalid Attribute

Boolean

If the attribute or value to delete is not present, then don’t throw the INVALID_ATTRIBUTE error.

false

Reconnection Strategy

  • reconnect

  • reconnect-forever

A retry strategy in case of connectivity errors.

### For Configurations - config ### Throws - LDAP:COMMUNICATION - LDAP:CONNECTIVITY - LDAP:SECURITY - LDAP:CONTEXT\_NOT\_EMPTY - LDAP:INVALID\_ATTRIBUTE - LDAP:INVALID\_ENTRY - LDAP:NAME\_ALREADY\_BOUND - LDAP:NAME\_NOT\_FOUND - LDAP:OPERATION\_NOT\_SUPPORTED - LDAP:OPERATION\_NOT\_COMPLETED - LDAP:PERMISSION - LDAP:RETRY\_EXHAUSTED - LDAP:UNKNOWN ## Delete Single Value Attribute `` Deletes the value matching attributeValue of the attribute defined by attributeName. If the entry didn’t have the value, then the entry stays the same. If no value is specified, then the whole attribute is deleted from the entry. If you want to delete a value with a type different than String, then you can use the delete-multi-value-attribute operation and define a single element list with the value. ### Parameters
NameTypeDescriptionDefault ValueRequired

Configuration

String

The name of the configuration to use.

x

DN

String

The DN of the LDAP entry to modify.

x

Attribute Name

String

The name of the attribute to delete its value.

x

Attribute Value

String

The value that should be deleted.

Ignore Invalid Attribute

Boolean

If the attribute or value to delete is not present, then don’t throw the INVALID_ATTRIBUTE error.

false

Reconnection Strategy

  • reconnect

  • reconnect-forever

A retry strategy in case of connectivity errors.

### For Configurations - config ### Throws - LDAP:COMMUNICATION - LDAP:CONNECTIVITY - LDAP:SECURITY - LDAP:CONTEXT\_NOT\_EMPTY - LDAP:INVALID\_ATTRIBUTE - LDAP:INVALID\_ENTRY - LDAP:NAME\_ALREADY\_BOUND - LDAP:NAME\_NOT\_FOUND - LDAP:OPERATION\_NOT\_SUPPORTED - LDAP:OPERATION\_NOT\_COMPLETED - LDAP:PERMISSION - LDAP:RETRY\_EXHAUSTED - LDAP:UNKNOWN ## Exists `` Checks whether an LDAP entry exists in the LDAP server or not. ### Parameters
NameTypeDescriptionDefault ValueRequired

Configuration

String

The name of the configuration to use.

x

DN

String

The DN of the LDAP entry to retrieve.

x

Target Variable

String

The name of a variable in which the operation’s output is placed.

Target Value

String

An expression to evaluate against the operation’s output and the outcome of that expression stored in the target variable.

#[payload]

Reconnection Strategy

  • reconnect

  • reconnect-forever

A retry strategy in case of connectivity errors.

### Output

Type

Boolean

### For Configurations - config ### Throws - LDAP:COMMUNICATION - LDAP:CONNECTIVITY - LDAP:SECURITY - LDAP:CONTEXT\_NOT\_EMPTY - LDAP:INVALID\_ATTRIBUTE - LDAP:INVALID\_ENTRY - LDAP:NAME\_ALREADY\_BOUND - LDAP:NAME\_NOT\_FOUND - LDAP:OPERATION\_NOT\_SUPPORTED - LDAP:OPERATION\_NOT\_COMPLETED - LDAP:PERMISSION - LDAP:RETRY\_EXHAUSTED - LDAP:UNKNOWN ## LDAPEntry To LDIF `` Transforms an LDAPEntry to a String in LDIF representation (RFC 2849). ### Parameters
NameTypeDescriptionDefault ValueRequired

Configuration

String

The name of the configuration to use.

x

Entry

Object

The LDAPEntry to transform to LDIF.

#[payload]

Target Variable

String

The name of a variable in which the operation’s output is placed.

Target Value

String

An expression to evaluate against the operation’s output and the outcome of that expression stored in the target variable.

#[payload]

Reconnection Strategy

  • reconnect

  • reconnect-forever

A retry strategy in case of connectivity errors.

### Output

Type

String

### For Configurations - config ### Throws - LDAP:COMMUNICATION - LDAP:CONNECTIVITY - LDAP:SECURITY - LDAP:CONTEXT\_NOT\_EMPTY - LDAP:INVALID\_ATTRIBUTE - LDAP:INVALID\_ENTRY - LDAP:NAME\_ALREADY\_BOUND - LDAP:NAME\_NOT\_FOUND - LDAP:OPERATION\_NOT\_SUPPORTED - LDAP:OPERATION\_NOT\_COMPLETED - LDAP:PERMISSION - LDAP:RETRY\_EXHAUSTED - LDAP:UNKNOWN ## Lookup `` Retrieves an entry from the LDAP server based on its distinguished name (DN). Distinguished Names are the unique identifiers of an LDAP entry, so this method performs a search based on this ID and returns a single entry as the result, or throws an exception if the DN is invalid or doesn’t exist. When you know the DN of the object you want to retrieve, use this operation: `#searchOne(LDAPConfiguration, LDAPConnectionWrapper, String, String, List, SearchScope, int, long, boolean, String)` ### Parameters
NameTypeDescriptionDefault ValueRequired

Configuration

String

The name of the configuration to use.

x

DN

String

The DN of the LDAP entry to retrieve.

x

Attributes

Array of String

A list of the attributes to return in the result. If the attributes list is empty or null, then by default all LDAP entry attributes are returned.

Structural Object Class

String

The type of entry to return. This is used for DataSense in Anypoint Studio IDE and has no impact on Mule.

Target Variable

String

The name of a variable in which the operation’s output is placed.

Target Value

String

An expression to evaluate against the operation’s output and the outcome of that expression stored in the target variable.

#[payload]

Reconnection Strategy

  • reconnect

  • reconnect-forever

A retry strategy in case of connectivity errors.

### Output

Type

Object

### For Configurations - config ### Throws - LDAP:COMMUNICATION - LDAP:CONNECTIVITY - LDAP:SECURITY - LDAP:CONTEXT\_NOT\_EMPTY - LDAP:INVALID\_ATTRIBUTE - LDAP:INVALID\_ENTRY - LDAP:NAME\_ALREADY\_BOUND - LDAP:NAME\_NOT\_FOUND - LDAP:OPERATION\_NOT\_SUPPORTED - LDAP:OPERATION\_NOT\_COMPLETED - LDAP:PERMISSION - LDAP:RETRY\_EXHAUSTED - LDAP:UNKNOWN ## Modify Entry `` Updates an existing LDAPEntry in the LDAP server. The entry should contain an existing distinguished name (DN), and at least a value for all the required attributes. Required attributes depend on the object classes assigned to the entry. You can refer to RFC 4519 for standard object classes and attributes. When updating an LDAP entry, only the attributes in the entry passed as parameters are updated or added. If you need to delete an attribute, you should use the delete attribute operation. Example: Updating one attribute and adding another. Original LDAP server entry: ```text dn: cn=entry,ou=group,dc=company,dc=org cn: entry attr1: Value1 attr2: Value2 multi1: Value3 multi1: Value4 objectclass: top objectclass: myentry ``` Entry map passed as a parameter: ```text dn: cn=entry,ou=group,dc=company,dc=org attr1: NewValue attr3: NewAttributeValue ` ``` Resulting LDAP server entry: ```text dn: cn=entry,ou=group,dc=company,dc=org cn: entry attr1: NewValue attr2: Value2 multi1: Value3 multi1: Value4 attr3: NewAttributeValue objectclass: top objectclass: myentry ``` ### Parameters
NameTypeDescriptionDefault ValueRequired

Configuration

String

The name of the configuration to use.

x

Entry

Object

The LDAPEntry that should be updated.

#[payload]

Structural Object Class

String

The type of entry to update. This is used for DataSense in Anypoint Studio IDE and has no impact on Mule.

Reconnection Strategy

  • reconnect

  • reconnect-forever

A retry strategy in case of connectivity errors.

### For Configurations - config ### Throws - LDAP:COMMUNICATION - LDAP:CONNECTIVITY - LDAP:SECURITY - LDAP:CONTEXT\_NOT\_EMPTY - LDAP:INVALID\_ATTRIBUTE - LDAP:INVALID\_ENTRY - LDAP:NAME\_ALREADY\_BOUND - LDAP:NAME\_NOT\_FOUND - LDAP:OPERATION\_NOT\_SUPPORTED - LDAP:OPERATION\_NOT\_COMPLETED - LDAP:PERMISSION - LDAP:RETRY\_EXHAUSTED - LDAP:UNKNOWN ## Modify Multi Value Attribute `` Updates (replaces) the value or values of the attribute defined by attributeName with the new values defined by attributeValues. If the attribute is not present in the entry, then the value is added. ### Parameters
NameTypeDescriptionDefault ValueRequired

Configuration

String

The name of the configuration to use.

x

DN

String

The DN of the LDAP entry to modify.

x

Attribute Name

String

The name of the attribute to update its values.

x

Attribute Values

Array of Any

The new values for the attribute.

#[payload]

Ignore Invalid Attribute

Boolean

If the attribute value to modify is already present, then don’t throw the INVALID_ATTRIBUTE error.

false

Reconnection Strategy

  • reconnect

  • reconnect-forever

A retry strategy in case of connectivity errors.

### For Configurations - config ### Throws - LDAP:COMMUNICATION - LDAP:CONNECTIVITY - LDAP:SECURITY - LDAP:CONTEXT\_NOT\_EMPTY - LDAP:INVALID\_ATTRIBUTE - LDAP:INVALID\_ENTRY - LDAP:NAME\_ALREADY\_BOUND - LDAP:NAME\_NOT\_FOUND - LDAP:OPERATION\_NOT\_SUPPORTED - LDAP:OPERATION\_NOT\_COMPLETED - LDAP:PERMISSION - LDAP:RETRY\_EXHAUSTED - LDAP:UNKNOWN ## Modify Single Value Attribute `` Updates (replaces) the value or values of the attribute defined by attributeName with the new value defined by attributeValue. If the attribute is not present in the entry, then the value is added. To update a value with a type different than String, use the update-multi-value-attribute operation and define a single element list with the value. ### Parameters
NameTypeDescriptionDefault ValueRequired

Configuration

String

The name of the configuration to use.

x

DN

String

The DN of the LDAP entry to modify.

x

Attribute Name

String

The name of the attribute to update its value.

x

Attribute Value

String

The new value for the attribute.

x

Ignore Invalid Attribute

Boolean

If the attribute value to modify is already present, then don’t throw the INVALID_ATTRIBUTE error.

false

Reconnection Strategy

  • reconnect

  • reconnect-forever

A retry strategy in case of connectivity errors.

### For Configurations - config ### Throws - LDAP:COMMUNICATION - LDAP:CONNECTIVITY - LDAP:SECURITY - LDAP:CONTEXT\_NOT\_EMPTY - LDAP:INVALID\_ATTRIBUTE - LDAP:INVALID\_ENTRY - LDAP:NAME\_ALREADY\_BOUND - LDAP:NAME\_NOT\_FOUND - LDAP:OPERATION\_NOT\_SUPPORTED - LDAP:OPERATION\_NOT\_COMPLETED - LDAP:PERMISSION - LDAP:RETRY\_EXHAUSTED - LDAP:UNKNOWN ## Paged Result Search `` Performs an LDAP search and streams the result to the rest of the flow. This means that if the LDAP server supports paging, this operation chunks the LDAP search request in pages, and then returns a list with all the results to the rest of the flow. For queries returning large results, it is best to use pagination, however, not all LDAP servers support this or are configured to support it. To use pagination, provide a page size value that’s less than or equal to the **Max Results** (count limit). If you get a size limit exceeded exception, ensure that the authenticated user has sufficient privileges, or that the LDAP server is not limited by its configuration, in which case, you should reduce the value of the fetch size. ### Parameters
NameTypeDescriptionDefault ValueRequired

Configuration

String

The name of the configuration to use.

x

Base DN

String

The base DN of the LDAP search.

x

Filter

String

A valid LDAP filter. LDAP connector supports LDAP search filters as defined in RFC 2254.

x

Attributes

Array of String

A list of the attributes to return in the result. If the attributes list is empty or null then, by default, all LDAP entry attributes are returned.

Scope

Enumeration, one of:

  • OBJECT

  • ONE_LEVEL

  • SUB_TREE

The scope of the search. Valid attributes are:

* OBJECT: Searches only the entry at the base DN so that only results from that entry are returned. This must meet the search filter criteria. * ONE_LEVEL: Searches all entries one level under the base DN and does not include entries in the base DN or any entries one level under the base DN. * SUB_TREE: Searches all entries at all levels under and including the specified base DN.

ONE_LEVEL

Timeout

Number

Search timeout in milliseconds. If the value is 0, this means to wait indefinitely.

0

Max Results

Number

The maximum number of entries to return as a result of the search. 0 indicates to return all entries.

0

Return Object

Boolean

Enables or disables returning objects that are returned as part of the result. If disabled, only the name and class of the object is returned. If enabled, the object is returned.

false

Page Size

Number

If the LDAP server supports paging results, set this attribute to the size of the page. If the pageSize is less than or equal to 0, paging is disabled.

0

Order by attribute

String

Name of the LDAP attribute used to sort results.

Ascending order?

Boolean

If orderBy is set, indicates whether to sort in ascending or descending order.

true

Structural Object Class

String

The type of entry to return. This is used for DataSense in Anypoint Studio IDE and has no impact on Mule.

Fetch Size

Number

The maximum number of LDAP entries retrieved at once per page.

200

Streaming Strategy

  • repeatable-in-memory-iterable

  • repeatable-file-store-iterable

  • non-repeatable-iterable

Configures how Mule processes streams. The default is to use repeatable streams.

Target Variable

String

Name of the variable that stores the operation’s output.

Target Value

String

Expression that evaluates the operation’s output. The outcome of the expression is stored in Target Variable.

#[payload]

Reconnection Strategy

  • reconnect

  • reconnect-forever

A retry strategy in case of connectivity errors.

### Output

Type

Array of Object

### For Configurations - config ### Throws - LDAP:COMMUNICATION - LDAP:CONNECTIVITY - LDAP:SECURITY - LDAP:CONTEXT\_NOT\_EMPTY - LDAP:INVALID\_ATTRIBUTE - LDAP:INVALID\_ENTRY - LDAP:NAME\_ALREADY\_BOUND - LDAP:NAME\_NOT\_FOUND - LDAP:OPERATION\_NOT\_SUPPORTED - LDAP:OPERATION\_NOT\_COMPLETED - LDAP:PERMISSION - LDAP:UNKNOWN ## Rename entry `` Renames an existing LDAP entry (moves an entry from a DN to another one). ### Parameters
NameTypeDescriptionDefault ValueRequired

Configuration

String

The name of the configuration to use.

x

Current DN

String

DN of the existing entry to rename.

x

New DN

String

Destination DN

x

Reconnection Strategy

  • reconnect

  • reconnect-forever

A retry strategy in case of connectivity errors.

### For Configurations - config ### Throws - LDAP:COMMUNICATION - LDAP:CONNECTIVITY - LDAP:SECURITY - LDAP:CONTEXT\_NOT\_EMPTY - LDAP:INVALID\_ATTRIBUTE - LDAP:INVALID\_ENTRY - LDAP:NAME\_ALREADY\_BOUND - LDAP:NAME\_NOT\_FOUND - LDAP:OPERATION\_NOT\_SUPPORTED - LDAP:OPERATION\_NOT\_COMPLETED - LDAP:PERMISSION - LDAP:RETRY\_EXHAUSTED - LDAP:UNKNOWN ## Search `` Performs an LDAP search that returns a list of all resulting LDAP entries. For queries returning large results, use pagination; however, not all LDAP servers support this or are configured to support it. To use pagination, provide a page size value that’s less than or equal to the max results (count limit). If you get a size limit exceeded exception, ensure that the authenticated user has sufficient privileges, or that the LDAP server is not limited by its configuration. ### Parameters
NameTypeDescriptionDefault ValueRequired

Configuration

String

The name of the configuration to use.

x

Base DN

String

The base DN of the LDAP search.

x

Filter

String

A valid LDAP filter. The LDAP connector supports LDAP search filters as defined in RFC 2254.

x

Attributes

Array of String

A list of the attributes to return in the result. If the attributes list is empty or null, by default all LDAP entry attributes are returned.

Scope

Enumeration, one of:

  • OBJECT

  • ONE_LEVEL

  • SUB_TREE

The scope of the search. Valid attributes are:

* OBJECT: This value is used to indicate searching only the entry at the base DN, resulting in only that entry being returned (keeping in mind that it also has to meet the search filter criteria) * ONE_LEVEL: This value is used to indicate searching all entries one level under the base DN - but not including the base DN and not including any entries under that one level under the base DN. * SUB_TREE: This value is used to indicate searching of all entries at all levels under and including the specified base DN.

ONE_LEVEL

Timeout

Number

Search timeout in milliseconds. If the value is 0, this means to wait indefinitely.

0

Max Results

Number

The maximum number of entries to return as a result of the search. 0 indicates to return all entries.

0

Return Object

Boolean

Enables or disables objects returned as part of the result. If disabled, only the name and class of the object is returned. If enabled, the object is also returned.

false

Page Size

Number

If the LDAP server supports paging results, set this attribute to the size of the page. If the pageSize is less than or equal to 0, then paging is disabled.

0

Structural Object Class

String

The type of entry to return. This is used for DataSense in Anypoint Studio IDE and has no impact on Mule.

Target Variable

String

The name of a variable in which the operation’s output is placed.

Target Value

String

An expression to evaluate against the operation’s output and the outcome of that expression stored in the target variable.

#[payload]

Reconnection Strategy

  • reconnect

  • reconnect-forever

A retry strategy in case of connectivity errors.

### Output

Type

Array of Object

### For Configurations - config ### Throws - LDAP:COMMUNICATION - LDAP:CONNECTIVITY - LDAP:SECURITY - LDAP:CONTEXT\_NOT\_EMPTY - LDAP:INVALID\_ATTRIBUTE - LDAP:INVALID\_ENTRY - LDAP:NAME\_ALREADY\_BOUND - LDAP:NAME\_NOT\_FOUND - LDAP:OPERATION\_NOT\_SUPPORTED - LDAP:OPERATION\_NOT\_COMPLETED - LDAP:PERMISSION - LDAP:RETRY\_EXHAUSTED - LDAP:UNKNOWN ## Search One `` Performs an LDAP search that is supposed to return a unique result. If the search returns more than one result, a warning log message is generated and the first element of the result is returned. Use this operation over `#lookup(LDAPConfiguration, LDAPConnectionWrapper, String, List, String)` when you don’t know the DN of the entry you need to retrieve but have a set of attributes that you know should return a single entry (for example an email address). ### Parameters
NameTypeDescriptionDefault ValueRequired

Configuration

String

The name of the configuration to use.

x

Base DN

String

The base DN of the LDAP search.

x

Filter

String

A valid LDAP filter. The LDAP connector supports LDAP search filters as defined in RFC 2254.

x

Attributes

Array of String

A list of the attributes to return in the result. If the attributes list is empty or null, then by default all LDAP entry attributes are returned.

Scope

Enumeration, one of:

  • OBJECT

  • ONE_LEVEL

  • SUB_TREE

The scope of the search. Valid attributes are:

* OBJECT: Indicates to search only for the entry at the base DN, resulting in only that entry being returned (keep in mind that it also has to meet the search filter criteria). * ONE_LEVEL: Indicates to search for all entries one level under the base DN - but not including the base DN and not including any entries under that one level under the base DN. * SUB_TREE: Indicates to search for all entries at all levels under and including the specified base DN.

ONE_LEVEL

Timeout

Number

Search timeout in milliseconds. If the value is 0, this means to wait indefinitely.

0

Max Results

Number

The maximum number of entries to return as a result of the search. 0 indicates to return all entries.

0

Return Object

Boolean

Enables or disables returning objects returned as part of the result. If disabled, only the name and class of the object is returned. If enabled, the object also returns.

false

Structural Object Class

String

The type of entry to return. This is used for DataSense in Anypoint Studio IDE and has no impact on Mule.

Target Variable

String

The name of a variable in which the operation’s output is placed.

Target Value

String

An expression to evaluate against the operation’s output and the outcome of that expression stored in the target variable.

#[payload]

Reconnection Strategy

  • reconnect

  • reconnect-forever

A retry strategy in case of connectivity errors.

### Output

Type

Object

### For Configurations - config ### Throws - LDAP:COMMUNICATION - LDAP:CONNECTIVITY - LDAP:SECURITY - LDAP:CONTEXT\_NOT\_EMPTY - LDAP:INVALID\_ATTRIBUTE - LDAP:INVALID\_ENTRY - LDAP:NAME\_ALREADY\_BOUND - LDAP:NAME\_NOT\_FOUND - LDAP:OPERATION\_NOT\_SUPPORTED - LDAP:OPERATION\_NOT\_COMPLETED - LDAP:PERMISSION - LDAP:RETRY\_EXHAUSTED - LDAP:UNKNOWN ## Unbind `` Closes the current connection, forcing the login operation (bind) the next time it is used. ### Parameters
NameTypeDescriptionDefault ValueRequired

Configuration

String

The name of the configuration to use.

x

Reconnection Strategy

  • reconnect

  • reconnect-forever

A retry strategy in case of connectivity errors.

### For Configurations - config ### Throws - LDAP:COMMUNICATION - LDAP:CONNECTIVITY - LDAP:SECURITY - LDAP:CONTEXT\_NOT\_EMPTY - LDAP:INVALID\_ATTRIBUTE - LDAP:INVALID\_ENTRY - LDAP:NAME\_ALREADY\_BOUND - LDAP:NAME\_NOT\_FOUND - LDAP:OPERATION\_NOT\_SUPPORTED - LDAP:OPERATION\_NOT\_COMPLETED - LDAP:PERMISSION - LDAP:RETRY\_EXHAUSTED - LDAP:UNKNOWN ## Sources ## On Modified Objects `` Triggers when an existing LDAP entry is modified. ### Parameters
NameTypeDescriptionDefault ValueRequired

Configuration

String

The name of the configuration to use.

x

Base DN

String

The base DN of the LDAP search.

x

Filter

String

A valid LDAP filter. The LDAP connector supports LDAP search filters as defined in RFC 2254.

Attributes

Array of String

A list of the attributes to return in the result. If the attributes list is empty or null, then by default all LDAP entry attributes are returned.

Scope

Enumeration, one of:

  • OBJECT

  • ONE_LEVEL

  • SUB_TREE

The scope of the search. Valid attributes are:

* OBJECT: Searches only the entry at the base DN so that only results from that entry are returned. This must meet the search filter criteria. * ONE_LEVEL: Searches all entries one level under the base DN and does not include entries in the base DN or any entries one level under the base DN. * SUB_TREE: Searches all entries at all levels under and including the specified base DN.

ONE_LEVEL

Structural Object Class

String

The type of entry to return. This is used for DataSense in Anypoint Studio IDE and has no impact on Mule.

Since

String

Specify a date in YYYYMMDDhhmmss’Z' format, which is the way LDAP formats dates (for example, 20170317163040Z). If this field is empty, this operation retrieves the selected objects from the time the Mule app is started.

Primary Node Only

Boolean

Determines whether to execute this source only on the primary node when running Mule instances in a cluster.

Scheduling Strategy

scheduling-strategy

Configures the scheduler that triggers the polling.

x

Redelivery Policy

Defines a policy for processing the redelivery of the same message.

Reconnection Strategy

  • reconnect

  • reconnect-forever

A retry strategy in case of connectivity errors.

### Output

Type

Object

Attributes Type

Any

### For Configurations - config ## On New Objects `` Triggers when a new LDAP entry is added. ### Parameters
NameTypeDescriptionDefault ValueRequired

Configuration

String

The name of the configuration to use.

x

Base DN

String

The base DN of the LDAP search.

x

Filter

String

A valid LDAP filter. The LDAP connector supports LDAP search filters as defined in RFC 2254.

Attributes

Array of String

A list of the attributes to return in the result. If the attributes list is empty or null, then by default all LDAP entry attributes are returned.

Scope

Enumeration, one of:

  • OBJECT

  • ONE_LEVEL

  • SUB_TREE

The scope of the search. Valid attributes are:

* OBJECT: Searches only the entry at the base DN so that only results from that entry are returned. This must meet the search filter criteria. * ONE_LEVEL: Searches all entries one level under the base DN and does not include entries in the base DN or any entries one level under the base DN. * SUB_TREE: Searches all entries at all levels under and including the specified base DN.

ONE_LEVEL

Structural Object Class

String

The type of entry to return. This is used for DataSense in Anypoint Studio IDE and has no impact on Mule.

Since

String

Specify a date in YYYYMMDDhhmmss’Z' format, which is the way LDAP formats dates (for example, 20170317163040Z). If this field is empty, this operation retrieves the selected objects from the time the Mule app is started.

Primary Node Only

Boolean

Determines whether to execute this source only on the primary node when running Mule instances in a cluster.

Scheduling Strategy

scheduling-strategy

Configures the scheduler that triggers the polling.

x

Redelivery Policy

Defines a policy for processing the redelivery of the same message.

Reconnection Strategy

  • reconnect

  • reconnect-forever

A retry strategy in case of connectivity errors.

### Output

Type

Object

Attributes Type

Any

### For Configurations - config ## Reconnection
FieldTypeDescriptionDefault ValueRequired

Fails Deployment

Boolean

When the application is deployed, a connectivity test is performed on all connectors. If set to true, deployment fails if the test doesn’t pass after exhausting the associated reconnection strategy.

Reconnection Strategy

  • reconnect

  • reconnect-forever

The reconnection strategy to use.

### Reconnect
FieldTypeDescriptionDefault ValueRequired

Frequency

Number

How often in milliseconds to reconnect.

Count

Number

How many reconnection attempts to make.

blocking

Boolean

If false, the reconnection strategy runs in a separate, non-blocking thread.

true

### Reconnect Forever
FieldTypeDescriptionDefault ValueRequired

Frequency

Number

How often in milliseconds to reconnect.

blocking

Boolean

If false, the reconnection strategy runs in a separate, non-blocking thread.

true

## Expiration Policy Type
FieldTypeDescriptionDefault ValueRequired

Max Idle Time

Number

A scalar time value for the maximum amount of time a dynamic configuration instance should be allowed to be idle before it’s considered eligible for expiration.

Time Unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

A time unit that qualifies the maxIdleTime attribute.

## Repeatable In-Memory Iterable Type
FieldTypeDescriptionDefault ValueRequired

Initial Buffer Size

Number

The amount of instances to initially allow to be kept in memory to consume the stream and provide random access to it. If the stream contains more data than can fit into this buffer, the buffer expands according to the bufferSizeIncrement attribute, with an upper limit of maxInMemorySize. Default value is 100 instances.

Buffer Size Increment

Number

This is by how much the buffer size expands if it exceeds its initial size. Setting a value of zero or lower means that the buffer should not expand, and to raise a STREAM_MAXIMUM_SIZE_EXCEEDED error when the buffer gets full. Default value is 100 instances.

Max Buffer Size

Number

The maximum amount of memory to use. If more than that is used, then a STREAM_MAXIMUM_SIZE_EXCEEDED error is raised. A value lower than or equal to zero means no limit.

## Repeatable File Store Iterable Type
FieldTypeDescriptionDefault ValueRequired

Max In Memory Size

Number

The maximum amount of instances to keep in memory. If more than that is required, then it starts to buffer the content on disk.

Buffer Unit

Enumeration, one of:

  • BYTE

  • KB

  • MB

  • GB

The unit in which maxInMemorySize is expressed.

## TLS Type Configures TLS to provide secure communications for the Mule app.
FieldTypeDescriptionDefault ValueRequired

Enabled Protocols

String

A comma-separated list of protocols enabled for this context.

Enabled Cipher Suites

String

A comma-separated list of cipher suites enabled for this context.

Trust Store

Configures the TLS truststore.

Key Store

Configures the TLS keystore.

Revocation Check

Configures certificate revocation checking.

## Truststore Type Configures the truststore for TLS.
FieldTypeDescriptionDefault ValueRequired

Path

String

Path to the truststore. Mule resolves the path relative to the current classpath and file system.

Password

String

Password used to protect the truststore.

Type

String

Type of store.

Algorithm

String

Encryption algorithm that the truststore uses.

Insecure

Boolean

If true, Mule stops performing certificate validations. Setting this to true can make connections vulnerable to attacks.

## Keystore Type Configures the keystore for the TLS protocol. The keystore you generate contains a private key and a public certificate.
FieldTypeDescriptionDefault ValueRequired

Path

String

Path to the keystore. Mule resolves the path relative to the current classpath and file system.

Type

String

Type of store.

Alias

String

Alias of the key to use when the keystore contains multiple private keys. By default, Mule uses the first key in the file.

Key Password

String

Password used to protect the private key.

Password

String

Password used to protect the keystore.

Algorithm

String

Encryption algorithm that the keystore uses.

## Standard Revocation Check Type Configures standard revocation checks for TLS certificates.
FieldTypeDescriptionDefault ValueRequired

Only End Entities

Boolean

Which elements to verify in the certificate chain:

* true - Verify only the last element in the certificate chain. * false - Verify all elements in the certificate chain.

Prefer Crls

Boolean

How to check certificate validity:

* true - Check the Certification Revocation List (CRL) for certificate validity. * false - Use the Online Certificate Status Protocol (OCSP) to check certificate validity.

No Fallback

Boolean

Whether to use the secondary method to check certificate validity:

* true - Use the method that wasn’t specified in the Prefer Crls field (the secondary method) to check certificate validity. * false - Do not use the secondary method to check certificate validity.

Soft Fail

Boolean

What to do if the revocation server can’t be reached or is busy:

* true - Avoid verification failure. * false - Allow the verification to fail.

## Custom OCSP Responder Type Configures a custom OCSP responder for certification revocation checks.
FieldTypeDescriptionDefault ValueRequired

Url

String

URL of the OCSP responder.

Cert Alias

String

Alias of the signing certificate for the OCSP response. If specified, the alias must be in the truststore.

## CRL File Type Specifies the location of the certification revocation list (CRL) file.
FieldTypeDescriptionDefault ValueRequired

Path

String

Path to the CRL file.

## Redelivery Policy Type Configures the redelivery policy for executing requests that generate errors. You can add a redelivery policy to any source in a flow.
FieldTypeDescriptionDefault ValueRequired

Max Redelivery Count

Number

The maximum number of times that a redelivered request can be processed unsuccessfully before returning a REDELIVERY_EXHAUSTED error.

Use Secure Hash

Boolean

If true, Mule uses a secure hash algorithm to identify a redelivered message.

Message Digest Algorithm

String

Secure hashing algorithm to use if the Use Secure Hash field is true. If the payload of the message is a Java object, Mule ignores this value and returns the value that the payload’s hashCode() returned.

Id Expression

String

One or more expressions that determine when a message was redelivered. You can set this property only if the Use Secure Hash field is false.

Object Store

Object Store

Configures the object store that stores the redelivery counter for each message.

## See Also - [Using Anypoint Studio to Configure a Connector](https://docs.mulesoft.com/connectors/introduction/intro-config-use-studio) - [Salesforce Help](https://help.salesforce.com) --- product: LDAP Connector version: 3.6 --- # Using Studio to Configure LDAP Connector 3.6 > For the full documentation index, see: https://docs.mulesoft.com/llms.txt Anypoint Studio (Studio) editors help you design and update your Mule applications, properties, and configuration files. To add and configure a connector in Studio: 1. [Create a Mule project](#create-mule-project). 2. [Add the connector to your Mule project](#add-connector-to-project). 3. [Configure a source for the connector’s flow](#configure-source). 4. [Add a connector operation to the flow](#add-connector-operation). 5. [Configure a global element for the connector](#configure-global-element). 6. [Configure the other connector fields](#configure-other-fields). When you run the connector, you can view the app log to check for problems in real time, as described in [View the App Log](#view-app-log). If you are new to configuring connectors in Studio, see [Using Anypoint Studio to Configure a Connector](https://docs.mulesoft.com/connectors/introduction/intro-config-use-studio). If, after reading this topic, you need additional information about the connector fields, see the [LDAP Connector Reference](https://docs.mulesoft.com/ldap-connector/3.6/ldap-connector-reference). ## Create a Mule Project In Studio, create a new Mule project in which to add and configure the connector: 1. In Studio, select **File > New > Mule Project**. 2. Enter a name for your Mule project and click **Finish**. ## Add the Connector to Your Mule Project Add Anypoint Connector for Lightweight Directory Access Protocol Connector (LDAP Connector) to your Mule project to automatically populate the XML code with the connector’s namespace and schema location and add the required dependencies to the project’s `pom.xml` file: 1. In the **Mule Palette** view, click **(X) Search in Exchange**. 2. In **Add Dependencies to Project**, type `ldap` in the search field. 3. Click **LDAP Connector** in **Available modules**. 4. Click **Add**. 5. Click **Finish**. Adding a connector to a Mule project in Studio does not make that connector available to other projects in your Studio workspace. ## Configure a Source A source initiates a flow when a specified condition is met. You can configure one of these sources to use with LDAP Connector: - On Modified Objects Initiates a flow when an LDAP data object is modified - On New Objects Initiates a flow when a new LDAP data object is created - HTTP Listener Initiates a flow each time it receives a request on the configured host and port - Scheduler Initiates a flow when a time-based condition is met For example, to configure an **On Modified Objects** source, follow these steps: 1. In the **Mule Palette** view, select **On Modified objects**. 2. Drag **On Modified Objects** to the Studio canvas. 3. If you want to customize the display name, change the value of the **Display Name** field. 4. In the **Connector configuration** field, either select an existing global element or click the plus sign (**+**) to configure a new global element. 5. On the **General** tab, specify the principal distinguished name (DN) for the connection, the authentication mechanism, and the configuration URL. 6. On the **Advanced** tab, specify reconnection information, including a reconnection strategy. 7. Click **Test Connection** to confirm that Mule can connect with the specified server. 8. In the **On Modified Objects** configuration screen, specify a value for the **Base DN** field. 9. Click **OK**. ## Add a Connector Operation to the Flow When you add a connector operation to your flow, you are specifying an action for that connector to perform. To add an operation for LDAP Connector, follow these steps: 1. In the **Mule Palette** view, select **LDAP** and then select the desired operation. 2. Drag the operation onto the Studio canvas, next to the input source. ## Configure a Global Element for the Connector When you configure a connector, configure a global element that all instances of that connector in the app can use. Configuring a global element requires you to provide the authentication credentials that the connector requires to access the target LDAP system. To configure the global element for LDAP Connector, follow these steps: 1. Select the operation in the Studio canvas. 2. In the **General** configuration screen for the operation, click **+** to access the global element configuration fields. 3. In the **General** tab, in **Connection**, select the connection type and then complete the associated connection fields. For information about configuring the SSL and TLS connection types, see [Configure an SSL Connection Type](#ssl-connection-type) and [Configure a TLS Connection Type](#tls-connection-type). You can reference a configuration file that contains ANT-style property placeholders (recommended), or you can enter your authorization credentials in the global configuration properties. For information about the benefits of using property placeholders and how to configure them, see [Anypoint Connector Configuration](https://docs.mulesoft.com/connectors/introduction/intro-connector-configuration-overview). 4. In the **Advanced** tab, optionally specify reconnection information, including a reconnection strategy. 5. Click **Test Connection** to confirm that Mule can connect with the specified server. 6. Click **OK**. ### Configure an SSL Connection Type To configure an SSL connection type, use Anypoint Studio to set up an SSL connection in the LDAP global element: 1. In the **Connection** field of the global element, select `SSL Configuration`. 2. Complete the required fields. Connect to SSL using port 636. When you set up an SSL connection type, you can set up one custom truststore. To support this scenario, the connector overrides the JVM default truststore path, which can affect other processes that depend on that truststore. ### Configure a TLS Connection Type To configure a TLS connection type, use Studio to set up a TLS connection in the LDAP global element: 1. In the **Connection** field of the global element, select `TLS Configuration`. 2. Select the **Advanced** Tab. 3. In the **Extended configurations** field, select **Edit inline** and then add the `org.mule.module.ldap.trustStorePath` and `org.mule.module.ldap.trustStorePassword` key values. 4. Ensure that the native LDAP pooling functionality is turned off. For example if using JNDI, do not use attributes such as `com.sun.jndi.ldap.connect.pool=true`, which causes problems when using TLS. Connect to TLS using port 389, using `ldap` instead of `ldaps` in the associated URL. For an example of configuring a TLS connection, see [Set Up a Common Truststore](https://docs.mulesoft.com/ldap-connector/3.6/ldap-connector-examples#set-up-common-truststore). ## Configure Additional Connector Fields After you configure a global element for LDAP Connector, configure the other required fields for the connector. The required fields vary depending on which connector operation you use. ## View the App Log To check for problems, you can view the app log as follows: - If you’re running the app from Anypoint Platform, the app log output goes to the Anypoint Studio console window. - If you’re running the app using Mule from the command line, the app log output goes to your operating system console. Unless the log file path is customized in the app’s log file (`log4j2.xml`), you can also access the app log in the default location `MULE_HOME/logs/.log`. You can configure the location of the log path in the app log file `log4j2.xml`. ## Next Step After configuring Studio, you can try using the [LDAP Connector Examples](https://docs.mulesoft.com/ldap-connector/3.6/ldap-connector-examples). ## See Also - [Using Anypoint Studio to Configure a Connector](https://docs.mulesoft.com/connectors/introduction/intro-config-use-studio) - [LDAP Connector Reference](https://docs.mulesoft.com/ldap-connector/3.6/ldap-connector-reference) - [Salesforce Help](https://help.salesforce.com) --- product: LDAP Connector version: 3.7 is-latest-version: true --- # Using Studio to Configure LDAP Connector 3.7 > For the full documentation index, see: https://docs.mulesoft.com/llms.txt Anypoint Studio (Studio) editors help you design and update your Mule applications, properties, and configuration files. To add and configure a connector in Studio: 1. [Create a Mule project](#create-mule-project). 2. [Add the connector to your Mule project](#add-connector-to-project). 3. [Configure a source for the connector’s flow](#configure-source). 4. [Add a connector operation to the flow](#add-connector-operation). 5. [Configure a global element for the connector](#configure-global-element). 6. [Configure the other connector fields](#configure-other-fields). When you run the connector, you can view the app log to check for problems in real time, as described in [View the App Log](#view-app-log). If you are new to configuring connectors in Studio, see [Using Anypoint Studio to Configure a Connector](https://docs.mulesoft.com/connectors/introduction/intro-config-use-studio). If, after reading this topic, you need additional information about the connector fields, see the [LDAP Connector Reference](https://docs.mulesoft.com/ldap-connector/latest/ldap-connector-reference). ## Create a Mule Project In Studio, create a new Mule project in which to add and configure the connector: 1. In Studio, select **File > New > Mule Project**. 2. Enter a name for your Mule project and click **Finish**. ## Add the Connector to Your Mule Project Add Anypoint Connector for Lightweight Directory Access Protocol Connector (LDAP Connector) to your Mule project to automatically populate the XML code with the connector’s namespace and schema location and add the required dependencies to the project’s `pom.xml` file: 1. In the **Mule Palette** view, click **(X) Search in Exchange**. 2. In **Add Dependencies to Project**, type `ldap` in the search field. 3. Click **LDAP Connector** in **Available modules**. 4. Click **Add**. 5. Click **Finish**. Adding a connector to a Mule project in Studio does not make that connector available to other projects in your Studio workspace. ## Configure a Source A source initiates a flow when a specified condition is met. You can configure one of these sources to use with LDAP Connector: - On Modified Objects Initiates a flow when an LDAP data object is modified - On New Objects Initiates a flow when a new LDAP data object is created - HTTP Listener Initiates a flow each time it receives a request on the configured host and port - Scheduler Initiates a flow when a time-based condition is met For example, to configure an **On Modified Objects** source, follow these steps: 1. In the **Mule Palette** view, select **On Modified objects**. 2. Drag **On Modified Objects** to the Studio canvas. 3. If you want to customize the display name, change the value of the **Display Name** field. 4. In the **Connector configuration** field, either select an existing global element or click the plus sign (**+**) to configure a new global element. 5. On the **General** tab, specify the principal distinguished name (DN) for the connection, the authentication mechanism, and the configuration URL. 6. On the **Advanced** tab, specify reconnection information, including a reconnection strategy. 7. Click **Test Connection** to confirm that Mule can connect with the specified server. 8. In the **On Modified Objects** configuration screen, specify a value for the **Base DN** field. 9. Click **OK**. ## Add a Connector Operation to the Flow When you add a connector operation to your flow, you are specifying an action for that connector to perform. To add an operation for LDAP Connector, follow these steps: 1. In the **Mule Palette** view, select **LDAP** and then select the desired operation. 2. Drag the operation onto the Studio canvas, next to the input source. ## Configure a Global Element for the Connector When you configure a connector, configure a global element that all instances of that connector in the app can use. Configuring a global element requires you to provide the authentication credentials that the connector requires to access the target LDAP system. To configure the global element for LDAP Connector, follow these steps: 1. Select the operation in the Studio canvas. 2. In the **General** configuration screen for the operation, click **+** to access the global element configuration fields. 3. In the **General** tab, in **Connection**, select the connection type and then complete the associated connection fields. For information about configuring the SSL (Deprecated), Secure SSL, and TLS connection types, see [Configure an SSL Connection Type (Deprecated)](#ssl-connection-type), [Configure a Secure SSL Connection Type](#secure-ssl-connection-type), and [Configure a TLS Connection Type](#tls-connection-type). You can reference a configuration file that contains ANT-style property placeholders (recommended), or you can enter your authorization credentials in the global configuration properties. For information about the benefits of using property placeholders and how to configure them, see [Anypoint Connector Configuration](https://docs.mulesoft.com/connectors/introduction/intro-connector-configuration-overview). 4. In the **Advanced** tab, optionally specify reconnection information, including a reconnection strategy. 5. Click **Test Connection** to confirm that Mule can connect with the specified server. 6. Click **OK**. ### Configure an SSL Connection Type (Deprecated) > [!IMPORTANT] The SSL connection type is deprecated. Use the > [Secure SSL connection type](#secure-ssl-connection-type) instead, which accepts a Mule TLS > context factory and supports FIPS 140-3 compliant deployments. To configure an SSL connection type, use Anypoint Studio to set up an SSL connection in the LDAP global element: 1. In the **Connection** field of the global element, select `SSL Configuration`. 2. Complete the required fields. Connect to SSL using port 636. When you set up an SSL connection type, you can set up one custom truststore. To support this scenario, the connector overrides the JVM default truststore path, which can affect other processes that depend on that truststore. ### Configure a Secure SSL Connection Type The Secure SSL connection type uses a Mule TLS context factory for trust store configuration. Use this connection type for FIPS 140-3 compliant deployments. It is also supported in non-FIPS environments with any trust store type provided via **TLS Context** field. To configure a Secure SSL connection type, use Studio to set up a Secure SSL connection in the LDAP global element: 1. In the **Connection** field of the global element, select `Secure SSL Configuration`. 2. In the **TLS Context** field, click the plus sign (**+**) to configure a new TLS context, or select an existing one. 3. In the TLS context, configure your truststore settings, including the truststore path, password, and type. 4. Complete the remaining required fields, including **Principal DN** and **URL**. 5. Click **Test Connection** to confirm that Mule can connect with the specified server. 6. Click **OK**. Connect to Secure SSL using port 636. ### Configure a TLS Connection Type To configure a TLS connection type, use Studio to set up a TLS connection in the LDAP global element: 1. In the **Connection** field of the global element, select `TLS Configuration`. 2. Select the **Advanced** Tab. 3. In the **Extended configurations** field, select **Edit inline** and then add the `org.mule.module.ldap.trustStorePath` and `org.mule.module.ldap.trustStorePassword` key values. 4. Ensure that the native LDAP pooling functionality is turned off. For example if using JNDI, do not use attributes such as `com.sun.jndi.ldap.connect.pool=true`, which causes problems when using TLS. Connect to TLS using port 389, using `ldap` instead of `ldaps` in the associated URL. For an example of configuring a TLS connection, see [Set Up a Common Truststore](https://docs.mulesoft.com/ldap-connector/latest/ldap-connector-examples#set-up-common-truststore). ## Configure Additional Connector Fields After you configure a global element for LDAP Connector, configure the other required fields for the connector. The required fields vary depending on which connector operation you use. ## View the App Log To check for problems, you can view the app log as follows: - If you’re running the app from Anypoint Platform, the app log output goes to the Anypoint Studio console window. - If you’re running the app using Mule from the command line, the app log output goes to your operating system console. Unless the log file path is customized in the app’s log file (`log4j2.xml`), you can also access the app log in the default location `MULE_HOME/logs/.log`. You can configure the location of the log path in the app log file `log4j2.xml`. ## Next Step After configuring Studio, you can try using the [LDAP Connector Examples](https://docs.mulesoft.com/ldap-connector/latest/ldap-connector-examples). ## See Also - [Using Anypoint Studio to Configure a Connector](https://docs.mulesoft.com/connectors/introduction/intro-config-use-studio) - [LDAP Connector Reference](https://docs.mulesoft.com/ldap-connector/latest/ldap-connector-reference) - [Salesforce Help](https://help.salesforce.com)