Skip to content

Commit

Permalink
Remove the runtime mismatch checks for now
Browse files Browse the repository at this point in the history
  • Loading branch information
beautifulentropy committed Nov 22, 2024
1 parent 18c6f83 commit fbaadbf
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 52 deletions.
10 changes: 0 additions & 10 deletions va/va.go
Original file line number Diff line number Diff line change
Expand Up @@ -481,16 +481,6 @@ func (va *ValidationAuthorityImpl) performRemoteValidation(
for _, i := range rand.Perm(remoteVACount) {
go func(rva RemoteVA) {
res, err := rva.PerformValidation(subCtx, req)
if res == nil {
responses <- &response{rva.Address, rva.Perspective, rva.RIR, res, err}
return
}
if rva.Perspective != res.Perspective || rva.RIR != res.Rir {
err = fmt.Errorf(
"Remote VA %q.PerformValidation result included mismatched Perspective result=[%q] configured=[%q] and/or RIR result=[%q] configured=[%q]",
rva.Perspective, res.Perspective, rva.Perspective, res.Rir, rva.RIR,
)
}
responses <- &response{rva.Address, rva.Perspective, rva.RIR, res, err}
}(va.remoteVAs[i])
}
Expand Down
42 changes: 0 additions & 42 deletions va/va_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -332,48 +332,6 @@ func TestNewValidationAuthorityImplWithDuplicateRemotes(t *testing.T) {
test.AssertContains(t, err.Error(), "duplicate remote VA perspective \"dadaist\"")
}

func TestPerformValidationWithMismatchedRemoteVAPerspectives(t *testing.T) {
mismatched1 := RemoteVA{
RemoteClients: setupRemote(nil, "", nil, "dadaist", arin),
Perspective: "baroque",
RIR: arin,
}
mismatched2 := RemoteVA{
RemoteClients: setupRemote(nil, "", nil, "impressionist", ripe),
Perspective: "minimalist",
RIR: ripe,
}
remoteVAs := setupRemotes([]remoteConf{{rir: ripe}}, nil)
remoteVAs = append(remoteVAs, mismatched1, mismatched2)
va, mockLog := setup(nil, "", remoteVAs, nil)

req := createValidationRequest("good-dns01.com", core.ChallengeTypeDNS01)
res, _ := va.PerformValidation(context.Background(), req)
test.AssertNotNil(t, res.Problems, "validation succeeded with mismatched remote VA perspectives")
test.AssertEquals(t, len(mockLog.GetAllMatching("result included mismatched")), 2)
}

func TestPerformValidationWithMismatchedRemoteVARIRs(t *testing.T) {
mismatched1 := RemoteVA{
RemoteClients: setupRemote(nil, "", nil, "dadaist", arin),
Perspective: "dadaist",
RIR: ripe,
}
mismatched2 := RemoteVA{
RemoteClients: setupRemote(nil, "", nil, "impressionist", ripe),
Perspective: "impressionist",
RIR: arin,
}
remoteVAs := setupRemotes([]remoteConf{{rir: ripe}}, nil)
remoteVAs = append(remoteVAs, mismatched1, mismatched2)
va, mockLog := setup(nil, "", remoteVAs, nil)

req := createValidationRequest("good-dns01.com", core.ChallengeTypeDNS01)
res, _ := va.PerformValidation(context.Background(), req)
test.AssertNotNil(t, res.Problems, "validation succeeded with mismatched remote VA perspectives")
test.AssertEquals(t, len(mockLog.GetAllMatching("result included mismatched")), 2)
}

func TestValidateMalformedChallenge(t *testing.T) {
va, _ := setup(nil, "", nil, nil)

Expand Down

0 comments on commit fbaadbf

Please sign in to comment.