fix(bqjdbc): support Service Account Impersonation in ADC#12967
fix(bqjdbc): support Service Account Impersonation in ADC#12967
Conversation
There was a problem hiding this comment.
Code Review
This pull request enables service account impersonation for Application Default Credentials (ADC) in the BigQuery JDBC driver. The changes update the property parsing logic to include ADC in impersonation checks and add unit and integration tests to validate the implementation. I have no feedback to provide.
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request enables service account impersonation for Application Default Credentials (ADC) by updating the property parsing logic and removing previous restrictions. While the core changes are functional, the accompanying tests introduce several issues. Specifically, the environment variable manipulation is non-deterministic and lacks proper restoration of existing values. Furthermore, the use of reflection to modify system environment variables is fragile and will fail on Java 17+ due to JDK encapsulation, suggesting a need for a more robust testing approach such as dependency injection for credentials.
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request enables service account impersonation when using Application Default Credentials (ADC) in the BigQuery JDBC driver. Key changes include updating the OAuth utility to parse impersonation properties for ADC, removing obsolete code comments, and adding comprehensive unit and integration tests. The review feedback suggests extending this impersonation support to external account authentication for better consistency and improving test assertions to verify that the generated impersonated credentials correctly wrap the source credentials.
b/506258278