turbot/steampipe-mod-terraform-aws-compliance

Control: Glue security configuration encryption should be enabled

Description

This control checks whether Glue security configuration encryption is enabled. This control is non-complaint if Glue security configuration encryption is disabled.

Usage

Run the control in your terminal:

powerpipe control run terraform_aws_compliance.control.glue_security_configuration_encryption_enabled

Snapshot and share results via Turbot Pipes:

powerpipe login
powerpipe control run terraform_aws_compliance.control.glue_security_configuration_encryption_enabled --share

SQL

This control uses a named query:

select
address as resource,
case
when (attributes_std -> 'encryption_configuration' -> 'cloudwatch_encryption' ->> 'cloudwatch_encryption_mode') = 'SSE-KMS'
and (attributes_std -> 'encryption_configuration' -> 'cloudwatch_encryption' ->> 'kms_key_arn') is not null
and (attributes_std -> 'encryption_configuration' -> 'job_bookmarks_encryption' ->> 'job_bookmarks_encryption_mode') = 'CSE-KMS'
and (attributes_std -> 'encryption_configuration' -> 'job_bookmarks_encryption' ->> 'kms_key_arn') is not null
and (attributes_std -> 'encryption_configuration' -> 's3_encryption' ->> 's3_encryption_mode') <> 'DISABLED'
and (attributes_std -> 'encryption_configuration' -> 's3_encryption' ->> 'kms_key_arn') is not null then 'ok'
else 'alarm'
end status,
split_part(address, '.', 2) || case
when (attributes_std -> 'encryption_configuration' -> 'cloudwatch_encryption' ->> 'cloudwatch_encryption_mode') = 'SSE-KMS'
and (attributes_std -> 'encryption_configuration' -> 'cloudwatch_encryption' ->> 'kms_key_arn') is not null
and (attributes_std -> 'encryption_configuration' -> 'job_bookmarks_encryption' ->> 'job_bookmarks_encryption_mode') = 'CSE-KMS'
and (attributes_std -> 'encryption_configuration' -> 'job_bookmarks_encryption' ->> 'kms_key_arn') is not null
and (attributes_std -> 'encryption_configuration' -> 's3_encryption' ->> 's3_encryption_mode') <> 'DISABLED'
and (attributes_std -> 'encryption_configuration' -> 's3_encryption' ->> 'kms_key_arn') is not null then ' encryption enabled'
else ' encryption disabled'
end || '.' reason
, path || ':' || start_line
from
terraform_resource
where
type = 'aws_glue_security_configuration';

Tags