-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path06_security_baseline.auto.tfvars
More file actions
352 lines (288 loc) · 10.2 KB
/
Copy path06_security_baseline.auto.tfvars
File metadata and controls
352 lines (288 loc) · 10.2 KB
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
348
349
350
351
352
# Generated by Merlin Studio (https://site.merlin-studio.cloud). Licensed under CC BY-ND 4.0.
# ----------------------------------------------------------------------------
# COMPLIANCE FRAMEWORK UPGRADES
# The following values were automatically upgraded from their defaults to meet
# compliance framework requirements. User-explicit values were preserved.
# ----------------------------------------------------------------------------
# [CIS] data_classification_config.enabled: False -> True (CIS GCP 5.1, 7.1)
# [CIS] data_classification_config.classification_tiers: <unset> -> [{'tier': 'internal', 'encryption_required': 'google_managed', 'require_vpc_sc': False, 'require_access_logging': True}, {'tier': 'confidential', 'encryption_required': 'google_managed', 'require_vpc_sc': False, 'require_access_logging': True}] (CIS GCP 5.1, 7.1 — data classification tiers for CMEK and access control)
# [CIS] organization_policies[compute.requireShieldedVm]: <missing> -> enforce (CIS GCP 4.x — Shielded VM features required)
# [CIS] organization_policies[compute.disableSerialPortAccess]: <missing> -> enforce (CIS GCP 4.x — disable unaudited console access)
# [CIS] organization_policies[compute.requireOsLogin]: <missing> -> enforce (CIS GCP 4.x — IAM-based SSH access management)
# [CIS] organization_policies[compute.disableNestedVirtualization]: <missing> -> enforce (CIS GCP 4.x — reduce hypervisor attack surface)
# [CIS] organization_policies[compute.vmExternalIpAccess]: <missing> -> deny_all (CIS GCP 4.x — restrict external IP assignment)
# ----------------------------------------------------------------------------
# ============================================================================
# COMPLIANCE STANDARD
# ============================================================================
# Primary compliance framework guiding security controls
compliance_standard = "cis_gcp_v2"
# ============================================================================
# ORGANIZATION POLICIES
# Preventive guardrails enforced across the organization
# ============================================================================
org_policies = {
"compute.skipDefaultNetworkCreation" = {
constraint = "constraints/compute.skipDefaultNetworkCreation"
enforcement = "enforce"
scope = "organization"
},
"storage.uniformBucketLevelAccess" = {
constraint = "constraints/storage.uniformBucketLevelAccess"
enforcement = "enforce"
scope = "organization"
},
"iam.disableServiceAccountKeyCreation" = {
constraint = "constraints/iam.disableServiceAccountKeyCreation"
enforcement = "not_enforce"
scope = "organization"
},
"compute.requireShieldedVm" = {
constraint = "constraints/compute.requireShieldedVm"
enforcement = "enforce"
scope = "organization"
},
"compute.disableSerialPortAccess" = {
constraint = "constraints/compute.disableSerialPortAccess"
enforcement = "enforce"
scope = "organization"
},
"compute.requireOsLogin" = {
constraint = "constraints/compute.requireOsLogin"
enforcement = "enforce"
scope = "organization"
},
"compute.disableNestedVirtualization" = {
constraint = "constraints/compute.disableNestedVirtualization"
enforcement = "enforce"
scope = "organization"
},
"compute.vmExternalIpAccess" = {
constraint = "constraints/compute.vmExternalIpAccess"
enforcement = "deny_all"
scope = "organization"
}
}
# ============================================================================
# CLOUD KMS CONFIGURATION
# Customer-managed encryption keys
# ============================================================================
kms_config = {
enabled = true
key_project = "prj-seed-kms"
key_rings = {
"kr-europe-west1" = {
name = "kr-europe-west1"
location = "europe-west1"
purpose = "general"
}
}
keys = {
"compute-disk-key" = {
key_ring = "kr-europe-west1"
rotation_period = "7776000s"
purpose = "ENCRYPT_DECRYPT"
algorithm = "GOOGLE_SYMMETRIC_ENCRYPTION"
protection_level = "SOFTWARE"
labels = {
service = "compute"
managed_by = "terraform"
}
},
"gcs-key" = {
key_ring = "kr-europe-west1"
rotation_period = "7776000s"
purpose = "ENCRYPT_DECRYPT"
algorithm = "GOOGLE_SYMMETRIC_ENCRYPTION"
protection_level = "SOFTWARE"
labels = {
service = "cloud-storage"
managed_by = "terraform"
}
},
"bigquery-key" = {
key_ring = "kr-europe-west1"
rotation_period = "7776000s"
purpose = "ENCRYPT_DECRYPT"
algorithm = "GOOGLE_SYMMETRIC_ENCRYPTION"
protection_level = "SOFTWARE"
labels = {
service = "bigquery"
managed_by = "terraform"
}
},
"cloudsql-key" = {
key_ring = "kr-europe-west1"
rotation_period = "7776000s"
purpose = "ENCRYPT_DECRYPT"
algorithm = "GOOGLE_SYMMETRIC_ENCRYPTION"
protection_level = "SOFTWARE"
labels = {
service = "cloud-sql"
managed_by = "terraform"
}
},
"pubsub-key" = {
key_ring = "kr-europe-west1"
rotation_period = "7776000s"
purpose = "ENCRYPT_DECRYPT"
algorithm = "GOOGLE_SYMMETRIC_ENCRYPTION"
protection_level = "SOFTWARE"
labels = {
service = "pubsub"
managed_by = "terraform"
}
}
}
# Services that should use CMEK by default
default_encryption = {
pubsub = true
gke_secrets = false
bigquery = true
cloud_storage = true
cloud_sql = true
firestore = false
dataflow = false
compute_disks = true
}
}
# ============================================================================
# AUDIT LOGGING CONFIGURATION
# ============================================================================
audit_logging = {
# Admin Activity logs are always enabled
admin_activity = true
# Data Access logging configuration
data_access = {
enabled = true
}
# Log retention
retention_days = 365
# Log sink configuration
log_sink_destination = "none"
sink_project = ""
}
# Audit log IAM configuration for org-level data access logs
audit_config = {
"allServices" = {
audit_log_configs = [
{
log_type = "ADMIN_READ"
}
]
}
}
# ============================================================================
# ACCESS TRANSPARENCY
# Visibility into Google admin access
# ============================================================================
access_transparency = {
enabled = false
}
# ============================================================================
# SECURITY CONTACTS
# Essential contacts for security notifications
# ============================================================================
security_contacts = {
"admin_at_gcp1_intentarch_app" = {
email = "admin@gcp1.intentarch.app"
notification_categories = [
"security",
"technical",
"billing"
]
}
}
# Essential contacts module configuration
essential_contacts = [
{
email = "admin@gcp1.intentarch.app"
notification_category_subscriptions = [
"SECURITY",
"TECHNICAL",
"BILLING"
]
}
]
# ============================================================================
# DATA RESIDENCY & SOVEREIGNTY
# Resource location constraints and data sovereignty controls
# ============================================================================
data_residency = {
enforce_resource_locations = false
allowed_locations = []
# Assured Workloads - Google-managed compliance environment
assured_workloads = {
enabled = false
}
# Access Approval - require explicit approval for Google admin access (CIS GCP 2.15)
access_approval = {
enabled = false
}
}
# ============================================================================
# DATA CLASSIFICATION
# Classification tiers and handling policies
# ============================================================================
data_classification = {
enabled = true
classification_tiers = {
"internal" = {
tier = "internal"
encryption_required = "google_managed"
require_vpc_sc = false
require_access_logging = true
},
"confidential" = {
tier = "confidential"
encryption_required = "google_managed"
require_vpc_sc = false
require_access_logging = true
}
}
}
# ============================================================================
# DERIVED VALUES - Computed security flags
# ============================================================================
# Compliance standard
# CMEK enabled flag
# Data access logging enabled
# Log retention period
# Security policies count
# Access transparency
# Data residency
# Data classification
# Cloud Armor
# ============================================================================
# CLOUD ARMOR
# Web application firewall and DDoS protection
# ============================================================================
cloud_armor = {
enabled = true
# Security policies
policies = {
"default-waf-policy" = {
name = "default-waf-policy"
type = "CLOUD_ARMOR"
default_action = "allow"
adaptive_protection = true
# Pre-configured WAF rules
preconfigured_waf_rules = [
"sqli-v33-stable",
"xss-v33-stable",
"lfi-v33-stable",
"rce-v33-stable"
]
}
}
rate_limiting_rules = {}
}
# ============================================================================
# Next Steps:
# 1. Review org policies and add exceptions as needed
# 2. Create KMS key rings and keys if CMEK is enabled
# 3. Configure audit log sinks to BigQuery or Cloud Storage
# 4. Add security contacts to receive notifications
# 5. Configure Cloud Armor WAF policies for web-facing workloads
# 6. Proceed to 07_advanced_security.tfvars for VPC-SC and additional controls
# ============================================================================