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
- Go to
Storage Accounts
- For each storage account, Click on the
Networking
blade - Click on the
Firewalls and virtual networks
heading. - Ensure that
Enabled from selected virtual networks and IP addresses
is selected. - Ensure that
Allow Azure services on the trusted services list to access this storage account
is checked inExceptions
.
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
- Go to Storage Accounts.
- For each storage account, click the Networking blade.
- Click the Firewalls and virtual networks heading.
- Select Enabled from selected virtual networks and IP addresses.
- Under the 'Exceptions' label, enable checkbox for Allow Azure services on the trusted services list to access this storage account.
- 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