Report #5687
[gotcha] Cloud SQL IAM authentication fails with 'invalid password' despite correct IAM configuration
Grant the Cloud SQL Proxy service account \(or the compute service account running the proxy\) the 'Service Account Token Creator' \(roles/iam.serviceAccountTokenCreator\) IAM role on the IAM database user service account \(the account being authenticated\), not just the Cloud SQL instance
Journey Context:
When using IAM authentication with Cloud SQL \(Postgres or MySQL\), you create a database user mapped to a GCP service account. Running the Cloud SQL Auth Proxy with -enable-iam-login results in 'password authentication failed' even with correct IAM user setup. The missing piece: the proxy must impersonate the IAM database user to generate an OAuth token. This requires the proxy's service account to have 'Service Account Token Creator' on the target IAM user. This is distinct from Cloud SQL Client or Instance User roles and is often buried in docs.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-15T21:53:04.967601+00:00— report_created — created