Setup for Access Management for Databricks all-purpose compute clusters with Fine-Grained Access Control (FGAC)¶
Configure¶
Perform the following steps to configure Databricks FGAC:
-
SSH to the instance where Privacera Manager is installed.
-
Run the following command to navigate to the /config directory.
Bash Note
JWT Authentication is enabled by-default for Databricks FGAC Plugin and thus needs JWT to be configured. Follow the steps given here to configure JWT for authentication.
-
Run the following command to copy the databricks FGAC plugin yml file from sample-vars, if it's not already present in custom-vars:
Bash -
Update the following properties in the
vars.databricks.plugin.ymlfile: -
Once the properties are configured, run the Privacera Manager post-install action Refer this
Enable Databricks Application¶
- In PrivaceraCloud, go to Settings -> Applications.
- On the Applications screen, select Databricks.
- Select Platform Type
- Enter the application Name and Description. Click Save. The name can be any name of your choice, e.g.,
Databricks. - Open the Databricks application.
- Enable the Access Management option with toggle button.
- Click on save button
Note
JWT Authentication is enabled by-default for Databricks FGAC Plugin and thus needs JWT to be configured. Follow the steps given here to configure JWT for authentication.
Download Script from PrivaceraCloud¶
- Open the Databricks application.
- Click on Access Management
- Click on Download Script
- Save the script locally as privacera_databricks.sh
Create Init script in Databricks Workspace File¶
- Login Databricks Web UI
- Click on the Workspace sidebar
- Click on the Workspace folder
- Click on Create -> Folder
- Name the folder privacera
- Click on Create
- Go inside the privacera folder
- Click on Create -> File
- Enter the new file name as privacera_databricks.sh
- Copy the content of the local privacera_databricks.sh and paste it into the workspace file privacera_databricks.sh
Configure the connector in Runtime and download it as a bundle. The bundle includes the init script that installs the plugin when the cluster starts. Upload that script to the workspace or to S3, then attach it to the cluster.
Note
Runtime support for this connector is available on Self-Managed and D2P planes only.
Configure the Databricks Spark connector¶
-
In the portal, open the runtime plane and go to the Connector tab. If no runtime plane exists yet, see Getting Started with Runtime Plane.
-
Add the Databricks Spark connector. Under Access Control Configs -> Connector Configs, set the following:
Field Definition Example Access control mode Fine-Grained Access Control ( FGAC). Fixed for this connector;OLACis not supported here.FGACEnable JWT authentication Enables JWT Authentication and identifies the querying user from a JWT. false -
JWT Authentication - only if Enable JWT authentication is on. For the provider fields, see Configuring JWT for Authentication.
-
Logging - only if Enable debug logging is on. For the fields and how to collect the logs afterwards, see Databricks enable logs.
-
Custom Properties - optional. Additional properties can be added here as key-value pairs.
For example:
Key Value spark.example.property.enabledtrue -
Advanced Configuration - optional. Settings this form does not carry are set on the Databricks cluster or under Custom Properties. See Advanced Configuration.
-
Save the configuration, then download the connector bundle.
The bundle contents depend on the plane, because certificates are shipped only where the plugin needs them:
Plane Bundle contents Self-Managed trust3ai_databricks_spark_plugin_<connector>_<version>.shandcerts.zipD2P trust3ai_databricks_spark_plugin_<connector>_<version>.shonly
Upload the init script¶
Upload the downloaded trust3ai_databricks_spark_plugin_<connector>_<version>.sh to a location the cluster can read - a folder in the Databricks workspace, or an S3 path such as s3://<bucket>/privacera/trust3ai_databricks_spark_plugin_<connector>_<version>.sh.
Note
For an S3 path, the cluster's instance profile needs s3:GetObject permission on it.
When creating the cluster, set the init script Source to match - Workspace or S3 - and give the path used above.
Upload the certificates¶
Self-Managed planes only. On D2P the bundle carries no certs.zip, and this section does not apply.
- Upload
certs.zipfrom the bundle to a location the cluster can read - a DBFS path such as/dbfs/privacera/certs.zip, or an S3 path such ass3://<bucket>/privacera/certs.zip. -
Set
TRUST3AI_CERTS_SOURCE_PATHon the cluster to that location. The init script reads it to fetch the certificates.Source Example DBFS /dbfs/privacera/certs.zip, or/dbfs/privacera- a path that does not end in.zipis treated as the folder holding itS3 s3://<bucket>/privacera/certs.zip- this must be the file itself, not the folderNote
For an S3 path, the cluster's instance profile needs
s3:GetObjectpermission on it.
Set a plugin property¶
Additional properties can be added under Custom Properties as key-value pairs, using the full property name as it appears in privacera_spark.properties. Runtime appends them after the connector's own settings, and the plugin keeps the last line for a key, so a custom property overrides the shipped default.
- In the portal, open the connector and go to Custom Properties.
- Enter the property name and value, for example
privacera.spark.deny.unsupported.sql.primitives.enabledandtrue. - Save the connector, then download the bundle again.
- Upload the init script and restart the clusters that use it.
A custom property applies to every cluster that uses this connector's bundle, and only reaches the plugin through a freshly downloaded bundle.
Note
privacera.deployment.type cannot be set this way - the mode comes from the connector and the installer refuses it.
Create Databricks cluster policy¶
We recommend to use Databricks cluster policy to control cluster configuration. Here are the steps to create cluster policy:
- Log in to Databricks Web UI
- Click on the Compute icon on the sidebar
- Click on the Policies tab
- Click on the Create policy button
- Provide a name to the policy i.e privacera-fgac-cluster-policy
- Add the appropriate policy definition (JSON) based on your Databricks Runtime version.
-
Replace
<instance-profile-arn>with your actual instance profile ARN.Cluster policy JSON for Databricks Runtime Version 17.3 LTS
Cluster policy JSON for Databricks Runtime Version 16.4 LTS and below
-
Save the policy.
Create Databricks cluster¶
Here are the steps to create Databricks cluster with Privacera plugin (FGAC):
- Log in to Databricks Web UI
- Click on the Compute icon on the sidebar
- Click the Create Compute button.
- Fill in the cluster configuration details.
- Under the Cluster Policies dropdown, select the policy you created in the previous step (i.e., privacera-fgac-cluster-policy)
- Under the Advanced option :
- Select Workspace as the source for init scripts.
- Specify the Workspace file path:
- Self Managed
- /privacera/{DEPLOYMENT_ENV_NAME}/ranger_enable.sh
- PrivaceraCloud and Data Plane
- /privacera/{DEPLOYMENT_ENV_NAME}/privacera_databricks.sh
- Runtime
- The path where you uploaded
trust3ai_databricks_spark_plugin_<connector>_<version>.sh. See Upload the init script; for an S3 path, select S3 as the source instead.
- The path where you uploaded
- Self Managed
- Click the Add button.
- Click Create Compute to create the cluster.
Validation¶
To confirm the successful association of an access management policy with data in your Databricks installation, follow these steps:
-
Prerequisites:
- A running Databricks cluster secured using the steps mentioned above.
- At least one resource policy associated with your data that grants a user access to the database.
- This resource policy must not be for Databrick's default database. Configure the policy for any database other than the default.
-
Sample Resource Policy:
- Policy Name: Employee Details
- Hive Database: sample_db
- Hive Table: employees
- Permissions: CREATE, UPDATE, SELECT, DROP
- Select User: emily

-
Steps to Validate Policy:
- Login to Databricks as a user who is defined in the resource policy.
- Create or open an existing notebook. Associate the Notebook with the running Databricks cluster.
- Select the database to which you have associated the policy.
- In the notebook, run following SQL commands to Create a sample table, Insert and Select the data:
- On Privacera portal, go to Access Management -> Audits
- Check for the success or failure of the resource policy. A successful access is indicated as Allowed and failure is indicated as Denied.
-
Sample Audit Logs:

- Prev topic: Prerequistes
- Next topic: Advanced Configuration