Gallery › Storage › Azure built-in policies
Azure NetApp Files SMB Volumes should use SMB3 encryption
Converted Policy Audit Deny Disabled Mode All Version 1.0.0
Disallow the creation of SMB Volumes without SMB3 encryption to ensure data integrity and data privacy.
ConvertTo-Bylaw converted this policy, and proved that the file compiles back to the same definition.
Azure Policy JSONANF_SMBVolumesShouldUseSMB3Encryption.json · 68 lines
{
"properties": {
"displayName": "Azure NetApp Files SMB Volumes should use SMB3 encryption",
"policyType": "BuiltIn",
"mode": "All",
"description": "Disallow the creation of SMB Volumes without SMB3 encryption to ensure data integrity and data privacy.",
"metadata": {
"version": "1.0.0",
"category": "Storage"
},
"version": "1.0.0",
"parameters": {
"effect": {
"type": "String",
"metadata": {
"displayName": "Effect",
"description": "Enable or disable the execution of the policy"
},
"allowedValues": [
"Audit",
"Deny",
"Disabled"
],
"defaultValue": "Audit"
}
},
"policyRule": {
"if": {
"allOf": [
{
"field": "type",
"equals": "Microsoft.NetApp/netAppAccounts/capacityPools/volumes"
},
{
"count": {
"field": "Microsoft.NetApp/netAppAccounts/capacityPools/volumes/protocolTypes[*]",
"where": {
"field": "Microsoft.NetApp/netAppAccounts/capacityPools/volumes/protocolTypes[*]",
"equals": "CIFS"
}
},
"greater": 0
},
{
"anyOf": [
{
"field": "Microsoft.NetApp/netAppAccounts/capacityPools/volumes/smbEncryption",
"exists": "false"
},
{
"field": "Microsoft.NetApp/netAppAccounts/capacityPools/volumes/smbEncryption",
"equals": "false"
}
]
}
]
},
"then": {
"effect": "[parameters('effect')]"
}
},
"versions": [
"1.0.0"
]
},
"id": "/providers/Microsoft.Authorization/policyDefinitions/ddcf4b94-9dfa-4a80-aca6-22bb654fde72",
"name": "ddcf4b94-9dfa-4a80-aca6-22bb654fde72"
}Bylawddcf4b94-9dfa-4a80-aca6-22bb654fde72.bylaw.ps1 · 38 lines
# Converted from ANF_SMBVolumesShouldUseSMB3Encryption.json by ConvertTo-Bylaw.
Policy 'ddcf4b94-9dfa-4a80-aca6-22bb654fde72' {
Properties @{
DisplayName = 'Azure NetApp Files SMB Volumes should use SMB3 encryption'
Description = 'Disallow the creation of SMB Volumes without SMB3 encryption to ensure data integrity and data privacy.'
Version = '1.0.0'
Category = 'Storage'
PolicyVersion = '1.0.0'
Mode = 'All'
}
Parameter Effect @{
AllowedValues = @('Audit', 'Deny', 'Disabled')
Default = 'Audit'
DisplayName = 'Effect'
Description = 'Enable or disable the execution of the policy'
}
Resource 'Microsoft.NetApp/netAppAccounts/capacityPools/volumes' {
When {
Count 'protocolTypes[*]' -Where {
Element | Must -Be 'CIFS'
} | Must -BeGreaterThan 0
}
Require 'smbEncryption exists' {
Field smbEncryption | Must -Exist
}
Require 'smbEncryption is not false' {
Field smbEncryption | Must -Not -Be 'false' -IfPresent
}
}
Effect (Param Effect)
}Source: built-in-policies/policyDefinitions/Storage/ANF_SMBVolumesShouldUseSMB3Encryption.json in Azure/azure-policy, under the MIT licence.
Bylaw