turbot/azure_compliance

Control: 3.6 Ensure default network access rule for Storage Accounts is set to deny

Description

Restricting default network access helps to provide a new layer of security, since storage accounts accept connections from clients on any network. To limit access to selected networks, the default action must be changed.

Storage accounts should be configured to deny access to traffic from all networks (including internet traffic). Access can be granted to traffic from specific Azure Virtual networks, allowing a secure network boundary for specific applications to be built. Access can also be granted to public internet IP address ranges, to enable connections from specific internet or on-premises clients. When network rules are configured, only applications from allowed networks can access a storage account. When calling from an allowed network, applications continue to require proper authorization (a valid access key or SAS token) to access the storage account.

Remediation

From Console

  1. Login to Azure Storage Accounts
  2. For each storage account, go to Security + networking section
  3. Click on the Networking settings
  4. Go to menu called Firewalls and virtual networks
  5. Ensure that you have elected to allow access from Selected networks
  6. Add rules to allow traffic from specific network.
  7. Click Save to apply your changes.

From Command Line

Use the below command to update default-action to Deny.

az storage account update --name <StorageAccountName> --resource-group <resourceGroupName> --default-action Deny

Usage

Run the control in your terminal:

powerpipe control run azure_compliance.control.cis_v140_3_6

Snapshot and share results via Turbot Pipes:

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

SQL

This control uses a named query:

storage_account_default_network_access_rule_denied

Tags