Overview
Some Azure services that interact with storage accounts operate from networks that can't be granted access through network rules. To help this type of service work as intended, allow the trusted Azure services to bypass the network rules. These services will then use strong authentication to access the storage account. If the Allow trusted Azure services exception is enabled, the following services are granted 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 a storage account will block access to incoming data requests, 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 a network request. As you set each storage account, there may be a temporary loss of communication. It is recommended not to do this on mission-critical resources during business hours.
Default Value
By default, Storage Accounts will accept connections from clients on any network.
References
Remediation guidance
Azure Console
- Open the storage account in the Azure Portal using the
Open in Azurebutton. - Under
Networking, click on theFirewalls and virtual networksheading - Ensure that
Enabled from selected virtual networks and IP addressesis selected - Under the
Exceptionslabel, checkAllow Azure services on the trusted services list to access this storage account. - Click
Saveto apply your changes.
Azure CLI
Use the below command to update Azure services:
az storage account update --name --resource-group <resourceGroupName> --bypass AzureServices
Service-wide remediation
Recommended when many resources are affected: fix the platform baseline first so new resources inherit the secure setting, then remediate the existing flagged resources in batches.
Azure
Use management group or subscription Azure Policy assignments, remediation tasks where supported, landing-zone standards, and IaC modules so drift is prevented at scale.
Operational rollout
- Fix the baseline first at the account, subscription, project, cluster, or tenant scope that owns this control.
- Remediate the currently affected resources in batches, starting with internet-exposed and production assets.
- Re-scan and track approved exceptions with an owner and expiry date.
Query logic
These are the stored checks tied to this control.
Storage accounts not allowing access from trusted Azure Services
Connectors
Covered asset types
Expected check: eq []
{
storageAccounts(
where: {
OR: [
{ AND: [{ networkRuleSetDefaultAction_CONTAINS: "Allow" }] }
{
AND: [
{ networkRuleSetDefaultAction_CONTAINS: "Deny" }
{ NOT: { networkRuleSetBypass_CONTAINS: "AzureServices" } }
]
}
]
}
) {
...AssetFragment
}
}
Microsoft Azure