-
Notifications
You must be signed in to change notification settings - Fork 11
Add client certs to HttpSender and TcpSender #49
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
base: main
Are you sure you want to change the base?
Add client certs to HttpSender and TcpSender #49
Conversation
…pSender and HttpSender
Hey @robin-rexstedt-stretch, thanks for the contribution! Few questions: is To complete the PR, please add a test that uses an |
As long as it is not disposed its entirely immutable these days.
Okay, I'll add that to the PR. Thanks for the feedback! |
Hi @ideoma, I have now added the requested unit tests. Please review and if you have any further questions or change requests, let me know. |
I tried running the new test and got this
|
I've only tried it on my local dev machine so far, which runs Windows 11 (where I get the error described in #50 due to system culture differences). I'll try to find some other machines to run it on, see if I can reproduce your above error. Certificate loading can be pretty OS dependent, so that might be the issue. The error message you get is exactly what is expected for when a certificate isn't being sent. I'll figure out a way to reproduce and then fix it. |
I'm using MacOS |
If you wait a bit, I will be able to set up Azure CI that will run the tests on Mac, Linux, and Windows, and you can test this PR on all platforms |
Hey @robin-rexstedt-stretch, I added an Azure pipeline; it should be triggered on PRs automatically. Please merge the latest from main |
This adds a way to add a client cert to both TcpSender and HttpSender via SenderOptions, without also setting the tls_roots.
This is needed in our case where we use Traefik as a https proxy in front of QuestDB.
Absolutely willing to adjust the implementation details if needed to adhere to QuestDB standards if this is something you are willing to consider merging.
The cert being provided in X509Certificate2 format instead of a file path is intentional, as it allows much greater freedom in cert types (pem+pem, pfx...) and also where it is read from - disk, base64 string, key vaults, IConfiguration, etc.