Configure LDAP Authentication Between Hue and Hive

As of Hue 3.8.1, you can configure Hue to use LDAP Authentication when it communicates with HiveServer2. Before you configure Hue to use LDAP authentication with HiveServer2, verify that HiveServer2 is configured to use LDAP authentication. For more information, see Configure HiveServer2 to use LDAP Authentication with OpenLDAP.

Complete the following steps to configure LDAP authentication between Hue and Hive:

  1. In the [desktop] section of the hue.ini, configure the ldap_username and ldap_password with the LDAP credentials for the Hue user that will communicate with Hive. Also, remove any hashes (##) that appear directly before the property name.
  2. If the cluster is not secure, in the [beeswax] section of the hue.ini, set security_enabled to True.
    [desktop]
    ....
    # LDAP username and password of the hue user used for LDAP authentications.
    # Set it to use LDAP Authentication with HiveServer2 and Impala.
    ldap_username=sampleuser1
    ldap_password=123456
     
    ....
     
    [beeswax]
    ...
    # Change this if your Hive is secured
    security_enabled=True
    ...
    
  3. If the cluster is secure, in the [beeswax] section of the hue.ini, set mechanism to PLAIN. The changes are summarized in the following example:
    [desktop]
    ....
    # LDAP username and password of the hue user used for LDAP authentications.
    # Set it to use LDAP Authentication with HiveServer2 and Impala.
    ldap_username=sampleuser1
    ldap_password=123456
     
    ....
     
    [beeswax]
    ...
    # Change this if your Hive is secured
    security_enabled=${security_enabled}
    
    # Security mechanism of authentication none/GSSAPI/MAPR-SECURITY
    mechanism=PLAIN
    ...
    
    Note: Hue automatically determines that the cluster is secure when the cluster is configured to use MapR-SASL or Kerberos. Therefore, you do not need to set the security_enabled property in this case.
  4. Restart Hue.
    maprcli node services -name hue -action restart -nodes <space delimited list of nodes>