Configuring Kerberos Authentication

Impala supports an enterprise-grade authentication system called Kerberos. Kerberos provides strong security benefits including capabilities that render intercepted authentication packets unusable by an attacker. It virtually eliminates the threat of impersonation by never sending a user's credentials in cleartext over the network.

Requirements for Using Impala with Kerberos

Impala supports the Cloudera ODBC driver and the Kerberos interface provided. To use Kerberos through the ODBC driver, the host type must be set depending on the level of the ODBD driver:

  • SecImpala for the ODBC 1.0 driver.
  • SecBeeswax for the ODBC 1.2 driver.
  • Blank for the ODBC 2.0 driver or higher, when connecting to a secure cluster.
  • HS2NoSasl for the ODBC 2.0 driver or higher, when connecting to a non-secure cluster.

Enabling Kerberos in Impala-shell

To enable Kerberos in the Impala shell, start the impala-shell command using the -k flag.

Configuring Impala to Support Kerberos Security

Enabling Kerberos authentication for Impala involves steps that can be summarized as follows:

  • Creating service principals for Impala and the HTTP service. Principal names take the form: serviceName/fully.qualified.domain.name@KERBEROS.REALM
  • Creating, merging, and distributing key tab files for these principals.
  • Editing /etc/default/impala (in cluster not managed by Cloudera Manager), or editing the Security settings in the Cloudera Manager interface, to accommodate Kerberos authentication.

Enabling Access to Internal Impala APIs for Kerberos Users

For applications that need direct access to Impala APIs, without going through the HiveServer2 or Beeswax interfaces, you can specify a list of Kerberos users who are allowed to call those APIs. By default, the impala and hdfs users are the only ones authorized for this kind of access. Any users not explicitly authorized through the internal_principals_whitelist configuration setting are blocked from accessing the APIs. This setting applies to all the Impala-related daemons, although currently it is primarily used for HDFS to control the behavior of the catalog server.

Customizing Kerberos Principals for Impala

  1. In Cloudera Manager, click Clusters > Impala to go to the Impala service.

  2. Click the Configuration tab.

  3. Select Scope > Impala (Service-Wide).

  4. In the Kerberos Principal field, add the custom Kerberos principal name to be used by all roles of this service.

  5. Click Save Changes.

  6. In the Instances tab, click Actions to Selected and select Regenerate missing keytab. Click Save.

  7. After setting the new kerberos principal name, restart stale services.

  8. In order to be able to regenerate missing keytabs, stop role instances.

Mapping Kerberos Principals to Short Names for Impala

Impala can support the additional mapping rules that will be inserted before rules generated from the list of trusted realms and before the default rule. The support is disabled by default in Impala.

To enable mapping Kerberos principals to short names:

  1. In Cloudera Manager, select the Impala service.
  2. In the Configuration tab, select Impala (Service-Wide) in Scope and Advanced in Category.
  3. Select the Use HDFS Rules to Map Kerberos Principals to Short Names field.
  4. Click Save Changes, and restart the Impala service.