OAuth Authentication¶
The default authentication mechanism in the Unity Catalog connector is token-based, but it also provides the option to enable OAuth. To generate OAuth credentials for the Databricks Unity Catalog, follow the instructions in the Databricks documentation.
Prerequisites¶
Given below is the instructions to generate OAuth credentials for the Databricks Unity Catalog. The instructions might change, so it is recommended to refer to the latest Databricks documentation
It is important to note that the service principal should have the necessary permissions to manage the policies in the Databricks Unity Catalog.
- Generate OAuth token: Refer to the Databricks documentation on how to use a service principal to authenticate with Databricks
- Note down the Secret and Client ID during the OAuth Secret generation.
-
To ensure the generated service principal has the necessary permissions, follow these steps:
- Add the service principal to the Admin Group in Databricks.
- Login into Databricks Unity Catalog Workspace URL
- Go to settings “Identity and access” → Management and permissions → Groups → Click on Manage.
- Locate the Admin Group and add your service principal.
- Grant the service principal Metastore admin access.
- Ensure the service principal has access to the system catalog.
-
Ensure that the service principal you create is added to the Admin Group Role in Databricks and has metastore admin access.
- It must have access to the system catalog.
Setup¶
Replace <CLIENT_ID>
and <CLIENT_SECRET>
with the actual values.
To enable OAuth authentication, update the following properties in Privacera Manager:
-
SSH to the instance where Privacera Manager is installed.
-
Run the following command to open the
.yml
file to be edited.If you have multiple connectors, then replace
instance1
with the appropriate connector instance name.Bash -
Set the following properties to enable OAuth authentication for the Databricks Unity Catalog Connector:
-
Once the properties are 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 - Post-installation step which generates Plugin tar ball, updates Route 53 DNS and so on.
-
In PrivaceraCloud portal, navigate to Settings -> Applications.
-
On the Connected Applications screen, select Databricks Unity Catalog.
-
Click the pen icon or the Account Name to modify the settings.
-
On the Edit Application screen, go to Access Management -> ADVANCED tab.
-
Add the following properties under Add New Custom Properties:
-
Click SAVE to apply the changes.
- Prev topic: Advanced Configuration