turbot/steampipe-mod-aws-compliance

Control: Redshift cluster encryption in transit should be enabled

Description

Ensure that your AWS Redshift clusters require TLS/SSL encryption to connect to SQL clients.

Usage

Run the control in your terminal:

powerpipe control run aws_compliance.control.redshift_cluster_encryption_in_transit_enabled

Snapshot and share results via Turbot Pipes:

powerpipe login
powerpipe control run aws_compliance.control.redshift_cluster_encryption_in_transit_enabled --share

SQL

This control uses a named query:

with pg_with_ssl as (
select
name as pg_name,
p ->> 'ParameterName' as parameter_name,
p ->> 'ParameterValue' as parameter_value
from
aws_redshift_parameter_group,
jsonb_array_elements(parameters) as p
where
p ->> 'ParameterName' = 'require_ssl'
and p ->> 'ParameterValue' = 'true'
)
select
arn as resource,
case
when cpg ->> 'ParameterGroupName' in (select pg_name from pg_with_ssl ) then 'ok'
else 'alarm'
end as status,
case
when cpg ->> 'ParameterGroupName' in (select pg_name from pg_with_ssl ) then title || ' encryption in transit enabled.'
else title || ' encryption in transit disabled.'
end as reason
, region, account_id
from
aws_redshift_cluster,
jsonb_array_elements(cluster_parameter_groups) as cpg;

Tags