Skip to content

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 on your Databricks cluster. The crypto.properties file contains configuration settings for Privacera Encryption.

The general process is as follows:

  • Move the properties file to the desired 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.

Note

This is to change the location of the crypto properties file on your Datbricks cluster, not a dbfs location.

Move the Properties File to New Location#

On your Databricsk cluser, the default location of the Privacera crypto properties file is /databricks/crypto/config/crypto.properties. This an absolute path starting with /.

  1. On your Privacera host, move the properties file from its default location to the new desired path. This must be an absolute path starting with /.
  2. Make a note of this new path.

In the steps here, this new location is called <absolute_path_on_databricks_cluster_to_directory_with_crypto.properties_file>.

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:

  1. Navigate to the system Configuration tab.
  2. In the Environment Variables section, add the following line: CRYPTO_CONFIG_DIR=<absolute_path_on_databricks_cluster_to_directory_with_crypto.properties_file>
  3. 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:

cp ~/privacera/privacera-manager/config/sample-vars/vars.databricks.plugin.yml  privacera/privacera-manager/config/custom-vars/vars.databricks.plugin.yml 
vi ~/privacera/privacera-manager/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

Last update: August 24, 2021