You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "backkem (via GitHub)" <gi...@apache.org> on 2023/12/19 17:17:13 UTC
[I] go/adbc/driver/flightsql: Handshake for bearer tokens [arrow-adbc]
backkem opened a new issue, #1380:
URL: https://github.com/apache/arrow-adbc/issues/1380
When a basic (username + password) authentication strategy is used, an explicit Handshake is currently performed:
https://github.com/apache/arrow-adbc/blob/c8ec427db7d3ee9435f3407aaab339b65ce0ecbd/go/adbc/driver/flightsql/flightsql_database.go#L377-L382
As part of this handshake the initial username/password is exchange for a new session-bound authorization header which is replayed by the client in follow-up requests.
In my case, I'd like to accomplish the same but using a bearer token (E.g.: API key) during the initial authorization. I see one can already pass an authorization header (#387) and it is already replayed by the client (#594). However, no handshake is performed in this scenario.
I see there is a test case that handles the authorization header using a middleware pattern:
https://github.com/apache/arrow-adbc/blob/d82ff04a39d588c1410fe00ae667bc1657c15ce9/go/adbc/driver/flightsql/flightsql_adbc_server_test.go#L206-L212
However, while it is easy to distinguish between a mock `Bearer initial` and `Bearer final`, a real scenario would require some heuristic to distinguish between the initial and session header. Doing an explicit handshake, similar to the basic auth scenario, would seem preferential.
I'd like to know if it would be sensible to add support for this scenario or if there is (already) a better way to configure this.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@arrow.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] go/adbc/driver/flightsql: Handshake for bearer tokens [arrow-adbc]
Posted by "backkem (via GitHub)" <gi...@apache.org>.
backkem commented on issue #1380:
URL: https://github.com/apache/arrow-adbc/issues/1380#issuecomment-1864413341
After some digging I found the argumentation in apache/arrow#23836 against the handshake. I'll move the auth to a middleware and session state to the ticket as [influxdb](https://github.com/influxdata/influxdb/blob/bb6a5c0bf6968117251617cda99cb39a5274b6dd/service_grpc_flight/src/lib.rs#L403) does.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] go/adbc/driver/flightsql: Handshake for bearer tokens [arrow-adbc]
Posted by "backkem (via GitHub)" <gi...@apache.org>.
backkem closed issue #1380: go/adbc/driver/flightsql: Handshake for bearer tokens
URL: https://github.com/apache/arrow-adbc/issues/1380
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] go/adbc/driver/flightsql: Handshake for bearer tokens [arrow-adbc]
Posted by "lidavidm (via GitHub)" <gi...@apache.org>.
lidavidm commented on issue #1380:
URL: https://github.com/apache/arrow-adbc/issues/1380#issuecomment-1864503239
Thanks for digging that up, I was trying to remember where all this was.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] go/adbc/driver/flightsql: Handshake for bearer tokens [arrow-adbc]
Posted by "lidavidm (via GitHub)" <gi...@apache.org>.
lidavidm commented on issue #1380:
URL: https://github.com/apache/arrow-adbc/issues/1380#issuecomment-1863211424
Wouldn't your middleware be able to parse the header and determine the type/whether to send a new header back?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] go/adbc/driver/flightsql: Handshake for bearer tokens [arrow-adbc]
Posted by "backkem (via GitHub)" <gi...@apache.org>.
backkem commented on issue #1380:
URL: https://github.com/apache/arrow-adbc/issues/1380#issuecomment-1863237888
It is feasible. However, it would be distinguishing between `Bearer xxx` for initial auth and `Bearer 123` for the session-bound auth. While feasible, it would seem less error prone to make the difference explicit by handling the initial auth in the handshake call.
Technically the same is true for Basic auth. You could use a middleware to detect the basic auth token and handle it accordingly. I think it makes sense to handle that explicitly, so why not use the handshake or all 'initial authentication' needs.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org