Repository navigation
fix skip-verify not applying to thin event forwarding - #1534
Conversation
PostV2 was using http.DefaultClient instead of the configured HTTP client, so the InsecureSkipVerify TLS setting from --skip-verify was being ignored for thin event forwarding.
|
|
1 similar comment
|
|
bernerd-stripe
left a comment
There was a problem hiding this comment.
👋 Hi @knQzx, thanks for the contribution (and the test coverage).
I think the test can be cleaned up a bit by using the ts.Client() helper for obtaining an HTTP client that's pre-configured to access the test server, so I left a suggestion to replace that (and remove the unused dependencies).
|
sorry about that, simplified the test to use ts.Client() and removed the unused imports. thanks for the feedback! |
summary
PostV2(thin event forwarding) was usinghttp.DefaultClientinstead of the configured HTTP client, so the--skip-verifyflag had no effect on thin events sent via--forward-thin-to/--forward-thin-connect-toPostV2to usec.cfg.HTTPClient(same asPostdoes for v1 events), which carries theInsecureSkipVerifyTLS configPostV2uses the configured client by hitting an HTTPS test server with a self-signed certtest plan
TestPostV2_UsesConfiguredHTTPClientwhich creates an HTTPS test server and verifiesPostV2succeeds withInsecureSkipVerify: true(would fail with x509 error usinghttp.DefaultClient)fixes #1434