cloudflared icon indicating copy to clipboard operation
cloudflared copied to clipboard

x509: certificate specifies an incompatible key usage

Open vhansjee opened this issue 4 years ago • 17 comments

After updating to cloudflared version 2021.12.0, the service gives this error for any host running a LE cert; works fine if I go back to the previous version.

ERR error="Unable to reach the origin service. The service may be down or it may not be responding to traffic from cloudflared: x509: certificate specifies an incompatible key usage"

vhansjee avatar Dec 15 '21 20:12 vhansjee

Hello @vhansjee ,

What exact previous version is that?

Can you share your YAML config?

nmldiegues avatar Dec 15 '21 20:12 nmldiegues

Hello 😀

Previous version : 2021.11.0

YAML config (obfuscated) :

tunnel: XXXXXXX-XXXXXXX-XXXXXXX-XXXXXXX-XXXXXXX credentials-file: /home/XXXXXXX/.cloudflared/XXXXXXX-XXXXXXX-XXXXXXX-XXXXXXX-XXXXXXX.json

ingress:

  • hostname: XXXXXXX.XXXXXXX.XX service: https://XXXXXXX.XXXXXXX.XXX
  • hostname: XXXXXXX.XXXXXXX.XX service: https://XXXXXXX.XXXXXXX.XXX
  • hostname: XXXXXXX.XXXXXXX.XX service: https://XXXXXXX.XXXXXXX.XXX
  • service: http_status:404

vhansjee avatar Dec 15 '21 20:12 vhansjee

I don't know of any change we have done that would have caused such difference in behaviour between 2021.11.0 and 2021.12.0

We'll have to try to reproduce it on our end.

nmldiegues avatar Dec 15 '21 21:12 nmldiegues

Thanks, i'll try generating new LE certs to see if that resolves the issue

vhansjee avatar Dec 15 '21 21:12 vhansjee

Regenerated LE certs same issue but if I change the service to http:// the tunnel comes back up (those LE certs were working fine before I updated the cloudflared service so I doubt it is the cert issue but I could be totally wrong)

vhansjee avatar Dec 15 '21 22:12 vhansjee

I am having the same issue. It was working yesterday and now after cloudflared auto-updated to the new version and restarted, it is not.

Is the previous version available for download somewhere for testing?

jdjord4n avatar Dec 15 '21 23:12 jdjord4n

I am having the same issue. It was working yesterday and now after cloudflared auto-updated to the new version and restarted, it is not.

Is the previous version available for download somewhere for testing?

I downloaded the previous version from : https://github.com/cloudflare/cloudflared/releases

vhansjee avatar Dec 16 '21 00:12 vhansjee

Can you confirm if you are running cloudflared for amd64 linux?

If yes, any chance you could compile cloudflared from source (tag 2021.12.0) and try it out again?

The 2021.12.0 amd64 linux binary was built with extra encryption requirements (for FIPS compliance) and that may be the cause here. If you build it yourself, it won't have those.

nmldiegues avatar Dec 16 '21 00:12 nmldiegues

Yes running it in amd64 linux (Ubuntu 20.04.3 LTS)

I'm still a linux noob so not sure if I know how to do that without breaking stuff even more 🥴

vhansjee avatar Dec 16 '21 00:12 vhansjee

Alright, no harm.

nmldiegues avatar Dec 16 '21 00:12 nmldiegues

We have a good certainty of the origin of the problem and will be releasing 2021.12.1 soon with the fix.

nmldiegues avatar Dec 16 '21 00:12 nmldiegues

Could it also explain an issue with an non-let's encrypt certificate, signed using ecdsa-with-SHA256 and used on an haproxy LB with the following setup:

ssl-default-bind-ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384 ssl-default-bind-ciphersuites TLS_AES_128_GCM_SHA256:TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256 ssl-default-bind-options ssl-min-ver TLSv1.2 no-tls-tickets

?

bplessis avatar Dec 16 '21 08:12 bplessis

Yes @bplessis

The release is coming out now, apologies for the delay. If you upgrade to 2021.12.1 it should work.

nmldiegues avatar Dec 16 '21 08:12 nmldiegues

Check out https://github.com/cloudflare/cloudflared/releases/tag/2021.12.1 and let us know please

nmldiegues avatar Dec 16 '21 08:12 nmldiegues

Thanks everything is working again 🎉👍

vhansjee avatar Dec 16 '21 08:12 vhansjee

Awesome. Thanks for reporting this. Apologies for the issue.

nmldiegues avatar Dec 16 '21 08:12 nmldiegues

Thanks for the speedy resolution!

vhansjee avatar Dec 16 '21 09:12 vhansjee