-
Notifications
You must be signed in to change notification settings - Fork 18
Description
Building a fresh node with your module using the DNS-01 mechanism with GoDaddy works mostly well. However, if we destroy a node that had already received its certificate, chain, and key files, we are unable to rebuild that node because we end up with a mismatched certificate/key pair. In my own testing, I was only able to rebuild an affected node by fully destroying both the affected node and the Puppet Server itself, then rebuilding them both! This is obviously not an ideal workaround.
Steps to reproduce:
- Build up a fresh Open-Source Puppet 5 Server with your module properly configured.
- Attach and build an Apache HTTPd node that also uses your module and requests a Let's Encrypt certificate via the DNS-01 mechanism for an SSL-enabled vhost.
- Note that after about 15 minutes and a few Puppet Agent runs on both the Puppet Server and the Apache HTTPd node, it works. [Aside: Please call this out in your README file; that it takes at least15 minutes and a minimum of 3 sequential Puppet Agent runs on the Puppet Server itself to actually obtain a signed certificate. So, if an unattended Puppet Server runs its Agent only once per hour, it will take over 3 hours to obtain a signed certificate!]
- Destroy the Apache HTTPd node. We do this deliberately to simulate disaster and other dynamic cloud scaling scenarios.
- Rebuild the Apache HTTPd node.
- Encounter the intractable error, "key values mismatch" even after the 15 minute minimum delay and any number of Puppet Agent runs on the Puppet Server and Apache HTTPd node.
There is no readily-identifiable way to resolve this error. I manually compared the private key and certificate files on the affected node and indeed, they are mismatched. I tried destroying the old certificate files from /etc/acme.sh/* directories on the Puppet Server for the affected node and repeating the request sequence in hope that your module would re-request fresh copies of the files from GoDaddy, but this had no effect; in fact, the certificate files are never recreated on the Puppet Server. This leaves me to suspect that you're caching the certificates in PuppetDB, which is cool except this needs to be clear in your documentation along with a direct means of flushing affected resources.
Please advise.