103 points · by pabs3 · 2y ago · 29 comments
I renew certs for several boring things like nginx instances, but also things like my printer’s web portal, a Synology NAS, and a Unifi console that require bespoke commands to reload the cert.
I’ve got monitors that fire if any of my certs drop below 27 days before expiry, and over the past ~2 years, 100% of the problems have been with the custom hooks. I’ll log into the server and find that it did reissue the cert, but the command to make the Synology ingest the new cert failed for some arcane reason. The servers where it’s just running systemctl restart nginx or similar don’t fail.
https://github.com/acmesh-official/acme.sh/commit/2ce145f359...
It's also cleared out my .account.conf files when run on the suggested cron.
I've started using updown which also monitors my TLS certs simply because I no longer trust the process to work as documented.
I was a bit mad at certbot for having chosen snap as its recommended installation platform, but my solution to use pypi + CD seems to be quite stable (famous last words).
The go services I run with autocert have had no manual intervention ever since the ACMEv2 move.
https://eff-certbot.readthedocs.io/en/latest/install.html#al...
It uses Lego under the hood to issue certs, and then has custom connectors to upload to destinations. Right now those are email (indeed, more humans handling certificates), sftp, and hetzner load balancers. I'm working on adding the ability for it to automatically renew and re-upload when certs are 30 days from expiration.
> Get certificates for remote servers - The tokens used to provide validation of domain ownership, and the certificates themselves can be automatically copied to remote servers (via ssh, sftp or ftp for tokens). The script doesn't need to run on the server itself. This can be useful if you don't have access to run such scripts on the server itself, as it's a shared server for example.
* https://dan.langille.org/2019/02/01/acme-domain-alias-mode/
* https://www.eff.org/deeplinks/2018/02/technical-deep-dive-se...
So if you want a cert for www.internal.example.com, you will first have do a one-time change to have a _acme-challenge.www.internal… CNAME created to point to any other (sub-)domain where you can easily update things dynamically, e.g., www-internal.example-dnsapi.com.
When request the cert for "www.internal…", LE/ACME will look up the corresponding _acme-challenge record, and go to "_acme-challenge.www-internal.example-dnsapi.com. The nonce token will be there in the 'final' destination following the CNAME in a TXT record, which shows LE/ACME that you control the DNS chain.
To do the DNS updating, you can use a CLI/Python library like Lexicon, which supports dozens of APIs:
And given the number of internal applications many large/r organizations have, giving all those internal dev teams update access to the main corporate domain is not something I'd really feel comfortable doing.
But being able to give API access to (e.g.) foo.dnsauth.example.com is something I have done: main domain needs to be touched once for the CNAME, and the sub-domain isn't critical for day-to-day operations of a company.
But yes, if you want a certificate for a name that isn't accessible externally and can't be made accessible externally, dns-01 works.
https://smallstep.com/docs/certificate-manager/acme/
At least they are doing a lot of "your own organizational PKI" tools and they care about ACME integration.
Disclosure: I work for Venafi
But because it's this giant behemoth involving multiple industries, technological components, and vested interests, it will never change, save to implement bandaid after bandaid after hack after kludge. Literally the only thing that changes it is when someone with enough power (a market-dominant browser) forces it and everyone has to comply, or face creating a total shit-show due to lack of conformance. And we're all hopelessly dependent on it so it's not like we can do anything about it. The security of the web is a Kafkaesque nightmare.
If your "libre" plan does not involve a way to bring those entities onboard and direct priority to servicing their needs, then no one is going to use it because we all actually live in the real world where those are the things we need security in communicating with.
I would prefer a "kinda federated" model where the owner of a domain registers a private key with a Domain Registrar, and CAs send CSRs to Domain Registrars to validate, and when the CA issues a cert, the browser can validate the registrar signed it (and who the domain's registrar is). That avoids all 9 unique attacks on CA validation, and more importantly, actually cryptographically verifies if the CA should issue a cert, which does not happen at all today.
It may just as well mean more capable audits to detect lost/compromised keys.
The article also says nothing of certificate validity periods, which are critical to their lifecycle and analysis.
The conclusion that humans degrade information security is true but ultimately removed from the reality of operating a business.