turbot/steampipe-mod-gcp-compliance

Control: Ensure that dataproc cluster is encrypted using customer-managed encryption key

Description

When you use Dataproc, cluster, and job data is stored on Persistent Disks (PDs) associated with the Compute Engine VMs in your cluster and in a Cloud Storage staging bucket. This PD and bucket data is encrypted using a Google-generated data encryption key (DEK) and key encryption key (KEK). The CMEK feature allows you to create, use, and revoke the key-encryption key (KEK). Google still controls the data encryption key (DEK).

Usage

Run the control in your terminal:

powerpipe control run gcp_compliance.control.dataproc_cluster_encryption_with_cmek

Snapshot and share results via Turbot Pipes:

powerpipe login
powerpipe control run gcp_compliance.control.dataproc_cluster_encryption_with_cmek --share

SQL

This control uses a named query:

select
cluster_name resource,
case
when config -> 'encryptionConfig' ->> 'gcePdKmsKeyName' is null then 'alarm'
else 'ok'
end as status,
case
when config -> 'encryptionConfig' ->> 'gcePdKmsKeyName' is null
then title || ' is not encrypted using customer-managed encryption keys (CMEK).'
else title || ' is encrypted using customer-managed encryption keys (CMEK).'
end as reason
, location as location, project as project
from
gcp_dataproc_cluster;

Tags