Repository navigation
feat(use-cases): add a certbot example - #40
Merged
Merged
Conversation
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.
A runnable example of certificates from certbot: certbot gets and renews the certificate with
--webroot, and Synapse serves it without a restart. Embedded ACME is deprecated andreverse-proxy-wafalready points readers to certbot; there was no example of how.use-cases/certbot/: Synapse proxy mode withproxy.certificates: /etc/letsencrypt/liveandacme.enabled: false; the challenge path routed to an nginx webroot by a second path entry; Pebble (the ACME test server) and certbot in compose; a demo script. Index rows in both READMEs.Run
With a 0.8.9 build mounted into
ubuntu:24.04(the published image does not exist yet), Pebble 2.9.0, certbot 2.11.0:livedirectory, Synapse does not start:proxy.certificates directory "/etc/letsencrypt/live" does not exist./upstream's answer and certbot reportsunauthorized. The first draft's route key with a trailing slash did not match; the README says to write it without.make lintandmake testpass (36 sets passed, 2 skipped)./carriesforce_https: true; the challenge route does not. With the challenge route left out, the CA is redirected to HTTPS and certbot reports aconnectionerror (tls: handshake failure).Not run
SYNAPSE_IMAGEoverrides it.First certificate
A first issuance could be missed by 0.8.9-rc.2 and earlier: certbot makes
live/<name>/and its links within a fraction of a millisecond, and under load Synapse saw only the directory and ignored it. That is fixed on the 0.8.9 branch. Against a build with the fix, the first certificate was served at the first poll in 10 of 10 runs ofdemo.shand in 10 of 10 runs with Synapse sharing one CPU with two busy loops. The same starved runs on a build without the fix served it 1 time in 10. The renewal showed a new serial with no restart in each of the 10 idle runs.Code-reviewed: ad08d3e — 3 findings
force_httpson/only, and the control re-run--email admin@example.com, which Let's Encrypt refuses: fixedNot re-reviewed: d7e7763 — should-fix batch, config and docs only
Not reviewed: 539b64c — docs only