fix(monitors): keep ignoreTlsErrors effective for proxied checks
Review found that the proxy path silently dropped ignoreTlsErrors. rejectUnauthorized was passed to the HttpsProxyAgent constructor, where it governs the socket to the proxy rather than the tunnelled handshake with the target. Verified directly: the value lands in connectOpts, while the target handshake reads got's per-request https options, which were unset and so defaulted to strict. The consequence was worse than a no-op. A monitor with ignoreTlsErrors against a self-signed endpoint works today; configuring a proxy would have made it fail verification, flip to down and fire a false incident with notifications. Stating the option per request fixes it, and the agent cache keeps its TLS split so a relaxed agent is never shared with a strict monitor. Also from review: - A fully-invalid PROXY_MONITOR_TYPES disabled proxying entirely, which in a restricted-egress deployment would take every HTTP monitor down at once — the exact failure the parser was meant to prevent. It now falls back to the defaults and warns loudly. "none" remains the way to disable deliberately. - The "none" sentinel only matched when it was the sole entry, so "none,http" half-enabled proxying. It is now honoured wherever it appears. - "unknown" is a real MonitorType but never a deliberate choice, so it is reported as a typo rather than as an unproxyable type. - Dropped the unused warning field from ProxyResolution. - Documented that lowercase proxy variables are honoured and take precedence, which matters on base images that already set them. Adds 10 tests, including the request-level TLS assertions the previous suite lacked. Verified by reverting the fix: both TLS tests fail without it.
This commit is contained in:
1 parent
705c19f7c8
commit
3b03850a3b
5 files changed
+144
-8
No files matched your search
@@ -37,6 +37,8 @@ STATUS_PAGE_THEMES_ENABLED=true
|
||||
# --------------
|
||||
# Route monitor checks through an HTTP proxy, for deployments whose egress is
|
||||
# restricted. Credentials may be embedded: http://user:pass@proxy:3128
|
||||
# The lowercase forms (http_proxy, https_proxy, no_proxy) are also honoured and
|
||||
# take precedence over these, which matters on base images that already set them.
|
||||
# HTTP_PROXY=http://proxy.corp.example:3128
|
||||
# HTTPS_PROXY=http://proxy.corp.example:3128
|
||||
#
|
||||
|
||||
Reference in new issue
Block a user