Skip to content

fix(bqjdbc): support Service Account Impersonation in ADC#12967

Merged
Neenu1995 merged 7 commits intomainfrom
ns/sai-for-adc
May 1, 2026
Merged

fix(bqjdbc): support Service Account Impersonation in ADC#12967
Neenu1995 merged 7 commits intomainfrom
ns/sai-for-adc

Conversation

@Neenu1995
Copy link
Copy Markdown
Contributor

@Neenu1995 Neenu1995 commented Apr 30, 2026

b/506258278

@Neenu1995 Neenu1995 requested review from a team as code owners April 30, 2026 13:56
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

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.

@Neenu1995
Copy link
Copy Markdown
Contributor Author

/gemini review

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

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.

@Neenu1995
Copy link
Copy Markdown
Contributor Author

/gemini review

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

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.

@Neenu1995 Neenu1995 enabled auto-merge (squash) May 1, 2026 13:50
@Neenu1995 Neenu1995 merged commit 8ce183c into main May 1, 2026
129 of 131 checks passed
@Neenu1995 Neenu1995 deleted the ns/sai-for-adc branch May 1, 2026 14:09
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.

2 participants