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.
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.
Open the Ranger UI of Cloudera Unified Data Fabric
Sign in as a user with Ranger administrator privileges.
On the Settings > Service Manager page, under Cloudera Harmony Catalog, click
udf_harmony_catalog_<instance_name>
The POLARIS Policies page is
displayed.
If you are configuring the Cloudera Harmony Catalog policies for the
first time:
To create a realm policy:
Click Add New Policy, and in
Policy Name, enter a name, for
example, harmony-catalog-default-catalog-create
policy.
In the Resources section, set the
following resources:
Realm Identifier –
*
Next resource level – None
In the Allow Rules section, in
Select Users, select the SPIFFE ID of
the trino service account.
Click Add Permissions, select the
following permissions, and click the check box:
Catalog Create
Catalog List
Click Save.
To create the catalog policy:
Click Add New Policy, and in
Policy Name, enter a name, for
example, all - catalog.
In the Resources section, set the
following resources:
Realm Identifier –
*
Catalog – *
Next resource level – None
In the Allow Rules section, in
Select Users, select the SPIFFE ID of
the trino service account.
Click Add Permissions, select the
following permissions, and click the check box:
Catalog Metadata Full
Catalog Properties Read
Click Save.
To create the namespace policy:
Click Add New Policy, and in
Policy Name, enter a name, for
example all - namespace.
In the Resources section, set the
following resources:
Realm Identifier –
*
Catalog – *
Namespace –
*
Next resource level – None
In the Allow Rules section, in
Select Users, select the SPIFFE ID of
the trino service account.
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
Click Save.
To create the table policy:
Click Add New Policy, and in
Policy Name, enter a name, for
example all - table.
In the Resources section, set the
following resources:
Realm Identifier –
*
Catalog – *
Namespace –
*
Table – *
In the Allow Rules section, in
Select Users, select the SPIFFE ID of
the trino service account.
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
Click Save.
If you are updating the existing Cloudera Harmony Catalog
policies:
In the POLARIS Policies page, find the existing
policy for each resource level.
In the row of a policy, click the Edit icon in
the Actions column.
The Policy Details dialog box is
displayed.
In the Policy Details dialog box, check the values
in the Resource section.
In the Allow Rules section, click the add icon
(+) to add a rule:
In the new rule, in Select Users, select
the SPIFFE ID of the trino service
account.
Click Add Permissions, select the
permissions based on your resource level (realm, catalogs,
namespaces, and tables), and click the check box.
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.