Granting Cloudera Lakehouse Engine access to Cloudera Harmony Catalog

Grant the Trino engine of each Cloudera Lakehouse Engine instance access to the realm, catalogs, namespaces, and tables in Cloudera Harmony Catalog, so that queries on Cloudera Harmony Catalog tables succeed.

Make sure that:

  • Your Cloudera Lakehouse Engine instance is deployed and running.
  • You have Ranger administrator privileges in Cloudera Unified Data Fabric. You get Ranger administrator access through the Access Control Administrators field when you deploy Cloudera Unified Data Fabric, or through the authz-role-admin application role in the AWC Admin Center. For more information, see Ranger users, groups, and administrators.
  • You have the SPIFFE ID of the Trino service account. For more information, see Service account SPIFFE IDs for Ranger and Harmony Catalog authorization.

Every Cloudera Lakehouse Engine instance requires these policies, whether the instance uses a new Cloudera Harmony Catalog instance or reuses an existing one. The Trino engine accesses Cloudera Harmony Catalog as the trino service account. If this service account does not have the required permissions, queries fail because the Trino engine does not have access to the resources.

  1. Open the Ranger UI of Cloudera Unified Data Fabric
  2. Sign in as a user with Ranger administrator privileges.
  3. On the Settings > Service Manager page, under Cloudera Harmony Catalog, click udf_harmony_catalog_<instance_name>
    The POLARIS Policies page is displayed.
  4. If you are configuring the Cloudera Harmony Catalog policies for the first time:
    1. To create a realm policy:
      1. Click Add New Policy, and in Policy Name, enter a name, for example, harmony-catalog-default-catalog-create policy.
      2. In the Resources section, set the following resources:
        • Realm Identifier – *
        • Next resource level – None
      3. In the Allow Rules section, in Select Users, select the SPIFFE ID of the trino service account.
      4. Click Add Permissions, select the following permissions, and click the check box:
        • Catalog Create
        • Catalog List
      5. Click Save.
    2. To create the catalog policy:
      1. Click Add New Policy, and in Policy Name, enter a name, for example, all - catalog.
      2. In the Resources section, set the following resources:
        • Realm Identifier – *
        • Catalog – *
        • Next resource level – None
      3. In the Allow Rules section, in Select Users, select the SPIFFE ID of the trino service account.
      4. Click Add Permissions, select the following permissions, and click the check box:
        • Catalog Metadata Full
        • Catalog Properties Read
      5. Click Save.
    3. To create the namespace policy:
      1. Click Add New Policy, and in Policy Name, enter a name, for example all - namespace.
      2. In the Resources section, set the following resources:
        • Realm Identifier – *
        • Catalog – *
        • Namespace – *
        • Next resource level – None
      3. In the Allow Rules section, in Select Users, select the SPIFFE ID of the trino service account.
      4. Click Add Permissions, select the following permissions, and click the check box:
        • Namespace Create
        • Namespace Drop
        • Namespace List
        • Namespace Metadata Full
        • Namespace Properties Read
        • Namespace Properties Write
        • Table Create
        • Table List
        • View Create
        • View List
      5. Click Save.
    4. To create the table policy:
      1. Click Add New Policy, and in Policy Name, enter a name, for example all - table.
      2. In the Resources section, set the following resources:
        • Realm Identifier – *
        • Catalog – *
        • Namespace – *
        • Table – *
      3. In the Allow Rules section, in Select Users, select the SPIFFE ID of the trino service account.
      4. Click Add Permissions, select the following permissions, and click the check box:
        • Table Data Read
        • Table Data Write
        • Table Drop
        • Table Format Version Upgrade
        • Table Location Set
        • Table Metadata Full
        • Table Partition Spec Add
        • Table Partition Specs Remove
        • Table Properties Read
        • Table Properties Remove
        • Table Properties Set
        • Table Properties Write
        • Table Schema Add
        • Table Schema Set Current
        • Table Snapshot Add
        • Table Snapshot-ref Remove
        • Table Snapshot-ref Set
        • Table Snapshots Remove
        • Table Sort Order Add
        • Table Sort Order Set Default
        • Table Statistics Remove
        • Table Statistics Set
        • Table Structure Manage
        • Table UUID Assign
        • View Drop
        • View Metadata Full
        • View Properties Read
        • View Properties Write
      5. Click Save.
  5. If you are updating the existing Cloudera Harmony Catalog policies:
    1. In the POLARIS Policies page, find the existing policy for each resource level.
    2. In the row of a policy, click the Edit icon in the Actions column.
      The Policy Details dialog box is displayed.
    3. In the Policy Details dialog box, check the values in the Resource section.
    4. In the Allow Rules section, click the add icon (+) to add a rule:
      1. In the new rule, in Select Users, select the SPIFFE ID of the trino service account.
      2. Click Add Permissions, select the permissions based on your resource level (realm, catalogs, namespaces, and tables), and click the check box.
      3. Click Save.

The POLARIS Policies page lists the realm, catalog, namespace, and table policies, each with the SPIFFE ID of the trino service account in the Users column. Users can run queries on Cloudera Harmony Catalog tables according to their Trino policies.