Repository navigation
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 of 7 tasks
Author
|
@CLAassistant check |
This was referenced Oct 23, 2026
A declared TLS option (root bundle, client certificate chain or client private key) is now refused when the URI scheme is http, or when no URI is set and the default http applies. The driver returns `InvalidArguments` that names the option. Tests cover the refusal and an https URI that still builds the connection.
Author
|
Added a check: the driver now refuses a declared TLS option when the URI scheme is http. |
abonander
requested changes
Nov 13, 2026
abonander
left a comment
Collaborator
There was a problem hiding this comment.
A few nits, plus this needs to be rebased to fix the merge conflicts.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 2 potential issues.
Reviewed by Cursor Bugbot for commit 0249b39. Configure here.
AI review gate — AI review passedClean review from: Cursor Bugbot. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Adds custom trust roots and a client certificate/key to the TLS transport. These options require a
rustls-tls-aws-lcorrustls-tls-ringfeature.clickhouse.client.tls_root_certsclickhouse.client.tls_client_certclickhouse.client.tls_client_keyOptions can be set on a database or passed to
new_connection_with_opts(). The transport is fixed when the connection is created. A declared TLS option requires an HTTPS URI; malformed PEM and an incomplete certificate/key pair returnInvalidArguments. The key is redacted inDebugoutput and cannot be read back. The internal feature is_tls-mtls. PEM parsing uses the existingrustls::pki_types::pem::PemObjectAPI.The branch includes current main through a forward merge. It has no changelog addition.
The custom connector allows HTTPS, retains the 60-second TCP keepalive and two-second idle pool policy, and provides the Tokio pool timer. A new loopback TLS regression cell checks a driver request and idle socket closure.
Formatting and locked checks of all targets pass locally with default and all features. Tests run only in CI; hosted results, including the new cell, are pending. The loopback cell does not establish a successful query or mutual authentication with a ClickHouse server.
Note
Medium Risk
Touches connection TLS setup and secret handling (PEM keys); mistakes could break secure connections or leak credentials if read-back rules regress.
Overview
Adds custom TLS trust and client identity for Rustls builds (
rustls-tls-aws-lc/rustls-tls-ringvia internal_tls-mtls): threeclickhouse.client.*options for a PEM root bundle that replaces built-in roots, plus optional mTLS cert/key pairs.When any of these are set, connection creation merges database and
new_connection_with_optsoverrides, validates PEM (and paired cert/key), requires https, and swaps in ahyper-rustlsHTTP client with a tailoredrustls::ClientConfig. The transport is fixed after connect; changing TLS on an existing connection is rejected, and the client private key cannot be read back.Cargo feature wiring now pulls optional
rustls,hyper-rustls, andhyper-util, and README documents the new options. Unit/integration-style tests cover validation, https enforcement, and a loopback TLS handshake.Reviewed by Cursor Bugbot for commit 48af568. Bugbot is set up for automated code reviews on this repo. Configure here.