Closed
Labels
area: acmearea: error handlingpriority: significantIssues with higher than average priority that do not need to be in the current milestone.
Description
This is to make use of boulder's work at letsencrypt/boulder#4193. I think a good starting point here is just making sure the field is properly parsed and displayed to the user.
I'm putting this in the next milestone because I think doing this is both valuable and shouldn't be too difficult.
Reacted by Daniel McCarney
Metadata
Metadata
Assignees
Labels
area: acmearea: error handlingpriority: significantIssues with higher than average priority that do not need to be in the current milestone.
Activity
cpu commentedon Jun 3, 2019
The Boulder side of this work is completed as of caf6553. You might find this integration test helpful as a starting point for making a
newOrderrequest that will return subproblems.Agreed 👍 The existing code seems to pull out the type/detail field of the problem instead of displaying it raw:
certbot/certbot/auth_handler.py
Lines 437 to 441 in 12ab59e
I think that's sensible but I noticed it made for a bad experience when I was testing sub-problems if Boulder returned a naive top level problem with a detail like "NewOrder request invalid. See sub-problems".
To try and account for this I made an effort to include at least one identifier in the top-level problem detail anywhere we return a problem with sub-problems so that clients like Certbot that display only some fields of the top-level problem will still be giving actionable information. Adding explicit display of the sub-problems will be a big improvement 🎉
Whoever picks this up can feel free to ping me with further q's!
adferrand commentedon Jun 3, 2019
Hello @cpu!
From the RFC 8555, I see that an error containing subproblems will have the key
subproblemsin the JSON representing the error. Testing if the key exists and does not contain an empty object or assimilate, would be a reliable way to trigger a suitable display logic on client side, right?adferrand commentedon Jun 3, 2019
One potential complex situation I see here to handle.
The
acmemodule in Certbot implements a message error as an object with atyp(andcode) parameter, calculated from thetypereceived in the JSON from ACME server. This is used in someplaces to trigger some specific branches, like here:certbot/acme/acme/client.py
Lines 1180 to 1185 in 18797dc
In theory, an error with sub-problems may contains a specific type like
badNoncein one of the sub-problems, with another more generic error at the top-level.So I imagine that we need to implement in our own representation of ACME error messages (
acme.message.Errors) some ad-hoc methods to match a given error code not only at the top level, but also in sub-problems if they exist.@bmw, your thought on this?
cpu commentedon Jun 3, 2019
Yup - that should be a reliable indicator. We use
omitemptyon the field in Boulder so it won't be present in the JSON if it is empty: https://github.com/letsencrypt/boulder/blob/f57f9a6c5586e49c9ba78289a08b375007f555ad/probs/probs.go#L45-L47bmw commentedon Jun 3, 2019
Thanks @cpu! Are there any areas where you expect Certbot's error output to get significantly worse as a result of these changes server side until we implement subproblems on our end? Also, when do you expect the use of subproblems to be enabled in production?
That's a good idea! My initial instinct on how to structure this part of the code is to add an optional
subproblemsfield toacme.messages.Errorwhich would contain a sequence of additionalErrorobjects along with a property likecodeswhich would be the sequence of all error codes in both the originalErrorand its subproblems.cpu commentedon Jun 4, 2019
I don't think there will be anywhere that gets significantly worse with perhaps one particular corner case. (If I turn out to be wrong about this I would definitely be willing to revisit it Boulder-side as the situation merits).
The one corner case where I expect Certbot (and likely other ACME clients) to take a small usability hit is the case where an RFC 8555 Order with many names is being finalized that has authorizations requiring CAA recheck (e.g. its authzs were validated >8hrs ago) and more than one recheck produces a CAA error.
Previously in this case Boulder joined all of the failing domain names into one (ugly) comma separated detail in the top level: https://github.com/letsencrypt/boulder/blob/6f93942a0449ea6bc0f6927c5e7520c1034f49b6/ra/ra.go#L905-L907
In the new sub-problem version the top level problem will only have the first erroring identifier and the remaining will be in the sub-problems. I think that's slightly inconvenient for users that can't see subproblems but it seemed like an acceptable trade-off when I implemented it.
Subproblem support is in release-2019-06-03 and should be going to staging today and prod on Thursday.
bmw commentedon Jun 4, 2019
That all sounds great. Thanks for the additional info.
I want to implement this soon, but I wanted to make sure there weren't any major downsides if we didn't get to this for a release or two.
7 remaining items
Add subproblems to errors (certbot#7046)
Add subproblems to errors (certbot#7046)
Add subproblems to errors (certbot#7046)
JamesBalazs commentedon Apr 1, 2022
I started looking at this yesterday in an attempt to get closer to a fix for #9251
Here's my initial PR: #9258
Review and any pointers would be greatly appreciated 🙂
Add subproblems to errors (#7046) (#9258)
Add subproblems to errors (certbot#7046)
alexzorin commentedon Apr 8, 2022
acmenow implements subproblems thanks to @JamesBalazs' work in #9258. Thank you.What remains is to review and implement the UX side of this. I've opened #9273 to track that.