An organization is configuring access for an automated CI/CD service account that must deploy workloads to Google Kubernetes Engine (GKE) clusters and read database passwords stored in Secret Manager within a single project named `prod-application`. In accordance with the principle of least privilege, which TWO IAM roles should be granted to the service account? (Select TWO.)
- Kubernetes Engine Developer (`roles/container.developer`) bound at the project levelAnswer
- BEditor (`roles/editor`) bound at the project level
- Secret Manager Secret Accessor (`roles/secretmanager.secretAccessor`) bound at the project levelAnswer
- DSecret Manager Admin (`roles/secretmanager.admin`) bound at the parent Folder level
Answer
To follow the principle of least privilege for deploying GKE workloads and accessing Secret Manager payloads within a specific project, grant the Kubernetes Engine Developer (`roles/container.developer`) role and the Secret Manager Secret Accessor (`roles/secretmanager.secretAccessor`) role at the project level.
Adhering to the principle of least privilege requires selecting targeted predefined roles scoped directly to the affected project. The Kubernetes Engine Developer role permits deploying container workloads without cluster admin capabilities, while the Secret Manager Secret Accessor role allows reading secret data without allowing secret administration.
Step-by-Step Solution
Key Concept
Applying Least Privilege with Predefined Roles and Resource Scope