-
Notifications
You must be signed in to change notification settings - Fork 15
fix: issue 117 ssl config #121
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
Conversation
Tested this by hand against Honza's clustered deployment. I get expected results, including failures with a bad .pem file. Further tests to be tried tomorrow. def test_all():
print("\ninfluxdb3 version: " + VERSION)
client = InfluxDBClient3(host=host,
database=database,
org=org,
token=token,
auth_scheme="Bearer",
debug=True,
verify_ssl=True,
#flight_client_options={'cert_chain':'/home/karl/bonitoo/qa/temp/influxdb3-python-issue117/foo.pem'},
#flight_client_options={'cert_chain':'/home/karl/.local/lib/python3.12/site-packages/certifi/cacert.pem'},
#ssl_ca_cert="/home/karl/bonitoo/qa/temp/influxdb3-python-issue117/cert.pem")
ssl_ca_cert="/etc/ssl/certs/ca-certificates.crt")
now = int(round(time.time()))
# result = client.write("scooter,location=folimanka speed=31 %s" % now,
# write_precision=WritePrecision.S)
# print(f"DEBUG result {result}\n")
query = "SELECT * FROM scooter"
table = client.query(query)
print(f"DEBUG qresult\n {table.to_pandas()}") |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #121 +/- ##
==========================================
+ Coverage 60.45% 61.63% +1.17%
==========================================
Files 33 33
Lines 2051 2101 +50
==========================================
+ Hits 1240 1295 +55
+ Misses 811 806 -5 ☔ View full report in Codecov by Sentry. |
0990e0a
to
f59cfb9
Compare
…ns.tls_verify to None
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, thanks 👍
Closes #117
Proposed Changes
QueryApiOptions
andQueryApiOptionsBuilder
tls_root_certs
andtls_verify
which map to Arrow FlightClientOptionstls_root_certs
anddisable_server_verification
respectively. N.B. logic ofdisable_server_verification
is the opposite oftls_verify
QueryApi
_query_api
in theInfluxDBClient3
constructor.see also (https://arrow.apache.org/docs/cpp/api/flight.html#_CPPv4N5arrow6flight19FlightClientOptionsE)
Checklist