An organization is setting up continuous deployment pipelines for a containerized application that interacts with a Cloud Spanner database in a single target project named `prod-app-services`. The automated service account used by the deployment pipeline needs permission to deploy updated Cloud Run services and execute database schema modifications in Cloud Spanner. The security architecture policy strictly mandates applying the Principle of Least Privilege and restricting role scope to only the necessary project. Which TWO IAM role bindings should be granted to the service account? (Select TWO.)
- Cloud Run Developer (roles/run.developer) on the `prod-app-services` projectAnswer
- BEditor (roles/editor) on the `prod-app-services` project
- Cloud Spanner Database Admin (roles/spanner.databaseAdmin) on the `prod-app-services` projectAnswer
- DCloud Run Admin (roles/run.admin) bound at the Organization root level
Answer
Granting Cloud Run Developer and Cloud Spanner Database Admin roles on the specific target project fulfills all operational needs while adhering to least privilege.
To satisfy least privilege for a pipeline managing Cloud Run deployments and Cloud Spanner schemas, specific predefined roles targeting those exact services must be chosen. The Cloud Run Developer role allows deploying and updating Cloud Run services without full administrative control over unrelated compute infrastructure. The Cloud Spanner Database Admin role allows creating, editing, and applying DDL schema updates to databases. Both bindings must be restricted to the specific target project.
Step-by-Step Solution
Key Concept
Principle of Least Privilege and Resource Hierarchy Scope in GCP IAM
Estimated Time:2m 0s