Skip to main content

Privacera Platform master publication

Create a custom path to the crypto properties file in Databricks
:

For your Databricks UDFs, you might want to change the location of Privacera's crypto properties file in your Databricks cluster to enhance security. The crypto.properties file contains configuration settings for Privacera Encryption.

To change the location of the crypto.properties file, follow these steps:

  1. Move the properties file to a new directory on your Databricks cluster.

  2. Define an environment variable in Databricks to point to that new directory.

  3. Define the same path in a Privacera custom variable on your Privacera host.

The following sections describe how to complete each of the above steps.

Note

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

Move the crypto properties file to new location in Databricks

In your Databricks cluster, 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 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 an 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, do the following:

  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, run the following commands:

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