-
-
Notifications
You must be signed in to change notification settings - Fork 137
allow invalid certificate for intra cluster calls #1309
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
allow invalid certificate for intra cluster calls #1309
Conversation
allow invalid certificates for connecting other nodes in the cluster required when querier/prism server tries to connect to other nodes via IP address directly but the certificate is valid for a specific domain name
## Walkthrough
A new static HTTP client, `INTRA_CLUSTER_CLIENT`, was introduced with conditional `.danger_accept_invalid_certs` based on a CLI option to allow intra-cluster communication over IP addresses despite invalid TLS certificates. Multiple modules replaced usage of the original `HTTP_CLIENT` with this new client for all intra-cluster HTTP requests. A new CLI option `tls_skip_verify` was added to control this behavior.
## Changes
| File(s) | Change Summary |
|-----------------------------------------|--------------------------------------------------------------------------------------------------------|
| src/lib.rs | Added `INTRA_CLUSTER_CLIENT` static HTTP client with `.danger_accept_invalid_certs(PARSEABLE.options.tls_skip_verify)` configuration.|
| src/cli.rs | Added `tls_skip_verify` boolean CLI option (`--tls-skip-verify`) to allow skipping TLS verification, defaulting to false. |
| src/analytics.rs | Replaced `HTTP_CLIENT` with `INTRA_CLUSTER_CLIENT` for fetching ingestors' metrics. |
| src/handlers/http/cluster/mod.rs | Switched all intra-cluster HTTP requests from `HTTP_CLIENT` to `INTRA_CLUSTER_CLIENT`. |
| src/handlers/http/cluster/utils.rs | Updated `check_liveness` function to use `INTRA_CLUSTER_CLIENT` instead of `HTTP_CLIENT`. |
| src/handlers/http/mod.rs | Changed `send_query_request_to_ingestor` to use `INTRA_CLUSTER_CLIENT` in place of `HTTP_CLIENT`. |
| src/metrics/prom_utils.rs | Switched HTTP client to `INTRA_CLUSTER_CLIENT` for `/about` endpoint requests. |
## Poem
> A hop and a skip, a client anew,
> Accepting certs, both old and askew.
> Now clusters on IPs, it gladly will greet,
> Even if domains and certs don’t quite meet.
> With a twitch of the nose and a whisker’s delight,
> Secure or not, the client connects right! 🐇 Tip ⚡️ Faster reviews with caching
Enjoy the performance boost—your workflow just got faster. 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (2)
⏰ Context from checks skipped due to timeout of 90000ms (10)
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
src/lib.rs
(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (10)
- GitHub Check: Build Default x86_64-pc-windows-msvc
- GitHub Check: Build Default aarch64-apple-darwin
- GitHub Check: Build Default x86_64-apple-darwin
- GitHub Check: Build Default aarch64-unknown-linux-gnu
- GitHub Check: Build Default x86_64-unknown-linux-gnu
- GitHub Check: Build Kafka aarch64-apple-darwin
- GitHub Check: Quest Smoke and Load Tests for Standalone deployments
- GitHub Check: Build Kafka x86_64-unknown-linux-gnu
- GitHub Check: Quest Smoke and Load Tests for Distributed deployments
- GitHub Check: coverage
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.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
src/cli.rs
(1 hunks)src/lib.rs
(2 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
- src/lib.rs
⏰ Context from checks skipped due to timeout of 90000ms (10)
- GitHub Check: Build Default x86_64-pc-windows-msvc
- GitHub Check: Build Default aarch64-apple-darwin
- GitHub Check: Build Default x86_64-apple-darwin
- GitHub Check: Build Default aarch64-unknown-linux-gnu
- GitHub Check: Build Kafka aarch64-apple-darwin
- GitHub Check: Quest Smoke and Load Tests for Distributed deployments
- GitHub Check: Build Default x86_64-unknown-linux-gnu
- GitHub Check: coverage
- GitHub Check: Quest Smoke and Load Tests for Standalone deployments
- GitHub Check: Build Kafka x86_64-unknown-linux-gnu
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Signed-off-by: Nikhil Sinha <[email protected]>
allow invalid certificates for connecting other nodes in the cluster
required when querier/prism server tries to connect to other nodes via IP address directly
but the certificate is valid for a specific domain name
Summary by CodeRabbit