nginx / njs-acme

Nginx NJS module runtime to work with ACME providers like Let's Encrypt for automated no-reload TLS certificate issue/renewal.
Apache License 2.0
70 stars 11 forks source link

Cross-check hostnames in config with hostnames in certificate #23

Closed zsteinkamp closed 1 year ago

zsteinkamp commented 1 year ago

Currently, if /acme/auto is requested and the certificate is present and more than 30 days away from expiring, then no action is taken.

This is a problem if the operator changes the hostname configuration (NJS_ACME_SERVER_NAMES variable) while the certificate is still in its validity period because the new hostname(s) in the configuration will not be supported by the existing certificate.

This request is to validate that the hostnames in the stored certificate match the hostnames in the njs_acme configuration. If they don't match, then we should kick off a new cert request.