Azure Storage Account: Trusted Microsoft Services Toegang Toestaan

💼 Management Samenvatting

Het toestaan van Trusted Microsoft Services in Azure Storage Account firewall-exceptions zorgt ervoor dat essentiële Azure platform-services zoals Azure Backup, Azure Site Recovery, Log Analytics en Azure Monitor toegang behouden tot het storage account, zelfs wanneer network access is beperkt tot specifieke VNets of IP-adressen. Deze configuratie balanceert strikte netwerkbeveiliging met operationele noodzaak.

Aanbeveling
IMPLEMENTEER TRUSTED SERVICES
Risico zonder
Medium
Risk Score
5/10
Implementatie
0.5u (tech: 0.5u)
Van toepassing op:
Azure opslag

Wanneer een Azure Storage Account wordt beveiligd met firewall-regels die network access beperken tot specifieke Virtual Networks of IP-adressen (wat een security best practice is), ontstaat een operationeel probleem waarbij critical Azure platform-services die het storage account moeten kunnen benaderen, worden geblokkeerd. Deze services hebben geen statische IP-adressen die kunnen worden gewhitelist en opereren vanuit Azure's eigen infrastructure buiten customer VNets. Zonder Trusted Services-exception worden essentiële operaties geblokkeerd: Azure Backup kan geen backup data schrijven naar het storage account wat backup failures veroorzaakt en data protection compromitteert, Azure Site Recovery kan geen replicatie-data opslaan wat disaster recovery capabilities elimineert, Log Analytics en Azure Monitor kunnen geen diagnostische logs en metrics schrijven wat compliance logging breekt en troubleshooting onmogelijk maakt, Azure Security Center en Defender for Cloud kunnen geen security scan-resultaten opslaan, en Azure File Sync kan niet functioneren voor hybrid file server scenarios. Deze service outages resulteren in compliance violations omdat logging faalt, business continuity failures omdat backups niet werken, en operational blindness omdat monitoring data niet wordt verzameld. De Trusted Microsoft Services bypass lost dit op door een curated list van Microsoft first-party services expliciet toe te staan om de Storage Account firewall te bypassen, waarbij alleen services op Microsoft's trusted list toegang krijgen zonder specifieke IP-whitelisting, security wordt behouden omdat alleen verified Microsoft platform-services worden toegestaan, en operational functionality wordt gewaarborgd voor critical services. Deze bypass is een Microsoft-maintained allow-list en bevat ALLEEN first-party Azure platform-services, geen third-party services.

PowerShell Modules Vereist
Primary API: Azure API
Connection: Connect-AzAccount
Required Modules: Az.Accounts, Az.opslag

Implementatie

Deze maatregel schakelt de 'Allow trusted Microsoft services to access this storage account' bypass in voor Azure Storage Accounts die firewall-regels hebben geconfigureerd. De configuratie gebeurt in Azure Portal onder Storage Account → Networking → Firewalls and virtual networks waarbij na het selecteren van 'Enabled from selected virtual networks and IP addresses' de checkbox 'Allow trusted Microsoft services to access this storage account' moet worden aangevinkt. Via PowerShell kan dit worden geconfigureerd met Update-AzStorageAccountNetworkRuleSet -Bypass AzureServices. De trusted services lijst omvat Azure Backup voor backup operations, Azure Site Recovery voor disaster recovery replicatie, Azure Monitor en Log Analytics voor diagnostische data collection, Azure Security Center en Defender for Cloud voor security scanning, Azure File Sync voor hybrid file server synchronisatie, Azure Import/Export service voor data transfer jobs, en andere Microsoft first-party platform services. Deze bypass werkt via Azure's internal service principal authentication waarbij services zich authentiseren via managed identities zonder publieke IP-whitelisting. De implementation is eenvoudig en kost slechts 30 minuten, heeft geen kosten, en is essentieel voor maintaining operational capabilities terwijl strong network security wordt afgedwongen via VNet-restrictions en Private Endpoints. Dit is een must-have configuration voor alle storage accounts met firewall-regels en voldoet aan CIS Azure Benchmark control 3.6 en BIO 13.01 network controls. Zonder deze bypass falen critical Azure platform-services wat unacceptable is voor productie-environments.

Vereisten

opslagaccount met firewall

Monitoring

Gebruik PowerShell-script trusted-services-enabled.ps1 (functie Invoke-Monitoring) – Controleren.

Controleer firewall exceptions.

Compliance en Auditing

  1. CIS 3.6
  2. BIO 13.01

Remediatie

Gebruik PowerShell-script trusted-services-enabled.ps1 (functie Invoke-Remediation) – Herstellen.

Compliance & Frameworks

Automation

Gebruik het onderstaande PowerShell script om deze security control te monitoren en te implementeren. Het script bevat functies voor zowel monitoring (-Monitoring) als remediation (-Remediation).

PowerShell
<# ================================================================================ AZURE POWERSHELL SCRIPT - Nederlandse Baseline voor Veilige Cloud ================================================================================ .SYNOPSIS Trusted Services Enabled .DESCRIPTION CIS Azure Foundations Benchmark - Control 3.31 Controleert of trusted Microsoft services toegang hebben tot storage. .NOTES Filename: trusted-services-enabled.ps1 Author: Nederlandse Baseline voor Veilige Cloud Version: 1.0 CIS Control: 3.31 #> #Requires -Version 5.1 #Requires -Modules Az.Accounts, Az.Storage [CmdletBinding()] param([Parameter()][switch]$Monitoring) $ErrorActionPreference = 'Stop' $PolicyName = "Trusted Services Enabled" function Connect-RequiredServices { if (-not (Get-AzContext)) { Connect-AzAccount | Out-Null } } function Test-Compliance { $storageAccounts = Get-AzStorageAccount -ErrorAction SilentlyContinue $result = @{ TotalAccounts = $storageAccounts.Count; TrustedServicesEnabled = 0 } foreach ($account in $storageAccounts) { if ($account.NetworkRuleSet.Bypass -like "*AzureServices*") { $result.TrustedServicesEnabled++ } } return $result } try { Connect-RequiredServices if ($Monitoring) { $r = Test-Compliance Write-Host "`n========================================" -ForegroundColor Cyan Write-Host "$PolicyName" -ForegroundColor Cyan Write-Host "========================================" -ForegroundColor Cyan Write-Host "Total Storage Accounts: $($r.TotalAccounts)" -ForegroundColor White Write-Host "Trusted Services Enabled: $($r.TrustedServicesEnabled)" -ForegroundColor $(if ($r.TrustedServicesEnabled -gt 0) { 'Green' } else { 'Yellow' }) } else { $r = Test-Compliance Write-Host "`nTrusted Services: $($r.TrustedServicesEnabled)/$($r.TotalAccounts) accounts" } } catch { Write-Error $_; exit 1 } # ================================================================================ # Standaard Invoke-* Functions (Auto-generated) # ================================================================================ function Invoke-Implementation { <# .SYNOPSIS Implementeert de configuratie #> [CmdletBinding()] param() Invoke-Remediation } function Invoke-Monitoring { <# .SYNOPSIS Controleert de huidige configuratie status #> [CmdletBinding()] param() $Monitoring = $true try { Connect-RequiredServices if ($Monitoring) { $r = Test-Compliance Write-Host "`n========================================" -ForegroundColor Cyan Write-Host "$PolicyName" -ForegroundColor Cyan Write-Host "========================================" -ForegroundColor Cyan Write-Host "Total Storage Accounts: $($r.TotalAccounts)" -ForegroundColor White Write-Host "Trusted Services Enabled: $($r.TrustedServicesEnabled)" -ForegroundColor $(if ($r.TrustedServicesEnabled -gt 0) { 'Green' } else { 'Yellow' }) } else { $r = Test-Compliance Write-Host "`nTrusted Services: $($r.TrustedServicesEnabled)/$($r.TotalAccounts) accounts" } } catch { Write-Error $_; exit 1 } } function Invoke-Remediation { <# .SYNOPSIS Herstelt de configuratie naar de gewenste staat .DESCRIPTION Dit is een monitoring-only control, remediation delegeert naar monitoring #> [CmdletBinding()] param() Write-Host "[INFO] Dit is een monitoring-only control" -ForegroundColor Yellow Write-Host "[INFO] Running monitoring check..." -ForegroundColor Cyan Invoke-Monitoring }

Risico zonder implementatie

Risico zonder implementatie
Medium: Storage firewall zonder trusted services exception = Azure Backup, Azure Monitor, Defender blocked. Operational impact. Compliance: CIS 3.6. Het risico is medium - operational.

Management Samenvatting

Trusted Services Enabled: Allow trusted Microsoft services bypass storage firewall (Azure Backup, Log Analytics, Defender). Exception to firewall deny-default. Activatie: Storage Account → Networking → Firewall → Allow trusted services. Gratis. Verplicht CIS 3.6. Implementatie: 30 minuten. Essential for Azure services integration.