Skip to main content

lacework-global-314

7.3 Specify a Default Customer-Managed Encryption Key (CMEK) for All BigQuery Data Sets (Automated)

note

This rule has been changed to automated, see Automated Policies for CIS GCP 1.3.0 for details.

Profile Applicability

• Level 2

Description

BigQuery by default encrypts the data as rest by employing Envelope Encryption using Google managed cryptographic keys. The data encryption keys encrypt the data, and data encryption keys themselves are further encrypted using key encryption keys. This is seamless and do not require any additional input from the user. However, if you want to have greater control, you can use Customer-managed encryption keys (CMEK) as an encryption key management solution for BigQuery Data Sets.

Rationale

BigQuery by default encrypts the data as rest by employing Envelope Encryption using Google managed cryptographic keys. This is seamless and does not require any additional input from the user.

For greater control over the encryption, customer-managed encryption keys (CMEK) can be used as encryption key management solution for BigQuery Data Sets. Setting a Default Customer-managed encryption key (CMEK) for a data set ensure any tables created in future will use the specified CMEK if none other is provided.

note

Google does not store your keys on its servers and cannot access your protected data unless you provide the key. This also means that if you forget or lose your key, there is no way for Google to recover the key or to recover any data encrypted with the lost key.

Impact

Using Customer-managed encryption keys (CMEK) will incur additional labor-hour investment to create, protect, and manage the keys.

Audit

From Console:

  1. Go to Analytics
  2. Go to BigQuery
  3. Under Analysis click on SQL Workspaces, select the project
  4. Select Data Set
  5. Ensure Customer-managed key is present under Dataset info section.
  6. Repeat for each data set in all projects.

From Command Line:

List all dataset names

bq ls

Use the following command to view each dataset details.

bq show <data_set_object>

Verify the kmsKeyName is present.

Remediation

You can update the default CMEK for existing data sets by specifying the default key in the EncryptionConfiguration.kmsKeyName field when calling the datasets.insert or datasets.patch methods

References

https://cloud.google.com/bigquery/docs/customer-managed-encryption