What’s the current state of the Let’s Encrypt / ACME python API, if indeed there is one?
I’m trying to script a renewal for wildcard domains. I already have a set of classes written against the my DNS provider’s (Linode) API so that I can manage the setup and removal of _acme-challenge TXT records, but I’ll need to do the following programatically, normally performed by certbot from the CLI:
- Possibly define a server at LetsEncrypt (acme-v02.api.letsencrypt.org)
- Register my account with the server
- Confirm my acceptance of IP address logging, if necessary
- Establish the DN for which to generate a wildcard cert
- Retrieve the DNS challenge cookies
- Kickstart the key/cert generation
- Retrieve the cert, key and chain PEM files for local use
The rest is just python programming, Once I have the DNS challenge cookeis I can programmatically create DNS records for them, and handle the file placement, symlinks and data structures as necessary on the local end.
I note that there are a lot of python modules and files under /usr/lib/python3/dist-packages/certbot/ but a comprehensive guide to registering with the API and programming against it will be really helpful. Does such a beast exist? I can always RE the code in /usr/bin/certbot but I always prefer good API documentation.