Repository navigation
Description
Context
The kernel supports two mutually-exclusive TLS backends selected by Cargo feature:
tls-native—reqwest/native-tls→ system OpenSSL. The default; used by direct-Rust consumers and the C-ABI/ODBC path on native x86_64/i686 Linux and macOS.tls-rustls—reqwest/rustls-tls(pure Rust + ring). Used by the napi and pyo3 bindings (to avoid an OpenSSL-symbol clash with the host Node/Python process), by Windows (to dodge SChannel/openssl-sys through MSVC), and by the ODBC Linux aarch64 cross-build (to avoid cross-building OpenSSL).
databricks-odbc#323 (fixed in #316) closed a behavioral gap between the two: tls-rustls now also enables reqwest/rustls-tls-native-roots, so rustls reads the OS system trust store (/etc/ssl/...) alongside Mozilla's webpki-roots, matching what OpenSSL does. That removes the arch-specific custom-CA divergence but leaves us maintaining two TLS stacks.
This issue tracks the evaluation of going rustls-by-default (or rustls-only), retiring tls-native from the kernel's own TLS.
Scope note: this is only the kernel's reqwest TLS dependency. It does not remove OpenSSL from the ODBC driver as a whole — the ODBC C++ side still links OpenSSL transitively via Arrow → thrift/libevent. The "one fewer C dependency" win is real for the kernel crate + its pyo3/napi bindings, but the ODBC
.sokeeps OpenSSL until Arrow's thrift transport is also migrated.
Pros of rustls-by-default
- Eliminates the per-arch divergence class (cert validation, OCSP, TLS 1.3 quirks). fix(cloudfetch): enforce end-to-end download deadline for chunks #323 existed because backends differ per platform; one backend → identical behavior everywhere.
- Drops the cross-OpenSSL burden. aarch64 and Windows already use rustls specifically to avoid OpenSSL; making it the default aligns the mainline with what the awkward platforms already do, and removes special-casing.
- Pure-Rust supply chain for the kernel + bindings: no
openssl-sysbuild-time C toolchain/headers, simpler static linking, and the napi/pyo3 path stops being "the exception." - Memory-safe TLS, actively maintained, modern defaults.
Cons / risks
- FIPS & the OpenSSL engine ecosystem. System OpenSSL gives customers FIPS-validated TLS modules, PKCS#11/HSM engines, and org-wide
openssl.cnf/ cipher policy "for free." rustls's FIPS story (aws-lc-rs) is a separate, heavier build and a distinct validation. For an enterprise driver this can be a real regression for some buyers. - Client-auth cert/key format & strictness differences. We already feature-gate
build_mtls_identitybecause native-tls wants(cert, key)PKCS#8 while rustls wants a concatenated PEM blob. rustls is also stricter about malformed certs/keys that OpenSSL tolerates — some enterprise PKI emits certs OpenSSL accepts and rustls rejects. (See the known pre-existing failure below.) - CVE patch-latency model shifts to us. System OpenSSL is patched by OS updates; statically-linked rustls/ring means a TLS CVE requires us to cut a release. Net security likely improves (memory safety), but the operational model changes.
- Parity revalidation. The mainline (x86_64) platform's TLS/mTLS/proxy/custom-CA behavior would need re-running against the reference driver, since drop-in parity is the whole point.
native-rootsstill needs care — it reads the OS store at client-build time (not live), and has its own "zero valid certs" failure mode.
Gating question (answer before any cutover)
Does any target customer require FIPS-validated TLS, or PKCS#11 / HSM-backed client authentication, through this driver?
- Yes → keep
tls-native/OpenSSL as at least an option (don't remove it). - No → a rustls-default move becomes very attractive; proceed with the plan below.
Suggested plan (if we proceed)
- Confirm the FIPS/PKCS#11 gating question with the field.
- Make rustls the default behind a release; keep
tls-nativeavailable as an opt-in feature for at least one release. - Full mTLS / proxy / custom-CA / self-signed conformance run vs. the reference driver on x86_64.
- Explicit FIPS decision: accept the gap, or wire aws-lc-rs.
- Document that the ODBC
.sostill carries OpenSSL via Arrow/thrift until that transport is migrated too.
Related
- fix(http): read the OS trust store on the tls-rustls backend (odbc#323) #316 — enable
rustls-tls-native-roots(system trust store ontls-rustls) - databricks/databricks-odbc#323 — the aarch64 divergence that motivated this
- Known pre-existing bug to fold in:
c_abi::session::tests::mtls_identity_is_forwarded_when_session_opensfails undertls-rustlsonmain— rustls'sIdentity::from_pemon a garbage cert surfaces "builder error" instead of the expected "Invalid mTLS client certificate/key" parse error (error-ordering difference vs native-tls). A rustls-default move must fix or re-baseline this test.
Activity
vikrantpuppala commentedon Sep 5, 2026
@vuanhphung @rahuls-db fyi for future
github-actions commentedon Oct 6, 2026
This issue has been marked as Stale because it has been open for 30 days with no activity. If you would like the issue to remain open, please remove the stale label or comment on the issue.
github-actions commentedon Oct 13, 2026
This issue was closed because it has been inactive for 7 days since being marked as stale.