turbot/steampipe-mod-terraform-azure-compliance

Control: An Azure Active Directory administrator should be provisioned for SQL servers

Description

Audit provisioning of an Azure Active Directory administrator for your SQL server to enable Azure AD authentication. Azure AD authentication enables simplified permission management and centralized identity management of database users and other Microsoft services.

Usage

Run the control in your terminal:

powerpipe control run terraform_azure_compliance.control.sql_server_azure_ad_authentication_enabled

Snapshot and share results via Turbot Pipes:

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

SQL

This control uses a named query:

select
address as resource,
case
when name in (select split_part((attributes_std ->> 'server_name'), '.', 2) from terraform_resource where type = 'azurerm_sql_active_directory_administrator') then 'ok'
else 'alarm'
end status,
split_part(address, '.', 2) || case
when name in (select split_part((attributes_std ->> 'server_name'), '.', 2) from terraform_resource where type = 'azurerm_sql_active_directory_administrator') then ' has AzureAD authentication enabled'
else ' does not have AzureAD authentication enabled'
end || '.' reason
, path || ':' || start_line
from
terraform_resource
where
type = 'azurerm_sql_server';

Tags