Repository navigation
wfe: use RFC 8555 problem types for url and CSR identifier mismatches - #582
Open
thedaemon-wizard wants to merge 2 commits into
Open
thedaemon-wizard wants to merge 2 commits into
thedaemon-wizard wants to merge 2 commits into
Conversation
A JWS whose "url" header parameter is not the request URL is now rejected as unauthorized instead of malformed. RFC 8555 Section 6.4: "If the two do not match, then the server MUST reject the request as unauthorized." A finalize request whose CSR identifiers differ from the order's now gets badCSR instead of unauthorized, as Section 7.4 says the problem document SHOULD use for that case. This covers a different or missing DNS name or IP address, and a different number of either. The checks of the inner JWS of a key rollover are unchanged. Fixes letsencrypt#581
aarongable
reviewed
Dec 3, 2026
Comment on lines
+962
to
+963
| // RFC 8555 Section 6.4: "If the two do not match, then the server MUST | ||
| // reject the request as unauthorized." |
Contributor
There was a problem hiding this comment.
I think this comment is unnecessary; a reader won't read this and wonder "why are they using Unauthorized here?".
Suggested change
| // RFC 8555 Section 6.4: "If the two do not match, then the server MUST | |
| // reject the request as unauthorized." |
Comment on lines
+2223
to
+2225
| // RFC 8555 Section 7.4: when the CSR and order identifiers differ, the | ||
| // problem document SHOULD use error code "badCSR". | ||
|
|
Contributor
There was a problem hiding this comment.
Same here, especially detached from the places where BadCSRProblem is actually being returned.
Suggested change
| // RFC 8555 Section 7.4: when the CSR and order identifiers differ, the | |
| // problem document SHOULD use error code "badCSR". |
aarongable
requested review from
a team and
aarongable
and removed request for
a team
December 3, 2026 02:03
Author
|
Thanks, both comments are removed. The eggsampler/acme job stops before any test runs: eggsampler/acme has required Go 1.26 since eggsampler/acme@f5ffad2 (2 December), and this job runs Go 1.25.0 with GOTOOLCHAIN=local. It fails the same way on main: https://github.com/letsencrypt/pebble/actions/runs/46974592799 |
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.
Fixes #581.
urlheader parameter is not the request URL now getsunauthorized(403) instead ofmalformed(400). RFC 8555 section 6.4 says the server "MUST reject the request as unauthorized".badCSR(400) instead ofunauthorized(403), as section 7.4 says the problem document SHOULD use.The checks of the inner JWS of a key rollover are unchanged.
Tests:
TestURLMismatchIsUnauthorizedandTestFinalizeWithDifferentIdentifiersIsBadCSR(four cases) fail on main and pass here. Also checked locally:go test -race ./..., golangci-lint v2.12.2 with Go 1.25.0 (0 issues), and the eggsampler/acme test suite against this build (all pass).