Fix ssl-certs-cron: replace unmaintained simp_le with certbot - #297
Merged
Conversation
simp_le's bundled acme dependency crashes on import against modern cryptography/pyOpenSSL (AttributeError: module 'OpenSSL.crypto' has no attribute 'X509Extension'), silently breaking automatic cert renewal and leaving the expired cert in place indefinitely since the self-signed fallback only triggers when no cert files exist at all. Replace simp_le with certbot (pinned alongside compatible cryptography/pyopenssl versions), run in webroot mode against the same nginx-shared challenge path, then copy the issued cert/key files into /certs/ under their existing expected filenames so nginx and the rest of the compose stack are unaffected.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ssl-certs-cron's renewal script (docker/ssl-certs/update-ssl-cert.sh) usessimp_le, an unmaintained ACME client. Its bundledacmelibrary crashes on import against currentcryptography/pyOpenSSL(AttributeError: module 'OpenSSL.crypto' has no attribute 'X509Extension'), so renewal has been silently failing.https://laxy.io's cert to actually expire in production.simp_lewithcertbot, pinned alongside compatiblecryptography/pyopensslversions, run in webroot mode against the same nginx-shared ACME challenge path already mounted into the container. Certbot's issued files are copied into/certs/under the same filenames (cert.pem,chain.pem,fullchain.pem,key.pem) nginx and the rest of the compose stack already expect, so no other service config needs to change.Test plan
docker buildthe updateddocker/ssl-certsimage locally — builds cleanly,certbot --versionruns without the previousX509Extensioncrashcertonly/webroot flags used in the script (--cert-name,--keep-until-expiring,--register-unsafely-without-email) are valid for the installed certbot versionbash -nsyntax check on the updatedupdate-ssl-cert.sh