GCP VM의 Shielded 보호 설정 점검

실제 부팅 보호 설정과 이미지 호환성을 함께 확인하세요.

설명

지원되는 Shielded VM 이미지에서는 vTPM과 무결성 모니터링이 기본으로 켜집니다. 모니터링은 vTPM이 기록한 부팅 측정값을 기준값과 비교합니다. Secure Boot는 신뢰할 수 있는 서명을 확인한 구성 요소만 실행합니다.

잠재적 영향

모니터링을 끄면 부팅 구성의 변조를 놓칠 수 있습니다. 반대로 서명되지 않은 커널이나 드라이버에 Secure Boot를 적용하면 VM이 부팅되지 않을 수 있습니다.

해결 방법

enable_vtpm과 enable_integrity_monitoring을 켜세요. enable_secure_boot는 이미지와 드라이버의 호환성을 시험한 뒤 켜세요. 기존 VM은 중단과 복구를 계획하고 정지 상태에서 설정을 바꾸세요. 다시 시작한 뒤 부팅 여부와 Cloud Logging의 무결성 검증 결과를 확인하세요.

예시

두 예시는 Secure Boot와 vTPM을 켠 같은 VM에서 enable_integrity_monitoring만 바꿉니다. 호환되는 부팅 디스크와 네트워크를 별도로 지정하세요.

변경 전

hcl
resource "google_compute_instance" "vm" {
  name         = "primary-application-server"
  machine_type = "e2-medium"
  zone         = "us-central1-a"

  shielded_instance_config {
    enable_secure_boot        = true
    enable_vtpm               = true
    enable_integrity_monitoring = false
  }
}

변경 후

hcl
resource "google_compute_instance" "vm" {
  name         = "primary-application-server"
  machine_type = "e2-medium"
  zone         = "us-central1-a"

  shielded_instance_config {
    enable_secure_boot         = true
    enable_vtpm                = true
    enable_integrity_monitoring = true
  }
}

참조