letsencrypt / letsencrypt/boulder

VA: Only use `prob` to reflect problems outside our infrastructure

Open
#8,747 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
5.8k
Forks
649
Avg merge
3d 23h
Merged PRs (30d)
24

Description

Lots of code in the VA package handles probs, often returning them when something has gone wrong. On the one hand, this makes sense: the ACME spec defines several problems that have to do with validation, and we want to ensure that we can properly store and return problems of the appropriate types when the client checks their authz state.

However, we also return lots of probs.ServerInternal when something has gone wrong in our own infrastructure, like a failed gRPC connection. This is bad, because it makes it very hard to tell the difference between problems that merely need to be stored and problems that are much worse.

As an example, see va.doRemoteOperation. It returns an MPIC summary and a problem, and often both are non-nil. Sometimes that problem is "some RVAs didn't see the right token", which is a simple validation failure. Sometimes that problem is "the result the RVA returned was malformed" or "we couldn't reach an RVA", which are also validation failures, but they're our fault, not the applicant's. And sometimes that problem is "we aren't even configured with enough RVAs to attempt MPIC", in which case the summary is nil.

We should ensure that all issues within our own infrastructure are returned as errors, and all mere validation issues are returned as problems. We can convert our own issues into problems at the boundary of the VA, for storage in the SA.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the VA package and va.doRemoteOperation, including how its MPIC summary and problem are consumed at the VA-to-SA boundary. Identify which outcomes are validation problems versus failures in Boulder’s infrastructure, and verify that storage receives converted problems only for the former while infrastructure failures remain errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
backend, security
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.