# Hive Hive Authentication

Source: https://userguide.qualytics.io/source-datastore/datastore/jdbc/hive/authentication/

Qualytics signs in to HiveServer2 with the identity set in the **Authentication** section of the connection form. Every query runs as that identity, so Hive (and Ranger, when it is in place) uses its privileges to decide what Qualytics may read (see [Permissions](https://userguide.qualytics.io/source-datastore/datastore/jdbc/hive/permissions/)). The **Type** field selects the method, and **Basic** is the default.

## Basic

With **Basic**, Qualytics signs in with a **User** and, optionally, a **Password**. **User** comes filled in as `hive`. Leave **Password** empty on a cluster that does not authenticate.

This is the simplest setup, suited to development clusters or clusters secured at the network level.

## Kerberos

With **Kerberos**, Qualytics signs in as a Kerberos principal instead of with a password. On the connection, you provide:

- **Client Principal**: the identity Qualytics logs in as, exactly as it appears in the keytab (for example `qualytics@EXAMPLE.COM`).
- **Keytab**: the keytab file holding that principal's key.
- **krb5.conf**: the Kerberos configuration for the cluster's realm, so Qualytics can reach its Key Distribution Center.
- **HiveServer2 Service Principal** (optional): the HiveServer2 service identity, such as `hive/_HOST@EXAMPLE.COM`. Left empty, Qualytics uses `hive/_HOST@` followed by the realm of the **Client Principal**.

Qualytics renews its Kerberos tickets on its own, so there is nothing to run by hand. Because the credentials live on the connection, changing them, or adding a second cluster, is a change to the connection rather than to your deployment. Grant the [Permissions](https://userguide.qualytics.io/source-datastore/datastore/jdbc/hive/permissions/) to the **Client Principal**.

The field-by-field rules, including how to bring a connection saved with the older single **Principal** field up to date, are in [Add Source Datastore](https://userguide.qualytics.io/source-datastore/datastore/jdbc/hive/how-tos/add-source/#authentication).

## ZooKeeper HA

If your cluster runs HiveServer2 in high availability behind **ZooKeeper**, select the **ZooKeeper HA** checkbox in the connection form and list the ZooKeeper quorum hosts in **Host**. Qualytics then discovers the available HiveServer2 instances through the quorum. It works with both **Basic** and **Kerberos**.

Connections saved with the former **Zookeeper** and **Zookeeper Kerberos** options of **Type** keep working: Qualytics reads them as **Basic** or **Kerberos** with **ZooKeeper HA** selected.

> **Tip: Credentials from a secrets manager**
>
> Credential fields, including the **Keytab** and **krb5.conf** files, can take their values from HashiCorp Vault or another secrets manager instead of being typed in or uploaded: turn on **Secrets Management** on the connection and write `${key}` in the field. See the [HashiCorp Vault](https://userguide.qualytics.io/source-datastore/datastore/deep-dive/hashicorp-vault/) pages for setup and troubleshooting.

*Last updated: November 16, 2026.*
