Other Articles

Cloud Storage – Enable Bucket Encryption

This check ensures that Cloud Storage buckets are encrypted using either Google-managed keys or customer-managed keys (CMEK). Encryption helps protect data at rest and ensures compliance with security requirements.

Check Details

  • Resource: Storage
  • Check: Enable bucket encryption
  • Risk: Buckets without encryption are vulnerable to data breaches and unauthorized access, compromising confidentiality.

Remediation via Google Cloud Console

  1. Log in to the Google Cloud Console and navigate to Buckets. GCP Storage browser
  2. Click on the name of the affected Cloud Storage bucket.
  3. Select the Configuration tab near the top of the page.
  4. Locate the Encryption section and click Edit.
  5. Choose an encryption option:
    • Google-managed key — automatically managed by Google (default).
    • Customer-managed key (CMEK) — select a key from Cloud Key Management Service (KMS) for full control.
    Encryption tab
  6. Click Save to apply changes.

Remediation via Google Cloud CLI

  1. Open the Google Cloud Console and launch Cloud Shell. GCP Cloud Shell
  2. Use the following command to enable Google-managed encryption:
    
    gsutil encryption set google-managed gs://<BUCKET_NAME>
    
  3. Use the following command to enable Customer-managed encryption (CMEK):
    
    gsutil encryption set kms://projects/<PROJECT_ID>/locations/<LOCATION>/keyRings/<KEY_RING>/cryptoKeys/<KEY_NAME> gs://<BUCKET_NAME>
    

Replace <BUCKET_NAME> with your bucket name, and for CMEK, replace <PROJECT_ID>, <LOCATION>, <KEY_RING>, and <KEY_NAME> with your KMS key details.

Default Value

By default, Cloud Storage buckets use Google-managed encryption keys. No action is required for basic encryption, but using customer-managed keys (CMEK) provides additional control and compliance benefits.