Skip to content

Allow to disable certificate verification on connection to ClickHouse #7

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

Merged
merged 4 commits into from
Jan 17, 2025

Conversation

orian
Copy link
Collaborator

@orian orian commented Jan 17, 2025

Description

Allows to skip ssl certificate validation when connecting to ClickHouse.

Pull request type

Please check the type of change your PR introduces:

  • Bugfix
  • Feature
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Documentation content changes
  • Other (please describe):

Checklist

  • Linter passes correctly
  • Add tests which fail without the change (if possible)
  • All tests passing
  • Extended the README / documentation, if necessary

Does this introduce a breaking change?

  • Yes
  • No

Further comments

IdleConnTimeout: 90 * time.Second,
TLSHandshakeTimeout: 10 * time.Second,
ExpectContinueTimeout: 1 * time.Second,
}

if cfgCp.InsecureSkipVerify {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we can just?

Suggested change
if cfgCp.InsecureSkipVerify {
transport.TLSClientConfig = &tls.Config{
InsecureSkipVerify: cfgCp.InsecureSkipVerify, //nolint:gosec
}

Not sure if creating the TLSClientConfig object changes the behavior though, in that case, just ignore this!

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had this code as you suggested before.
I've tried to dig on this one into the source. There's a one warning about HTTP2. I have no confidence in committing it.

@orian orian merged commit 2133208 into master Jan 17, 2025
2 checks passed
@orian orian deleted the pawel/feat/no-cert-verify branch February 21, 2025 11:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants