Updated on 2022-08-12 GMT+08:00

Updating a Key for a Cluster

Scenario

When a cluster is installed, an encryption key is generated automatically by the system so that the security information in the cluster (such as all database user passwords and key file access passwords) can be stored in encryption mode. After the cluster is installed, if the original key is accidentally disclosed or a new key is required, you can perform the following operations to manually update the key.

Impact on the System

  • After a cluster key is updated, a new key is generated randomly in the cluster. This key is used to encrypt and decrypt the newly stored data. The old key is not deleted, and it is used to decrypt old encrypted data. After security information is modified, for example, a database user password is changed, the new password is encrypted using the new key.
  • When a key is updated for a cluster, the cluster must be stopped and cannot be accessed.

Prerequisites

  • You have obtained the IP addresses of the active and standby management nodes. For details, see Logging In to the Management Node.
  • You have stopped the upper-layer service applications that depend on the cluster.

Procedure

  1. Log in to FusionInsight Manager.
  2. Choose Cluster > Name of the desired cluster > Stop, and enter the password of the current login administrator for authentication.

    In the displayed window, click OK. Operation succeeded is displayed. Click Finish. The cluster is stopped.

  3. Log in to the active management node as user omm with the IP address of the active management node.
  4. Run the following command to prevent you from being forcibly logged out when a timeout occurs:

    TMOUT=0

    After the operations in this section are complete, run the TMOUT=Timeout interval command to restore the timeout interval in a timely manner. For example, TMOUT=600 indicates that a user is logged out if the user does not perform any operation within 600 seconds.

  5. Run the following command to switch the directory:

    cd ${BIGDATA_HOME}/om-server/om/tools

  6. Run the following command to update the cluster key:

    sh updateRootKey.sh

    Enter y as prompted.

    The root key update is a critical operation. 
    Do you want to continue?(y/n):     

    If the following information is displayed, the key is updated successfully.

    Step 4-1: The key save path is obtained successfully. 
    ... 
    Step 4-4: The root key is sent successfully.     

  7. On FusionInsight Manager, choose Cluster > Name of the desired cluster > Start.

    In the confirmation dialog box, click OK to start the cluster. Operation succeeded is displayed. Click Finish. The cluster is started.