0

I'm trying to access a cloud SQL db using passwordless auth through an IAM user, however, I keep getting FATAL: Cloud SQL IAM service account authentication failed for user. There is another Postgres DB instance that has the same config and auth is working without a problem but this one fails for some reason. Any idea why that is?

Steps I've taken to enable IAM auth:

  1. Turned the cloudsql.iam_authentication flag on on the instance
  2. Granted "Cloud SQL Instance User", and "Cloud SQL Client" roles to the service account (This is the same service account that's being used on the other instance where this issue is not present). This role allows users to authenticate into the cloudsql using their cloud identity.
  3. Added the service accounts to the instance under Console → SQL → Select Instance → Users → Add user account→ Cloud IAM → Enter email address → Add
  4. Granted database level privileges to the IAM user (The access privileges column in cloud shell matches the other instance's privileges)
  5. Checked table level privileges and they are also the same as on the other instance.
  6. Tried restarting the instance after privileges were granted

Is there anything I'm missing?

Might be an Auth Proxy config I'm missing?

The old instance is on PostgreSQL 13.10, this new one is on PostgreSQL 14.7, can this cause any problems?

Dzsonah
  • 125
  • 1
  • 11

0 Answers0