turbot/steampipe-mod-terraform-azure-compliance

Control: Service Fabric clusters should have the ClusterProtectionLevel property set to EncryptAndSign

Description

Service Fabric provides three levels of protection (None, Sign and EncryptAndSign) for node-to-node communication using a primary cluster certificate. Set the protection level to ensure that all node-to-node messages are encrypted and digitally signed.

Usage

Run the control in your terminal:

powerpipe control run terraform_azure_compliance.control.servicefabric_cluster_protection_level_as_encrypt_and_sign

Snapshot and share results via Turbot Pipes:

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

SQL

This control uses a named query:

select
address as resource,
case
when (attributes_std -> 'fabric_settings') is null then 'alarm'
when (attributes_std -> 'fabric_settings' -> 'parameters') is null then 'alarm'
when (attributes_std -> 'fabric_settings' ->> 'parameters') like '%EncryptAndSign%' then 'ok'
else 'alarm'
end status,
split_part(address, '.', 2) || case
when (attributes_std -> 'fabric_settings') is null then ' Cluster Protection Level not set'
when (attributes_std -> 'fabric_settings' -> 'parameters') is null then ' Cluster Protection Level not set to EncryptAndSign'
when (attributes_std -> 'fabric_settings' ->> 'parameters') like '%EncryptAndSign%' then ' Cluster Protection Level set to EncryptAndSign'
else ' Cluster Protection Level not set to EncryptAndSign'
end || '.' reason
, path || ':' || start_line
from
terraform_resource
where
type = 'azurerm_service_fabric_cluster';

Tags