A security administrator needs to grant a development team the ability to deploy Cloud Run services that execute under an existing user-managed service account named [email protected]. Security policy strictly requires enforcing the principle of least privilege and forbids developers from creating service account keys or modifying IAM policies on the service account. Which IAM configuration fulfills these requirements?
- AGrant the developers the Service Account Key Admin role (roles/iam.serviceAccountKeyAdmin) on the specific service account resource.
- BGrant the developers the Editor primitive role (roles/editor) at the project level.
- Grant the developers the Service Account User role (roles/iam.serviceAccountUser) on the specific service account resource.Cevap
- DGrant the developers the Service Account Admin role (roles/iam.serviceAccountAdmin) at the project level.
Cevap
Granting the Service Account User role (roles/iam.serviceAccountUser) resource-level access on the specific service account gives developers the exact permission required to bind the service account to compute resources like Cloud Run, while withholding service account management and key creation rights.
To allow a identity to attach a service account to a compute service (such as Cloud Run or Compute Engine), the identity requires the Service Account User role (roles/iam.serviceAccountUser). Binding this role directly on the specific service account resource restricts authorization to that single identity, satisfying the principle of least privilege without providing key generation or IAM administrative permissions.
Adım Adım Çözüm
Anahtar Kavram
Delegating Service Account Usage with Least Privilege