mirror of
https://github.com/louislam/uptime-kuma.git
synced 2026-03-02 22:57:00 -05:00
mTLS montoring through the tcp probe fails when extracting TLS alerts on TLS1.3 connections #4621
Labels
No labels
A:accessibility
A:api
A:cert-expiry
A:core
A:dashboard
A:deployment
A:documentation
A:domain expiry
A:incidents
A:maintenance
A:metrics
A:monitor
A:notifications
A:reports
A:settings
A:status-page
A:ui/ux
A:user-management
Stale
ai-slop
blocked
blocked-upstream
bug
cannot-reproduce
dependencies
discussion
duplicate
feature-request
feature-request
good first issue
hacktoberfest
help
help wanted
house keeping
invalid
invalid-format
invalid-format
question
releaseblocker 🚨
security
spam
type:enhance-existing
type:new
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/uptime-kuma#4621
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @tchinchow on GitHub (Jan 19, 2026).
📑 I have found these related issues/pull requests
This is a continuation of #5837 which was closed as "implemented by #6587"
Many thanks for this patch that opened the way.
🛡️ Security Policy
📝 Description
I'm still facing issues on some of my sites when expecting a
certificate_requestedalert (116) from the server.The tcp probe pretends like the server accepted the connection when it really did not (and
curlconfirms that the server is requiring a client certificate).(see #5837 for details and screenshots)
👟 Reproduction steps
Probe a TLSv1.3 server that requires a client certificate.
Set the
Expected TLS Alertfield to certificate_requested (116)`.👀 Expected behavior
The probe should indicate that the server indeed responded with the expected TLS alert (116).
😓 Actual Behavior
The probe pretends like the server accepted the connection and fails to recognize that it actually refused the connection with the expected TLS alert (116).
This is confirmed this with
curl. You can run it from inside the docker container to make sure that the network configuration is similar.🐻 Uptime-Kuma Version
2.1.0-beta2
💻 Operating System and Arch
fedora
🌐 Browser
firefox
🖥️ Deployment Environment
you can do this in the official docker container.
📝 Relevant log output
@tchinchow commented on GitHub (Jan 19, 2026):
I think I know what happens but I'm not confident enough with Javascript/node to fix it.
TLSv1.3 seems to enter a
secureConnectstate/event before reaching theerrorstate/event because ciphering happens much before what is done in TLSv1.2.The connection eventually reaches the
errorstate but this event happens when the Promise has already been resolved.In comparison, TLSv1.2 fails during the handshake and the
errorstate is reached first.This explains why current code works with this version of TLS (at least with fairly recent versions of node).
Documentation of the NodeJS TLS, session event seems better suited than
secureConnectfor what we want to achieve here.However in case of TLSv1.2 it lloks like we never get to the
sessionstate/event.I don't know why and this is where Javascript leaves me hanging...
I tried to modify the code _(#6772)_but then most tests fail because the
sessionevent does not seem to come for TLSv1.2 servers....and then I'm stuck for now.
@tchinchow commented on GitHub (Jan 19, 2026):
All I can tell is that the fix seems to work for me with node version 25.3.0.
It clearly fails with node version 20
I don't know about other versions but the automated tests suggests that multiple versions (including old node versions 20) must be supported by uptime kuma on systems such like ubuntu...
I will close the pull requests where I was only trying to figure out how the test system works and what it validates.
I don't know what I'm doing and I don't know how I can try things out on my own without polluting this repo.