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 support for service account access_token #165

Merged
merged 3 commits into from
Oct 5, 2021
Merged

add support for service account access_token #165

merged 3 commits into from
Oct 5, 2021

Conversation

megan07
Copy link
Contributor

@megan07 megan07 commented Oct 4, 2021

Fixes #127

Not sure what all I can do in infra.tf to prepare for this. I created a new service account with what I'm guessing is all the permissions it needs? But I think I'll need to set up DWD for it to work properly, so the tests may fail at first until I do that.

Thanks to @gabor-farkas for all the help with this!!

@megan07 megan07 requested a review from appilon October 4, 2021 21:01
@megan07 megan07 merged commit 78b9144 into main Oct 5, 2021
@megan07 megan07 deleted the megan_127 branch October 5, 2021 14:19
creds := googleoauth.Credentials{
TokenSource: oauth2.StaticTokenSource(token),
}
diags = c.SetupClient(ctx, &creds)
Copy link
Contributor

Choose a reason for hiding this comment

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

Hi, sorry for adding this late, but isn't a return statement missing here? This way, if there are no impersonated user specified, it will fall back to ADC at line 109, so the access token will be ignored finally.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh good catch! I forgot I had that else down there. Thanks! I'll fix that!

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.

Support for Service Account Access Tokens
3 participants