Skip to content

Implement RFC 8555 Subproblems #4193

Closed
Closed

Description

@cpu

"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:

  1. Move the AcmeIdentifier type and associated bits out of core. Nobody likes the grab-bag core/util package design and this is a fundamental type. That fixes the import cycle.
  2. Add a SubProblemDetails type in probs that composes a ProblemDetails and a AcmeIdentifier.
  3. Update ProblemDetails to have a Subproblems field that is a slice of SubProblemDetails.
  4. Update the problem constructors to take an optional map of AcmeIdentifier to SubProblemDetails to include as the top-level problem's subproblems.
  5. Do similar with berrors to allow sub-errors.
  6. Update web/probs.go to convert sub-errors to sub-problems.
  7. 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

  1. cpu commented on May 2, 2019

    @cpu
    ContributorAuthor

    One other thing we need to consider is the database serialization of these problems in authz/order error fields. The authz2, order and challenges table all use a MEDIUMBLOB for 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?).

  2. added this to the Spring 2019-05-07 milestone on May 7, 2019
  3. cpu commented on Jun 3, 2019

    @cpu
    ContributorAuthor

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions