A system administrator needs permissions to fully manage Cloud SQL database instances and view Pub/Sub topics within a single Google Cloud project. Following Google Cloud security best practices for least privilege without using primitive roles, which TWO predefined IAM roles should be assigned to the administrator?
- Cloud SQL Admin (roles/cloudsql.admin)Answer
- Pub/Sub Viewer (roles/pubsub.viewer)Answer
- CEditor (roles/editor)
- DPub/Sub Admin (roles/pubsub.admin)
Answer
The correct predefined roles are Cloud SQL Admin (roles/cloudsql.admin) to manage Cloud SQL instances and Pub/Sub Viewer (roles/pubsub.viewer) to view Pub/Sub topics.
Cloud SQL Admin allows full management of Cloud SQL instances, while Pub/Sub Viewer allows viewing Pub/Sub topics and subscriptions without granting modification rights. Together, these predefined roles fulfill the requirements under the principle of least privilege.
Step-by-Step Solution
Key Concept
Applying the principle of least privilege using predefined IAM roles instead of primitive or overly permissive roles.