Rotating the Cluster Root Encryption Key

AI Tools

Your organizational security policies determine how often encryption keys should be rotated. Once a policy determines that keys should be rotated, you can invoke an API call that will cause the cluster to create a new KEK and re-encrypt the existing DEKs with the new KEK. The cluster always keeps a copy of the “old” KEK for one generation. During key rotation, there is a period of time (from seconds up to a few hours depending on the number of volumes/snapshots in the cluster) that the system re-encrypts the DEKs with the new KEK, and both KEKs are still valid (both the new one and the old one).

During key rotation, all of the existing data encryption keys are re-encrypted, so it is recommended not to run this API too frequently. There is a set cluster config parameter that defines a default of a 24-hour minimum interval between key rotations. So if you rotated the key successfully, you will only be able to rotate the key again 24 hours later.

To get the state of the rotation process, current encryption key generation, and the last date the key was rotated, you can run the get clusterinfo API.

Note

Cluster root encryption key rotation is fully supported from v3.15.x.

Note

It is recommended to run the key rotation API only when the cluster is stable and all nodes are active on the same Lightbits cluster version (e.g., all servers are on 3.14). Below a certain threshold of inactive nodes, the key rotation process will fail and will have to be triggered again. Running the key rotation API in the middle of an upgrade process could cause unexpected behavior and is not supported.

KEK Rotation API

CLI

lbcli rotate cluster-root-key

REST

POST /api/v2/cluster/clusterRootKey/rotate