fix(clickhouse): honor verify=false in the Rust HTTP writer - #8419
Open
bhataprameya wants to merge 1 commit into
Open
fix(clickhouse): honor verify=false in the Rust HTTP writer#8419bhataprameya wants to merge 1 commit into
bhataprameya wants to merge 1 commit into
Conversation
The Rust consumer writer always verified ClickHouse TLS certificates, while the Python clients honor the cluster verify setting. Plumb verify into the Rust consumer config and disable certificate and hostname checks only for HTTPS when verify is explicitly false.
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.
Context
verifysetting (CLICKHOUSE_VERIFY). WithsecureHTTPS and a self-signed/private-CA certificate, Rust consumers fail withcertificate verify failed: unable to get local issuer certificateeven when verification is explicitly disabled.Changes
verifysetting into the Rust consumer config (bool | None; raw env strings coerced, only explicitfalse/0disable).tls_danger_accept_invalid_certs+tls_danger_accept_invalid_hostnamesonly whensecure && verify == Some(false).None) keeps current behavior (verification on); plaintext HTTP and credentials/headers are unchanged.verifykey asNoneinstead ofFalseso "unset" stays distinct from "explicitly disabled" (both are falsy at existing Python call sites, so no behavior change).Testing
cargo test --lib config::— verify absent →None, explicitfalse→Some(false).pytest tests/consumers/test_consumer_config.py— 15 passed (coercion matrix + propagation).cargo clippy --all-targets -- -D warnings,cargo fmt --check, ruff, mypy: clean.