Set up local encryption keys for production environments
After installing HCD, create a local encryption key file, distribute it to the same location on all nodes in the cluster, and update the system_key_directory property in the cassandra.yaml file.
-
To ensure support for all encryption algorithms, make sure the Java Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy is enabled. In JDK
8u161and later, this is enabled by default. -
If the encryption key directory does not exist, create the
/confdirectory for your HCD installation type:-
Package installations:
/etc/hcd/conf -
Tarball installations:
INSTALL_DIRECTORY/resources/hcd/conf
-
-
Generate the encryption key file:
echo -n "$(openssl rand -hex 32)" > /etc/hcd/conf/system_key -
Ensure that the system user that runs HCD has read and write access on the file. If necessary, change the ownership of the file to the HCD user.
chown cassandra /etc/hcd/conf/system_key -
Make sure the encryption key file is stored in the same location on all nodes in the cluster, and the HCD user has appropriate permissions on the file.
-
Update the
system_key_directoryproperty in thecassandra.yamlfile.The location of the
cassandra.yamlfile depends on your installation type:-
Package installations:
/etc/hcd/cassandra/cassandra.yaml -
Tarball installations:
INSTALL_DIRECTORY/resources/cassandra/conf/cassandra.yaml
-