469 points · by mmoez · 6y ago · 137 comments
https://letsencrypt.org/2020/02/19/multi-perspective-validat...
Maybe we can get the link changed?
[1] https://community.letsencrypt.org/t/acme-v1-v2-validating-ch...
I’m all for making things more secure, but they’ve broken all of my certs in the last 12 months (in different ways, at different times), and I’m sick of it.
My own monitoring always alerts if certificate chains don't validate, HTTP->HTTPS redirection is dead, or if the certificate is due to expire in less than 10 days.
The various tools for interacting with Lets Encrypt might fail sometimes, but if you have monitoring you can fix them up as required - and without monitoring you'll in trouble regardless of who you use.
OCSP out of the box is a call back to the issuing CA to verify that your certificate is still valid. Let's Encrypt like a lot of popular CAs implements this by having a CDN answer all live OCSP queries with bulk produced generic "This is still fine" answers for all the still-good certificates. But that means for any clients which check OCSP (some browsers do) that CDN is now on your critical path.
You can instead have your web server obtain (and periodically refresh) OCSP answers and "staple" them to its certificate when it answers HTTPS connections so that CDN isn't on your critical path any more.
However, some popular servers (most notably Apache HTTPD) do such a bad job of implementing OCSP Stapling that you're more likely to destroy your availability than improve it by enabling stapling (this is one of the things IIS actually gets right for a change), so make sure you understand what you're getting into. You will also need monitoring of the stapled response, because now if it's bad that might be a problem with your systems that you need to fix - whereas if Let's Encrypt OCSP is broken for the world you can be sure somebody else's on-call engineers are wrestling with it.
Edit: personally I also have a script that runs every day and checks the validity of all the certs in my live directory and pings me when they are due to expire as a second measure.
I actually don't know if that works with domains not managed by them, but I believe so.
Sadly, certs from big CAs are pretty expensive these days... Let's encrypt is really awesome service to counter that.
Yeah you can use domains not managed by them, just have to throw a txt record given by them on on to the DNS for the domain to validate that you have control of the domain.
They use the same acme system as LE so depends on what failed for you for it to be a viable alternative (if the certbot failed for example then it might of failed using buypass in the same way as it would of failed under LE)
What happened? Was it their fault or yours?
For example you could buy a Sectigo (previously Comodo) certificate for 2 years for like 17$ or so. Wildcard for 2 years is like 100$.
Its worth less than a broken certificate.
Also, with Sectigo you're more likely to get an actual broken certificate. They misissued nearly every certificate starting from 2002 until late 2019 [1].
Sure about the broken, but the alternatives are worse with possible leaked private keys.
We are going to repurchase all of our certs in Digicert this year with which I’ve had a much much better experience. They are well integrated with Azure Key Vault which allows us to automate certificate renewal and our AKS clusters will automatically get the new certs without us doing anything.
https://www.theregister.co.uk/2018/03/01/trustico_digicert_s...
if you are using your cloud certificates (built into lb, etc), then this is a moot point. You dont even need letsencrypt then.
Am I looking in the wrong place?
[1] https://www.comodoca.com/ssl-certificate-comparison?key5sk1=...
But I think it would be far better for them to focus on alerting webmasters if someone does manage to get a new certificate issued for a domain before the old one expires.
Certbot should reference the old certificate when doing a renewal. If someone registers a new certificate while an old one is valid and without referencing the old one, the owner of the old certificate should be notified loudly (sms, different-domain email, etc). Same if they register a certificate through a different provider.
Today all of the above is possible with certificate transparency logs, but nobody looks in them, so they're useless.
I check mine once or twice a month manually, but it is pretty trivial to monitor it automatically as well, e.g. there are APIs for crt.sh or they even offer direct public read access to their database.
I believe certificate users should remain responsble for their own monitoring. Alerting as you say would be very annoying since you couldn't preemptively replace certs without getting alerted unecesarily, and it would divert Let's Encrypt developer resources away from more useful projects.
You can check your domains there or subscribe for email notifications.
You would sign your request for a new cert with the private key of your old cert, proving you are the same person, which would suppress the alert.
Obviously the key provisioning tooling would do that automatically, so you needn't do it manually.
I suppose one could compare the public key of two leaf certificates, but reusing the private key is also a bad practice.
From CA end, it could check if the certificate is requested from the same account key. One can even use a DNS record to public the account keys (CAA + TLSA).
http://www.cs.cmu.edu/~dga/papers/perspectives-usenix2008.pd...
Think about the contents of that video/PDF for a second. The guys/gals doing that bit of research at the university are clearly smart, but imagine what a state level actor can do?
We shall see how well this works in practice. Assuming it's relatively cheap it's harmless to at least try.
Let's Encrypt offers three ACME methods which implement 3.2.2.4.6 ("Agreed Upon Change to Website"), 3.2.2.4.7 ("DNS Change") and 3.2.2.4.10 ("TLS Using a Random Number").
Where can I find these details? Sorry if I'm being a bit dense here.
But it turns out cheap bulk hosting sites, especially using Apache HTTPD often did this because it worked fine by default.
The symptom for ordinary users would be you try to visit https://cat-videos.example/ and it gives a certificate error saying the site has a certificate only for aaa-microwave-repairs.example do you want to continue? If you say "Yes" you get an error page. Eventually you remember it was http://cat-videos.example/ no need for the 's' and that works. Weird but ultimately harmless.
What has happened is the Microwave repairs people paid for working HTTPS, with a valid certificate for their name, the Cat Video people didn't bother. But both set the bulk hosting site as the correct IP address for their servers.
Now, when you connect to that IP address and ask for cat-videos.example using SNI, the remote server should go "Er, no?" and you just get an error. But Apache's default behaviour instead figures you want the default web site and default certificate, which will typically be alphabetically first on that server.
This destroys the security assumptions for tls-sni-01, because "it's safe unless people use cheap bulk hosting" is essentially identical to "it's not safe" and getting Apache to fix things was too late. Bad guys could sign up for a bulk host used by their target for non-TLS sites, and add a bogus site named like aaaaaaa.bad-guys.example and use this to attack the target with tls-sni-01 challenges.
So, the replacement ACME challenge doesn't rely on SNI it uses ALPN instead. Also some people actually tested to check that Apache isn't also dumb enough to go "Um, I don't recognise this ALPN, I guess that means I should press on anyway and cause breakage" which fortunately it is not.
Unless someone successfully preforms a MITM attack on letsencrypt but then all bets are off.
To summarize TFA: lets encrypt is now verifying domain ownership from multiple data centers. The idea being if someone tries to mitm the verification process (through bgp hijacking or whatever) its much harder to do that across the entire internet and go unnoticed then it is to do it on just one network path
LE has been great for me.
You just don't stop answering challenges until the cert gets issued.
I don't know why anyone would have stopped answering challenges after the first request anyway. Surely the default assumption should be that everyone has network & processing failures, and hey maybe ACME would need to check again if something broke before the cert was signed.
Besides, your argument could be used to justify any price hike! "If you can afford X, then you can afford Y!"
I run a simple static website served with Nginx. I would like to know if this change has any impact on me.
I set that up originally for a wildcard, as http validation is not supported for them and I didn't fancy mucking about automating updating the main bind instances, but it is convenient for the others too and will be unaffected by these changes.
Not a perfect solution for everyone of course, copies of all the keys are in one place for one thing, and it all in one place could be bad or good for maintenance (single point of failure, but single service to monitor & maintain), but worth considering if you expect problems with http validation.
> some countries and their IP ranges just need not access my server
I'm guessing that they won't be using locations that are commonly blocked in this way anyway. And if they do happen to use one, you may be fine as only two of the three external checks need to be responded to.
Let's encrypt will only check the DNS entry once, if it doesn't find it, it fails the authentication process and doesn't retry (contrary to the specs).
Still unexperienced with letsencrypt, but I know enough that I cannot use the standard way.
Therefore ACME's DNS request for checking via DNS validation is validated directly by the tiny DNS server due to the CNAME record directing traffic to it.
I've never done this my self neither, but I think it would be along those lines.
Though that isn't actually how I do it (I'm using dehydrated with my own hook script to update a bind9 instance) but probably would be if I started again from scratch.
You first set up a VM and set up your favourite authoritative DNS software on it: popular choices are ISC's BIND and NLnet's NSD. Either will do. Call it (e.g.) ns-dnsauth.mydomain.com, which is Internet accessible only on udp/53 and tcp/53.
You have to then configure that DNS server to serve the domain (e.g.) dnsauth.mydomain.com.
Next you configure the DNS server software to allow dynamic updates. For ISC BIND, you can set up (crypto) keys and use the nsupdate(1) utility:
* https://www.zytrax.com/books/dns/ch7/xfer.html#allow-update
* https://dan.langille.org/2017/05/31/creating-a-txt-only-nsup...
Point your public/external DNS records to your delegated-auth server by having (say) _acme-challenge.www.mydomain.com be a CNAME to (say) _acme-challenge.www.dnsauth.... LE will follow the CNAME and try to do the verification against the record in dnsauth sub-domain that lives on the ns-dnsauth VM.
Then you have your LE/ACME client(s) run a hook script to publish (and cleanup) the dns-01 TXT challenge records:
* https://dan.langille.org/2017/07/04/acme-sh-getting-free-ssl...
* https://github.com/dehydrated-io/dehydrated/wiki/example-dns...
The LE client goes to the LE API, gets a verification token/nonce, executes the the hook script to push the TXT record to ns-dnsauth, the LE folks verify the record, the LE client (ideally) cleans up the TXT record, receives the cert for the LE API, puts it in the correct path and restarts your (web) service(s).
Someone actually wrote a limited-functionality DNS server that allows for pushing of records via a REST API for this purpose:
* https://github.com/joohoi/acme-dns
This way the 'heavier' BIND/NSD software doesn't have to be used, as those have more features than are needed.
Either way, letsencrypt will probably have a somewhat fixed pool of these challenge validation IP addresses/ranges, so adding those to a white list should probably work with a strict firewall.
But that's a wrong metric to optimize for. Cutting down the number of "attacks" by 90% doesn't improve your security. If your server has a vulnerability that can be picked up by script kiddie scanners, changing the default port only delays the inevitable.
Only you can talk to sensitive ports. And the server is available to the rest of the world for non sensitive things. And if you connect from a new IP, within 5 min you have access to the server (I have a scheduled task that updates the IP list with my current IP so I usually don’t even wait).
It’s about as useful as wearing a condom 50% of the time.
If you weren't trying to say that, my mistake.
> Either way, letsencrypt will probably have a somewhat fixed pool of these challenge validation IP addresses/ranges, so adding those to a white list should probably work with a strict firewall.
They won't publish the ranges as far as I've read.
Really, do give it a try.
Your idea of just randomly blocking access from certain IP address ranges doesn’t really provide you with any security at all. If you’re worried about rusaian hackers or whatever, most people exploiting anything have access to botnets with whatever bespoke IP address ranges they need to bypass those sort of rules.
In anti fraud we see this commonly, people using stolen details will happily get better matches with GEOIP than the legitimate users of the credentials. Blocking specific countries IP allocations is just providing a false sense security on your part.
Run your own DNS server and get a registrar lock. If that is not feasible, and consultants are too expensive, I would look into the more expensive dns providers that provide custom interface that fit the threat model of your system. If that is also too expensive then I would take a second look at the risk analysis and recalculate the cost of each risk.
Do you really think you're stopping anyone in .cn who wants to actually connect to your server from doing so?
Proxies and botnets are a thing.
(Taking 5MB and 2s to send 500 words of text can do that, but since the primary audience of Let's Encrypt is web folks, there's some schadenfreude in my weltschmerz.)
Edit: Ah, upon testing it breaks if you have 1st party JS allowed but not 3rd party. This is pretty reasonable in my opinion.