turbot/steampipe-mod-azure-compliance

Control: 9.3.5 Ensure 'Allow Azure services on the trusted services list to access this storage account' is Enabled for Storage Account Access

Description

NOTE: This recommendation assumes that the Public network access parameter is set to Enabled from selected virtual networks and IP addresses. Please ensure the prerequisite recommendation has been implemented before proceeding:

  • Ensure Default Network Access Rule for Storage Accounts is Set to Deny.

If the Allow Azure services on the trusted services list to access this storage account exception is enabled, the following services are granted access to the storage account:

  • Azure Backup,
  • Azure Data Box,
  • Azure DevTest Labs,
  • Azure Event Grid,
  • Azure Event Hubs,
  • Azure File Sync,
  • Azure HDInsight,
  • Azure Import/Export,
  • Azure Monitor,
  • Azure Networking Services, and
  • Azure Site Recovery (when registered in the subscription).

Remediation

Remediate from Azure Portal

  1. Go to Storage Accounts.
  2. For each storage account, under Security + networking, click Networking.
  3. Click on the Firewalls and virtual networks heading.
  4. Under Exceptions, check the box next to Allow Azure services on the trusted services list to access this storage account.
  5. Click Save.

Remediate from Azure CLI

Use the below command to update bypass to Azure services.

Default Value

By default, Storage Accounts will accept connections from clients on any network.

Usage

Run the control in your terminal:

powerpipe control run azure_compliance.control.cis_v500_9_3_5

Snapshot and share results via Turbot Pipes:

powerpipe login
powerpipe control run azure_compliance.control.cis_v500_9_3_5 --share

SQL

This control uses a named query:

select
sa.id as resource,
case
when network_rule_bypass not like '%AzureServices%' then 'alarm'
else 'ok'
end as status,
case
when network_rule_bypass not like '%AzureServices%' then sa.name || ' trusted Microsoft services not enabled.'
else sa.name || ' trusted Microsoft services enabled.'
end as reason
, sa.resource_group as resource_group
, sub.display_name as subscription
from
azure_storage_account sa
left join azure_subscription sub on sub.subscription_id = sa.subscription_id;

Tags