MapR 5.0 Documentation : Configure Hue to use Kerberos (MRv1)

If you want to use Hue on a secure cluster that uses Kerberos, you will need to set up a Kerberos principal and keytab file, as well as modify some configuration files. Each step in the process is explained in the following sections:

You must have a proper SSL Certificate to upload files using the Hue File Browser over HTTPS (SSL). Self-signed certificates do not work.

Creating a Kerberos Principal

Set up the Kerberos principal and keytab file as shown in Configuring JobTracker and YARN Servers with Kerberos.

Using Kerberos Tickets for Hue

Using the keytab and principal you created in the previous step, complete the following steps:

  1. Extract the Kerberos ticket from the keytab file.
  2. Optionally, enable the Kerberos ticket renewer.

Extracting the Kerberos Ticket from the keytab File

To extract the ticket from the keytab file, run the following command (substitute your host and realm for perfnode181.perf.lab@dev-maprtech):

kinit -k -t /opt/mapr/conf/mapr.keytab -c /tmp/hue_krb5_ccache mapr/perfnode181.perf.lab@dev-maprtech

This command extracts the ticket from mapr.keytab and copies it to the path to the Kerberos ticket file used by Hue.

Enabling the Kerberos Ticket Renewer

Kerberos tickets have a default expiration time of 7 days. If you plan to use the Hue Kerberos ticket renewer in your cluster, enable this functionality by making changes to these two files:

  • kdc.conf (add the max_renewable_life parameter)
  • krb5.conf (add the renew_lifetime parameter)

Modifying the hue.ini File

In the kerberos section of the hue.ini file, make the following changes:

  1. Supply the path to Hue's kerberos keytab file.
  2. Supply the kerberos principal name for Hue.
  3. Supply the path to kinit. 
  4. Configure the following in the [[mapred_clusters]] [[[default]]] section:
    • For versions prior to Hue 3.7-1505: Set security_enabled=True.
    • For Hue 3.7 versions prior to Hue 3.7-1505: Set mechanism=GSSAPI.
  5. For Hue with secure Hive: In the beeswax section, make sure that the hive_conf_dir property points to a directory containing a valid hive-site.xml file (either the original or a synced copy).
  6. For Hue with secure Hive: Provide the fully-qualified domain name (FQDN) for the hive_server_host.

    For Hue to work with HiveServer2 with security enabled, you must provide the fully-qualified domain name (FQDN) for the hive_server_host. This must match the FQDN of the hue_principal property.

  7. Optional: To enable SSL encryption, see Enable SSL Encryption Between Hue and Hive.

  8. For Oozie only: Set the oozie_url parameter in the liboozie section.

    For Hue to work with Oozie with security enabled, you must provide the URL where the Oozie service is running by setting the oozie_url parameter in the liboozie section.

  9. For Hbase with Hue 3.7 versions prior to Hue 3.7-1505: Set mechanism=GSSAPI in the [hbase] section.

The changes are summarized in the following hue.ini files, which you can use as a template:

MRv1 Example
    # Path to Hue's Kerberos keytab file

    # Kerberos principal name for Hue
    # hue_principal=mapr/<hostname>@<realm>
    # Substitute your hostname and realm in the example below

    # Path to kinit
    # Note that the actual path depends on which Linux OS you are using
  # If Kerberos security is enabled, use fully-qualified domain name
  # (FQDN)
  # Hive configuration directory, where hive-site.xml is located.
      # Enter the host on which you are running the Hadoop JobTracker
      ## jobtracker_host=perfnode181.perf.lab
      # jobtracker kerberos principal name
      # Change this if your MapReduce cluster is secured      
      # Security mechanism of authentication none/GSSAPI/MAPR-SECURITY
  # The URL where the Oozie service runs on. This is required in order for
  # users to submit jobs.

  # Requires FQDN in oozie_url if enabled
  # Security mechanism of authentication none/GSSAPI/MAPR-SECURITY
As of Hue 3.7-1505, the security_enabled and mechanism properties are automatically configured based on cluster configuration. Therefore, you do not need to configure values.

Modifying the File

The file contains a setting for MapR login options that defaults to the value maprsasl. Change this value to hybrid, which includes Kerberos and other security protocols.

The new line (after the change) should look like this:




Modifying the core-site.xml File

In the core-site.xml file, provide the shortname for the Kerberos principal as shown. In addition, verify that you configured the proxyuser during configuration. See Configuring Hue 3.x (MapR 4.0.x space)  for details..

<!-- Hue security configuration -->
  <value>*</value> <!-- A group that all users of Hue belong to, or the wildcard value "*" -->
In Hue 3.7, if you do not set the property to authentication, you might not be able to view job details in the Job Browser.

Restarting Warden and Hue

After you make all the changes to the files listed above, restart Warden and Hue so the changes will take effect.