AlinsRan opened a new pull request, #14260: URL: https://github.com/apache/apisix/pull/14260
### Description `skywalking-logger` connected to the collector with only the host and port. An `https` `endpoint_addr` therefore got a plain TCP connection, and the collector certificate was never checked. This PR connects with the scheme, host and port from `endpoint_addr`, and sends the collector hostname as SNI for `https`. It adds an `ssl_verify` option, defaulting to `true` as in `clickhouse-logger` and `elasticsearch-logger`, which verifies the certificate against `apisix.ssl.ssl_trusted_certificate`. Setting `ssl_verify: false` logs the usual security warning. The option has no effect on `http` endpoints, and the POST path (`/v3/logs`) is unchanged. Upgrade note: an `https` endpoint must now present a trusted certificate for its configured hostname. Such endpoints could not work against a real TLS collector before this change. Add a private CA to `apisix.ssl.ssl_trusted_certificate`, or set `ssl_verify: false`. The new `t/plugin/skywalking-logger-tls.t` runs against local collectors: - A trusted `https` collector receives `/v3/logs`. - A collector presenting another host's certificate is rejected. - The same mismatch is accepted with `ssl_verify: false`, and the warning is logged. - An `http` endpoint with `ssl_verify: true` receives the logs. The first three cases fail on master. ### Checklist - [x] I have explained the need for this PR and the problem it solves - [x] I have explained the changes or the new features added to this PR - [x] I have added tests corresponding to this change - [x] I have updated the documentation to reflect this change - [ ] I have verified that this change is backward compatible (If not, please discuss on the [APISIX mailing list](https://github.com/apache/apisix/tree/master#community) first) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
