Skip Implicit USE CATALOG and USE SCHEMA Grants¶
Configure the Databricks Unity Catalog connector to stop sending USE CATALOG and USE SCHEMA grants with every table grant, and give these privileges once through two policies instead. This reduces the number of grants the connector sends to Databricks.
Overview¶
To read a table in Unity Catalog, a user needs USE CATALOG on the catalog, USE SCHEMA on the schema and SELECT on the table. By default, the connector sends all three for every table grant.
When this feature is enabled:
- The connector sends only the table grant (for example
SELECT). Grants created for view-based masking, view-based row filters, secure views or data admin still includeUSE CATALOGandUSE SCHEMA. - Users get
USE CATALOGandUSE SCHEMAfrom two policies for thepublicgroup (see Prerequisites). - On a catalog or schema that these policies do not cover, the connector keeps sending
USE CATALOGandUSE SCHEMAas before, and logs a warning that names it.
Explicit USE CATALOG / USE SCHEMA grants from your own policies are not affected.
Keep the prerequisite policies in place
Once the feature has been enabled, users rely on the prerequisite policies for USE CATALOG and USE SCHEMA. Do not remove these policies, even if you turn the feature off later.
Prerequisites¶
Create these policies after you enable the feature, as described in Rollout order.
-
Create two policies for the group
public:Policy Resource Permission Principal A catalog *Use Catalog group publicB catalog *, schema*Use Schema group public -
Create them in every security zone that has Unity Catalog resources, and also outside zones if you have resources that are not in a zone.
-
Keep the connector's default Databricks native public group setting, so that
publicmaps to the Databricksaccount usersgroup (see Using Databricks Native Public Group). -
Make sure no policy denies
publicaccess at catalog or schema level.
Configuration property¶
| Property | Custom property (Portal and PrivaceraCloud) | Default |
|---|---|---|
CONNECTOR_DATABRICKS_UNITY_CATALOG_SKIP_IMPLICIT_USAGE_GRANTS | ranger.policysync.connector.0.skip.implicit.usage.grants | false |
Set it to true to enable the feature.
Rollout order¶
- Enable the feature (see Setup) and restart the connector.
- Create policies A and B, as described in Prerequisites.
- Check that a user with only a table-level grant can query the table.
Tip
Enable the feature before you create the policies. Creating the policies first makes the connector re-send USE grants for every catalog and schema, which can slow down sync.
Setup¶
-
Navigate to Settings → Applications in the Self-Managed Portal.
-
From the list of Connected Applications, select Databricks Unity Catalog.
-
Select the application name or the icon to edit. Then, go to the Access Management tab.
-
Under the ADVANCED tab, under Add New Custom Properties, add:
Properties -
Select SAVE to apply the changes.
-
SSH to the instance where Privacera Manager is installed.
-
Run the following command to open the
.ymlfile to be edited.If you have multiple connectors, then replace
instance1with the appropriate connector instance name. -
Add or set the following property:
YAML -
Once the property is configured, run the following commands to update your Privacera Manager platform instance:
Step 1 - Setup which generates the helm charts. This step usually takes few minutes.
Step 2 - Apply the Privacera Manager helm charts. Step 3 - (Optional) Post-installation step which generates Plugin tar ball, updates Route 53 DNS and so on. This step is not required if you are updating only connector properties.
-
In PrivaceraCloud portal, navigate to Settings → Applications.
-
On the Connected Applications screen, select Databricks Unity Catalog.
-
Select the pen icon or the Account Name to modify the settings.
-
On the Edit Application screen, go to Access Management → ADVANCED tab.
-
Under Add New Custom Properties, add:
Properties -
Select SAVE to apply the changes.
- Prev topic: Advanced Configuration