sqlalchemy_dremio icon indicating copy to clipboard operation
sqlalchemy_dremio copied to clipboard

sqlalchemy_dremio arrow flight ssl certificates

Open jsanko9 opened this issue 3 years ago • 2 comments

I'm having same issue as #22 , since drivers are not available (I have been told they are "legacy"), I'm trying to do the same with new driver and Dremio 22.0.3

However I am still getting connection issues, which (I think) are caused self signed certificate. Unfortunately the only message I'm getting is this:

File "/home/superset/.local/lib/python3.8/site-packages/sqlalchemy_dremio/db.py", line 20, in connect return Connection(c) File "/home/superset/.local/lib/python3.8/site-packages/sqlalchemy_dremio/db.py", line 53, in __init__ client.authenticate(HttpDremioClientAuthHandler(splits[0].split("=")[1], splits[1].split("=")[1])) File "pyarrow/_flight.pyx", line 1177, in pyarrow._flight.FlightClient.authenticate File "pyarrow/_flight.pyx", line 69, in pyarrow._flight.check_flight_status pyarrow._flight.FlightUnavailableError: gRPC returned unavailable error, with message: failed to connect to all addresses

I would like to confirm this, but before that, could you advise me with: 1 - Whether sqlalchemy_dremio supports Apache Arrow Flight SQL Driver ? 2 - How to disable cert verification in Superset or specify crt/pem file ?

Since I'm trying to run this on Debian, I'm afraid I can't use default store until its supported there.

I tried with your test: DREMIO_CONNECTION_URL="dremio+flight://user:pass@server:32010/dremio;DisableCertificateVerification=0&DisableCertificateValidation=0"

jsanko9 avatar Jul 26 '22 14:07 jsanko9

Please add the following property to dremio.conf, restart the server and try again:

services.flight.auth.mode: "legacy.arrow.flight.auth"

narendrans avatar Aug 07 '22 13:08 narendrans

Not sure this helps, but I also had problems connection Superset to Dremio using Flight, and after some fiddling around this worked for me. Using legacy auth actually broke it (again) for me, so I commented it out.

  1. Change dremio.conf and enable SSL:
services: {
  # ...
  flight.use_session_service: true
  # flight.auth.mode: "legacy.arrow.flight.auth"
  flight.ssl.enabled: true
  flight.ssl.auto-certificate.enabled: true
}
  1. Use this kind of connection string: dremio+flight://superset:XXXXXX@dremio:32010/dremio?UseEncryption=true&disableCertificateVerification=true

mcdeck avatar Jan 03 '23 14:01 mcdeck