Repository navigation
Description
"Subproblems" (RFC 8555 Section 6.7.1) offer a way for Boulder to break down one top level probs.ProblemDetails to provide additional per-identifier subproblems. This is valuable principally for handling NewOrder and FinalizeOrder requests where there may be up to 100 identifiers in the order/CSR and each could have a potential problem (e.g. see #3727 and policy errors).
Adding subproblems to Boulder is a little bit tricky. The probs package needs to handle ACME identifiers for subproblems and that makes a circular import depedency with the core package that currently defines the core.AcmeIdentifier type. We also have to contend with the berrors package and supporting a way to define suberrors internal to Boulder that can map to subproblems at the WFE level.
We chatted about this rough approach in sprint planning:
- Move the
AcmeIdentifiertype and associated bits out ofcore. Nobody likes the grab-bag core/util package design and this is a fundamental type. That fixes the import cycle. - Add a
SubProblemDetailstype inprobsthat composes aProblemDetailsand aAcmeIdentifier. - Update
ProblemDetailsto have aSubproblemsfield that is a slice ofSubProblemDetails. - Update the problem constructors to take an optional map of
AcmeIdentifiertoSubProblemDetailsto include as the top-level problem's subproblems. - Do similar with
berrorsto allow sub-errors. - Update
web/probs.goto convert sub-errors to sub-problems. - Update relevant parts of Boulder to construct problems with sub-problems.
We are OK choosing to not strip the Subproblems from WFE1 responses. Only clients that fail in the presence of a new key in a JSON problem will balk at this additional debug info and it is only included when the overall request has already failed.
Activity
cpu commentedon May 2, 2019
One other thing we need to consider is the database serialization of these problems in authz/order error fields. The
authz2,orderandchallengestable all use aMEDIUMBLOBfor storing the serialized JSON. Adding subproblems for up to 100 names will inflate the size of the JSON being serialized for this column and we should take care to limit the number of subproblems and their length we'll return based on this constraint (or increase the field size?).Implement suberrors & subproblems (#4227)
Implement suberrors for policy blocked names. (#4234)
RA: Use suberrors when rechecking CAA. (#4240)
cpu commentedon Jun 3, 2019
I think this issue is now resolved. Subproblems are implemented and used in the places I think make the most sense. There may be other places in Boulder that would benefit from subproblems but I think we should address those as they arise with new tracking issues.