Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to connect to cloudSQL instance using IAM Authentication #1

Open
fredsco opened this issue Feb 25, 2024 · 1 comment
Open

Unable to connect to cloudSQL instance using IAM Authentication #1

fredsco opened this issue Feb 25, 2024 · 1 comment

Comments

@fredsco
Copy link

fredsco commented Feb 25, 2024

I am unable to connect to my cloudSQL instance using IAM Authentication. Using the db password works fine. The error I am receiving:

ERROR: Error opening connection SASL: SCRAM-SERVER-FIRST-MESSAGE: client password must be a string

Application Default Credentials is configured.

@chokoswitch
Copy link
Contributor

chokoswitch commented Feb 26, 2024

Hi @fredsco - would you be able to share a possibly redacted version of the JSON representation of your config to confirm it? The one I have that uses IAM authentication successfully looks like this

"sqltools.connections": [
			{
				"previewLimit": 50,
				"driver": "CloudSQL-PostgreSQL",
				"name": "mydb",
				"group": "dev",
				"instanceConnectionName": "myproject-dev:us-central1:mydb",
				"database": "mydb",
				"username": "administrator@myproject-dev.iam",
				"impersonatedServiceAccount": "administrator@myproject-dev.iam.gserviceaccount.com",
				"iamAuthentication": true
			}
		],

Note that if your JSON looks different from that, there could be a UI bug in the editor that allows an incorrect config so would be good to confirm it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants