Help Center/ Data Encryption Workshop/ Getting Started/ Creating a Secret for Data Storage Rotation
Updated on 2024-11-29 GMT+08:00

Creating a Secret for Data Storage Rotation

Applications and business systems have a large number of secrets and are difficult to manage. Cloud Secret Management Service (CSMS) can store, retrieve, and use secrets in a unified manner throughout their lifecycles.

Procedure

This section uses a shared secret and a rotated secret as examples to describe how to create a secret and rotate data. The following figure shows the process.

Figure 1 Creating a key for cloud service encryption

Procedure

Description

Preparations

Register a Huawei ID, enable Huawei Cloud services, top up the account, and grant CSMS permissions to the account.

Create a secret and choose the secret type.

Data Rotation

After the secret is created, you can configure FunctionGraph to complete data rotation within the secret.

Preparations

  1. Before creating a secret, register a Huawei Cloud account and enable Huawei Cloud services. For details, see Signing up for a Huawei ID and Enabling Huawei Cloud Services and Real-Name Authentication.

    If you have enabled Huawei Cloud services and completed real-name authentication, skip this step.

  2. Before purchasing an instance, ensure that your account balance is sufficient. For details, see Top-Up and Repayment.
  3. You have created an encryption key on KMS.
    • The default key is csms/default.
    • Select the custom keys created on KMS. For details, see Creating a Key.
  4. Before using a rotated secret, you need to create a database instance and database account.
  1. Log in to the management console. Click on the left and choose Security & Compliance > Data Encryption Workshop.
  2. In the navigation pane on the left, choose Cloud Secret Management Service > Secrets. On the displayed page, click Create Secret in the upper left corner.
  3. Configure the parameters as follows:
    • Type: Select Shared secret.

      The created secret can be used only in the current region. To use it in other regions, switch to the target region and create a secret. For details about regions of secret management, see Function Overview.

    • KMS Encryption Key: Choose the default key or a created key from the list.
    • Set other parameters as needed.
  4. Click OK. In the secret list, you can view the created secrets, which are in the Enabled state by default.
  1. Log in to the management console. Click on the left and choose Security & Compliance > Data Encryption Workshop.
  2. In the navigation pane on the left, choose Cloud Secret Management Service > Secrets. On the displayed page, click Create Secret in the upper left corner.
  3. Configure the parameters as follows:
    • Type: Select Rotated secret and choose an RDS secret or GaussDB(for MySQL) secret.

      The created secret can be used only in the current region. To use it in other regions, switch to the target region and create a secret. For details about regions of secret management, see Function Overview.

    • KMS Encryption Key: Choose the default key or a created key from the list.
    • Secret Value: Choose the created database account and enter the password.
    • Set other parameters as needed.
  4. Click Next. On the displayed page, enable automatic rotation and set the rotation period as required.
  5. Under Rotation function, click Create one, enter the function name, select I understand the risks, and click Next.
  6. Click OK. In the secret list, you can view the created secrets, which are in the Enabled state by default.

Data Rotation

You need to configure FunctionGraph to use shared secrets for data rotation. For details, see the following.