Rotating an encryption key
The keyrotate
tool uses the primary encryption key to
re-encrypt database secure data that was encrypted with other keys.
You can run the keyrotate tool in dry-run mode such that the database is not modified, and the tool only demonstrates the changes. The --change-database argument is required if you want to carry out the changes in the database. You must take a backup of the database before you use the --change-database argument.
The keyrotate tool can be run while the server is online. In an HA cluster, all members share the same database, so you must run the keyrotate tool on only one cluster member.
-
Edit the
installed.properties
file and set theencryption.keystore.alias
property to the correct alias.In an HA cluster, each member has its own
installed.properties
file, so each must be edited individually. -
Restart the updated server.
The server loads keys and the primary key setting only at startup. In an HA cluster, you must restart each updated member.
To rotate a secure property encryption key: