turbot/steampipe-mod-terraform-azure-compliance

Control: Event Hub namespaces 'Minimum TLS version' should be set to 'Version 1.2'

Description

This control checks whether 'Minimum TLS version' is set to 1.2. TLS 1.0 is a legacy version and has known vulnerabilities. This minimum TLS version can be configured to later protocols such as TLS 1.2.

Usage

Run the control in your terminal:

powerpipe control run terraform_azure_compliance.control.eventhub_namespace_uses_latest_tls_version

Snapshot and share results via Turbot Pipes:

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

SQL

This control uses a named query:

select
address as resource,
case
when (attributes_std ->> 'minimum_tls_version') is null then 'ok'
when (attributes_std ->> 'minimum_tls_version')::text = '1.2' then 'ok'
else 'alarm'
end status,
split_part(address, '.', 2) || case
when (attributes_std ->> 'minimum_tls_version') is null then ' TLS version not defined by default uses 1.2'
when (attributes_std ->> 'minimum_tls_version')::text = '1.2' then ' use TLS version 1.2'
else ' does not use TLS version 1.2'
end || '.' reason
, path || ':' || start_line
from
terraform_resource
where
type = 'azurerm_eventhub_namespace';

Tags