Control: 7.3 Ensure That a Default Customer-Managed Encryption Key (CMEK) Is Specified for All BigQuery Data Sets
Description
BigQuery by default encrypts the data as rest by employing Envelope Encryption
using Google managed cryptographic keys. The data is encrypted using the data encryption keys 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, Customer-managed encryption keys (CMEK) can be used as encryption key management solution for BigQuery Data Sets.
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.
Remediation
From Command Line
The default CMEK for existing data sets can be updated by specifying the default key in the EncryptionConfiguration.kmsKeyName
field when calling the datasets.insert
or datasets.patch
methods.
Default Value
Google Managed keys are used as key encryption keys
.
Usage
Run the control in your terminal:
powerpipe control run gcp_compliance.control.cis_v300_7_3
Snapshot and share results via Turbot Pipes:
powerpipe loginpowerpipe control run gcp_compliance.control.cis_v300_7_3 --share
SQL
This control uses a named query:
bigquery_dataset_encrypted_with_cmk