Skip to main content

lacework-global-617

Enable 'Allow Azure services on the trusted services list to access this storage account' for Storage Account Access (Automated)

Profile Applicability

• Level 2

Description

Some Azure services that interact with storage accounts operate from networks that are not granted access through network rules. To help this type of service work as intended, allow the set of trusted Azure services to bypass the network rules. These services then use strong authentication to access the storage account. If you enable the Allow trusted Azure services exception, the following services get access to the storage account: Azure Backup, Azure Site Recovery, Azure DevTest Labs, Azure Event Grid, Azure Event Hubs, Azure Networking, Azure Monitor, and Azure SQL Data Warehouse (when registered in the subscription).

Rationale

Turning on firewall rules for storage account will block access to incoming requests for data, including from other Azure services. We can re-enable this functionality by enabling "Trusted Azure Services" through networking exceptions.

Impact

This creates authentication credentials for services that need access to storage resources so that services will no longer need to communicate via network request. There may be a temporary loss of communication as you set each Storage Account. It is recommended to not do this on mission-critical resources during business hours.

Audit

From Azure Portal

  1. Go to Storage Accounts
  2. For each storage account, Click on the Networking blade
  3. Click on the Firewalls and virtual networks heading.
  4. Ensure that Enabled from selected virtual networks and IP addresses is selected.
  5. Ensure that Allow Azure services on the trusted services list to access this storage account is checked in Exceptions.

From Azure CLI

Ensure bypass contains AzureServices

az storage account list --query '[*].networkRuleSet'

From Azure PowerShell

Connect-AzAccount
Set-AzContext -Subscription <subscription ID>
Get-AzStorageAccountNetworkRuleset -ResourceGroupName <resource group> -Name <storage account name> |Select-Object Bypass

If the resultant output from the above command shows 'NULL', that storage account configuration is out of compliance with this check. If the result of the above command shows 'AzureServices', that storage account configuration is in compliance with this check.

Remediation

From Azure Portal

  1. Go to Storage Accounts.
  2. For each storage account, click the Networking blade.
  3. Click the Firewalls and virtual networks heading.
  4. Select Enabled from selected virtual networks and IP addresses.
  5. Under the 'Exceptions' label, enable checkbox for Allow Azure services on the trusted services list to access this storage account.
  6. Click Save to apply your changes.

From Azure CLI

Use the below command to update Azure services:

az storage account update --name <StorageAccountName> --resource-group <resourceGroupName> --bypass AzureServices

References

https://docs.microsoft.com/en-us/azure/storage/common/storage-network-security
https://docs.microsoft.com/en-us/security/benchmark/azure/security-controls-v3-network-security#ns-2-secure-cloud-services-with-network-controls