[googleapis_auth] Support impersonated_service_account in ADC#721
[googleapis_auth] Support impersonated_service_account in ADC#721
Conversation
Summary of ChangesHello @kevmoo, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly enhances the Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Changelog
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
PR HealthBreaking changes ✔️
This check can be disabled by tagging the PR with Unused Dependencies ✔️
For details on how to fix these, see dependency_validator. This check can be disabled by tagging the PR with Changelog Entry ✔️
Changes to files need to be accounted for in their respective changelogs. This check can be disabled by tagging the PR with License Headers ✔️
All source files should start with a license header. This check can be disabled by tagging the PR with API leaks ✔️The following packages contain symbols visible in the public API, but not exported by the library. Export these symbols or remove them from your publicly visible API.
This check can be disabled by tagging the PR with |
There was a problem hiding this comment.
Code Review
This pull request adds support for impersonated_service_account in Application Default Credentials (ADC) and propagates quota_project_id for service account credentials. The changes include refactoring to handle different credential types, updating various clients and functions to support quota_project and baseClient parameters, and adding corresponding tests. The code changes are well-structured and include appropriate tests. My review includes one suggestion to improve security by using a more specific OAuth scope.
|
Question, with these changes does the clientViaApplicationDefaultCredentials always act as one or the other? one or the other meaning source service account and target service account, if yes then that might not be the intended use of ImpersonatedAuthClient. At least what I understand is, you should be able to create two different clients one clientViaApplicationDefaultCredentials and the other clientViaServiceAccountImpersonation and use both but now |
|
After a bunch of cleanup, all this does is wire through ADC on top of https://github.com/google/googleapis.dart/pull/711/changes Are you saying the ADC should NOT always use the impersonation route if that's the credentials that are discovered? |
…actor _FlowClient Features: - Add support for `impersonated_service_account` type in Application Default Credentials (ADC). - Propagate `quota_project_id` for Service Account credentials in ADC. - Add `ImpersonatedAuthClient` and `clientViaServiceAccountImpersonation` which accept an optional baseClient. Tests: - Add `adc_impersonation_test.dart` to verify full impersonation flow.
0ebe0d4 to
cdf5229
Compare
Features:
impersonated_service_accounttype in Application Default Credentials (ADC).Tests:
adc_impersonation_test.dartto verify full impersonation flow.