Gallery › Storage › Azure built-in policies
Storage accounts should prevent cross tenant object replication
Converted Policy Audit Deny Disabled Mode Indexed Version 1.0.0
Audit restriction of object replication for your storage account. By default, users can configure object replication with a source storage account in one Azure AD tenant and a destination account in a different tenant. It is a security concern because customer's data can be replicated to a storage account that is owned by the customer. By setting allowCrossTenantReplication to false, objects replication can be configured only if both source and destination accounts are in the same Azure AD tenant.
ConvertTo-Bylaw converted this policy, and proved that the file compiles back to the same definition.
{
"properties": {
"displayName": "Storage accounts should prevent cross tenant object replication",
"policyType": "BuiltIn",
"mode": "Indexed",
"description": "Audit restriction of object replication for your storage account. By default, users can configure object replication with a source storage account in one Azure AD tenant and a destination account in a different tenant. It is a security concern because customer's data can be replicated to a storage account that is owned by the customer. By setting allowCrossTenantReplication to false, objects replication can be configured only if both source and destination accounts are in the same Azure AD tenant.",
"metadata": {
"version": "1.0.0",
"category": "Storage"
},
"version": "1.0.0",
"parameters": {
"effect": {
"type": "string",
"defaultValue": "Audit",
"allowedValues": [
"Audit",
"Deny",
"Disabled"
],
"metadata": {
"displayName": "Effect",
"description": "The effect determines what happens when the policy rule is evaluated to match"
}
}
},
"policyRule": {
"if": {
"allOf": [
{
"field": "type",
"equals": "Microsoft.Storage/storageAccounts"
},
{
"field": "Microsoft.Storage/storageAccounts/allowCrossTenantReplication",
"notEquals": "false"
}
]
},
"then": {
"effect": "[parameters('effect')]"
}
},
"versions": [
"1.0.0"
]
},
"id": "/providers/Microsoft.Authorization/policyDefinitions/92a89a79-6c52-4a7e-a03f-61306fc49312",
"name": "92a89a79-6c52-4a7e-a03f-61306fc49312"
}# Converted from StorageAccountAllowCrossTenantReplication_Audit.json by ConvertTo-Bylaw.
Policy '92a89a79-6c52-4a7e-a03f-61306fc49312' {
Properties @{
DisplayName = 'Storage accounts should prevent cross tenant object replication'
Description = 'Audit restriction of object replication for your storage account. By default, users can configure object replication with a source storage account in one Azure AD tenant and a destination account in a different tenant. It is a security concern because customer''s data can be replicated to a storage account that is owned by the customer. By setting allowCrossTenantReplication to false, objects replication can be configured only if both source and destination accounts are in the same Azure AD tenant.'
Version = '1.0.0'
Category = 'Storage'
PolicyVersion = '1.0.0'
Mode = 'Indexed'
}
Parameter Effect @{
Type = 'string'
AllowedValues = @('Audit', 'Deny', 'Disabled')
Default = 'Audit'
DisplayName = 'Effect'
Description = 'The effect determines what happens when the policy rule is evaluated to match'
}
Resource 'Microsoft.Storage/storageAccounts' {
Require 'allowCrossTenantReplication is false' {
Field allowCrossTenantReplication | Must -Be 'false'
}
}
Effect (Param Effect)
}Source: built-in-policies/policyDefinitions/Storage/StorageAccountAllowCrossTenantReplication_Audit.json in Azure/azure-policy, under the MIT licence.
Bylaw