-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
GH-38576: [Java] Change JDBC driver to optionally preserve cookies and auth tokens when getting streams #38580
Conversation
539e622
to
1b143a1
Compare
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.
LGTM! I like that the default will be to maintain previous behavior :)
credentialOptions.add( | ||
ClientAuthenticationUtils.getAuthenticate( | ||
client, username, password, authFactory, options.toArray(new CallOption[0]))); | ||
if (username != null && token == null) { |
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.
Should this also use isUsingUserPasswordAuth
?
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.
That's correct. Thanks!
c23d4be
to
a6b041a
Compare
…ies and auth tokens when getting streams - Change the JDBC driver to add new properties "retainCookies" and "retainAuth" - These properties allow internally spawned connections for getting streams to use the cookies and bearer tokens from the original connection. - Add tests for validating defaults from ArrowFlightSqlClient.Builder
a6b041a
to
528b39c
Compare
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.
Thanks!
After merging your PR, Conbench analyzed the 5 benchmarking runs that have been run so far on merge-commit fafd48c. There were no benchmark performance regressions. 🎉 The full Conbench report has more details. It also includes information about 2 possible false positives for unstable benchmarks that are known to sometimes produce them. |
…ies and auth tokens when getting streams (apache#38580) ### Rationale for this change This change restores the original behavior of transmitting existing cookies and auth tokens when getting separate streams returned by getFlightInfo after adding support for multiple endpoints. These properties are now optional though. ### What changes are included in this PR? - Change the JDBC driver to add new properties "retainCookies" and "retainAuth" - These properties allow internally spawned connections for getting streams to use the cookies and bearer tokens from the original connection. - Add tests for validating defaults from ArrowFlightSqlClient.Builder ### Are these changes tested? Unit tests have been added. ### Are there any user-facing changes? Yes. There are now properties and they are documented. * Closes: apache#38576 Authored-by: James Duong <james.duong@improving.com> Signed-off-by: David Li <li.davidm96@gmail.com>
…ies and auth tokens when getting streams (apache#38580) ### Rationale for this change This change restores the original behavior of transmitting existing cookies and auth tokens when getting separate streams returned by getFlightInfo after adding support for multiple endpoints. These properties are now optional though. ### What changes are included in this PR? - Change the JDBC driver to add new properties "retainCookies" and "retainAuth" - These properties allow internally spawned connections for getting streams to use the cookies and bearer tokens from the original connection. - Add tests for validating defaults from ArrowFlightSqlClient.Builder ### Are these changes tested? Unit tests have been added. ### Are there any user-facing changes? Yes. There are now properties and they are documented. * Closes: apache#38576 Authored-by: James Duong <james.duong@improving.com> Signed-off-by: David Li <li.davidm96@gmail.com>
…ies and auth tokens when getting streams (apache#38580) ### Rationale for this change This change restores the original behavior of transmitting existing cookies and auth tokens when getting separate streams returned by getFlightInfo after adding support for multiple endpoints. These properties are now optional though. ### What changes are included in this PR? - Change the JDBC driver to add new properties "retainCookies" and "retainAuth" - These properties allow internally spawned connections for getting streams to use the cookies and bearer tokens from the original connection. - Add tests for validating defaults from ArrowFlightSqlClient.Builder ### Are these changes tested? Unit tests have been added. ### Are there any user-facing changes? Yes. There are now properties and they are documented. * Closes: apache#38576 Authored-by: James Duong <james.duong@improving.com> Signed-off-by: David Li <li.davidm96@gmail.com>
Rationale for this change
This change restores the original behavior of transmitting existing cookies and auth tokens when getting separate
streams returned by getFlightInfo after adding support for multiple endpoints.
These properties are now optional though.
What changes are included in this PR?
Are these changes tested?
Unit tests have been added.
Are there any user-facing changes?
Yes. There are now properties and they are documented.