80 points · by twistedpair · 6y ago · 95 comments
If you've heard of Caddy but haven't used Caddy 2 yet, we've made some huge improvements with it, and it's capable of managing tens of thousands of certificates at a time. As of next week's beta it can handle certificates with lifetimes as short as a few minutes. It works as a load balancer, in a cluster behind load balancers, and with Docker with its new dynamic config API. There's no technical reasons I know of why sites like TechCrunch can't use it.
Caddy is written in Go, a memory safe language. I cannot overstate how significant it is that most servers like ngixn, Apache, and HAProxy are written in C and cannot offer the same security guarantees.
Caddy will also staple OCSP, in the most robust way compared to other servers. It has weathered outages that took Apache and NGINX sites down (in Firefox).
We've also seen CertBot consume high amounts of resources at scale, whereas Caddy can handle thousands of certs no problem. That's why some companies have talked to me about why they switched.
Caddy can coordinate cert management in a cluster. This happens automatically when configured with the same storage backend. CertBot doesn't do that. Caddy works great behind reverse proxies, or as the reverse proxy.
Perhaps most importantly, Caddy is the only server to use HTTPS by default without needing any explicit configuration. You simplify your deployment workflows and have less room for things to go wrong.
There's also a values statement here... If you think privacy and security are important, you choose software that enables privacy by default because it aligns with your values.
Sure, any number of solutions can get you TLS and a few even get you TLS via ACME, but Caddy (2) is highly optimized to handle the edge cases and scaling requirements a lot of sites have these days.
Of course there is - a web server that gets a certificate via LE is a single screw. A commercial internet-facing site is a high rise. One does not just replace a screw in a high rise -- it requires ensuring that the right tools are in every toolbelt to manipulate the screws. For Caddy to be useful in a non- oh look ma, i'm on the internet projects, it needs to fit into the tooling system.
For example, it should be fetching storing certificates in a database that can be accessed by multiple servers. Rather than doing everything behind the scenes, it should be emitting events indicating its desire to renew a cert and let someone else handle ( maybe a different caddy ) handle the renewals, etc, etc, etc.
By the way, Caddy CAN store certs in a database accessed by multiple servers. It coordinates cert management when configured as a cluster, automatically. Caddy is the only server that does this (for free).
Every single operational reason is a technical reason if it touches operation of the technology.
> By the way, Caddy CAN store certs in a database accessed by multiple servers. It coordinates cert management when configured as a cluster, automatically. Caddy is the only server that does this (for free
An edge web server should carry no knowledge of a concept of a cluster. It should simply be able to ask something for a cert. Otherwise it is a screw that insists that in order for it be used in high rise, it needs to be used in a specific pattern that the screw designer envisioned.
If you want to make Caddy easily adoptable in high rises I suggest the following path:
1. Subscribe to events saying "fetch this cert from here"
2. Emit events saying "Need to renew X" when you need to renew.
3. Create ability to forward renew requests to renew requests processor.
4. Make request processor update the cert store and emit the event that the key pair is available.
Right now I use the official HAProxy container + the official certbot container and a script that renews all my domains and then sends a sig-HUP to HAProxy to reload the certs. It mostly works but there have been a few hickups (HAProxy not starting because of the README file in the live LetsEncrypt folder; however if you send an HUP, it ignores it fine).
Has anyone used Traefik? Is it worth switching to over HAProxy+Certbot?
1) Prometheus + blackbox_exporter https://www.robustperception.io/get-alerted-before-your-ssl-...
2) Sensu/Nagios https://github.com/sensu-plugins/sensu-plugins-http/blob/mas...
3) Openssl in a crontab:
echo | openssl s_client -connect ${DOMAIN}:443 -servername ${DOMAIN} -verify_hostname ${DOMAIN} 2>/dev/null | openssl x590 -noout -startdate -enddate techcrunch.com
Issued by: DigiCert SHA2 Secure Server CA
Expires: Wednesday, 2 March 2022 at 12:00:00 GMTMost TC links get uBlocked completely now with adtech run amok.
Just use monitoring with alerts.
At that point, calendar reminders ain't going to cut it. And I imagine that TechCrunch-Oath-AOL-Yahoo-Verizon has at least that much complexity.
12h long certificate was used
https://www.webase.com/blog/pro-tip-makesure-your-ssl-cert-d...
This is bad, but at least the domain name didn't expire!
Even if automated, actually especially if automated, that's four times a year you can have complete site failure if something goes wrong.
ps. would be nice if firefox could easily override expired certs for advanced users like self-signed certs
IMO Let's Encrypt is the best way to manage an SSL cert these days.
Being good at catching errors doesn't soften the blow of the errors being so readily occurring in the first place.
Yes it does. If you can see the errors you can change your usage pattern or request a rate limit override. Flying blind is the worst way to go!
[1] EDIT: In the long-term, that is, not that individual site's interaction.
Though in most cases I just leave the site.
My list of containers will become a bit unwieldy in time, I think. I should probably consolidate some types and take the hit a bit on some cookie sharing behind the scenes.
What a mess.