All Products
Search
Document Center

E-MapReduce:Manage LDAP authentication

Last Updated:Sep 21, 2026

After LDAP authentication is enabled for a service, you must provide your LDAP username and password when you access the service. This improves the security of the service. You can enable LDAP authentication for a service in the EMR console by performing simple operations. This frees you from the complex configuration of LDAP authentication.

Prerequisites

You have created a DataLake cluster with the Spark and OpenLDAP services selected. For more information, see create a cluster.

Note

The examples in this topic use Spark3.

Procedure

  1. Add an EMR user. For more information, see Add a user.

  2. Go to the Services tab.

    1. Log on to the EMR console.

    2. In the left-side navigation pane, click EMR on ECS.

    3. In the top navigation bar, select the region in which your cluster resides and select a resource group based on your business requirements.

    4. On the EMR on ECS page, find the desired cluster and click Services in the Actions column.

  3. Enable LDAP authentication.

    1. On the Services page, find the Spark3 service and click Status.

    2. Turn on the enableLDAP switch.

      • For EMR-5.11.1 or later, and EMR-3.45.1 or later:

        1. In the Service Overview section, turn on the enableLDAP switch.

        2. In the dialog box that appears, click OK.

      • For EMR-5.11.0 or earlier, and EMR-3.45.0 or earlier:

        Important

        For earlier EMR versions that lack a dedicated button, you must configure LDAP authentication manually. For more information, refer to the relevant open-source documentation.

        1. In the Components section, find SparkThriftServer, click the more > enableLDAP.

        2. In the dialog box that appears, enter a reason in the Execution Reason field and click OK.

        3. In the Confirm dialog box, click OK.

    3. Restart SparkThriftServer.

      1. In the Components section, find SparkThriftServer and click Restart in the Actions column.

      2. In the dialog box that appears, enter a reason in the Execution Reason field and click OK.

      3. In the Confirm dialog box, click OK.

  4. Connect to SparkThriftServer.

    After enabling LDAP authentication, use your LDAP credentials to connect to SparkThriftServer.

    1. Log on to the cluster using SSH. For more information, see log on to a cluster.

    2. Run the following command to connect to SparkThriftServer.

      • Beeline client:

        spark-beeline -u jdbc:hive2://master-1-1:10001 -n <user> -p <password>
      • JDBC:

        jdbc:hive2://master-1-1:10001/default;user=<user>;password=<password>
      Note

      In these commands, replace <user> with the LDAP username and <password> with the LDAP password. These are the credentials for the user that you added in Step 1.

  5. Optional: Disable LDAP authentication.

    1. On the Services page, find the Spark3 service and click Status.

    2. Turn off the enableLDAP switch.

      • For EMR-5.11.1 or later, and EMR-3.45.1 or later:

        1. In the Service Overview section, turn off the enableLDAP switch.

        2. In the dialog box that appears, click OK.

      • For EMR-5.11.0 or earlier, and EMR-3.45.0 or earlier:

        1. In the Components section, find SparkThriftServer, click the more > disableLDAP.

        2. In the dialog box that appears, enter a reason in the Execution Reason field and click OK.

        3. In the Confirm dialog box, click OK.

    3. Restart SparkThriftServer.

      1. In the Components section, find SparkThriftServer and click Restart in the Actions column.

      2. In the dialog box that appears, enter a reason in the Execution Reason field and click OK.

      3. In the Confirm dialog box, click OK.