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

Add workaround for golang.org/x/oauth2/google panic #15861

Closed
wants to merge 3 commits into from

Conversation

espadolini
Copy link
Contributor

@espadolini espadolini commented Aug 26, 2022

Because of golang/oauth2#583, it's possible to get a panic when trying to use a Google JSON credential file, if it requires user interaction but the appropriate callback is not specified (see #15608).

This PR adds a callback that always returns an error, in that case.

Copy link
Contributor

@greedy52 greedy52 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible to add a test case for this?

@espadolini
Copy link
Contributor Author

espadolini commented Aug 29, 2022

It might be possible to change the way we parse credentials to properly error out if the credential file is not of service_account type (which is the only one that's intended to be supported anyway, as other credential types don't do impersonation as we expect them to). Holding off on merging this until I figure out if that's ok to do, as that would essentially negate the need for this while also improving the admin user experience.

@espadolini
Copy link
Contributor Author

Closing in favor of #16003

@espadolini espadolini closed this Aug 31, 2022
@espadolini espadolini deleted the espadolini/oauth2-panic-fix branch August 31, 2022 14:29
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.

3 participants