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

fix: throw error when Auto IAM AuthN is unsupported #310

Merged
merged 8 commits into from
Oct 7, 2022
Merged

Conversation

enocom
Copy link
Member

@enocom enocom commented Sep 14, 2022

Fixes #283.

@enocom enocom requested a review from a team September 14, 2022 18:05
dialer.go Outdated Show resolved Hide resolved
dialer.go Outdated Show resolved Hide resolved
dialer.go Outdated Show resolved Hide resolved
dialer.go Outdated Show resolved Hide resolved
@kurtisvg kurtisvg changed the title fix: verify engine supports Auto IAM AuthN fix: throw error when Auto IAM AuthN is unsupported Sep 14, 2022
@enocom enocom requested a review from kurtisvg October 3, 2022 17:58
@enocom
Copy link
Member Author

enocom commented Oct 5, 2022

@jackwotherspoon Pointed out that a request to generate an ephemeral cert with an access token will return a 40x response for SQL server. So this check probably needs to move into the refresh logic.

dialer.go Outdated Show resolved Hide resolved
@enocom enocom requested a review from kurtisvg October 7, 2022 20:51
@enocom
Copy link
Member Author

enocom commented Oct 7, 2022

I moved the check right next to the metadata call and now we get a good error even if the ephemeral certificate call fails.

internal/cloudsql/refresh.go Outdated Show resolved Hide resolved
enocom and others added 2 commits October 7, 2022 16:13
Co-authored-by: Kurtis Van Gent <31518063+kurtisvg@users.noreply.github.com>
@enocom enocom merged commit 652e196 into main Oct 7, 2022
@enocom enocom deleted the iam-check branch October 7, 2022 22:22
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

Successfully merging this pull request may close these issues.

Connector should error on invalid Auto IAM AuthN invocations
2 participants