Rework certificate handling. #532
Open
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.
In Zulip Server 4.9-0, we started unconditionally installing
certbot, leading to/etc/letsencryptalways existing in the container, and breaking the symlinking of it into/data/, and certbot certificates in general.Rework how certificates are obtained and stored. Certificates are now stored in subdirectories of
/data/certs/, so that auto-generated certificates (either from certbot, or self-signed) cannot ever overwrite manual certificates. Only the data parts of/etc/letsencryptare stored in the data volume; the general configuration aspects and hooks are left for Puppet to configure.We swap
certbot-deploy-hookfor overwriting the/etc/letsencrypt/renewal-hooks/deploy/050-nginx.shhook, leaving the other hooks (for symlinking, and restarting the email server) untouched. The core Zulip Server behaviour of symlinking the certbot certificates into/etc/ssl/is left untouched; we deal with persistence and backup by dint of storing the/etc/letsencryptin the data volume.Fixes #381.
Fixes #489.
Requires zulip/zulip#36803.