Skip to content

Commit c394831

Browse files
va: Make the primary VA aware of the Perspective and RIR of each remote (#7839)
- Make the primary VA aware of the expected Perspective and RIR of each remote VA. - All Perspectives should be unique, have the primary VA check for duplicate Perspectives at startup. - Update test setup functions to ensure that each remote VA client and corresponding inmem impl have a matching perspective and RIR. Part of #7819
1 parent 7791262 commit c394831

File tree

8 files changed

+420
-318
lines changed

8 files changed

+420
-318
lines changed

cmd/boulder-va/main.go

Lines changed: 39 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,44 @@ import (
1515
vapb "github.com/letsencrypt/boulder/va/proto"
1616
)
1717

18+
// RemoteVAGRPCClientConfig contains the information necessary to setup a gRPC
19+
// client connection. The following GRPC client configuration field combinations
20+
// are allowed:
21+
//
22+
// ServerIPAddresses, [Timeout]
23+
// ServerAddress, DNSAuthority, [Timeout], [HostOverride]
24+
// SRVLookup, DNSAuthority, [Timeout], [HostOverride], [SRVResolver]
25+
// SRVLookups, DNSAuthority, [Timeout], [HostOverride], [SRVResolver]
26+
type RemoteVAGRPCClientConfig struct {
27+
cmd.GRPCClientConfig
28+
// Perspective uniquely identifies the Network Perspective used to
29+
// perform the validation, as specified in BRs Section 5.4.1,
30+
// Requirement 2.7 ("Multi-Perspective Issuance Corroboration attempts
31+
// from each Network Perspective"). It should uniquely identify a group
32+
// of RVAs deployed in the same datacenter.
33+
//
34+
// TODO(#7615): Make mandatory.
35+
Perspective string `validate:"omitempty"`
36+
37+
// RIR indicates the Regional Internet Registry where this RVA is
38+
// located. This field is used to identify the RIR region from which a
39+
// given validation was performed, as specified in the "Phased
40+
// Implementation Timeline" in BRs Section 3.2.2.9. It must be one of
41+
// the following values:
42+
// - ARIN
43+
// - RIPE
44+
// - APNIC
45+
// - LACNIC
46+
// - AfriNIC
47+
//
48+
// TODO(#7615): Make mandatory.
49+
RIR string `validate:"omitempty,oneof=ARIN RIPE APNIC LACNIC AfriNIC"`
50+
}
51+
1852
type Config struct {
1953
VA struct {
2054
vaConfig.Common
21-
RemoteVAs []cmd.GRPCClientConfig `validate:"omitempty,dive"`
55+
RemoteVAs []RemoteVAGRPCClientConfig `validate:"omitempty,dive"`
2256
// Deprecated and ignored
2357
MaxRemoteValidationFailures int `validate:"omitempty,min=0,required_with=RemoteVAs"`
2458
Features features.Config
@@ -92,7 +126,7 @@ func main() {
92126
if len(c.VA.RemoteVAs) > 0 {
93127
for _, rva := range c.VA.RemoteVAs {
94128
rva := rva
95-
vaConn, err := bgrpc.ClientSetup(&rva, tlsConfig, scope, clk)
129+
vaConn, err := bgrpc.ClientSetup(&rva.GRPCClientConfig, tlsConfig, scope, clk)
96130
cmd.FailOnError(err, "Unable to create remote VA client")
97131
remotes = append(
98132
remotes,
@@ -101,7 +135,9 @@ func main() {
101135
VAClient: vapb.NewVAClient(vaConn),
102136
CAAClient: vapb.NewCAAClient(vaConn),
103137
},
104-
Address: rva.ServerAddress,
138+
Address: rva.ServerAddress,
139+
Perspective: rva.Perspective,
140+
RIR: rva.RIR,
105141
},
106142
)
107143
}

test/config-next/remoteva-a.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
"http://boulder.service.consul:4000/acme/reg/",
3838
"http://boulder.service.consul:4001/acme/acct/"
3939
],
40-
"perspective": "development",
40+
"perspective": "dadaist",
4141
"rir": "ARIN"
4242
},
4343
"syslog": {

test/config-next/remoteva-b.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
"http://boulder.service.consul:4000/acme/reg/",
3838
"http://boulder.service.consul:4001/acme/acct/"
3939
],
40-
"perspective": "development",
40+
"perspective": "surrealist",
4141
"rir": "RIPE"
4242
},
4343
"syslog": {

test/config-next/remoteva-c.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
"http://boulder.service.consul:4000/acme/reg/",
3838
"http://boulder.service.consul:4001/acme/acct/"
3939
],
40-
"perspective": "development",
40+
"perspective": "cubist",
4141
"rir": "ARIN"
4242
},
4343
"syslog": {

test/config-next/va.json

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,17 +46,23 @@
4646
{
4747
"serverAddress": "rva1.service.consul:9397",
4848
"timeout": "15s",
49-
"hostOverride": "rva1.boulder"
49+
"hostOverride": "rva1.boulder",
50+
"perspective": "dadaist",
51+
"rir": "ARIN"
5052
},
5153
{
5254
"serverAddress": "rva1.service.consul:9498",
5355
"timeout": "15s",
54-
"hostOverride": "rva1.boulder"
56+
"hostOverride": "rva1.boulder",
57+
"perspective": "surrealist",
58+
"rir": "RIPE"
5559
},
5660
{
5761
"serverAddress": "rva1.service.consul:9499",
5862
"timeout": "15s",
59-
"hostOverride": "rva1.boulder"
63+
"hostOverride": "rva1.boulder",
64+
"perspective": "cubist",
65+
"rir": "ARIN"
6066
}
6167
],
6268
"accountURIPrefixes": [

0 commit comments

Comments
 (0)