-
Notifications
You must be signed in to change notification settings - Fork 1.1k
fix(bqjdbc): add default OAuth client id/secret #12946
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -940,15 +940,19 @@ public void setDestinationDatasetExpirationTime(long destinationDatasetExpiratio | |||||||||||||
| } | ||||||||||||||
|
|
||||||||||||||
| public String getOAuthClientId() { | ||||||||||||||
| return oAuthClientId; | ||||||||||||||
| return oAuthClientId != null && !oAuthClientId.isEmpty() | ||||||||||||||
| ? oAuthClientId | ||||||||||||||
| : BigQueryJdbcUrlUtility.DEFAULT_OAUTH_CLIENT_ID; | ||||||||||||||
|
Comment on lines
+943
to
+945
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The getter returns a default OAuth client ID unconditionally when the field is null or empty. This can lead to authentication conflicts when using other authentication types (e.g., Service Account) that do not require a client ID. Consider applying this default only when the
Suggested change
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we not want to add |
||||||||||||||
| } | ||||||||||||||
|
|
||||||||||||||
| public void setOAuthClientId(String oAuthClientId) { | ||||||||||||||
| this.oAuthClientId = oAuthClientId; | ||||||||||||||
| } | ||||||||||||||
|
|
||||||||||||||
| public String getOAuthClientSecret() { | ||||||||||||||
| return oAuthClientSecret; | ||||||||||||||
| return oAuthClientSecret != null && !oAuthClientSecret.isEmpty() | ||||||||||||||
| ? oAuthClientSecret | ||||||||||||||
| : BigQueryJdbcUrlUtility.DEFAULT_OAUTH_CLIENT_SECRET; | ||||||||||||||
|
Comment on lines
+953
to
+955
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Similar to
Suggested change
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same question here |
||||||||||||||
| } | ||||||||||||||
|
|
||||||||||||||
| public void setOAuthClientSecret(String oAuthClientSecret) { | ||||||||||||||
|
|
||||||||||||||
Uh oh!
There was an error while loading. Please reload this page.