turbot/steampipe-mod-terraform-azure-compliance

Control: Only secure connections to your Azure Cache for Redis should be enabled

Description

Audit enabling of only connections via SSL to Azure Cache for Redis. Use of secure connections ensures authentication between the server and the service and protects data in transit from network layer attacks such as man-in-the-middle, eavesdropping, and session-hijacking.

Usage

Run the control in your terminal:

powerpipe control run terraform_azure_compliance.control.azure_redis_cache_ssl_enabled

Snapshot and share results via Turbot Pipes:

powerpipe login
powerpipe control run terraform_azure_compliance.control.azure_redis_cache_ssl_enabled --share

SQL

This control uses a named query:

select
address as resource,
case
when (attributes_std -> 'enable_non_ssl_port')::boolean then 'alarm'
else 'ok'
end status,
split_part(address, '.', 2) || case
when (attributes_std -> 'enable_non_ssl_port')::boolean then ' secure connections disabled'
else ' secure connections enabled'
end || '.' reason
, path || ':' || start_line
from
terraform_resource
where
type = 'azurerm_redis_cache';

Tags