You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Mutual TLS on multi-worker /aggregated_metrics still uses VERIFY_NONE #269
When in_prometheus uses TLS and workers > 1, /aggregated_metrics fetches each worker on loopback with OpenSSL::SSL::VERIFY_NONE. External /metrics can require a client certificate ( and client_cert_auth). The worker-aggregation fetch does not verify the worker certificate, so that path is not mutual TLS.
The setting is in do_request in lib/fluent/plugin/in_prometheus.rb:
if secure
http.use_ssl = true
target is our child process. so it's secure.
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
end
The async-http path in lib/fluent/plugin/in_prometheus/async_wrapper.rb has the same gap.
To Reproduce
Start Fluentd with workers 2 and the configuration below.
Request https://127.0.0.1:24231/aggregated_metrics with a valid client certificate.
The parent worker scrapes the other worker with verify_mode = OpenSSL::SSL::VERIFY_NONE.
A worker certificate that would fail VERIFY_PEER is still accepted on that internal fetch.
Expected behavior
The loopback fetch should use VERIFY_PEER and the same CA as the TLS transport, on both the Net::HTTP path and the async-http path. A bad worker certificate should be rejected.
No error is logged. The loopback scrape succeeds because verification is disabled. That is the bug: a certificate that VERIFY_PEER would reject is accepted
A proper fix needs a bit more than switching to VERIFY_PEER:
When client_cert_auth is enabled, the loopback client should present cert_path / private_key_path as its client certificate (this would also fix the aggregation failure described above).
Server certificates often do not include 127.0.0.1 / ::1 in their SAN, so hostname verification on the loopback address needs to be handled while still verifying the chain against ca_path.
The behavior with system CA (no ca_path), generated self-signed certificates, and the deprecated <ssl> section needs to stay consistent.
Activity
Watson1978 commentedon Oct 1, 2026
A proper fix needs a bit more than switching to
VERIFY_PEER:client_cert_authis enabled, the loopback client should presentcert_path/private_key_pathas its client certificate (this would also fix the aggregation failure described above).127.0.0.1/::1in their SAN, so hostname verification on the loopback address needs to be handled while still verifying the chain againstca_path.ca_path), generated self-signed certificates, and the deprecated<ssl>section needs to stay consistent.