Upgrading from 1.14 to 1.16 causes authError, Message: Invalid Credentials
Recently I upgraded cloud-sql-proxy to 1.16 and spent most of my day figuring out what portion of my configuration i had screwed up. Rolling back to 1.14 resolves the problem... Here is what is shown in the logs:
E 2019-12-30T19:01:10.104576468Z Reason: authError, Message: Invalid Credentials
E 2019-12-30T19:01:10.104570780Z More details:
E 2019-12-30T19:01:10.104557726Z googleapi: Error 401: Request had invalid authentication credentials. Expected OAuth 2 access token, login cookie or other valid authentication credential. See https://developers.google.com/identity/sign-in/web/devconsole-project.
E 2019-12-30T19:01:10.104518343Z 2019/12/30 19:01:10 errors parsing config:
Perhaps there's some config parsing change introduced? This issue appears similar to #301
Marking this bug as closed - while there has been some good discussion, but I think most of it is tangential to the original issue (which I think has been resolved)
We have been getting this error lately in our case we are using a service account key for authentication and the issue happens randomly. In our case we are using the proxy on a Golang API so we are not relying on the proxy as a sidecar container and instead we are directly using the proxy Go package to communicate with CloudSQL.
github.com/GoogleCloudPlatform/cloudsql-proxy/proxy/dialers/mysql
2020/06/12 20:18:50 failed to refresh the ephemeral certificate for [INSTANCE]
before expiring: googleapi: Error 401: Request had invalid authentication credentials. Expected OAuth 2 access token, login cookie or other valid authentication credential.
See https://developers.google.com/identity/sign-in/web/devconsole-project.
More details:
Reason: authError, Message: Invalid Credentials
Hi @alejandro-delgado-garcia - please open a new issue as this is a different issue that just happens to be throwing the same error.
@kurtisvg 1.16 also breaks essential workflows of using gcloud auth login to have credentials to use the proxy locally.
@lozandier I don't think the v1.15 docker image even has gcloud installed, so I'm not really sure what you mean by "essential workflow". Regardless, it also sounds like a different issue than this one, so I'd suggest opening a new issue with more information on what you would like supported since this one is closed.
I got same error .
so, the recomend solution for production situations is adding --skip_failed_instance_config ?
even thought, there is no --skip_failed_instance_config on the GCP document.
I got same error . so, the recomend solution for production situations is adding
--skip_failed_instance_config? even thought, there is no--skip_failed_instance_configon the GCP document.
solved. It's my bad. I did not set serviceAccount on deployment yaml.
just needed setting KSA ( I'm using 1.17, not 1.16 )
spec:
serviceAccountName: <YOUR-KSA-NAME>