Encrypt sensitive configuration values
Configuration encryption provides privacy and increased security for sensitive configuration values, such as passwords.
After you activate configuration encryption, sensitive configuration values entered in the DSE OpsCenter user interface are encrypted dynamically, and then transmitted and written in an encrypted state to the relevant configuration files. Once encrypted, most sensitive configuration values cannot be changed directly in the user interface. Instead, you must manually encrypt sensitive values, and then enter the new, encrypted values into the appropriate configuration files.
Encryption limitations
-
Lifecycle Manager (LCM) isn’t compatible with configuration encryption in DSE and OpsCenter. For more information, see Encrypt DSE configuration values.
-
Encryption isn’t retroactive for backup credentials. At the time that you enable configuration encryption, you must manually encrypt any credentials used to access existing destinations for scheduled backups. For example, you must manually encrypt the
access_secretfield for any scheduled backups to Amazon S3.
Encrypted fields
When configuration encryption is enabled, the following fields are eligible for encryption. Some fields are optional and must be opted in to encryption.
- Encrypted fields in
CLUSTER_NAME.conf -
-
jmxsection:password -
cassandrasection:password,ssl_keystore_password,ssl_truststore_password -
storage_cassandrasection:password,ssl_keystore_password,ssl_truststore_password -
agentssection:ssl_keystore_passwordandssl_truststore_passwordfor a monitored cluster, andstorage_ssl_keystore_passwordandstorage_ssl_truststore_passwordfor a separate storage cluster -
agent_kerberossection:keytab,ticket_cache -
backup_servicesection:s3_proxy_host,s3_proxy_port
-
- Encrypted fields in
/event-plugins/email.conf -
Used for alert notifications. The only encryption-eligible field is
smtp_pass. Encryption for thesmtp_passfield must be manually enabled. - Encrypted fields in
opscenterd.conf -
The only encryption-eligible field in
opscenterd.confissearch_passwordin theldapsection. - Encrypted fields in
address.yaml -
Encryption of DataStax Agent configuration fields in
address.yamlis optional. OpsCenter provides the values fromopscenterd.confto the DataStax Agent when it connects.If you set the DataStax Agent configuration fields values in
address.yaml, and you setconfig_encryption_activetotruein bothaddress.yamlandopscenterd.conf, then you must supply encrypted values for the encrypted agent configuration fields.-
access_secret -
storage_key -
jmx_pass -
cassandra_pass -
monitored_cassandra_pass -
ssl_keystore_passwordandssl_truststore_passwordfor a separate storage cluster -
monitored_ssl_keystore_passwordandmonitored_ssl_truststore_passwordfor a monitored cluster
-
Activate configuration encryption and create a system encryption key
Use these steps to enable configuration encryption and create the system encryption key.
Configuration encryption requires a system key for both automatic and manual encryption.
The OpsCenter system key tool can create an encryption key for use on the opscenterd machine and all the nodes in a cluster.
This tool doesn’t support decrypting values.
-
Edit the
opscenterd.conffile.The location of this file depends on the type of installation:
-
Package installations:
/etc/opscenter/opscenterd.conf -
Tarball installations:
INSTALL_DIRECTORY/conf/opscenterd.conf
-
-
In the
securitysection, set theconfig_encryption_activeoption toTrue:[security] config_encryption_active = True -
Optional: Configure a non-default system key name and location.
By default, the system key is named
opsc_system_key, and it is located in the same directory as theopscenterd.conffile. To use a non-default name or location, specify theconfig_encryption_key_nameandconfig_encryption_key_pathoptions inopscenterd.conforaddress.yaml. The options inaddress.yamltake precedence overopscenterd.conf. For example:[security] config_encryption_active = True # Optional non-default system encryption key name config_encryption_key_name = opsc_system_key # Optional non-default path for the encryption key config_encryption_key_path = -
In your OpsCenter installation’s
/binsubdirectory, runopscenter_system_key_toolto create an encryption key:PATH/opscenter_system_key_tool create MODE STRENGTHReplace the following:
-
PATH: The path to theopscenter_system_key_toolexecutable:-
Package installations:
/usr/share/opscenter/bin/opscenter_system_key_tool -
Tarball installations:
INSTALL_DIRECTORY/bin/opscenter_system_key_tool
-
-
MODE: The AES encryption mode to use. Allowed values areECB,CBC,CFB, andOFB. -
STRENGTH: The key strength, either128(128-bit) or256(256-bit).The Java Cryptography Extension (JCE) is required for 256-bit key strength. If your current JRE doesn’t already support JCE, you must download and install the Java Cryptography Extension (JCE), unzip the jar files, and store the files at
$JAVA_HOME/jre/lib/security. JCE-based products are restricted for export to certain countries by the U.S. Export Administration Regulations.
For example, to create an AES encryption key using ECB mode and 128-bit key strength:
opscenter_system_key_tool create ECB 128 -
-
Manually copy the system key file to the agent installation directory on each node.
The key file must reside in the same directory as the agent’s
address.yaml. For example:cp local/opsc_system_key ../agent/local
Manually encrypt a configuration value
|
These steps are for changing previously encrypted values or encrypting existing configuration values that aren’t automatically encrypted. For new clusters, don’t enter encrypted values directly into the OpsCenter UI. Enter the actual values, and then allow OpsCenter to handle encryption. |
Use the OpsCenter system key tool to manually encrypt sensitive configuration values before entering them in the configuration files. This is required to change encrypted values after you enable configuration encryption, and to encrypt existing configuration values that aren’t automatically encrypted. The tool uses the system encryption key that you created when you activated configuration encryption.
For relevant fields, see Encrypted fields.
This tool doesn’t support decryption.
-
In your OpsCenter installation’s
/binsubdirectory, run theopscenter_system_key_tool valuecommand to encrypt a value:PATH/opscenter_system_key_tool valueReplace
PATHwith the path to theopscenter_system_key_toolexecutable:-
Package installations:
/usr/share/opscenter/bin/opscenter_system_key_tool -
Tarball installations:
INSTALL_DIRECTORY/bin/opscenter_system_key_tool
-
-
When prompted, enter and confirm the value to encrypt:
Enter value to encrypt: Confirm value to encrypt: -
Get the encrypted value from the output, and then paste the encrypted value in the appropriate configuration file, such as
opscenterd.conf,CLUSTER_NAME.conf, oraddress.yaml.
Deactivate configuration encryption
You can temporarily deactivate configuration encryption if needed for troubleshooting:
-
Edit the
opscenterd.conffile. -
In the
[security]section, deactivate configuration encryption:[security] config_encryption_active = False -
After troubleshooting, reactivate configuration encryption by setting
config_encryption_activetoTrueand restartingopscenterd.