Custom Path to Crypto Properties File in Databricks
For security reasons, for your Databricks UDFs, you might want to change the location of Privacera's crypto properties file on your Databricks cluster.
crypto.properties file contains configuration settings for Privacera Encryption.
The general process is as follows:
- Move the properties file to a new directory on your Databricks cluster.
- Define an environment variable in Databricks to point to that new directory.
- Define the same path in a Privacera custom variable on your Privacera host.
This is to change the location of the crypto properties file on your Databricks cluster, not a DBFS location.
Move the Properties File to New Location#
On your Databricks cluster, the default location of the Privacera crypto properties file is
/databricks/crypto/config/crypto.properties. This an absolute path starting with
- On your Privacera host, move the properties file from its default location to the new path. This must be an absolute path starting with
- Make a note of this new path.
In the steps here, this new location is called
Define Environment Variable in Databricks#
You must set an environment variable to point to the new location of the Privacera crypto properties file.
As the Databricks administrator, in your Databricks cluster:
- Navigate to the system Configuration tab.
- In the Environment Variables section, add the following line:
- Save the change.
Define Custom Variable in Privacera#
You need to define the same new path of the crypto properties file in your Privacera installation and update the configuration.
As the Privacera administrator, on the Privacera host:
cd ~/privacera/privacera-manager cp config/sample-vars/vars.databricks.plugin.yml config/custom-vars/vars.databricks.plugin.yml vi config/custom-vars/vars.databricks.plugin.yml DATABRICKS_CRYPTO_CONFIG_DIR: "<absolute_path_on_databricks_cluster_to_directory_with_crypto.properties_file>" # Save the file # Update the configuration cd ~/privacera/privacera-manager ./privacera-manager.sh update