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 cluster that includes the Trino and OpenLDAP services. For more information, see Create a cluster.

Usage notes

  • If you cannot connect to EMR V3.43.1 or V5.9.1 after you enable LDAP, the cause is likely a missing configuration on worker nodes. You must log on to the master-1-1 node to find the value of the internal-communication.shared-secret parameter in the Presto config.properties file. Then, in the console, add this configuration to the Core and Task node groups. For more information about how to add a configuration item, see Add a configuration item.

  • LDAP authentication and Kerberos for Trino are mutually exclusive. You can enable only one at a time.

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 Trino service and click Status.

    2. Enable LDAP.

      • For EMR V5.11.1 and later, and EMR V3.45.1 and later

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

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

      • For EMR V5.11.0 and earlier, and EMR V3.45.0 and 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 TrinoMaster and choose more > enableLDAP in the Actions column.

        2. In the dialog box that appears, enter an Execution Reason and click OK.

        3. In the Confirm dialog box, click OK.

    3. Restart TrinoMaster.

      1. In the Components section, find TrinoMaster and click restart in the Actions column.

      2. In the dialog box that appears, enter an Execution Reason and click OK.

      3. In the Confirm dialog box, click OK.

  4. Connect to the Trino service.

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

    2. Run the following command to access Trino.

      Important

      When high security is enabled, you must use port 7778 to access Trino over HTTPS. This closes the original port 9090 and renders the http-server.http.port parameter setting invalid.

      trino --server https://{fqdn}:7778 --keystore-path {keystore_location} \
      --keystore-password {keystore_passwd} --catalog hive --user {user} --password

      Parameter

      Description

      {fqdn}

      The fully qualified domain name (FQDN) of the Trino master node.

      On the Configure tab of the Trino service page in the E-MapReduce console, select Dedicated Node Configuration and master-1-1. Then, view the ldap.url parameter to obtain the FQDN of the keystore. The FQDN is in the master-1-1.c-xxxxxxx.cn-x******.emr.aliyuncs.com format.

      {keystore_location}

      The path of the keystore.

      This is the value of the http-server.https.keystore.path parameter in the config.properties file. The path is /etc/emr/trino-conf/keystore.

      {keystore_passwd}

      The password of the keystore.

      This is the value of the http-server.https.keystore.key parameter in the config.properties file. You must retrieve the password yourself. You can run the following command on the master-1-1 node to retrieve it: awk -F= '/http-server.https.keystore.key/{print $2}' ${TRINO_CONF_DIR}/config.properties.

      {user}

      The LDAP username. This is the username that you added in Step 1.

      When prompted, enter the LDAP password that you set in Step 1.

  5. Optional: Disable LDAP authentication.

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

    2. Disable LDAP.

      • For EMR V5.11.1 and later, and EMR V3.45.1 and later

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

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

      • For EMR V5.11.0 and earlier, and EMR V3.45.0 and earlier

        1. In the Components section, find TrinoMaster and choose more > disableLDAP in the Actions column.

        2. In the dialog box that appears, enter an Execution Reason and click OK.

        3. In the Confirm dialog box, click OK.

    3. Restart TrinoMaster.

      1. In the Components section, find TrinoMaster and click restart in the Actions column.

      2. In the dialog box that appears, enter an Execution Reason and click OK.

      3. In the Confirm dialog box, click OK.