Control: CloudFront distributions should not use deprecated SSL protocols between edge locations and custom origins
Description
This control checks if AWS CloudFront distributions are using deprecated SSL protocols for HTTPS communication between CloudFront edge locations and your custom origins. This control fails if a CloudFront distribution has a CustomOriginConfig where OriginSslProtocols includes SSLv3.
Usage
Run the control in your terminal:
powerpipe control run aws_compliance.control.cloudfront_distribution_no_deprecated_ssl_protocol
Snapshot and share results via Turbot Pipes:
powerpipe loginpowerpipe control run aws_compliance.control.cloudfront_distribution_no_deprecated_ssl_protocol --share
SQL
This control uses a named query:
with origin_ssl_protocols as ( select distinct arn, o -> 'CustomOriginConfig' ->> 'OriginProtocolPolicy' as origin_protocol_policy from aws_cloudfront_distribution, jsonb_array_elements(origins) as o where o -> 'CustomOriginConfig' -> 'OriginSslProtocols' -> 'Items' @> '["SSLv3"]')select b.arn as resource, case when o.arn is null then 'ok' else 'alarm' end as status, case when o.arn is null then title || ' does not have deprecated SSL protocols.' else title || ' has deprecated SSL protocols.' end as reason , region, account_idfrom aws_cloudfront_distribution as b left join origin_ssl_protocols as o on b.arn = o.arn;