uptime-kuma icon indicating copy to clipboard operation
uptime-kuma copied to clipboard

Matrix - Unable to verify the first certificate

Open Chiller2019 opened this issue 1 year ago • 1 comments

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

  • [X] I checked and didn't find similar issue

🛡️ Security Policy

📝 Describe your problem

I set Matrix (Synapse) as notification-provider but when I send a test-message, I get an error.

Matrix

and Log: Log

Now my question, how can I install my self-signed RootCA or deactivate TLS-Check?

PS.: Uptime-Kuma has a Proxy over Traefik

I import the CA Certificate on the host, with curl -XPOST -d '{"type": "m.login.password", "identifier": {"user": "botusername", "type": "m.id.user"}, "password": "passwordforuser"}' "https://home.server/_matrix/client/r0/login" I became a right output without faults.

Matrix_Output

🐻 Uptime-Kuma Version

1.17.1

💻 Operating System and Arch

Ubuntu 20.04.4 LTS

🌐 Browser

GC 103.0+

🐋 Docker Version

20.10.17

🟩 NodeJS Version

No response

Chiller2019 avatar Jul 17 '22 11:07 Chiller2019

Can no one help?

Chiller2019 avatar Jul 22 '22 19:07 Chiller2019

I have the same problem with homebridge. It seems to be problem with the web-server part , Because curl is raising the error too.

My problem is, that checking 'Certificate Expiry' is not working when 'ignore TLS/SSL-errors' is active. That should be changed.

HolgerAusB avatar Aug 13 '22 16:08 HolgerAusB

I have the same problem with homebridge. It seems to be problem with the web-server part , Because curl is raising the error too.

My problem is, that checking 'Certificate Expiry' is not working when 'ignore TLS/SSL-errors' is active. That should be changed.

And what exactly did you do to solve the problem?

Chiller2019 avatar Aug 13 '22 21:08 Chiller2019

As a user, I can't!

Kuma does not send a notification on cert expiry, when you set 'irgnore TLS/SSL-errors'. From my point this is a bug to kuma.

On the other hand, it is a bug to the webserver-engine of your/mine smarthome software. Don't know if this is nginx, Node.js etc. But as far as I researched, this first-cert-issue is on them. With a web browser there is no problem, they do know this middle-CA. But curl (and kuma) can't resolv this problem. The very same cert on Apache server does not have this problem with curl or kuma.

HolgerAusB avatar Aug 13 '22 22:08 HolgerAusB

Same problem here.

hugokernel avatar Aug 29 '22 14:08 hugokernel

Yeahr but I think its possible to add a tag to curl when kuma will send a message. The tag is "--insecure"

Chiller2019 avatar Aug 29 '22 14:08 Chiller2019

False alarm for me, sorry, problem of conf in the certificate following renewal.

hugokernel avatar Aug 29 '22 14:08 hugokernel

Can you not place your own CA cert into /etc/ssl/certs/ via a bind mount? I'm not sure if Uptime Kuma itself as part of the upstart process will call the command update-ca-certificates though.

That might need to be added to the docker.

Aterfax avatar Oct 10 '22 11:10 Aterfax

Can you not place your own CA cert into /etc/ssl/certs/ via a bind mount? I'm not sure if Uptime Kuma itself as part of the upstart process will call the command update-ca-certificates though.

That might need to be added to the docker.

Tried months ago, doesn't work.

Chiller2019 avatar Oct 10 '22 18:10 Chiller2019

Can you not place your own CA cert into /etc/ssl/certs/ via a bind mount? I'm not sure if Uptime Kuma itself as part of the upstart process will call the command update-ca-certificates though. That might need to be added to the docker.

Tried months ago, doesn't work.

Did you try running update-ca-certificates from a console within the docker container first?

Aterfax avatar Oct 11 '22 00:10 Aterfax

Setting a valid CA cert appears to have been handled in this thread: https://github.com/louislam/uptime-kuma/issues/1380

Aterfax avatar Oct 11 '22 00:10 Aterfax

so for my problem with homebridge (via node.js) the solution was simple. In the config of homebridge I just changed the path to cert.pem to fullchain.pem.

HolgerAusB avatar Oct 26 '22 08:10 HolgerAusB

so for my problem with homebridge (via node.js) the solution was simple. In the config of homebridge I just changed the path to cert.pem to fullchain.pem.

In the case of certificates issued from Letsencrypt etc... the full chain of certificates including the CA (certificate authority), the intermediate CA certificate as well as your own domain's issued certificate must be supplied added to your service (e.g. homebridge / nginx etc... must use the fullchain.pem which contains the full chain) or some devices will be unable to verify the trust chain from your domain's certificate back to a trusted root CA certificate due to the missing middle link of the intermediate certificates.

This issue was originally filed by someone trying to use their own root CA and sub-certificates (I think). If using your own certificate authority, the details of adding the new CA certificates/trust chain are detailed in https://github.com/louislam/uptime-kuma/issues/1380 using the NODE_EXTRA_CA_CERTS environment variable.

Aterfax avatar Oct 28 '22 18:10 Aterfax

We are clearing up our old issues and your ticket has been open for 3 months with no activity. Remove stale label or comment or this will be closed in 2 days.

github-actions[bot] avatar Jan 27 '23 00:01 github-actions[bot]

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

github-actions[bot] avatar Jan 29 '23 06:01 github-actions[bot]

how to solve this problem ?

rizkytegar avatar Apr 18 '23 07:04 rizkytegar

Hello, I noticed I have the exact same error when I use certificates that I have to replace each year by a new one (officially signed by an external accreditation platform). It's like UptimeKuma keeps in memory the first certificate it checks and doesn't replace it with the new one, or doesn't change which certificate it checks. Any idea?

EgonHeuson avatar Feb 01 '24 14:02 EgonHeuson

Are you sure it's Kuma? I had a similar issue. But here it was Homebridge (NodeJS), that doesn't use the new certificate automatically, which I copied by script from a different machine via ssh. I need to reboot that RaspberryPi after each renewal of the LetsEncrypt Wildcard cert, which is done by the copy script, too (following night 3am via at).

HolgerAusB avatar Feb 01 '24 15:02 HolgerAusB

Hey! I think so, but not sure. In my case it's pretty straightforward. I handle the certificates with NginxProxyManager for each of my application, and when I renew my certificate, I delete the old one, and add a new .cert file. My web browsers don't have any issue with the new certificates by the way. For now I deactivated the SSL check in Kuma, but don't really know what to do else.

EgonHeuson avatar Feb 02 '24 10:02 EgonHeuson

same problem

Namydad avatar Feb 07 '24 17:02 Namydad