-
Notifications
You must be signed in to change notification settings - Fork 380
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
feat(rest): support impersonated ADC #14815
feat(rest): support impersonated ADC #14815
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #14815 +/- ##
=======================================
Coverage 93.27% 93.27%
=======================================
Files 2319 2319
Lines 208410 208481 +71
=======================================
+ Hits 194390 194459 +69
- Misses 14020 14022 +2 ☔ View full report in Codecov by Sentry. |
If the iamcredentials url created in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 0 of 2 files reviewed, 1 unresolved discussion (waiting on @dbolduc)
google/cloud/internal/oauth2_google_credentials.cc
line 71 at r1 (raw file):
} if (cred_type == "impersonated_service_account") { auto info = ParseImpersonatedServiceAccountCredentials(contents, path);
I would have thought that info
would contain the service_account_impersonation_url
and that it would be used as part of the request.
Ultimately, we want to use What we have will create the
I parsed out the service account, because that is what we (currently) feed into the thing that makes the base credentials. I looked into plumbing the full url but it got annoying quickly. As discussed in the team meeting, I think we should go ahead with this PR (adding functionality) then look into revising the plumbing as part of the ID Token flow work. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 2 of 2 files at r1, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @dbolduc)
Part of the work for #12497
Support ADC impersonation over REST.
We need to feed the
source_credentials
back into the thing that parses the ADC json, then fit that into our existing impersonation code.Testing
I am not sure how to turn this into an integration test. If I figure it out, I will add one in a future PR.
To test locally I...
roles/ServiceAccountTokenCreator
on (1)source_credentials
are (2)service_account_impersonation_url
points to (1)This change is