Soru

Zorluk: OrtaProvisioning Compute Engine and Kubernetes Engine Clusters

An e-commerce organization is implementing an automated deployment pipeline to provision Compute Engine virtual machine instances for an order processing backend service. A dedicated custom service account was created to provide runtime permissions for the application on these instances. However, when the automated pipeline executes, instance creation fails with an IAM authorization error when trying to bind the custom service account to the virtual machines. Which configuration change should the cloud architect implement to resolve this provisioning error while adhering to the principle of least privilege?

  1. Grant the deployment pipeline service account the Service Account User role (roles/iam.serviceAccountUser) on the target custom service account.Cevap
  2. B
    Grant the deployment pipeline service account the Service Account Admin role (roles/iam.serviceAccountAdmin) on the project level.
  3. C
    Assign the primitive Editor role (roles/editor) to the custom service account attached to the Compute Engine instances.
  4. D
    Migrate the order processing service to a Google Kubernetes Engine (GKE) cluster in Autopilot mode to handle identity binding automatically.

Cevap

Grant the deployment pipeline service account the Service Account User role (roles/iam.serviceAccountUser) on the target custom service account.
When an automated pipeline provisions Compute Engine virtual machines configured to run under a custom service account, the entity issuing the creation command must have permission to use that service account. Granting the `roles/iam.serviceAccountUser` role on the target service account permits the deployment pipeline to attach it to the virtual machine instances while strictly maintaining least privilege constraints.

Adım Adım Çözüm

1
Identify the resource creation requirement
Creating Compute Engine instances attached to a custom service account requires the deployment identity to impersonate or pass that service account to the compute resource.
Google Cloud security controls require permission checks on both the compute provisioning API and the service account being attached.
2
Evaluate required IAM permissions against least privilege
The Service Account User role (roles/iam.serviceAccountUser) permits an identity to attach the service account to compute resources without granting full administrative privileges over IAM.
Granting roles/iam.serviceAccountUser restricted to the specific service account ensures minimal required access.

Anahtar Kavram

Compute Engine Service Account Attachment Permissions
Bu soruyu puanla