-
Notifications
You must be signed in to change notification settings - Fork 1.1k
/
StorageNetworkAccessBypassOnly_AuditDeny.json
94 lines (94 loc) · 2.83 KB
/
StorageNetworkAccessBypassOnly_AuditDeny.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
{
"properties": {
"displayName": "Storage Accounts should restrict network access through network ACL bypass configuration only.",
"policyType": "BuiltIn",
"mode": "Indexed",
"description": "To improve the security of Storage Accounts, enable access only through network ACL bypass. This policy should be used in combination with a private endpoint for storage account access.",
"metadata": {
"version": "1.0.0",
"category": "VirtualEnclaves"
},
"version": "1.0.0",
"parameters": {
"effect": {
"type": "String",
"metadata": {
"displayName": "Effect",
"description": "Enable or disable the execution of the audit policy"
},
"allowedValues": [
"Audit",
"Deny",
"Disabled"
],
"defaultValue": "Audit"
},
"bypassConfiguration": {
"type": "String",
"metadata": {
"displayName": "Bypass Configuration",
"description": "Bypass the policy for storage accounts that match the configuration"
},
"allowedValues": [
"None",
"AzureServices",
"Logging",
"Metrics",
"Logging, Metrics",
"Logging, Metrics, AzureServices",
"Logging, AzureServices",
"Metrics, AzureServices"
],
"defaultValue": "AzureServices"
}
},
"policyRule": {
"if": {
"allOf": [
{
"field": "type",
"equals": "Microsoft.Storage/storageAccounts"
},
{
"anyOf": [
{
"field": "Microsoft.Storage/storageAccounts/networkAcls.defaultAction",
"notEquals": "Deny"
},
{
"count": {
"field": "Microsoft.Storage/storageAccounts/networkAcls.ipRules[*]"
},
"greaterOrEquals": 1
},
{
"count": {
"field": "Microsoft.Storage/storageAccounts/networkAcls.resourceAccessRules[*]"
},
"greaterOrEquals": 1
},
{
"count": {
"field": "Microsoft.Storage/storageAccounts/networkAcls.virtualNetworkRules[*]"
},
"greaterOrEquals": 1
},
{
"field": "Microsoft.Storage/storageAccounts/networkAcls.bypass",
"notEquals": "[parameters('bypassConfiguration')]"
}
]
}
]
},
"then": {
"effect": "[parameters('effect')]"
}
},
"versions": [
"1.0.0"
]
},
"id": "/providers/Microsoft.Authorization/policyDefinitions/7809fda1-ba27-48c1-9c63-1f5aee46ba89",
"name": "7809fda1-ba27-48c1-9c63-1f5aee46ba89"
}