A digital streaming platform organizes its Google Cloud environment into environment-specific folders. A team of software engineers needs permission to manage Compute Engine instances and attach existing managed service accounts to those instances across all projects under the `Engineering-Staging` folder. The security team requires that engineers must not be granted permissions to modify service account credentials, create new service accounts, or grant IAM permissions to other users. Which IAM role assignment strategy complies with the principle of least privilege while minimizing operational administrative overhead?
- Grant roles/compute.instanceAdmin.v1 and roles/iam.serviceAccountUser to the engineering group on the Engineering-Staging folder.Answer
- BGrant roles/editor to the engineering group on the Engineering-Staging folder.
- CGrant roles/compute.instanceAdmin.v1 and roles/iam.serviceAccountAdmin to the engineering group on the Engineering-Staging folder.
- DGrant roles/owner to the engineering group individually on each project contained within the Engineering-Staging folder.
Answer
Grant roles/compute.instanceAdmin.v1 and roles/iam.serviceAccountUser to the engineering group on the Engineering-Staging folder.
Binding `roles/compute.instanceAdmin.v1` and `roles/iam.serviceAccountUser` to a Google Group at the folder level allows the group to manage virtual machines and attach existing service accounts across all current and future projects in that folder, adhering to least privilege and reducing management complexity.
Step-by-Step Solution
Key Concept
Resource Hierarchy IAM Inheritance and Service Account User Scoping