Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RVA: Recheck CAA records #7221

Merged
merged 25 commits into from
Jan 25, 2024
Merged

RVA: Recheck CAA records #7221

merged 25 commits into from
Jan 25, 2024

Conversation

pgporada
Copy link
Member

@pgporada pgporada commented Dec 16, 2023

Previously, va.IsCAAValid would only check CAA records from the primary VA during initial domain control validation, completely ignoring any configured RVAs. The upcoming MPIC ballot will require that it be done from multiple perspectives. With the currently deployed Multi-Perspective Validation in staging and production, this change brings us in line with the proposed phase 3. This change reuses the existing MaxRemoteValidationFailures variable for the required non-corroboration quorum.

Phase 3: June 15, 2025 - December 14, 2025 ("CAs MUST implement MPIC in blocking mode*"):

MUST implement MPIC? Yes
Required quorum?: Minimally, 2 remote perspectives must be used. If using less than 6 remote perspectives, 1 non-corroboration is allowed. If using 6 or more remote perspectives, 2 non-corroborations are allowed.
MUST block issuance if quorum is not met: Yes.
Geographic diversity requirements?: Perspectives must be 500km from 1) the primary perspective and 2) all other perspectives used in the quorum.

  • Note: "Blocking Mode" is a nickname. As opposed to "monitoring mode" (described in the last milestone), CAs MUST NOT issue a certificate if quorum requirements are not met from this point forward.

Adds new VA feature flags:

  • EnforceMultiCAA instructs a primary VA to command each of its configured RVAs to perform a CAA recheck.
  • MultiCAAFullResults causes the primary VA to block waiting for all RVA CAA recheck results to arrive.

Renamed va.logRemoteValidationDifferentials to va.logRemoteDifferentials because it can handle initial domain control validations and CAA rechecking with minimal editing.

Part of #7061

@pgporada pgporada requested a review from aarongable January 3, 2024 03:32
@pgporada pgporada marked this pull request as ready for review January 3, 2024 03:33
@pgporada pgporada requested a review from a team as a code owner January 3, 2024 03:33
Copy link
Contributor

@aarongable aarongable left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've only reviewed the production code so far, haven't taken a look at tests yet, but figured I should send comments so you'd have them quickly anyway.

High level comment: it's slightly surprising for the two processRemote...Results functions to call through to a shared helper with some metadata for log/error messages, but for the two performRemote... functions (which are similarly identical) to be wholly independent. I don't have a strong opinion on which (or leaving things as-is!) is better -- on the one hand, sharing code is generally good; on the other hand, the metadata construct is a little awkward; on the third hand, simply the fact that the two performRemote... functions call a different underlying gRPC method may be enough argument that they should remain separate. I just want to make sure we think about it.

va/proto/va.proto Outdated Show resolved Hide resolved
va/caa.go Outdated Show resolved Hide resolved
va/va.go Outdated Show resolved Hide resolved
va/caa.go Outdated Show resolved Hide resolved
va/va.go Outdated Show resolved Hide resolved
va/caa.go Outdated Show resolved Hide resolved
va/caa.go Outdated Show resolved Hide resolved
}).Observe(recheckLatency.Seconds())
}
}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Question for the future (not this PR): do we want IsCAAValid to be producing and audit logging a structured logEvent, just like PerformValidation does? I think we will want that (or something similar) eventually, given the MPIC ballot's logging requirements.

Copy link
Member Author

@pgporada pgporada Jan 12, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a great idea. We could edit the caa-log-checker to handle this case too in a followup PR.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The authz ID is not currently passed to IsCAAValidRequest unlike PerformValidationRequest ([1] and [2]) which allows logging enough data to determine which sufficiently old authz triggered the CAA check. I think we do want that, but it would need to be done in a separate PR, get deployed to staging/prod, then accessed here once the protobuf change has been successfully rolled out.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From sprint planning, I'll make the protobuf change as a followup PR.

va/caa.go Outdated Show resolved Hide resolved
va/caa.go Outdated Show resolved Hide resolved
ra/ra_test.go Outdated Show resolved Hide resolved
va/va_test.go Outdated Show resolved Hide resolved
va/va_test.go Outdated Show resolved Hide resolved
va/va_test.go Outdated Show resolved Hide resolved
va/caa_test.go Outdated Show resolved Hide resolved
va/caa_test.go Outdated Show resolved Hide resolved
va/caa_test.go Outdated Show resolved Hide resolved
va/caa_test.go Outdated Show resolved Hide resolved
va/caa_test.go Outdated Show resolved Hide resolved
va/caa_test.go Outdated Show resolved Hide resolved
@pgporada pgporada marked this pull request as draft January 9, 2024 21:17
Copy link
Contributor

@pgporada, this PR appears to contain configuration changes. Please ensure that a corresponding deployment ticket has been filed with the new configuration values.

@pgporada pgporada requested review from aarongable and a team January 16, 2024 21:48
@pgporada pgporada marked this pull request as ready for review January 16, 2024 21:48
Copy link
Member

@beautifulentropy beautifulentropy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall this looks great! I found a couple of small changes that could deduplicate logic and improve clarity.

va/caa.go Outdated Show resolved Hide resolved
va/caa.go Outdated Show resolved Hide resolved
va/caa.go Outdated Show resolved Hide resolved
va/dns_test.go Outdated Show resolved Hide resolved
va/va.go Outdated Show resolved Hide resolved
va/va.go Outdated Show resolved Hide resolved
va/caa.go Show resolved Hide resolved
va/caa.go Outdated Show resolved Hide resolved
va/caa.go Outdated Show resolved Hide resolved
va/caa_test.go Outdated Show resolved Hide resolved
va/caa_test.go Show resolved Hide resolved
va/caa_test.go Outdated Show resolved Hide resolved
va/caa_test.go Outdated Show resolved Hide resolved
aarongable
aarongable previously approved these changes Jan 25, 2024
@pgporada pgporada merged commit 03152aa into main Jan 25, 2024
19 checks passed
@pgporada pgporada deleted the rva-caa-recheck-hooray branch January 25, 2024 21:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants