-
Notifications
You must be signed in to change notification settings - Fork 12
/
section_1.sp
347 lines (301 loc) · 12.5 KB
/
section_1.sp
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
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
locals {
cis_v140_1_common_tags = merge(local.cis_v140_common_tags, {
cis_section_id = "1"
})
}
benchmark "cis_v140_1" {
title = "1 Identity and Access Management"
documentation = file("./cis_v140/docs/cis_v140_1.md")
children = [
control.cis_v140_1_1,
control.cis_v140_1_2,
control.cis_v140_1_3,
control.cis_v140_1_4,
control.cis_v140_1_5,
control.cis_v140_1_6,
control.cis_v140_1_7,
control.cis_v140_1_8,
control.cis_v140_1_9,
control.cis_v140_1_10,
control.cis_v140_1_11,
control.cis_v140_1_12,
control.cis_v140_1_13,
control.cis_v140_1_14,
control.cis_v140_1_15,
control.cis_v140_1_16,
control.cis_v140_1_17,
control.cis_v140_1_18,
control.cis_v140_1_19,
control.cis_v140_1_20,
control.cis_v140_1_21,
control.cis_v140_1_22
]
tags = merge(local.cis_v140_1_common_tags, {
type = "Benchmark"
service = "Azure/ActiveDirectory"
})
}
control "cis_v140_1_1" {
title = "1.1 Ensure that multi-factor authentication status is enabled for all privileged users"
description = "Enable multi-factor authentication for all user credentials who have write access to Azure resources. These include roles like 'Service Co-Administrators', 'Subscription Owners', 'Contributors'."
query = query.ad_manual_control
documentation = file("./cis_v140/docs/cis_v140_1_1.md")
tags = merge(local.cis_v140_1_common_tags, {
cis_item_id = "1.1"
cis_level = "1"
cis_type = "manual"
service = "Azure/ActiveDirectory"
})
}
control "cis_v140_1_2" {
title = "1.2 Ensure that multi-factor authentication status is enabled for all non- privileged users"
description = "Enable multi-factor authentication for all non-privileged users."
query = query.ad_manual_control
documentation = file("./cis_v140/docs/cis_v140_1_2.md")
tags = merge(local.cis_v140_1_common_tags, {
cis_item_id = "1.2"
cis_level = "2"
cis_type = "manual"
service = "Azure/ActiveDirectory"
})
}
control "cis_v140_1_3" {
title = "1.3 Ensure guest users are reviewed on a monthly basis"
description = "Guest users allow you to share your company's applications and services with users from any other organization, while maintaining control over your own corporate data. Guest users should be review on a monthly basis to ensure that inactive and unneeded accounts are removed."
query = query.ad_guest_user_reviewed_monthly
documentation = file("./cis_v140/docs/cis_v140_1_3.md")
tags = merge(local.cis_v140_1_common_tags, {
cis_item_id = "1.3"
cis_level = "1"
cis_type = "automated"
service = "Azure/ActiveDirectory"
})
}
control "cis_v140_1_4" {
title = "1.4 Ensure that 'Restore multi-factor authentication on all remembered devices' is enabled"
description = "Do not allow users to remember multi-factor authentication on devices."
query = query.ad_manual_control
documentation = file("./cis_v140/docs/cis_v140_1_4.md")
tags = merge(local.cis_v140_1_common_tags, {
cis_item_id = "1.4"
cis_level = "1"
cis_type = "manual"
service = "Azure/ActiveDirectory"
})
}
control "cis_v140_1_5" {
title = "1.5 Ensure that 'Number of methods required to reset' is set to '2'"
description = "Ensure that two alternate forms of identification are provided before allowing a password reset."
query = query.ad_manual_control
documentation = file("./cis_v140/docs/cis_v140_1_5.md")
tags = merge(local.cis_v140_1_common_tags, {
cis_item_id = "1.5"
cis_level = "1"
cis_type = "manual"
service = "Azure/ActiveDirectory"
})
}
control "cis_v140_1_6" {
title = "1.6 Ensure that 'Number of days before users are asked to re-confirm their authentication information' is not set to \"0\""
description = "Ensure that the number of days before users are asked to re-confirm their authentication information is not set to 0."
query = query.ad_manual_control
documentation = file("./cis_v140/docs/cis_v140_1_6.md")
tags = merge(local.cis_v140_1_common_tags, {
cis_item_id = "1.6"
cis_level = "1"
cis_type = "manual"
service = "Azure/ActiveDirectory"
})
}
control "cis_v140_1_7" {
title = "1.7 Ensure that 'Notify users on password resets?' is set to 'Yes'"
description = "Ensure that users are notified on their primary and secondary emails on password resets."
query = query.ad_manual_control
documentation = file("./cis_v140/docs/cis_v140_1_7.md")
tags = merge(local.cis_v140_1_common_tags, {
cis_item_id = "1.7"
cis_level = "1"
cis_type = "manual"
service = "Azure/ActiveDirectoryM"
})
}
control "cis_v140_1_8" {
title = "1.8 Ensure that 'Notify all admins when other admins reset their password?' is set to 'Yes'"
description = "Ensure that all administrators are notified if any other administrator resets their password."
query = query.ad_manual_control
documentation = file("./cis_v140/docs/cis_v140_1_8.md")
tags = merge(local.cis_v140_1_common_tags, {
cis_item_id = "1.8"
cis_level = "2"
cis_type = "manual"
service = "Azure/ActiveDirectory"
})
}
control "cis_v140_1_9" {
title = "1.9 Ensure that 'Users can consent to apps accessing company data on their behalf' is set to 'No'"
description = "Require administrators to provide consent for the apps before use."
query = query.ad_manual_control
documentation = file("./cis_v140/docs/cis_v140_1_9.md")
tags = merge(local.cis_v140_1_common_tags, {
cis_item_id = "1.9"
cis_level = "2"
cis_type = "manual"
service = "Azure/ActiveDirectory"
})
}
control "cis_v140_1_10" {
title = "1.10 Ensure that 'Users can add gallery apps to their Access Panel' is set to 'No'"
description = "Require administrators to provide consent for the apps before use."
query = query.ad_manual_control
documentation = file("./cis_v140/docs/cis_v140_1_10.md")
tags = merge(local.cis_v140_1_common_tags, {
cis_item_id = "1.10"
cis_level = "2"
cis_type = "manual"
service = "Azure/ActiveDirectory"
})
}
control "cis_v140_1_11" {
title = "1.11 Ensure that 'Users can register applications' is set to 'No'"
description = "Require administrators to register third-party applications."
query = query.ad_manual_control
documentation = file("./cis_v140/docs/cis_v140_1_11.md")
tags = merge(local.cis_v140_1_common_tags, {
cis_item_id = "1.11"
cis_level = "2"
cis_type = "manual"
service = "Azure/ActiveDirectory"
})
}
control "cis_v140_1_12" {
title = "1.12 Ensure That 'Guest users access restrictions' is set to 'Guest user access is restricted to properties and memberships of their own directory objects'"
description = "Limit guest user permissions."
query = query.ad_manual_control
documentation = file("./cis_v140/docs/cis_v140_1_12.md")
tags = merge(local.cis_v140_1_common_tags, {
cis_item_id = "1.12"
cis_level = "2"
cis_type = "manual"
service = "Azure/ActiveDirectory"
})
}
control "cis_v140_1_13" {
title = "1.13 Ensure that 'Guest invite restrictions' is set to 'Only users assigned to specific admin roles can invite guest users'"
description = "Restrict invitations to users with specific admin roles only."
query = query.ad_manual_control
documentation = file("./cis_v140/docs/cis_v140_1_13.md")
tags = merge(local.cis_v140_1_common_tags, {
cis_item_id = "1.13"
cis_level = "2"
cis_type = "manual"
service = "Azure/ActiveDirectory"
})
}
control "cis_v140_1_14" {
title = "1.14 Ensure That 'Restrict access to Azure AD administration portal' is set to 'Yes'"
description = "Restrict access to the Azure AD administration portal to administrators only."
query = query.ad_manual_control
documentation = file("./cis_v140/docs/cis_v140_1_14.md")
tags = merge(local.cis_v140_1_common_tags, {
cis_item_id = "1.14"
cis_level = "2"
cis_type = "manual"
service = "Azure/ActiveDirectory"
})
}
control "cis_v140_1_15" {
title = "1.15 Ensure that 'Restrict user ability to access groups features in the Access Pane' is Set to 'Yes'"
description = "Restricts group creation to administrators with permissions only."
query = query.ad_manual_control
documentation = file("./cis_v140/docs/cis_v140_1_15.md")
tags = merge(local.cis_v140_1_common_tags, {
cis_item_id = "1.15"
cis_level = "1"
cis_type = "manual"
service = "Azure/ActiveDirectory"
})
}
control "cis_v140_1_16" {
title = "1.16 Ensure that 'Users can create security groups in Azure portals, API or PowerShell' is set to 'No'"
description = "Restrict security group creation to administrators only."
query = query.ad_manual_control
documentation = file("./cis_v140/docs/cis_v140_1_16.md")
tags = merge(local.cis_v140_1_common_tags, {
cis_item_id = "1.16"
cis_level = "2"
cis_type = "manual"
service = "Azure/ActiveDirectory"
})
}
control "cis_v140_1_17" {
title = "1.17 Ensure that 'Owners can manage group membership requests in the Access Panel' is set to 'No'"
description = "Restrict security group management to administrators only."
query = query.ad_manual_control
documentation = file("./cis_v140/docs/cis_v140_1_17.md")
tags = merge(local.cis_v140_1_common_tags, {
cis_item_id = "1.17"
cis_level = "2"
cis_type = "manual"
service = "Azure/ActiveDirectory"
})
}
control "cis_v140_1_18" {
title = "1.18 Ensure that 'Users can create Microsoft 365 groups in Azure portals, API or PowerShell' is set to 'No'"
description = "Restrict Microsoft 365 group creation to administrators only."
query = query.ad_manual_control
documentation = file("./cis_v140/docs/cis_v140_1_18.md")
tags = merge(local.cis_v140_1_common_tags, {
cis_item_id = "1.18"
cis_level = "2"
cis_type = "manual"
service = "Azure/ActiveDirectory"
})
}
control "cis_v140_1_19" {
title = "1.19 Ensure that 'Require Multi-Factor Authentication to register or join devices with Azure AD' is set to 'Yes'"
description = "Joining or registering devices to the active directory should require Multi-factor authentication."
query = query.ad_manual_control
documentation = file("./cis_v140/docs/cis_v140_1_19.md")
tags = merge(local.cis_v140_1_common_tags, {
cis_item_id = "1.19"
cis_level = "2"
cis_type = "manual"
service = "Azure/ActiveDirectory"
})
}
control "cis_v140_1_20" {
title = "1.20 Ensure that no custom subscription owner roles are created"
description = "Subscription ownership should not include permission to create custom owner roles. The principle of least privilege should be followed and only necessary privileges should be assigned instead of allowing full administrative access."
query = query.iam_no_custom_subscription_owner_roles_created
documentation = file("./cis_v140/docs/cis_v140_1_20.md")
tags = merge(local.cis_v140_1_common_tags, {
cis_item_id = "1.20"
cis_level = "2"
cis_type = "automated"
service = "Azure/ActiveDirectory"
})
}
control "cis_v140_1_21" {
title = "1.21 Ensure Security Defaults is enabled on Azure Active Directory"
description = "Security defaults in Azure Active Directory (Azure AD) make it easier to be secure and help protect your organization. Security defaults contain preconfigured security settings for common attacks."
query = query.ad_manual_control
documentation = file("./cis_v140/docs/cis_v140_1_21.md")
tags = merge(local.cis_v140_1_common_tags, {
cis_item_id = "1.21"
cis_level = "1"
cis_type = "automated"
service = "Azure/ActiveDirectory"
})
}
control "cis_v140_1_22" {
title = "1.22 Ensure Custom Role is assigned for Administering Resource Locks"
description = "Resource locking is a powerful protection mechanism that can prevent inadvertent modification/deletion of resources within Azure subscriptions/Resource Groups and is a recommended NIST configuration."
query = query.ad_manual_control
documentation = file("./cis_v140/docs/cis_v140_1_22.md")
tags = merge(local.cis_v140_1_common_tags, {
cis_item_id = "1.22"
cis_level = "2"
cis_type = "manual"
service = "Azure/ActiveDirectory"
})
}