Authentication error via IAM Authentication with GCP Cloud SQL

94 Views Asked by At

I am trying to authenticate my IAM user with my GCP Cloud SQL instance via ./cloud-sql-proxy. After the ./cloud-sql-proxy is ran and awaiting connections, I used VSC's SQLTools extension by Matheus Teixeira to add a connection to my DB instance.

While I have no issues with in-buit users that I have created on my Cloud SQL instance, I seem to be running to a connection error like this below for my IAM user:

CloudSQL Instance's IAM access denied for user <IAM USER>: Error Message : IAM Connections using insecure transport are prohibited. Please use secure transport.

This is the code I'm using to start my ./cloud-sql-proxy as found here:

./cloud-sql-proxy --auto-iam-authn <INSTANCE NAME>

It will then output the following:

2023/08/01 11:51:30 Authorizing with Application Default Credentials
2023/08/01 11:51:31 [INSTANCE ID] Listening on 127.0.0.1:3306
2023/08/01 11:51:31 The proxy has started successfully and is ready for new connections!

Any help is much appreciated.

0

There are 0 best solutions below