Storage account has cross-tenant replication disabled
Azure Storage accounts are assessed for whether cross-tenant object replication is disallowed via AllowCrossTenantReplication=false, limiting replication policies to the same tenant.
Risk
Permitting cross-tenant replication can copy sensitive blobs into external tenants, undermining confidentiality. A compromised or mismanaged destination enables data exfiltration; mirrored updates/deletes can impact integrity and retention, complicating auditability and incident response.
Run this check with Prowler
Run in Prowler Cloudprowler azure --checks storage_cross_tenant_replication_disabledRecommendation
Enforce AllowCrossTenantReplication=false and keep replication within the same tenant. Apply least privilege and separation of duties for replication management, backed by policy-based governance to prevent drift. If cross-tenant transfer is required, use formal data-sharing controls, monitoring, and time-bound approvals.
Remediation
CLI
az storage account update --name <storage-account-name> --resource-group <resource-group> --allow-cross-tenant-replication falseTerraform
resource "azurerm_storage_account" "main" {
name = "<example_resource_name>"
resource_group_name = "<example_resource_name>"
location = "<example_resource_name>"
account_tier = "Standard"
account_replication_type = "LRS"
cross_tenant_replication_enabled = false # Critical: disallow cross-tenant object replication
}NativeIaC
// Disables cross-tenant replication on the storage account
resource sa 'Microsoft.Storage/storageAccounts@2023-01-01' = {
name: '<example_resource_name>'
location: resourceGroup().location
sku: {
name: 'Standard_LRS'
}
kind: 'StorageV2'
properties: {
allowCrossTenantReplication: false // Critical: disallow cross-tenant object replication
}
}Other
Check Code
from prowler.lib.check.models import Check, Check_Report_Azure
from prowler.providers.azure.services.storage.storage_client import storage_client
class storage_cross_tenant_replication_disabled(Check):
"""Check if cross-tenant replication is disabled.
Attributes:
metadata: Metadata associated with the check (inherited from Check).
"""
def execute(self) -> Check_Report_Azure:
"""Execute the check for cross-tenant replication.
This method checks if cross-tenant replication is disabled. If it is, the check passes; otherwise, it fails.
Returns:
Check_Report_Azure: A report containing the result of the check.
"""
findings = []
for subscription, storage_accounts in storage_client.storage_accounts.items():
subscription_name = storage_client.subscriptions.get(
subscription, subscription
)
for storage_account in storage_accounts:
report = Check_Report_Azure(
metadata=self.metadata(), resource=storage_account
)
report.subscription = subscription
if not storage_account.allow_cross_tenant_replication:
report.status = "PASS"
report.status_extended = f"Storage account {storage_account.name} from subscription {subscription_name} ({subscription}) has cross-tenant replication disabled."
else:
report.status = "FAIL"
report.status_extended = f"Storage account {storage_account.name} from subscription {subscription_name} ({subscription}) has cross-tenant replication enabled."
findings.append(report)
return findings