DNS alias mode (2020)
github.com
github.com
I have this implemented (with help) for the libdns plugin for DuckDNS, which can be used with Caddy. https://github.com/caddy-dns/duckdns#challenge-delegation
So basically, you can use a free https://www.duckdns.org/ domain to solve DNS challenges, for your domain which may be managed by any other DNS provider.
I do this with my domain I have registered with Google Domains, because they have no API at all right now.
Deep dive on ACME DNS validation works:
* https://www.eff.org/deeplinks/2018/02/technical-deep-dive-se...
* https://github.com/AnalogJ/lexicon
This way you only have to write one set of boiler plate in case you use multiple providers (or want to change providers).
To use a hypothetical automated DNS/HTTP hybrid, you would need to do all of (possibly proceeding in parallel) the following:
* Write up technically how it works. You likely want a complete ACME challenge method through the IETF process (ie you're writing an RFC probably with the ACME working group)
* Get both groups at CA/B (the public Certificate Authorities, and the Browser vendors) to vote in favour of a change adding this new method to the Ten Blessed Methods (section 3.2.2.4) with a condition allowing wildcards.
* Get at least one publicly trusted CA to actually offer your new method to subscribers for wildcard certificates.
This isn't at all impossible, but any two of those alone aren't enough to make it happen, you need all three. Personally I don't think this hybrid seems safe, and so I wouldn't support it, but I don't decide any of this.
1. For many domains, you cannot just pick any random subdomain and expect that you can reach a server there.
2. For services where users share the same domain (e.g. *.github.io), proving ownership of a single random subdomain won't be enough, because you could just create that domain as a response to the ACME challenge. But that doesn't prove that you have complete ownership over github.io.
I cannot come up with any HTTP-based validation scheme that would prove ownership of all subdomains for a domain.
Either (a) no one thought of cross-protocol validation signalling, or (b) they thought of it and concluded that it was too convoluted and easy to screw up.
As to why no HTTP check, an observation from another recent thread on LE/ACME:
> For example, `nrmitchi.com` is pointed at Netlify. Netlify can obtain a certificate for `nrmitchi.com` (and `www.nrmitchi.com`, which is also pointed at them). It does not allow Netlify to obtain a cert for `.nrmitchi.com`, nor should it.*
* https://news.ycombinator.com/item?id=28244246#unv_28249719
I’m not seeing any reason for the CNAME technique; seems like the NS technique should be every bit as good, without needing another domain name (which costs money and is another moving part). I’d like to know if I’m misreading anything.
You can then have a small VM handle answering DNS queries just for dnsauth.example.com. Folks have written servers to do just this:
* https://www.eff.org/deeplinks/2018/02/technical-deep-dive-se...
You can have a CNAME _acme-challenge.example.COM point to _acme-challenge.example.ORG or a sub-domain like _acme-challenge.DNSAUTH.example.com.
At work we use the sub-domain method and just have a small non-HA VM with some scripts that allow ACME clients to update particular TXT records. Each ACME client is given an individual key and allowed to only update a particular record.
Folks have specifically written DNS servers to do just this:
* https://github.com/joohoi/acme-dns
However we used BIND with some custom scripting.
So my only choices are, take the risk and save that API token on my server, or just manually run a script that renews the certs on my own computer every three months.
If this works, we can create a new account on the registrar with just the one (not so important) domain, and create an API token for only that account.
However, it still doesn't seem like a perfect solution to me. For example, if that API token does get leaked, someone else could still create a certificate for your domain. But I guess that's still a lot better than using your token to transfer the domain to another person.
It would be great if registrars provided more fine grained control over the access an API token is granted.
If you add cloudflare you can use their DNS challenge. Most of the tutorials out there reference the global API key, but the more restricted one works too.
Setting up a subdomain as a separate zone within Cloudflare is only available to Enterprise customers.
But yes you could register a separate challenge domain for the trick described in this article, add it to Cloudflare, and then use a token scoped to only that challenge domain, and it'd be a reasonably safe thing to do.
Tying the security of the dns records of your website and the security of TLS certificates of your website into one shared fate setup is a terrible idea.