Skip to content

Commit 50b7d76

Browse files
committed
Update AKS policy to enforce encryption at host for temporary disks; enhance policy rule logic and versioning
1 parent f4bf52e commit 50b7d76

1 file changed

Lines changed: 37 additions & 17 deletions

File tree

‎policyDefinitions/aks/pol-deny-aks-disks-cache-encrypted-at-host.json‎

Lines changed: 37 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55
"description": "To enhance data security, the data stored on the virtual machine (VM) host of your Azure Kubernetes Service nodes VMs should be encrypted at rest. This is a common requirement in many regulatory and industry compliance standards.",
66
"metadata": {
77
"category": "Azure Kubernetes Service",
8-
"version": "1.0.0",
8+
"version": "1.1.0",
99
"preview": false,
1010
"deprecated": false,
1111
"source_builtIn_name": "41425d9f-d1a5-499a-9932-f8ed8453932c"
1212
},
13-
"mode": "Indexed",
13+
"mode": "All",
1414
"parameters": {
1515
"effect": {
1616
"type": "String",
@@ -28,32 +28,52 @@
2828
},
2929
"policyRule": {
3030
"if": {
31-
"allOf": [
31+
"anyOf": [
3232
{
33-
"field": "type",
34-
"equals": "Microsoft.ContainerService/managedClusters"
33+
"allOf": [
34+
{
35+
"field": "type",
36+
"equals": "Microsoft.ContainerService/managedClusters"
37+
},
38+
{
39+
"count": {
40+
"field": "Microsoft.ContainerService/managedClusters/agentPoolProfiles[*]",
41+
"where": {
42+
"anyOf": [
43+
{
44+
"field": "Microsoft.ContainerService/managedClusters/agentPoolProfiles[*].enableEncryptionAtHost",
45+
"exists": "false"
46+
},
47+
{
48+
"field": "Microsoft.ContainerService/managedClusters/agentPoolProfiles[*].enableEncryptionAtHost",
49+
"equals": "false"
50+
}
51+
]
52+
}
53+
},
54+
"greater": 0
55+
}
56+
]
3557
},
3658
{
37-
"count": {
38-
"field": "Microsoft.ContainerService/managedClusters/agentPoolProfiles[*]",
39-
"where": {
59+
"allOf": [
60+
{
61+
"field": "type",
62+
"equals": "Microsoft.ContainerService/managedClusters/agentPools"
63+
},
64+
{
4065
"anyOf": [
4166
{
42-
"field": "Microsoft.ContainerService/managedClusters/agentPoolProfiles[*].enableEncryptionAtHost",
43-
"exists": "False"
44-
},
45-
{
46-
"field": "Microsoft.ContainerService/managedClusters/agentPoolProfiles[*].enableEncryptionAtHost",
47-
"equals": ""
67+
"field": "Microsoft.ContainerService/managedClusters/agentPools/enableEncryptionAtHost",
68+
"exists": "false"
4869
},
4970
{
50-
"field": "Microsoft.ContainerService/managedClusters/agentPoolProfiles[*].enableEncryptionAtHost",
71+
"field": "Microsoft.ContainerService/managedClusters/agentPools/enableEncryptionAtHost",
5172
"equals": "false"
5273
}
5374
]
5475
}
55-
},
56-
"greater": 0
76+
]
5777
}
5878
]
5979
},

0 commit comments

Comments
 (0)