설명
Shielded VM에서 Secure Boot는 부팅 구성 요소의 서명을 확인합니다. vTPM은 부팅 측정값을 기록하고, 무결성 모니터링은 이를 신뢰된 기준값과 비교합니다.
잠재적 영향
무결성 모니터링이 꺼져 있으면 부팅 과정의 변조를 놓칠 수 있습니다. Secure Boot와 호환되지 않는 커널이나 드라이버는 부팅에 실패할 수 있습니다.
해결 방법
shielded_instance_config에서 enable_vtpm과 enable_integrity_monitoring을 켜고, 이미지와 드라이버가 호환되면 enable_secure_boot도 켜세요. 기존 VM은 중지한 상태에서 변경하세요. 다시 시작한 뒤 Cloud Logging의 부팅 무결성 결과를 확인하고 실패 시 알림을 받도록 구성하세요.
예시
세 작업은 이름이 다른 VM의 생성 예시입니다. test-object1은 이미지 기본값을 사용하고 test-object5는 모니터링을 끕니다. test-object는 세 기능을 켭니다. 호환되는 부팅 디스크, 네트워크, 프로젝트와 서비스 계정 JSON 파일을 지정하세요.
변경 전
yaml
- name: create a instance1
google.cloud.gcp_compute_instance:
name: test-object1
machine_type: n1-standard-1
zone: us-central1-a
project: "{{ gcp_project_id }}"
auth_kind: serviceaccount
service_account_file: "{{ gcp_credentials_file }}"
state: present
- name: create a instance5
google.cloud.gcp_compute_instance:
name: test-object5
machine_type: n1-standard-1
zone: us-central1-a
project: "{{ gcp_project_id }}"
auth_kind: serviceaccount
service_account_file: "{{ gcp_credentials_file }}"
state: present
shielded_instance_config:
enable_integrity_monitoring: no
enable_secure_boot: yes
enable_vtpm: yes
변경 후
yaml
- name: create a instance
google.cloud.gcp_compute_instance:
name: test-object
machine_type: n1-standard-1
zone: us-central1-a
project: "{{ gcp_project_id }}"
auth_kind: serviceaccount
service_account_file: "{{ gcp_credentials_file }}"
state: present
shielded_instance_config:
enable_integrity_monitoring: yes
enable_secure_boot: yes
enable_vtpm: yes