A database administrator needs to create and configure Cloud SQL instances within a Google Cloud development project. The administrator must be able to perform all administrative tasks on Cloud SQL resources, but must not have permissions to manage other Google Cloud services or edit project IAM policies. Following Google's recommended security best practices of least privilege, which role should be granted to the administrator?
- Cloud SQL Admin (roles/cloudsql.admin)Answer
- BEditor (roles/editor)
- CCloud SQL Viewer (roles/cloudsql.viewer)
- DOwner (roles/owner) at the project level with an IAM deny policy applied to other services
Answer
Grant the Cloud SQL Admin (roles/cloudsql.admin) predefined role at the project level.
The Cloud SQL Admin (roles/cloudsql.admin) predefined role provides complete administrative access to Cloud SQL instances, databases, and backups without granting access to manage unrelated GCP services or project-level IAM bindings.
Step-by-Step Solution
Key Concept
Granting service-specific predefined roles rather than primitive roles to enforce the principle of least privilege.