The password had been stolen before anyone noticed. This time, it wasn’t a human account—it was a service account with full access to the production database.
GCP database access security is only as strong as the controls you put in place on day one. That’s why the fastest way to ship a secure proof of concept, pilot, or internal project is a well-designed Minimum Viable Product (MVP) for database access security. Done right, it protects Cloud SQL, Firestore, Spanner, or any other GCP data store without slowing down engineers.
Start with identity. Use IAM roles that follow the principle of least privilege. Never grant roles/cloudsql.admin or equivalent to application service accounts unless absolutely required. Bind access to human and service identities using IAM Conditions that limit by time, IP range, or request attributes.
Next, lock down connectivity. For Cloud SQL, enforce private IP connections and disable public IP unless there’s no alternative. For Sensitive Data, enable SSL/TLS for all connections. Combine this with VPC Service Controls to reduce the blast radius from compromised credentials.