A cloud engineer needs to configure a Google Compute Engine VM instance to securely access objects in a Cloud Storage bucket following Google Cloud security best practices and least-privilege principles. Arrange the procedural steps in the correct sequential order from first to last.
- 1Create a custom user-managed service account in the GCP project using the gcloud command line tool.
- 2Grant the Storage Object Viewer role (roles/storage.objectViewer) to the newly created service account specifically on the target Cloud Storage bucket.
- 3Provision the Compute Engine VM instance and specify the custom service account as its identity, overriding the default Compute Engine service account.
- 4Execute the application on the VM instance using Google Application Default Credentials (ADC) without generating or storing long-lived service account key files.
Cevap
The correct sequence begins with creating the custom user-managed service account, followed by granting the specific storage IAM role to that service account, attaching the custom service account identity to the Compute Engine VM, and finally running the workload utilizing Application Default Credentials (ADC).
The correct operational order follows standard GCP security lifecycle practices: first, define the custom service account identity; second, delegate minimal resource-level IAM roles to that identity; third, attach the identity to the Compute Engine VM; and fourth, run the application using non-static Application Default Credentials (ADC) fetched from the metadata server.
Adım Adım Çözüm
Anahtar Kavram
Service Account Creation, Least Privilege Role Binding, and Compute Engine Attachment via Application Default Credentials
Tahmini Süre:2m 0s