이 페이지는 아직 한국어로 제공되지 않습니다. 번역 작업 중입니다.
현재 번역 프로젝트에 대한 질문이나 피드백이 있으신 경우
언제든지 연락주시기 바랍니다.Id: 32ecd6eb-0711-421f-9627-1a28d9eff217
Cloud Provider: GCP
Platform: Terraform
Severity: Medium
Category: Access Control
Learn More
Description
This check verifies whether the enable-oslogin metadata key is set to true in Google Cloud project or instance metadata, as shown below:
resource "google_compute_project_metadata" "secure_example" {
metadata = {
enable-oslogin = true
}
}
If OS Login is not enabled, user and SSH key management is handled by instance-level metadata, which can lead to inconsistent access policies and increased risk of unauthorized access. Enabling OS Login centralizes and streamlines IAM-based SSH access, reducing the attack surface of compute resources.
Compliant Code Examples
resource "google_compute_project_metadata" "negative1" {
metadata = {
enable-oslogin = true
}
}
Non-Compliant Code Examples
resource "google_compute_project_metadata" "positive1" {
metadata = {
enable-oslogin = false
}
}
resource "google_compute_project_metadata" "positive2" {
metadata = {
foo = "bar"
}
}