-
Notifications
You must be signed in to change notification settings - Fork 95
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
feat(java/driver/flight-sql): add basic auth #1487
Conversation
Looking to extend this PR to add token authentication, cookie middleware, and TLS. This would bring the driver close to the Flight JDBC Driver in terms of connectivity functionality. |
Tests to be added. |
0e146eb
to
8959431
Compare
I've been working on the tests for this. I'm planning to make some changes to the infrastructure:
|
c840157
to
c6a3b79
Compare
- Propagate bearer tokens to spawned connections. - Allow for cookies and propagate to spawned connections. - Implement support for user-specified headers. - Implement TLS options.
- Use FlightServerTestRule to build end-to-end tests for TLS and MTLS. - Add conversion of FlightRunTimeExceptions to AdbcExceptions
Fix POMs Correct use of submodules recursive in errorprone job
Add tests for arbitrary headers, cookies, auth. Fix bugs retaining the bearer token.
33b54df
to
676be98
Compare
import org.apache.arrow.flight.sql.util.TableRef; | ||
import org.apache.arrow.util.AutoCloseables; | ||
|
||
/** A wrapper around FlightSqlClient which automatically adds CallOptions to each RPC call. */ |
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.
~nit: would it make more sense to wrap the FlightClient and give that to the FlightSqlClient? Ah, I guess we can't subclass...
|
||
/** Defines connection options that are used by the FlightSql driver. */ | ||
public interface FlightSqlConnectionProperties { | ||
// |
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.
nit: did you mean to leave this?
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!
@jduo I also planned on adding Dremio test suite following this one, the work is here main...tokoko:arrow-adbc:java-flight-sql-dremio. I'll try to rebase it when i find some time and see if it's still worth merging. |
FlightSqlDatabase
FlightSqlDatabase
toFlightSqlConnection
.