Gallery › Storage › Azure Landing Zones Library
File Services with insecure Kerberos ticket encryption should be denied
Converted Policy Audit Deny Disabled Mode All Version 1.0.0
This policy denies the use of insecure Kerberos ticket encryption (RC4-HMAC) when using File Services on a storage account.
ConvertTo-Bylaw converted this policy, and proved that the file compiles back to the same definition.
Azure Policy JSONDeny-FileServices-InsecureKerberos.alz_policy_definition.json · 64 lines
{
"name": "Deny-FileServices-InsecureKerberos",
"properties": {
"description": "This policy denies the use of insecure Kerberos ticket encryption (RC4-HMAC) when using File Services on a storage account.",
"displayName": "File Services with insecure Kerberos ticket encryption should be denied",
"metadata": {
"alzCloudEnvironments": [
"AzureCloud",
"AzureChinaCloud",
"AzureUSGovernment"
],
"category": "Storage",
"source": "https://github.com/Azure/Enterprise-Scale/",
"version": "1.0.0"
},
"mode": "All",
"parameters": {
"effect": {
"allowedValues": [
"Audit",
"Deny",
"Disabled"
],
"defaultValue": "Deny",
"metadata": {
"description": "The effect determines what happens when the policy rule is evaluated to match",
"displayName": "Effect"
},
"type": "String"
},
"notAllowedKerberosTicketEncryption": {
"allowedValues": [
"RC4-HMAC",
"AES-256"
],
"defaultValue": "RC4-HMAC",
"metadata": {
"description": "The list of kerberosTicketEncryption not allowed.",
"displayName": "Kerberos ticket encryption supported by server. Valid values are RC4-HMAC, AES-256."
},
"type": "String"
}
},
"policyRule": {
"if": {
"allOf": [
{
"equals": "Microsoft.Storage/storageAccounts/fileServices",
"field": "type"
},
{
"contains": "[parameters('notAllowedKerberosTicketEncryption')]",
"field": "Microsoft.Storage/storageAccounts/fileServices/protocolSettings.smb.kerberosTicketEncryption"
}
]
},
"then": {
"effect": "[parameters('effect')]"
}
},
"policyType": "Custom"
},
"type": "Microsoft.Authorization/policyDefinitions"
}BylawDeny-FileServices-InsecureKerberos.bylaw.ps1 · 34 lines
# Converted from Deny-FileServices-InsecureKerberos.alz_policy_definition.json by ConvertTo-Bylaw.
Policy 'Deny-FileServices-InsecureKerberos' {
Properties @{
DisplayName = 'File Services with insecure Kerberos ticket encryption should be denied'
Description = 'This policy denies the use of insecure Kerberos ticket encryption (RC4-HMAC) when using File Services on a storage account.'
Category = 'Storage'
Version = '1.0.0'
Mode = 'All'
Metadata = [ordered]@{ alzCloudEnvironments = @('AzureCloud', 'AzureChinaCloud', 'AzureUSGovernment'); source = 'https://github.com/Azure/Enterprise-Scale/' }
}
Parameter Effect @{
AllowedValues = @('Audit', 'Deny', 'Disabled')
Default = 'Deny'
DisplayName = 'Effect'
Description = 'The effect determines what happens when the policy rule is evaluated to match'
}
Parameter NotAllowedKerberosTicketEncryption @{
AllowedValues = @('RC4-HMAC', 'AES-256')
Default = 'RC4-HMAC'
DisplayName = 'Kerberos ticket encryption supported by server. Valid values are RC4-HMAC, AES-256.'
Description = 'The list of kerberosTicketEncryption not allowed.'
}
Resource 'Microsoft.Storage/storageAccounts/fileServices' {
Require 'protocolSettings.smb.kerberosTicketEncryption is as required' {
Field protocolSettings.smb.kerberosTicketEncryption | Must -Not -ContainText (Param NotAllowedKerberosTicketEncryption) -IfPresent
}
}
Effect (Param Effect)
}Source: policy_definitions/Deny-FileServices-InsecureKerberos.alz_policy_definition.json in Azure/Azure-Landing-Zones-Library, under the MIT licence.
Bylaw