-
-
Notifications
You must be signed in to change notification settings - Fork 5.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improvement: Support TLS Expiry alerts also for CA certs in cert chain #2594
Conversation
…for improved notifications
…epresent what id does. Evaluate certificate expiry from all certs in chain. Send a separate notification for every cert in chain, including cert type and CN.
- enable clickable URL on Dashboard Details if monitor is of type `mp-health`
I want to test this. I am wondering how to prepare test cases. |
I'll try my best to describe all steps necessary but it's not trivial. To run such a Test you need a CA (or sub ca) with an expiry date below kuma's threshold (default 7/14/21). The server certificate should have an expiry date outside of this threshold. I attached two openssl config files - one for creating the ca and one for creating the server cert: Create a private key for the CA:openssl genrsa -out rootCAKey.pem 2048 Create a CA - with an expiration after 10 days (the defaults are from the openssl_ca.cnf.txt):
Create a private key for the "server":
Create the Server CSR (the defaults are from the openssl_cert.cnf.txt):
Sign the CSR with an expiration after 60 days:
Set up a webserverusing the mydomain.com.crt + mydomain.com.key and additionally set up the rootCACert.pem as CA (apache: SSLCertificateChainFile). Start kuma and tell it to trust the CA:
Set up a new HTTP(s) monitor for the web server.
As soon as the monitor is running, it will show the certificates and the expiry of the server cert (60 days) but when clicking on it you can see the root ca with "Days Remaining: 10". furthermore you should find similar log statements when the checks are running:
|
Well, just came across this idea: as reference: Today's uptime-kuma will only trigger an alert fort the server cert. This patch here will also trigger an separate alert for each intermediate or root ca within expiry threshold. |
# Conflicts: # server/model/monitor.js # src/pages/Details.vue
greatly appreciated 👍 |
https://github.com/louislam/uptime-kuma/blob/master/CONTRIBUTING.md#can-i-create-a-pull-request-for-uptime-kuma
Tick the checkbox if you understand [x]:
Description
Fixes #2593
Type of change
Please delete any options that are not relevant.
Checklist
(including JSDoc for methods)
Screenshots (if any)
Please do not use any external image service. Instead, just paste in or drag and drop the image here, and it will be uploaded automatically.