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

Proxy doesn't allow Auto IAM Authn with gcloud user credentials. #1754

Closed
enocom opened this issue Apr 18, 2023 · 0 comments · Fixed by #1762 or #1758
Closed

Proxy doesn't allow Auto IAM Authn with gcloud user credentials. #1754

enocom opened this issue Apr 18, 2023 · 0 comments · Fixed by #1762 or #1758
Assignees
Labels
priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@enocom
Copy link
Member

enocom commented Apr 18, 2023

Bug Description

./cloud-sql-proxy -i -g <INSTANCE_CONNECTION_NAME>

2023/04/18 13:30:29 Authorizing with gcloud user credentials
2023/04/18 13:30:30 The proxy has encountered a terminal error: unable to start: error initializing dialer: use WithIAMAuthNTokenSources instead of WithTokenSource be used when IAM AuthN is enabled

@enocom enocom added priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. labels Apr 18, 2023
enocom added a commit that referenced this issue Apr 20, 2023
This combination is insecure because it puts an OAuth2 token with
broader scoped access than necessary into the ephemeral certificate.

Because gcloud-auth is a legacy flag, it is generally discouraged. This
commit also adds a note to make that clear and provides a clear
alternative using Application Default Credentials.

Fixes #1754
enocom added a commit that referenced this issue Apr 20, 2023
This combination is insecure because it puts an OAuth2 token with
broader scoped access than necessary into the ephemeral certificate.

Because gcloud-auth is a legacy flag, it is generally discouraged. This
commit also adds a note to make that clear and provides a clear
alternative using Application Default Credentials.

Fixes #1754

Co-authored-by: Jack Wotherspoon <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
1 participant