Skip to main content

Azure Storage 'Selected Networks' Firewall Still Allows Trusted Azure Services Through

High severityMicrosoft Azure About 20 minutes to fix

Overview

An Azure Storage account locked to 'Selected networks' still allows any trusted Azure service to bypass the firewall by default, letting unapproved resources read and write data through an exception hidden below the subnet rule list.

At a glance

Symptom
A platform team locks down an Azure Storage account by switching its networking configuration from 'All networks' to 'Selected networks', adding only the subnet…
Likely cause
Azure Storage account network rules and the trusted-services exception are two distinct, independently evaluated controls, not a single unified allow-list.
Impact
Any resource that authenticates as one of the trusted Azure services, in this subscription or another one the account owner does not control, can read or write storage…
Verification signal
Confirm that only the explicitly approved resource instances retain access and that the blanket exception no longer applies.Re-open the storage account's Networking configuration and confirm 'Allow trusted Microsoft…
Safe correction
Narrow the exception to only the specific trusted-service integrations the account genuinely needs, rather than leaving the blanket toggle enabled.Where the platform supports it, replace the blanket trusted-services…
Rollback or recovery
If disabling the blanket exception breaks a legitimate integration that was not correctly captured in a resource instance rule, re-enable the account-wide trusted-services toggle immediately to restore the…

Symptom

A platform team locks down an Azure Storage account by switching its networking configuration from ‘All networks’ to ‘Selected networks’, adding only the subnet IDs for their application tier. Storage firewall diagnostics show the expected default-deny posture, and manual test requests from outside the approved subnets return the expected 403 network rule violation. Despite this, security review later finds that traffic that appears to come from a different team’s Azure Backup vault, a Cognitive Services resource, and an Azure Monitor diagnostic pipeline in another subscription has been reading and writing blobs in the account, none of which appear in the allowed subnet or IP rule list. Which of these callers actually accessed the account, and under what authorisation, needs to be confirmed from the logs. Cognitive Services access in particular depends on its own documented mechanism, not on the generic trusted-services bypass, so it should not be assumed to be explained by the exception.

False Assumption

The team assumed that setting the storage account’s public network access to ‘Selected networks’ and adding only their own subnets was sufficient to restrict access to those subnets alone. They treated the firewall configuration screen as a complete allow-list, not realising a separate exception, the checkbox ‘Allow Azure services on the trusted services list to access this storage account’ in the Networking firewall section, may be enabled and is evaluated independently of the subnet and IP rules.

Root Cause

Azure Storage account network rules and the trusted-services exception are two distinct, independently evaluated controls, not a single unified allow-list. When the exception (‘Allow Azure services on the trusted services list to access this storage account’) is enabled, a defined set of Azure services on the trusted services list (for example Azure Backup and Azure Site Recovery; see the Azure Storage firewall documentation, ‘Configure Azure Storage firewalls and virtual networks’, for the current list) can bypass the subnet and IP-based firewall rules, provided the caller is also authorised through RBAC or its own managed identity. The exception is controlled by the networkAcls.bypass property, which accepts the values None, Logging, Metrics and AzureServices. AzureServices enables the trusted-services exception, while Logging and Metrics permit storage analytics access (they are not a general Azure Monitor pipeline). Removing AzureServices disables the trusted-services exception. Azure Monitor should not be assumed to be covered by the trusted-services exception; check the documentation for how a given diagnostic pipeline reaches storage. Resource instance rules are a separate control (networkAcls.resourceAccessRules). The trusted-services exception exists to keep first-party platform integrations functional after a customer restricts network access, and it may be enabled on an account that was locked down to selected networks, so check it explicitly rather than assuming it is off.

Impact

Trusted services bypass only the network rules; they still need authorisation on the account (RBAC or a managed identity role assignment) to read or write data. Where such a role assignment exists, including one granted by another team, the caller can reach storage data even though the account’s own firewall rules only name a small internal subnet list. This breaks the intended blast-radius assumption behind ‘Selected networks’: the network boundary the team believed they had built does not hold against trusted-service traffic, and access review based solely on subnet and IP rules will understate who or what can reach the data.

Diagnosis

Confirm the exception is active and identify what it is granting access to before changing anything. These steps are read-only.

  • Review the storage account’s Networking blade (or the equivalent resource properties) for the public network access setting and confirm it is set to ‘Selected networks’ rather than ‘Disabled’.
  • Check whether ‘Allow Azure services on the trusted services list to access this storage account’ (the networkAcls.bypass setting, with AzureServices among its values) is enabled, separately from the subnet and IP rule list. Record the current bypass value exactly, and also list any existing resource instance rules (networkAcls.resourceAccessRules).
  • Review role assignments on the account and cross-reference storage access logs (where diagnostic logging is enabled) for read/write activity from identities outside the intended subnet list, to establish which services actually did the access and under what authorisation.
  • Treat any access attributed to a trusted-service identity as expected only if that specific integration (for example, a named backup vault) was deliberately approved; otherwise flag it for review.

Correction

The trusted-services exception is controlled by the bypass setting (None, Logging, Metrics, AzureServices) and cannot be narrowed per service. Before changing it, record the current bypass value. Inventory the services that depend on it (for example Azure Backup) and confirm whether each one needs it. Pilot on a non-production account first, then set bypass to only the values that are required, or to None if none are.

Resource instance rules are available only for a limited set of supported services. Confirm that each integration supports them before relying on them. Where a service is documented as supporting them, add a rule naming the specific resource and test that the service still works before reducing the exception. For Azure Backup, check the current vendor documentation on whether and in which scenarios resource instance rules are supported before deciding; until confirmed, assume a Backup vault still relies on the trusted-services exception and do not disable it on accounts that Backup protects.

Validation

Confirm that the bypass setting matches what you intended and that unapproved callers no longer get through.

  • Re-open the storage account’s Networking configuration and confirm the trusted-services exception is set as intended (bypass reduced to the required values, or None) and that no dependent service still needs what was removed.
  • Confirm each previously observed unexpected caller that relied on the bypass can no longer reach the account; expect access to be denied after the change. For the Cognitive Services resource, if the logs show it did access the account, check which mechanism it used, since that may not be the bypass.
  • Confirm approved integrations continue to function without new access errors during their next scheduled operation: the Backup vault, if it still relies on the exception, and any service covered by a resource instance rule.
  • Review storage diagnostic logs, where enabled, for a period after the change to confirm no further trusted-service traffic from unapproved resources is being accepted.

Rollback

If reducing the exception breaks a legitimate integration, restore the bypass value you recorded before the change, exactly as it was, while the missing integration is identified and, if its service supports it, given an explicit resource instance rule.

  • Stop condition: any approved service integration reports authentication or access failures within its normal operating window after the change.
  • Rollback action: set the bypass property back to the originally recorded value (for example AzureServices, or the exact combination previously present) on the storage account’s networking configuration.
  • Recovery path: once the missing integration is identified, add a resource instance rule if the service is documented as supporting one, test it, then reduce the exception again and re-run validation.

Prevention

Document the trusted-services exception as a named, reviewed control rather than an implicit default whenever a storage account’s networking is scoped to ‘Selected networks’. During any future network lockdown of a storage account, explicitly record which trusted-service integrations are required, use resource instance rules where the service supports them, and include the trusted-services setting in access reviews and infrastructure-as-code definitions so it cannot silently drift back to an open default during subsequent changes.

3

Apply the safer control

Before you change production

Confirm the affected scope, export the current configuration, and test the replacement control in a non-production environment first.

Control to implement

Narrow the exception to only the specific trusted-service integrations the account genuinely needs, rather than leaving the blanket toggle enabled.Where the platform supports it, replace the blanket trusted-services…

Validate the vendor-specific syntax in official documentation before applying it.

4

When to escalate

Validation and rollback are covered in the sections above.

Escalate

Escalate when the blast radius is uncertain, the control cannot be tested safely, or remediation requires an outage or security exception.

The KBY Brief

Fixed? Get the next one before it hits you: The KBY Brief

Practical fixes for the systems you run, by email about twice a week. Unsubscribe at any time.

About this page

Credited to

Dates

Published

Last updated

Corrections

  • : Corrected during a review of published articles. Details

Was this useful?

Reports go to the site owner and are used to correct pages. Corrections are listed at /corrections.

After remediation

Further reading stays below the corrective workflow and is selected by platform, category and shared technical keywords.

Discover more

Connected KBY resources