question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support x509 certificates with subjectAltName for HTTPS checks

See original GitHub issue

⚠️ Please verify that this bug has NOT been raised before.

  • I checked and didn’t find similar issue

🛡️ Security Policy

Description

Uptime-Kuma tells me that a check failed, because it was unable to verify the first certificate. I was a bit puzzled, since I was able to open the page in my browser and see that it works, and the certificate is fine.

Upon closer inspection, I noticed a potential explanation:

  • the server uses a certificate from Letsencrypt, which has multiple domain names in it
  • the common name of the subject is not the same as the domain I go to
  • the domain is featured in the list of the subjectAltName attribute of the certificate

When viewing such a certificate with Chrome, it doesn’t even show the entries of subjectAltName. So, it looks like the certificate is indeed not valid for this domain, despite the fact that the padlock icon in the address bar is fine. Firefox, on the other hand, shows the other domains this certificate is valid for: image

👟 Reproduction steps

Use a Letsencrypt certificate issued for multiple domain names.

👀 Expected behavior

Uptime-Kuma should successfully verify the certificate’s validity for the given domain.

😓 Actual Behavior

Uptime-Kuma fails to verify the certificate.

🐻 Uptime-Kuma Version

1.16.0

💻 Operating System and Arch

Ubuntu 20.04 x86

🌐 Browser

Chrome, Firefox

🐋 Docker Version

No response

🟩 NodeJS Version

No response

📝 Relevant log output

2022-05-27T14:31:28.174Z [MONITOR] WARN: Monitor #1 'test': Failing: unable to verify the first certificate | Interval: 300 seconds | Type: keyword

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
chakflyingcommented, May 28, 2022

The problem is you did not include the intermediate certificates bundle provided by Let’s Encrypt in your server. Node.js has strict requirement for this so it rejected the connection but browsers are more lenient.

0reactions
github-actions[bot]commented, Sep 20, 2022

This issue was closed because it has been stalled for 7 days with no activity.

Read more comments on GitHub >

github_iconTop Results From Across the Web

SubjectAltNames in X.509 Certificates
X.509 certificates bind a public key to the contents of the Subject field, the SubjectAltName extension, or both. The SubjectAltName extension has become ......
Read more >
Does Domino HTTP allow SSL certificates with ... - HCL support
Subject Alternative Names, allow ssl certificates to secure the same IP address accessed over different.
Read more >
How to display the Subject Alternative Name of a certificate?
The closest answer that I found is using "grep". > openssl x509 -text -noout - ...
Read more >
X.509 Authentication in Spring Security - Baeldung
The article discusses using certificates for both client and server side authentication.
Read more >
SAN Certificates: Subject Alternative Name - DigiCert.com
The Subject Alternative Name field lets you specify additional host names (sites, IP addresses, common names, etc.) to be protected by a single...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found