Customer supplied encryption keys are not used to encrypt compute disk Affecting Compute Engine service in Google


Severity

0.0
medium
0
10
    Severity Framework
    Snyk CCSS
    Rule category
    Data / Encryption at Rest

Is your enviroment affected by this misconfiguration?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
    Frameworks
    CIS-Google CSA-CCM GDPR HIPAA ISO-27001 NIST-800-53 SOC-2
  • Snyk ID SNYK-CC-00375
  • credit Snyk Research Team

Description

Google Cloud encrypts all data at rest by default with Google-generated keys. However, for business critical instances, users may want to use customer-supplied encryption keys for an additional layer of protection as data encrypted with customer-supplied encryption keys cannot be accessed by Google.

How to fix?

Set the disk_encryption_key.raw_key attribute to a customer-supplied encryption key.

Example Configuration

resource "google_compute_disk" "allow" {
  name  = "test-disk"
  type  = "pd-ssd"
  zone  = "us-central1-a"
  image = "debian-10-buster-v20220920"
  labels = {
    environment = "dev"
  }
  physical_block_size_bytes = 4096
  disk_encryption_key {
    raw_key = "dummy_key"
  }
}