/
ASC_Azure_Defender_Servers_Full_Features_DINE.json
187 lines (187 loc) · 6.28 KB
/
ASC_Azure_Defender_Servers_Full_Features_DINE.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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
{
"properties": {
"displayName": "Configure Microsoft Defender for Servers plan",
"policyType": "BuiltIn",
"mode": "All",
"description": "New capabilities are continuously being added to Defender for Servers, which may require the user's explicit enablement. Use this policy to make sure all new capabilities will be enabled.",
"metadata": {
"version": "1.0.0",
"category": "Security Center"
},
"version": "1.0.0",
"parameters": {
"effect": {
"type": "string",
"defaultValue": "DeployIfNotExists",
"metadata": {
"displayName": "Effect",
"description": "Enable or disable the execution of the policy"
},
"allowedValues": [
"DeployIfNotExists",
"Disabled"
]
},
"subPlan": {
"type": "String",
"metadata": {
"displayName": "Defender for Servers plans",
"description": "Select a Defender for Servers plan"
},
"allowedValues": [
"P1",
"P2"
],
"defaultValue": "P2"
},
"isAgentlessVmScanningEnabled": {
"type": "String",
"metadata": {
"displayName": "Agentless VM Scanning Enabled",
"description": "Enable or disable the Agentless VM Scanning add-on feature"
},
"allowedValues": [
"true",
"false"
],
"defaultValue": "true"
},
"isMdeDesignatedSubscriptionEnabled": {
"type": "String",
"metadata": {
"displayName": "MDE Designated Subscription Enabled",
"description": "Enable or disable the MDE Designated Subscription add-on feature"
},
"allowedValues": [
"true",
"false"
],
"defaultValue": "false"
}
},
"policyRule": {
"if": {
"field": "type",
"equals": "Microsoft.Resources/subscriptions"
},
"then": {
"effect": "[parameters('effect')]",
"details": {
"type": "Microsoft.Security/pricings",
"name": "VirtualMachines",
"deploymentScope": "subscription",
"existenceScope": "subscription",
"roleDefinitionIds": [
"/providers/Microsoft.Authorization/roleDefinitions/8e3af657-a8ff-443c-a75c-2fe8c4bcb635"
],
"existenceCondition": {
"allOf": [
{
"field": "Microsoft.Security/pricings/pricingTier",
"equals": "Standard"
},
{
"field": "Microsoft.Security/pricings/subPlan",
"equals": "[parameters('subPlan')]"
},
{
"count": {
"field": "Microsoft.Security/pricings/extensions[*]",
"where": {
"allOf": [
{
"field": "Microsoft.Security/pricings/extensions[*].name",
"equals": "AgentlessVmScanning"
},
{
"field": "Microsoft.Security/pricings/extensions[*].isEnabled",
"equals": "[if(equals(parameters('subPlan'), 'P2'), parameters('isAgentlessVmScanningEnabled'), 'false')]"
}
]
}
},
"equals": 1
},
{
"count": {
"field": "Microsoft.Security/pricings/extensions[*]",
"where": {
"allOf": [
{
"field": "Microsoft.Security/pricings/extensions[*].name",
"equals": "MdeDesignatedSubscription"
},
{
"field": "Microsoft.Security/pricings/extensions[*].isEnabled",
"equals": "[parameters('isMdeDesignatedSubscriptionEnabled')]"
}
]
}
},
"equals": 1
}
]
},
"deployment": {
"location": "westeurope",
"properties": {
"mode": "incremental",
"parameters": {
"subPlan": {
"value": "[parameters('subPlan')]"
},
"isAgentlessVmScanningEnabled": {
"value": "[parameters('isAgentlessVmScanningEnabled')]"
},
"isMdeDesignatedSubscriptionEnabled": {
"value": "[parameters('isMdeDesignatedSubscriptionEnabled')]"
}
},
"template": {
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"subPlan": {
"type": "String"
},
"isAgentlessVmScanningEnabled": {
"type": "String"
},
"isMdeDesignatedSubscriptionEnabled": {
"type": "String"
}
},
"resources": [
{
"type": "Microsoft.Security/pricings",
"apiVersion": "2023-01-01",
"name": "VirtualMachines",
"properties": {
"pricingTier": "Standard",
"subPlan": "[parameters('subPlan')]",
"extensions": [
{
"name": "AgentlessVmScanning",
"isEnabled": "[parameters('isAgentlessVmScanningEnabled')]"
},
{
"name": "MdeDesignatedSubscription",
"isEnabled": "[parameters('isMdeDesignatedSubscriptionEnabled')]"
}
]
}
}
]
}
}
}
}
}
},
"versions": [
"1.0.0"
]
},
"id": "/providers/Microsoft.Authorization/policyDefinitions/5eb6d64a-4086-4d7a-92da-ec51aed0332d",
"name": "5eb6d64a-4086-4d7a-92da-ec51aed0332d"
}