mirror of
https://github.com/dehydrated-io/dehydrated.git
synced 2026-01-13 15:13:33 +01:00
Wildcard cert plus apex domain fails DNS-01 challenge #287
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @erorus on GitHub (Feb 27, 2018).
If you make a Let's Encrypt cert for
*.example.com, it does not coverexample.com. This is normal. Most wildcard certs from other providers include the naked/apex domain in the SAN to cover it.The problem is that LE will validate both the wildcard and the apex domain using the same key:
_acme-challenge.example.com, and dehydrated is set up to deploy all challenge tokens before validation, even with HOOK_CHAIN="no".@lukas2511 commented on GitHub (Feb 27, 2018):
Wildcard certificates are validated at the upper level of domain (e.g.
*.example.comvalidates atexample.com).You can see that the script is actually trying to handle two authorizations for
example.com, one is for the wildcard certificate, the other for the normal domain, and there is no way for dehydrated to know which one is which.The corresponding tokens have to be in your DNS zone at the same time, or possibly one after another with very short TTLs or a 5 minute delay in the hook script, otherwise you'll have DNS caching issues.
My best guess would be that your hook-script is replacing the TXT record instead of appending new ones, this will result in a missing token.
It's confusing but there isn't really a good way around this, neither from the CA standpoint, nor inside dehydrated.
@erorus commented on GitHub (Feb 27, 2018):
Ah yes, I had forgotten that you can have multiple TXT records with the same name. I just now told my hook script to append the record instead of replacing it. Both values were then in DNS, and both were accepted by LE.
Thanks for your quick reply. 👍