boulder icon indicating copy to clipboard operation
boulder copied to clipboard

Split remote-va into separate implementation

Open aarongable opened this issue 5 years ago • 1 comments

When the RA makes a PerformValidation gRPC call to the VA, three things happen:

  1. the VA kicks off remote validations by making PerformValidation gPRC calls to remote VAs
  2. the VA performs its own validation
  3. the VA collates the results, with behavior controlled by the EnforceMultiVA flag

That looks like a recursive process. The only reason it isn't is that the remove VAs have different config files which don't set up connections to even more remote VAs. But they have all the same code paths: kick off remote validations, do their own, collate the results. This seems needlessly complex.

I propose that we split ValidationAuthorityImpl into two separate structs: the existing one and a smaller RemoteValidationAuthorityImpl. The simpler one will satisfy the same interface, but have a PerformValidation method that does not perform any recursive calls nor try to collate any results.

I believe this will make the code more readable, and will give us much more intuitive control over where and when we do things like log failures and increment metrics (cf. #4803).

aarongable avatar Feb 17 '21 19:02 aarongable

Plan: perform this split just to the degree that is necessary for https://github.com/letsencrypt/boulder/issues/7386, i.e. enough to give the RVA a separate config (maybe two tlsConfigs for different client/server setups, maybe no list of RVAs so it can never try to recurse) but not the full implementation split proposed above.

Once we have that in place, we can return to considering ways to simplify the RVA implementation itself.

aarongable avatar Apr 09 '24 18:04 aarongable