Repository navigation
Conversation
…o start Caddy on a bad bundle
… writer goroutine
…sleep past ValidBefore
…gation checks are disabled
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
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.
Supersedes #82, #83 and #84. This PR fixes the issues they found, plus others from a
full audit of the server, client, Caddy plugin and tools. Each commit is small
and stands on its own, so the PR can be reviewed commit by commit.
Config breaking changes are listed in
docs/breaking-changes-v0.8.0.md.Security
plain HTTP.
token. Unknown values are rejected on the server,the client and the Caddy plugin.
os.Exit. Thebundles are loaded once at startup, and Caddy refuses a config with a bad
bundle.
--test(TLS verification off) and when a token is sent to anhttp://URL.only after the account registers, and only replaced with
--force(
certdx_tools google-account -f).stream panic is recovered. On the client, a response without a TLS
certificate ends the stream with an error instead of crashing.
Correctness
domain.Canonical), covering case,order, duplicates and a trailing dot. Empty domain sets are rejected by the
server, the client and the Caddy plugin.
cache.jsonentries from olderversions are canonicalized when loaded.
the cert is being issued, then answers 503.
ValidBeforestays in the future and within the issued cert's lifetime.ValidBefore.host[:port]nameservers, required S3 fields.
domain set, same name in gRPC mode, same file path).
disableCompletePropagationRequirementkeeps its behavior, but nowlogs a prominent warning, plus another when
conservativeDnsCheckoverrides it.
Reliability
cache.jsonis written atomically. Renewed certs are savedsynchronously, and the cert store uses a mutex instead of a writer goroutine.
is bounded by a 5 minute timeout.
retryCounttimes (30s→90sbackoff) before switching from main to standby. If both fail, the client
waits 1h and starts again from main. It always goes back to main after a
success, because main and standby may issue from different CAs.
races.
Provision.Refactors
and offers are deduplicated by entry sequence.
dns01Options).Testing
go vetandgo test -race ./pkg/...pass, along with theexec/caddytlsunit tests.
cd test/e2e && go test -tags e2e ./..., about 375s(was about 257s). Most of the extra time comes from the 5s minimum
renew-check interval and the longer HTTP retry waits.
handling, renew scheduling, config validation, atomic writes, HTTP failover
and the Caddy JSON defaults.