/
section_4.sp
271 lines (235 loc) · 12.8 KB
/
section_4.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
locals {
cis_v200_4_common_tags = merge(local.cis_v200_common_tags, {
cis_section_id = "4"
})
}
benchmark "cis_v200_4" {
title = "4 Logging and Monitoring"
documentation = file("./cis_v200/docs/cis_v200_4.md")
children = [
control.cis_v200_4_1,
control.cis_v200_4_2,
control.cis_v200_4_3,
control.cis_v200_4_4,
control.cis_v200_4_5,
control.cis_v200_4_6,
control.cis_v200_4_7,
control.cis_v200_4_8,
control.cis_v200_4_9,
control.cis_v200_4_10,
control.cis_v200_4_11,
control.cis_v200_4_12,
control.cis_v200_4_13,
control.cis_v200_4_14,
control.cis_v200_4_15,
control.cis_v200_4_16,
control.cis_v200_4_17
]
tags = merge(local.cis_v200_4_common_tags, {
type = "Benchmark"
})
}
control "cis_v200_4_1" {
title = "4.1 Ensure default tags are used on resources"
description = "Using default tags is a way to ensure all resources that support tags are tagged during creation. Tags can be based on static values or based on computed values. It is recommended to setup default tags early on to ensure all created resources will get tagged. Tags are scoped to Compartments and are inherited by Child Compartments. The recommendation is to create default tags like “CreatedBy” at the Root Compartment level to ensure all resources get tagged."
query = query.identity_default_tag
documentation = file("./cis_v200/docs/cis_v200_4_1.md")
tags = merge(local.cis_v200_4_common_tags, {
cis_item_id = "4.1"
cis_level = "1"
cis_type = "automated"
service = "OCI/Identity"
})
}
control "cis_v200_4_2" {
title = "4.2 Create at least one notification topic and subscription to receive monitoring alerts"
description = "Notifications provide a multi-channel messaging service that allow users and applications to be notified of events of interest occurring within OCI. Messages can be sent via eMail, HTTPs, PagerDuty, Slack or the OCI Function service. Some channels, such as eMail require confirmation of the subscription before it becomes active."
query = query.notification_topic_with_subscription
documentation = file("./cis_v200/docs/cis_v200_4_2.md")
tags = merge(local.cis_v200_4_common_tags, {
cis_item_id = "4.2"
cis_level = "1"
cis_type = "automated"
service = "OCI/ONS"
})
}
control "cis_v200_4_3" {
title = "4.3 Ensure a notification is configured for Identity Provider changes"
description = "It is recommended to setup an Event Rule and Notification that gets triggered when Identity Providers are created, updated or deleted. Event Rules are compartment scoped and will detect events in child compartments. It is recommended to create the Event rule at the root compartment level."
query = query.events_rule_notification_identity_provider_changes
documentation = file("./cis_v200/docs/cis_v200_4_3.md")
tags = merge(local.cis_v200_4_common_tags, {
cis_item_id = "4.3"
cis_level = "1"
cis_type = "automated"
service = "OCI/ONS"
})
}
control "cis_v200_4_4" {
title = "4.4 Ensure a notification is configured for IdP group mapping changes"
description = "It is recommended to setup an Event Rule and Notification that gets triggered when Identity Provider Group Mappings are created, updated or deleted. Event Rules are compartment scoped and will detect events in child compartments. It is recommended to create the Event rule at the root compartment level."
query = query.events_rule_notification_idp_group_mapping_changes
documentation = file("./cis_v200/docs/cis_v200_4_4.md")
tags = merge(local.cis_v200_4_common_tags, {
cis_item_id = "4.4"
cis_level = "1"
cis_type = "automated"
service = "OCI/ONS"
})
}
control "cis_v200_4_5" {
title = "4.5 Ensure a notification is configured for IAM group changes"
description = "It is recommended to setup an Event Rule and Notification that gets triggered when IAM Groups are created, updated or deleted. Event Rules are compartment scoped and will detect events in child compartments, it is recommended to create the Event rule at the root compartment level."
query = query.events_rule_notification_iam_group_changes
documentation = file("./cis_v200/docs/cis_v200_4_5.md")
tags = merge(local.cis_v200_4_common_tags, {
cis_item_id = "4.5"
cis_level = "1"
cis_type = "automated"
service = "OCI/ONS"
})
}
control "cis_v200_4_6" {
title = "4.6 Ensure a notification is configured for IAM policy changes"
description = "It is recommended to setup an Event Rule and Notification that gets triggered when IAM Policies are created, updated or deleted. Event Rules are compartment scoped and will detect events in child compartments, it is recommended to create the Event rule at the root compartment level."
query = query.events_rule_notification_iam_policy_changes
documentation = file("./cis_v200/docs/cis_v200_4_6.md")
tags = merge(local.cis_v200_4_common_tags, {
cis_item_id = "4.6"
cis_level = "1"
cis_type = "automated"
service = "OCI/ONS"
})
}
control "cis_v200_4_7" {
title = "4.7 Ensure a notification is configured for user changes"
description = "It is recommended to setup an Event Rule and Notification that gets triggered when IAM Users are created, updated, deleted, capabilities updated, or state updated. Event Rules are compartment scoped and will detect events in child compartments, it is recommended to create the Event rule at the root compartment level."
query = query.events_rule_notification_iam_user_changes
documentation = file("./cis_v200/docs/cis_v200_4_7.md")
tags = merge(local.cis_v200_4_common_tags, {
cis_item_id = "4.7"
cis_level = "1"
cis_type = "automated"
service = "OCI/ONS"
})
}
control "cis_v200_4_8" {
title = "4.8 Ensure a notification is configured for VCN changes"
description = "It is recommended to setup an Event Rule and Notification that gets triggered when Virtual Cloud Networks are created, updated or deleted. Event Rules are compartment scoped and will detect events in child compartments, it is recommended to create the Event rule at the root compartment level."
query = query.events_rule_notification_vcn_changes
documentation = file("./cis_v200/docs/cis_v200_4_8.md")
tags = merge(local.cis_v200_4_common_tags, {
cis_item_id = "4.8"
cis_level = "1"
cis_type = "automated"
service = "OCI/ONS"
})
}
control "cis_v200_4_9" {
title = "4.9 Ensure a notification is configured for changes to route tables"
description = "It is recommended to setup an Event Rule and Notification that gets triggered when route tables are created, updated or deleted. Event Rules are compartment scoped and will detect events in child compartments, it is recommended to create the Event rule at the root compartment level."
query = query.events_rule_notification_route_table_changes
documentation = file("./cis_v200/docs/cis_v200_4_9.md")
tags = merge(local.cis_v200_4_common_tags, {
cis_item_id = "4.9"
cis_level = "1"
cis_type = "automated"
service = "OCI/ONS"
})
}
control "cis_v200_4_10" {
title = "4.10 Ensure a notification is configured for security list changes"
description = "It is recommended to setup an Event Rule and Notification that gets triggered when security lists are created, updated or deleted. Event Rules are compartment scoped and will detect events in child compartments, it is recommended to create the Event rule at the root compartment level."
query = query.events_rule_notification_security_list_changes
documentation = file("./cis_v200/docs/cis_v200_4_10.md")
tags = merge(local.cis_v200_4_common_tags, {
cis_item_id = "4.10"
cis_level = "1"
cis_type = "automated"
service = "OCI/ONS"
})
}
control "cis_v200_4_11" {
title = "4.11 Ensure a notification is configured for network security group changes"
description = "It is recommended to setup an Event Rule and Notification that gets triggered when network security groups are created, updated or deleted. Event Rules are compartment scoped and will detect events in child compartments, it is recommended to create the Event rule at the root compartment level."
query = query.events_rule_notification_network_security_list_changes
documentation = file("./cis_v200/docs/cis_v200_4_11.md")
tags = merge(local.cis_v200_4_common_tags, {
cis_item_id = "4.11"
cis_level = "1"
cis_type = "automated"
service = "OCI/ONS"
})
}
control "cis_v200_4_12" {
title = "4.12 Ensure a notification is configured for changes to network gateways"
description = "It is recommended to setup an Event Rule and Notification that gets triggered when Network Gateways are created, updated, deleted, attached, detached, or moved. This recommendation includes Internet Gateways, Dynamic Routing Gateways, Service Gateways, Local Peering Gateways, and NAT Gateways. Event Rules are compartment scoped and will detect events in child compartments, it is recommended to create the Event rule at the root compartment level."
query = query.events_rule_notification_network_gateway_changes
documentation = file("./cis_v200/docs/cis_v200_4_12.md")
tags = merge(local.cis_v200_4_common_tags, {
cis_item_id = "4.12"
cis_level = "1"
cis_type = "automated"
service = "OCI/ONS"
})
}
control "cis_v200_4_13" {
title = "4.13 Ensure VCN flow logging is enabled for all subnets"
description = "VCN flow logs record details about traffic that has been accepted or rejected based on the security list rule."
query = query.core_subnet_flow_log_enabled
documentation = file("./cis_v200/docs/cis_v200_4_13.md")
tags = merge(local.cis_v200_4_common_tags, {
cis_item_id = "4.13"
cis_level = "2"
cis_type = "automated"
service = "OCI/VCN"
})
}
control "cis_v200_4_14" {
title = "4.14 Ensure Cloud Guard is enabled in the root compartment of the tenancy"
description = "Cloud Guard detects misconfigured resources and insecure activity within a tenancy and provides security administrators with the visibility to resolve these issues. Upon detection, Cloud Guard can suggest, assist, or take corrective actions to mitigate these issues. Cloud Guard should be enabled in the root compartment of your tenancy with the default configuration, activity detectors and responders."
query = query.cloudguard_enabled
documentation = file("./cis_v200/docs/cis_v200_4_14.md")
tags = merge(local.cis_v200_4_common_tags, {
cis_item_id = "4.14"
cis_level = "1"
cis_type = "automated"
service = "OCI/CloudGuard"
})
}
control "cis_v200_4_15" {
title = "4.15 Ensure a notification is configured for Oracle Cloud Guard problems detected"
description = "Cloud Guard detects misconfigured resources and insecure activity within a tenancy and provides security administrators with the visibility to resolve these issues. Upon detection, Cloud Guard generates a Problem. It is recommended to setup an Event Rule and Notification that gets triggered when Oracle Cloud Guard Problems are created, dismissed or remediated. Event Rules are compartment scoped and will detect events in child compartments. It is recommended to create the Event rule at the root compartment level."
query = query.events_rule_notification_cloud_guard_problems_detected
documentation = file("./cis_v200/docs/cis_v200_4_15.md")
tags = merge(local.cis_v200_4_common_tags, {
cis_item_id = "4.15"
cis_level = "1"
cis_type = "automated"
service = "OCI/ONS"
})
}
control "cis_v200_4_16" {
title = "4.16 Ensure customer created Customer Managed Key (CMK) is rotated at least annually"
description = "Oracle Cloud Infrastructure Vault securely stores master encryption keys that protect your encrypted data. You can use the Vault service to rotate keys to generate new cryptographic material. Periodically rotating keys limits the amount of data encrypted by one key version."
query = query.kms_cmk_rotation_365
documentation = file("./cis_v200/docs/cis_v200_4_16.md")
tags = merge(local.cis_v200_4_common_tags, {
cis_item_id = "4.16"
cis_level = "1"
cis_type = "automated"
service = "OCI/KMS"
})
}
control "cis_v200_4_17" {
title = "4.17 Ensure write level Object Storage logging is enabled for all buckets"
description = "Object Storage write logs will log all write requests made to objects in a bucket."
query = query.manual_control
documentation = file("./cis_v200/docs/cis_v200_4_17.md")
tags = merge(local.cis_v200_4_common_tags, {
cis_item_id = "4.17"
cis_level = "2"
cis_type = "automated"
service = "OCI/Logging"
})
}