Gallery › Storage › Azure built-in policies
Azure NetApp Files Volumes should not use NFSv3 protocol type
Converted Policy Audit Deny Disabled Mode All Version 1.0.0
Disallow the use of NFSv3 protocol type to prevent unsecure access to volumes. NFSv4.1 with Kerberos protocol should be used to access NFS volumes to ensure data integrity and encryption.
ConvertTo-Bylaw converted this policy, and proved that the file compiles back to the same definition.
Azure Policy JSONANF_VolumesShouldNotUseNFSv3.json · 56 lines
{
"properties": {
"displayName": "Azure NetApp Files Volumes should not use NFSv3 protocol type",
"policyType": "BuiltIn",
"mode": "All",
"description": "Disallow the use of NFSv3 protocol type to prevent unsecure access to volumes. NFSv4.1 with Kerberos protocol should be used to access NFS volumes to ensure data integrity and encryption.",
"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": "NFSv3"
}
},
"greater": 0
}
]
},
"then": {
"effect": "[parameters('effect')]"
}
},
"versions": [
"1.0.0"
]
},
"id": "/providers/Microsoft.Authorization/policyDefinitions/d558e1a6-296d-4fbb-81a5-ea25822639f6",
"name": "d558e1a6-296d-4fbb-81a5-ea25822639f6"
}Bylawd558e1a6-296d-4fbb-81a5-ea25822639f6.bylaw.ps1 · 30 lines
# Converted from ANF_VolumesShouldNotUseNFSv3.json by ConvertTo-Bylaw.
Policy 'd558e1a6-296d-4fbb-81a5-ea25822639f6' {
Properties @{
DisplayName = 'Azure NetApp Files Volumes should not use NFSv3 protocol type'
Description = 'Disallow the use of NFSv3 protocol type to prevent unsecure access to volumes. NFSv4.1 with Kerberos protocol should be used to access NFS volumes to ensure data integrity and encryption.'
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' {
Require 'protocolTypes is as required' {
Each 'protocolTypes[*]' {
Element | Must -Not -Be 'NFSv3'
}
}
}
Effect (Param Effect)
}Source: built-in-policies/policyDefinitions/Storage/ANF_VolumesShouldNotUseNFSv3.json in Azure/azure-policy, under the MIT licence.
Bylaw