Check provider logo

BigQuery dataset is encrypted with Customer-Managed Keys (CMKs)

bigquery_dataset_cmk_encryption

Severityhigh
Servicebigquery
by Prowler

BigQuery datasets use Customer-Managed Encryption Keys (CMEK) rather than Google-managed encryption. The evaluation identifies datasets configured to use a customer-managed key for data-at-rest protection.

Risk

Without CMEK, organizations lose cryptographic control of data at rest, weakening confidentiality and access governance. Lack of custom key rotation, revocation (kill switch), and location control hinders incident response and may conflict with data-sovereignty requirements.

Run this check with Prowler CLI

prowler gcp --checks bigquery_dataset_cmk_encryption

Recommendation

Protect datasets with CMEK via Cloud KMS:

  • Set a dataset or project default key
  • Align key location with dataset region
  • Enforce least privilege and separation of duties on key usage
  • Rotate keys and define revocation procedures
  • Audit key usage and use org policies to require CMEK

Remediation

CLI

bq update --default_kms_key projects/<KMS_PROJECT_ID>/locations/<LOCATION>/keyRings/<KEY_RING>/cryptoKeys/<KEY_NAME> --dataset <DATASET_ID>

Terraform
Other
  1. In Google Cloud Console, go to BigQuery
  2. In Explorer, select your project and click the dataset <DATASET_ID>
  3. Click Edit details
  4. Under Encryption, select Customer-managed key and choose or paste the key: projects/<KMS_PROJECT_ID>/locations/<LOCATION>/keyRings/<KEY_RING>/cryptoKeys/<KEY_NAME>
  5. Click Save

Source Code

Resource Type

bigquery.googleapis.com/Dataset

References