Skip to main content

Triage and Remediation

Remediation

Using Console

To remediate the issue of unencrypted Bigtable Cluster backups in GCP, you can follow these steps:
  1. Open the Google Cloud Console and navigate to the Bigtable Cluster backups page.
  2. Select the Bigtable cluster for which you want to enable backup encryption.
  3. Click on the “Edit” button located at the top of the page.
  4. Scroll down to the “Backup Encryption” section and select “Enabled”.
  5. Choose the key version you want to use for encryption and click on “Save”.
  6. Once the backup encryption is enabled, all new backups for the selected Bigtable cluster will be encrypted using the specified key version.
  7. You can also verify the encryption status of existing backups by checking the “Encryption” column in the backups table.
It is important to note that enabling backup encryption may increase the cost of backups due to the additional resources required for encryption. However, it is a necessary step to ensure the security of your data.

To remediate the misconfiguration of unencrypted backups for a Bigtable cluster in GCP, you can follow the below steps:
  1. Open the Cloud Shell in the GCP Console.
  2. Run the following command to list all the Bigtable instances in the current project:
  3. Identify the instance for which you want to enable encrypted backups.
  4. Run the following command to enable encryption for backups for the identified instance:
    Replace [INSTANCE_ID] with the actual ID of the Bigtable instance.
  5. The above command enables encryption for backups using the default Google Cloud KMS key. If you want to use a different KMS key, replace google-default-kms-key with the resource ID of the desired KMS key.
  6. Once the command executes successfully, encrypted backups will be enabled for the specified Bigtable instance.
Note: The above command enables encryption for future backups only. To encrypt existing backups, you need to create a new backup and delete the old unencrypted backup.
To remediate the Bigtable Cluster Backups Should Be Encrypted misconfiguration in GCP using python, follow these steps:
  1. Open the Cloud Shell in your GCP console.
  2. Install the google-cloud-bigtable library using the following command:
  1. Create a Python script to enable encryption for Bigtable cluster backups. Here is an example script:
  1. Replace the placeholders in the script with your own project ID, instance ID, cluster ID, backup ID, and encryption type.
  2. Run the script in the Cloud Shell using the following command:
  1. Verify that the backup was created with encryption enabled by checking the backup details in the GCP console.
By following these steps, you have successfully remediated the Bigtable Cluster Backups Should Be Encrypted misconfiguration in GCP using python.
kms_key_name is immutable for an existing backup; adding or changing it will force replacement of the google_bigtable_backup resource (destroy and recreate the backup), which is irreversible for the data in that backup.To verify, terraform plan should show the google_bigtable_backup resource either being created with kms_key_name = "KMS_KEY_RESOURCE_ID" or updated with a replacement where the only functional change is the addition (or change) of kms_key_name.