- set up a server to run the acme client and submit requests to Let's Encrypt for every subdomain that needs a cert (s1.example.org, s2.example.org, etc etc)
This does not need to be on a server. This can just be your work machine, or another work machine. I do this from my laptop all the time.
The DNS-01 authorization works by inserting a TXT record onto:
_acme-challenge.example.com
for example.com
_acme-challenge.subdomain.example.com
for subdomain.example.com
_acme-challenge.subdomain-alt.subdomain.example.com
for subdomain-alt.subdomain.example.com
- etc.
LetsEncrypt will follow CNAME records, so you can either:
- Manipulate the primary DNS records, or
- CNAME the _acme-challenge record onto another system.
I prefer to use both CNAMEs and acme-dns. You can use CNAMEs with any DNS provider. The benefit of using CNAMEs onto a secondary DNS provider, is that you can be less worried about the credentials being compromised. This is the best-practice and essentially required if you run the Acme Client from an internet connected server - you don't want to risk a server compromise leading to control of all DNS records or potentially domain registration.
This concern is largely explained in this blog posting: A Technical Deep Dive: Securing the Automation of ACME DNS Challenge Validation | Electronic Frontier Foundation
An alternate option is if you have a primary DNS system that offers granular control of token credentials. I.e. you can configure a token to only alter CNAME TXT records, or select TXT records. I believe Azure and Route53 both support this.
The general flow of the DNS-01 challenge, using Certbot as an example:
Variation A - Direct DNS Control: a dns-01 plugin will manipulate the DNS records, you shouldn't have to do anything differently for onboarding or renewal.
Variation B - Secondary DNS CNAME: this varies by plugin/dns provider, but in general: the client will pause during onboarding and ask for the CNAME's target, you set that up manually, and the client will then manipulate the target record instead of the source record. renewals should not pause, and just use the stored credentials for the target record.
The big work effort here is either in:
- ensuring you have locked-down credentials that can only alter the relevant
_acme-challenge
TXT records (if you have a DNS provider with granular control), or
- setting up the secondary DNS system, whether it is a vendor or self-hosted
The onboarding of every domain will either be generating a new credential or expanding the existing token to handle the new acme-challenge DNS entry, or creating the CNAME record from the primary to secondary system.
set up a script or client to publish the certs to our internal key vault for distribution.
If you use Certbot, there is a "post-deploy" hook to leverage for this. I like to script these things with Fabfile.org
I hope that makes sense.