Register a Databricks Unity Catalog Connection
Register your Databricks Unity Catalog data
New connections
The new connections flow documented here is available and released to select tenants.
Requirements
Immuta user with the
APPLICATION_ADMINImmuta permissionDatabricks service principal with the following privileges. For instructions on setting up this user, see the Creating the Databricks service principal section:
USE CATALOGandMANAGEon all catalogs containing securables you want registered as Immuta data sources.USE SCHEMAon all schemas containing securables you want registered as Immuta data sources.MODIFYandSELECTon all securables you want registered as Immuta data sources.Workspace admin on the workspace configured as the host for the integration.
Additional privileges are required for query audit:
USE CATALOGon thesystemcatalogUSE SCHEMAon thesystem.accessandsystem.queryschemasSELECTon the following system tables:system.access.table_lineagesystem.access.column_lineagesystem.access.auditsystem.query.history
Add the Databricks service principal to the
databricks_pii_accessgroup
Databricks user to run the script to register the connection with the following privileges:
Metastore admin and account admin
CREATE CATALOGprivilege on the Unity Catalog metastore to create an Immuta-owned catalog and tables
See the Databricks documentation for more details about Unity Catalog privileges and securable objects.
Prerequisites
Unity Catalog metastore created and attached to a Databricks workspace.
Unity Catalog enabled on your Databricks cluster or SQL warehouse. All SQL warehouses have Unity Catalog enabled if your workspace is attached to a Unity Catalog metastore. Immuta recommends linking a SQL warehouse to your Immuta tenant rather than a cluster for both performance and availability reasons.
Register a connection
Create a separate Immuta catalog for each Immuta tenant
If multiple Immuta tenants are connected to your Databricks environment, create a separate Immuta catalog for each of those tenants. Having multiple Immuta tenants use the same Immuta catalog causes failures in policy enforcement.
Click Data and select the Connections tab in the navigation menu.
Click the + Add Connection button.
Select the Databricks data platform tile.
Enter the connection information:
Display Name: The display name represents the unique name of your connection and will be used as prefix in the name for all data objects associated with this connection. It will also appear as the display name in the UI and will be used in all API calls made to update or delete the connection. Avoid the use of periods (
.) or restricted words in your connection name.Host: The hostname of your Databricks workspace.
Port: Your Databricks port.
HTTP Path: The HTTP path of your Databricks cluster or SQL warehouse.
Immuta Catalog: The name of the catalog Immuta will create to store internal entitlements and other user data specific to Immuta. This catalog will only be readable for the Immuta service principal and should not be granted to other users. The catalog name may only contain letters, numbers, and underscores and cannot start with a number.
Opt to configure an HTTP proxy for this connection by selecting Enable and entering the required details:
Proxy Host: Enter the full proxy URL.
Proxy Port: Enter the proxy port.
Select if the proxy requires authentication:
Disabled
Enabled:
Proxy Username: Enter the username for the proxy connection.
Proxy Password: Enter the password for the proxy connection.
Select your authentication method from the dropdown menu and enter the authentication information for the Immuta service principal that you created.
Personal Access Token
Enter the Token. This is the access token for the Immuta service principal, which can be an on-behalf token created in Databricks. This service principal must have the metastore privileges listed for the metastore associated with the Databricks workspace. If this token is configured to expire, update this field regularly for the connection to continue to function. This authentication information will be included in the script populated to complete the connection setup.
OAuth M2M (Client Secret)
AWS Databricks:
Follow Databricks documentation to create a client secret for the Immuta service principal and assign this service principal the privileges listed for the metastore associated with the Databricks workspace.
Fill out the Client ID. This is a combination of letters, numbers, or symbols, used as a public identifier and is the client ID displayed in Databricks when creating the client secret for the service principal.
Fill out the Authority URL with the full URL of the identity provider. This is where the generated token is sent. The default value is
https://<your workspace name>.cloud.databricks.com/oidc/v1/token.Enter the Scope (string). The scope limits the operations and roles allowed in Databricks by the access token. See the OAuth 2.0 documentation for details about scopes.
Enter the Client Secret. Immuta uses this secret to authenticate with the authorization server when it requests a token.
Azure Databricks:
Follow Databricks documentation to create a service principal within Azure and then populate to your Databricks account and workspace.
Assign this service principal the privileges listed for the metastore associated with the Databricks workspace.
Within Databricks, create an OAuth client secret for the service principal. This completes your Databricks-based service principal setup.
Fill out the Client ID. This is a combination of letters, numbers, or symbols, used as a public identifier and is the client ID displayed in Databricks when creating the client secret for the service principal (note that Azure Databricks uses the Azure SP Client ID; it will be identical).
Within Immuta, fill out the Authority URL with the full URL of the identity provider. This is where the generated token is sent. The default value is
https://<your workspace name>.azuredatabricks.net/oidc/v1/token.Enter the Scope (string). The scope limits the operations and roles allowed in Databricks by the access token. See the OAuth 2.0 documentation for details about scopes.
Enter the Client Secret you created above. Immuta uses this secret to authenticate with the authorization server when it requests a token.
OAuth M2M (Certificate)
Fill out the Client ID, which is the subject of the generated token. It is also known as
sub(subject).Fill out the Authority URL, which is the authority URL of your identity provider.
Fill out the Scope, which is the scope of operations and roles allowed by the secret.
Enter the Certificate Thumbprint. This identifies the corresponding key to the token and is often abbreviated as
x5tor is calledkid(key identifier).Opt to fill out the Resource field with a URI of the resource where the requested token will be used.
Upload the Private Key, which is the client certificate that is used to sign the authorization request.
Click Next.
Configure the Policy setting:
Opt to exclude specific users from policy by adding them to the Exclude Group Pattern. This field cannot be changed after the connection is created.
Click Next.
Configure the Audit settings:
Opt to Enable Audit.
If audit is enabled, opt to enter Workspace IDs to filter the audit ingest to just specific workspaces.
Click Next.
Opt to Enable Object Sync, which will keep your connection objects up to date with your Databricks Unity Catalog environment.
Select the Start Time for when the first object sync job will run each day.
Select the Run Frequency to determine how frequently object sync will run each day.
Opt to Run Object Sync on Create to create all the data objects for your connection. If you do not select this option, you must run object sync manually or wait for the scheduled object sync for your connection's data objects.
Click Save connection.
Copy the provided script and run it in Databricks Unity Catalog as a user with the privileges listed in the requirements section.
Click Validate Connection.
If the connection is successful, click Finish. If there are any errors, check the connection details and credentials to ensure they are correct and try again.
Opt to enable Databricks Unity Catalog tag ingestion
Private preview: This feature is only available to select accounts. Contact your Immuta representative to enable this feature.
Requirements:
A configured Databricks Unity Catalog connection
Fewer than 10,000 Databricks Unity Catalog data sources registered in Immuta
The following permissions must be added to your Immuta service principal:
USE CATALOGon thesystemcatalogUSE SCHEMAon thesystem.accessschemaSELECTon the following system table:system.access.audit
If ingesting and applying tags to foreign catalogs (created via Lakehouse Federation), the following additional permissions are required:
USE SCHEMAon thesystem.information_schemaschemaSELECTon the following system tables:system.information_schema.column_tagssystem.information_schema.table_tagssystem.information_schema.tablessystem.information_schema.columns
To allow Immuta to automatically import table and column tags from Databricks Unity Catalog, enable Databricks Unity Catalog tag ingestion in the external catalog section of the Immuta app settings page.
Navigate to the App Settings page.
Scroll to 2 External Catalogs, and click Add Catalog.
Enter a Display Name and select Databricks Unity Catalog from the dropdown menu.
Click Save and confirm your changes.
Setting up the required Databricks service principal
If you need instruction for setting up your Databricks service principal before registering your connection, see the steps below.
Creating the Databricks service principal
In Databricks, create a service principal with the privileges listed below. Immuta uses this service principal continuously to orchestrate Unity Catalog policies and maintain state between Immuta and Databricks.
USE CATALOGandMANAGEon all catalogs containing securables you want registered as Immuta data sources.USE SCHEMAon all schemas containing securables you want registered as Immuta data sources.MODIFYandSELECTon all securables you want registered as Immuta data sources. TheMODIFYprivilege is not required for materialized views registered as Immuta data sources, sinceMODIFYis not a supported privilege on that object type in Databricks.Workspace admin permissions (If your service principal is a regular user in Databricks and not an actual service principal in Databricks, follow the guidance for managing users in Databricks documentation to grant this user the workspace admin permission.)
MANAGE and MODIFY are required so that the service principal can apply row filters and column masks on the securable; to do so, the service principal must also have SELECT on the securable as well as USE CATALOG on its parent catalog and USE SCHEMA on its parent schema. Since privileges are inherited, you can grant the service principal the MODIFY and SELECT privilege on all catalogs or schemas containing Immuta data sources, which automatically grants the service principal the MODIFY and SELECT privilege on all current and future securables in the catalog or schema. The service principal also inherits MANAGE from the parent catalog for the purpose of applying row filters and column masks, but that privilege must be set directly on the parent catalog in order for grants to be fully applied.
See the Databricks documentation for more details about Unity Catalog privileges and securable objects.
Configuring query audit privileges
Grant the service principal access to the Databricks Unity Catalog system tables. For Databricks Unity Catalog audit to work, Immuta must have, at minimum, the following access.
USE CATALOGon thesystemcatalogUSE SCHEMAon thesystem.accessandsystem.queryschemasSELECTon the following system tables:system.access.table_lineagesystem.access.column_lineagesystem.access.auditsystem.query.history
Access to system tables is governed by Unity Catalog. No user has access to these system schemas by default. To grant access, a user that is both a metastore admin and an account admin must grant
USE_SCHEMAandSELECTprivileges on the system schemas to the service principal. See Manage privileges in Unity Catalog.Create an account-level group in Databricks named
databricks_pii_access(case-sensitive) and add the service principal to the group.
Last updated
Was this helpful?

