Repository navigation
test: Check that a deployed snippet checks the log's accepted roots - #74
Merged
Merged
Conversation
npm run test:roots sends the log identified by CTREQ_LOG_URL one certificate whose issuer isn't a root. The local snippet built for the log's zone must reject it with root-not-accepted (else the check is skipped), and the deployed snippet must too, confirming that the zone's current snippet, with its lists of accepted roots, is the one deployed. Were the deployed snippet to forward it, the log would reject it itself, so nothing is logged. test:forwarding and test:roots share outputFor(), which finds the snippet to deploy for a log's hostname. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.
What
Adds
npm run test:roots(test/roots.mjs), a fourth check of a deployed log. Until now, nothing checked that a deployed snippet actually appliesroot-not-accepted. WithCTREQ_LOG_URLset,npm testonly sends requests that the local snippet rejects forlog.example.com, which has no roots list.test:resubmitonly shows that real entries aren't falsely rejected.dist/) must reject it withroot-not-accepted. If that snippet has no roots list for the hostname, e.g. alocalhostURL, the check is skipped with an explanation.X-CTreq-Reject: root-not-accepted. A Cloudflare error page, or the log answering itself, fails the check: the failure message asks whether the zone's current snippet is the one deployed.test:forwardingneeds a production log.test:forwardingandtest:rootsshare a newoutputFor()intools/build.mjs, which picks the snippet to deploy for a log's hostname. The README's "Testing a deployed log" section has a new row and subsection.Testing
localhostURL: skipped;root-not-acceptedlocally for all eight Sectigo logs.npm testandnpm run test:minifiedpass.Co-authored-by: Copilot 223556219+Copilot@users.noreply.github.com