Skip to content

Commit e899546

Browse files
authored
[terraform] enable secure boot in k8s node pools (#15068)
## Change Description Fixes hail-is/hail-security#47 Enables secure boot and shielded nodes for node pools and vdc cluster. Note: - [x] Apply terraform and validate that it works in a sandbox instance before bringing to production - [ ] Must be applied manually in production after the PR merges ## Security Assessment - This change potentially impacts the Hail Batch instance as deployed by Broad Institute in GCP ### Impact Rating - This change has a medium security impact ### Impact Description Enables secure boot and shielded nodes. Makes sure the kernels being loaded in are properly protected ### Appsec Review - [x] Required: The impact has been assessed and approved by appsec
1 parent c34b96b commit e899546

File tree

2 files changed

+14
-3
lines changed

2 files changed

+14
-3
lines changed

infra/gcp-broad/main.tf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ resource "google_container_cluster" "vdc" {
143143
name = "vdc"
144144
location = var.gcp_zone
145145
network = google_compute_network.default.name
146-
enable_shielded_nodes = false
146+
enable_shielded_nodes = true
147147

148148
# We can't create a cluster with no node pool defined, but we want to only use
149149
# separately managed node pools. So we create the smallest possible default
@@ -263,7 +263,7 @@ resource "google_container_node_pool" "vdc_preemptible_pool" {
263263

264264
shielded_instance_config {
265265
enable_integrity_monitoring = true
266-
enable_secure_boot = false
266+
enable_secure_boot = true
267267
}
268268
}
269269

@@ -310,7 +310,7 @@ resource "google_container_node_pool" "vdc_nonpreemptible_pool" {
310310

311311
shielded_instance_config {
312312
enable_integrity_monitoring = true
313-
enable_secure_boot = false
313+
enable_secure_boot = true
314314
}
315315
}
316316

infra/gcp/main.tf

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@ resource "google_container_cluster" "vdc" {
121121
name = "vdc"
122122
location = var.gcp_zone
123123
network = google_compute_network.default.name
124+
enable_shielded_nodes = true
124125

125126
# We can't create a cluster with no node pool defined, but we want to only use
126127
# separately managed node pools. So we create the smallest possible default
@@ -200,6 +201,11 @@ resource "google_container_node_pool" "vdc_preemptible_pool" {
200201
metadata = {
201202
disable-legacy-endpoints = "true"
202203
}
204+
205+
shielded_instance_config {
206+
enable_integrity_monitoring = true
207+
enable_secure_boot = true
208+
}
203209
}
204210
}
205211

@@ -228,6 +234,11 @@ resource "google_container_node_pool" "vdc_nonpreemptible_pool" {
228234
metadata = {
229235
disable-legacy-endpoints = "true"
230236
}
237+
238+
shielded_instance_config {
239+
enable_integrity_monitoring = true
240+
enable_secure_boot = true
241+
}
231242
}
232243
}
233244

0 commit comments

Comments
 (0)