wfe: send GetOrder via RA The RA passes through the SA response, with one tweak: if the order is for an MTC and is in "processing" state, the RA will additionally check with the MTCA to see if the corresponding serial number is ready to have a standalone certificate built and set state to be "valid" if so. The RA does a similar thing for non-MTC certificates by setting "valid" if the certificateSerial field is nonempty. This is redundant with the SA but will allow us to, for consistency, make the RA responsible for setting the "valid" status on orders in all cases.
diff --git a/core/proto/core.pb.go b/core/proto/core.pb.go index d3f439c..04b7a1d 100644 --- a/core/proto/core.pb.go +++ b/core/proto/core.pb.go
@@ -726,7 +726,7 @@ MtcLogID string `protobuf:"bytes,17,opt,name=mtcLogID,proto3" json:"mtcLogID,omitempty"` MtcSerialNumber uint64 `protobuf:"varint,18,opt,name=mtcSerialNumber,proto3" json:"mtcSerialNumber,omitempty"` // This is an opaque ID communicated from the MTCA to the MTCB. - MtcSubtreeID uint64 `protobuf:"varint,19,opt,name=mtcSubtreeID,proto3" json:"mtcSubtreeID,omitempty"` + MtcSubtreeID int64 `protobuf:"varint,19,opt,name=mtcSubtreeID,proto3" json:"mtcSubtreeID,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -859,7 +859,7 @@ return 0 } -func (x *Order) GetMtcSubtreeID() uint64 { +func (x *Order) GetMtcSubtreeID() int64 { if x != nil { return x.MtcSubtreeID } @@ -1095,7 +1095,7 @@ 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x12, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0f, 0x6d, 0x74, 0x63, 0x53, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x22, 0x0a, 0x0c, 0x6d, 0x74, 0x63, 0x53, 0x75, 0x62, 0x74, 0x72, 0x65, 0x65, 0x49, 0x44, 0x18, 0x13, 0x20, 0x01, - 0x28, 0x04, 0x52, 0x0c, 0x6d, 0x74, 0x63, 0x53, 0x75, 0x62, 0x74, 0x72, 0x65, 0x65, 0x49, 0x44, + 0x28, 0x03, 0x52, 0x0c, 0x6d, 0x74, 0x63, 0x53, 0x75, 0x62, 0x74, 0x72, 0x65, 0x65, 0x49, 0x44, 0x4a, 0x04, 0x08, 0x03, 0x10, 0x04, 0x4a, 0x04, 0x08, 0x06, 0x10, 0x07, 0x4a, 0x04, 0x08, 0x0a, 0x10, 0x0b, 0x4a, 0x04, 0x08, 0x08, 0x10, 0x09, 0x22, 0x7a, 0x0a, 0x08, 0x43, 0x52, 0x4c, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x18, 0x01,
diff --git a/core/proto/core.proto b/core/proto/core.proto index e178252..ae6cc54 100644 --- a/core/proto/core.proto +++ b/core/proto/core.proto
@@ -133,7 +133,7 @@ string mtcLogID = 17; uint64 mtcSerialNumber = 18; // This is an opaque ID communicated from the MTCA to the MTCB. - uint64 mtcSubtreeID = 19; + int64 mtcSubtreeID = 19; } message CRLEntry {
diff --git a/features/features.go b/features/features.go index 4245faf..53cfe74 100644 --- a/features/features.go +++ b/features/features.go
@@ -15,6 +15,9 @@ // then call features.Set(parsedConfig) to load the parsed struct into this // package's global Config. type Config struct { + // Deprecated config fields: + UnsignLintCerts bool + // CertCheckerChecksValidations enables an extra query for each certificate // checked, to find the relevant authzs. Since this query might be // expensive, we gate it behind a feature flag. @@ -80,12 +83,6 @@ // change to work. SetAuthzProcessing bool - // UnsignLintCerts controls whether the linting package returns RFC 9925 - // Unsigned versions of the linting precerts it checks. This in turn controls - // the the contents of the precertificates table (which actually stores - // linting precerts), saving on storage volume by dropping fake signatures. - UnsignLintCerts bool - // RevokeAuthzsUponRevokeCert controls whether the RA will call for // revocation of Authorizations for identifiers in a certificate that is // successfully revoked by a requester that is DIFFERENT than the one that @@ -98,6 +95,11 @@ // OrderModelHasMTCFields tells the SA that the necessary migration has been // applied for the order model to have the new fields needed for MTCs. OrderModelHasMTCFields bool + + // WFECallsRAForGetOrder tells the WFE to call the RA instead of the SA for + // GetOrder, so we can calculate the "status" field correctly for MTCs (based + // on whether sufficient signatures are available). + WFECallsRAForGetOrder bool } var fMu = new(sync.RWMutex)
diff --git a/linter/linter.go b/linter/linter.go index f98b68c..fbe0cce 100644 --- a/linter/linter.go +++ b/linter/linter.go
@@ -17,7 +17,6 @@ "github.com/zmap/zlint/v3/lint" "github.com/letsencrypt/boulder/core" - "github.com/letsencrypt/boulder/features" "github.com/letsencrypt/boulder/unsigned" _ "github.com/letsencrypt/boulder/linter/lints/cabf_br" @@ -58,10 +57,7 @@ return nil, err } - if features.Get().UnsignLintCerts { - return unsigned.Design(lintCertBytes, false) - } - return lintCertBytes, nil + return unsigned.Design(lintCertBytes, false) } // CheckCRL is like Check, but for CRLs. @@ -169,10 +165,7 @@ return nil, err } - if features.Get().UnsignLintCerts { - return unsigned.Design(lintCertBytes, false) - } - return lintCertBytes, nil + return unsigned.Design(lintCertBytes, false) } // CheckCRL signs the given RevocationList template using the Linter's fake
diff --git a/mtca/mtca.go b/mtca/mtca.go index f32c6a1..b0430e99 100644 --- a/mtca/mtca.go +++ b/mtca/mtca.go
@@ -68,6 +68,8 @@ return nil, errors.New("sequencingPeriod must be non-zero") } + db := initDB(dbMap) + m := &mtca{ issuer: issuer, profiles: profiles, @@ -77,10 +79,11 @@ sequencingPeriod: sequencingPeriod, - db: initDB(dbMap), - s3c: s3c, - log: logger, - clk: clk, + db: db, + treedb: treedb.New(db), + s3c: s3c, + log: logger, + clk: clk, } cosigner, err := cosignature.NewCosigner(logID.CAID, logID.Origin(), issuer.Signer) @@ -133,10 +136,16 @@ // TODO: factor our sa.InitWrappedDb() so we get metrics and other goodies. // TODO: decide whether we want to route this through the SA or an SA-like object, // or keep a direct DB connection from the MTCA. - db *db.WrappedMap - s3c simpleS3 - log blog.Logger - clk clock.Clock + db *db.WrappedMap + treedb treeDB + s3c simpleS3 + log blog.Logger + clk clock.Clock +} + +type treeDB interface { + LatestCheckpoint(ctx context.Context, mtcLogID string) (*treedb.CheckpointModel, error) + GetSubtree(ctx context.Context, mtcLogID string, id int64) (*treedb.CheckpointSubtreeModel, error) } // simpleS3 matches the subset of the s3.Client interface which we use, to allow @@ -251,7 +260,7 @@ m.frontier = candidate - _, err = treedb.New(m.db).LatestCheckpoint(ctx, m.logID.String()) + _, err = m.treedb.LatestCheckpoint(ctx, m.logID.String()) if err != nil { return fmt.Errorf("fetching first checkpoint: %s", err) } @@ -269,7 +278,7 @@ // a previous process stopped between publishing tiles and serving. It must be // called on startup, before Loop(). func (m *mtca) Preflight(ctx context.Context) error { - latest, err := treedb.New(m.db).LatestCheckpoint(ctx, m.logID.String()) + latest, err := m.treedb.LatestCheckpoint(ctx, m.logID.String()) if err != nil { return err } @@ -414,6 +423,22 @@ } } +// StandaloneReady checks if the requested TBSCertificateLogEntry is ready to be built into a stanadlone certificate. +// +// TODO(#8918): Move this to MTCB. +func (m *mtca) StandaloneReady(ctx context.Context, req *mtcapb.StandaloneReadyRequest) (*mtcapb.StandaloneReadyResponse, error) { + if req.MtcLogID != m.logID.String() { + return nil, fmt.Errorf("misdirected request for MTC log ID %q", req.MtcLogID) + } + subtree, err := m.treedb.GetSubtree(ctx, m.logID.String(), req.MtcSubtreeID) + if err != nil { + return nil, err + } + + ready := len(subtree.MirrorSignature) > 0 + return &mtcapb.StandaloneReadyResponse{Ready: ready}, nil +} + // Loop periodically sequences all entries in the pool and sends notifications to the waiting RPCs. // // Must be called after Preflight() returns success. @@ -474,7 +499,7 @@ return nil } - latest, err := treedb.New(m.db).LatestCheckpoint(ctx, m.logID.String()) + latest, err := m.treedb.LatestCheckpoint(ctx, m.logID.String()) if err != nil { return err }
diff --git a/mtca/mtca_test.go b/mtca/mtca_test.go index ff35b0c..951f64c 100644 --- a/mtca/mtca_test.go +++ b/mtca/mtca_test.go
@@ -33,7 +33,7 @@ corepb "github.com/letsencrypt/boulder/core/proto" "github.com/letsencrypt/boulder/issuance" blog "github.com/letsencrypt/boulder/log" - "github.com/letsencrypt/boulder/mtca/proto" + mtcapb "github.com/letsencrypt/boulder/mtca/proto" "github.com/letsencrypt/boulder/mtpublisher" "github.com/letsencrypt/boulder/mtpublisher/mtpublishertest" "github.com/letsencrypt/boulder/privatekey" @@ -210,7 +210,7 @@ // issueResult is the outcome of one async Issue call, along with the values // we expect to find in the entry sequenced for it. type issueResult struct { - *proto.IssueResponse + *mtcapb.IssueResponse err error expectedSPKIHash [sha256.Size]byte expectedDNSName string @@ -218,7 +218,7 @@ // makeIssueRequest returns an IssueRequest with a freshly generated key and // a random DNS name under example.com. -func makeIssueRequest(t *testing.T) *proto.IssueRequest { +func makeIssueRequest(t *testing.T) *mtcapb.IssueRequest { t.Helper() key, err := ecdsa.GenerateKey(elliptic.P256(), nil) if err != nil { @@ -236,7 +236,7 @@ } dnsName := fmt.Sprintf("%x.example.com", buf) - return &proto.IssueRequest{ + return &mtcapb.IssueRequest{ Pubkey: pubkeyBytes, Identifiers: []*corepb.Identifier{ {Type: "dns", Value: dnsName}, @@ -814,3 +814,67 @@ t.Errorf("getCAID(): got %s, want %s", caID, expected) } } + +type treedbWithStandaloneReady struct { + ready bool +} + +func (t treedbWithStandaloneReady) LatestCheckpoint(ctx context.Context, mtcLogID string) (*treedb.CheckpointModel, error) { + return nil, fmt.Errorf("unimplemented") +} + +func (t treedbWithStandaloneReady) GetSubtree(ctx context.Context, mtcLogID string, subtreeID int64) (*treedb.CheckpointSubtreeModel, error) { + mirrorID := "7897.23.1.4" + var mirrorSignature []byte + if t.ready { + mirrorSignature = []byte("def") + } + return &treedb.CheckpointSubtreeModel{ + ID: subtreeID, + MTCLogID: mtcLogID, + MTCASignature: []byte("abc"), + MirrorID: &mirrorID, + MirrorSignature: mirrorSignature, + SubtreeStart: 2, + SubtreeEnd: 3, + SubtreeHash: []byte("ghi"), + }, nil +} + +func TestStandaloneReady(t *testing.T) { + m, _, cleanup, err := setup() + if err != nil { + t.Fatalf("setup: %s", err) + } + defer cleanup() + + m.treedb = treedbWithStandaloneReady{true} + + resp, err := m.StandaloneReady(t.Context(), &mtcapb.StandaloneReadyRequest{ + MtcLogID: "44947.4.1.0.3", + MtcSerialNumber: 123, + MtcSubtreeID: 456, + }) + if err != nil { + t.Fatalf("StandaloneReady(): %s", err) + } + + if !resp.Ready { + t.Errorf("StandaloneReady(): got %t, want %t", resp.Ready, true) + } + + m.treedb = treedbWithStandaloneReady{false} + + resp, err = m.StandaloneReady(t.Context(), &mtcapb.StandaloneReadyRequest{ + MtcLogID: "44947.4.1.0.3", + MtcSerialNumber: 123, + MtcSubtreeID: 456, + }) + if err != nil { + t.Fatalf("StandaloneReady(): %s", err) + } + + if resp.Ready { + t.Errorf("StandaloneReady(): got %t, want %t", resp.Ready, false) + } +}
diff --git a/mtca/proto/mtca.pb.go b/mtca/proto/mtca.pb.go index d8d2e5c..e26388cd 100644 --- a/mtca/proto/mtca.pb.go +++ b/mtca/proto/mtca.pb.go
@@ -144,6 +144,112 @@ return 0 } +type StandaloneReadyRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Next unused field number: 4 + MtcLogID string `protobuf:"bytes,1,opt,name=mtcLogID,proto3" json:"mtcLogID,omitempty"` + MtcSerialNumber uint64 `protobuf:"varint,2,opt,name=mtcSerialNumber,proto3" json:"mtcSerialNumber,omitempty"` + MtcSubtreeID int64 `protobuf:"varint,3,opt,name=mtcSubtreeID,proto3" json:"mtcSubtreeID,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *StandaloneReadyRequest) Reset() { + *x = StandaloneReadyRequest{} + mi := &file_mtca_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *StandaloneReadyRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StandaloneReadyRequest) ProtoMessage() {} + +func (x *StandaloneReadyRequest) ProtoReflect() protoreflect.Message { + mi := &file_mtca_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StandaloneReadyRequest.ProtoReflect.Descriptor instead. +func (*StandaloneReadyRequest) Descriptor() ([]byte, []int) { + return file_mtca_proto_rawDescGZIP(), []int{2} +} + +func (x *StandaloneReadyRequest) GetMtcLogID() string { + if x != nil { + return x.MtcLogID + } + return "" +} + +func (x *StandaloneReadyRequest) GetMtcSerialNumber() uint64 { + if x != nil { + return x.MtcSerialNumber + } + return 0 +} + +func (x *StandaloneReadyRequest) GetMtcSubtreeID() int64 { + if x != nil { + return x.MtcSubtreeID + } + return 0 +} + +type StandaloneReadyResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Next unused field number: 2 + Ready bool `protobuf:"varint,1,opt,name=ready,proto3" json:"ready,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *StandaloneReadyResponse) Reset() { + *x = StandaloneReadyResponse{} + mi := &file_mtca_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *StandaloneReadyResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StandaloneReadyResponse) ProtoMessage() {} + +func (x *StandaloneReadyResponse) ProtoReflect() protoreflect.Message { + mi := &file_mtca_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StandaloneReadyResponse.ProtoReflect.Descriptor instead. +func (*StandaloneReadyResponse) Descriptor() ([]byte, []int) { + return file_mtca_proto_rawDescGZIP(), []int{3} +} + +func (x *StandaloneReadyResponse) GetReady() bool { + if x != nil { + return x.Ready + } + return false +} + var File_mtca_proto protoreflect.FileDescriptor var file_mtca_proto_rawDesc = string([]byte{ @@ -164,14 +270,31 @@ 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0f, 0x6d, 0x74, 0x63, 0x53, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x22, 0x0a, 0x0c, 0x6d, 0x74, 0x63, 0x53, 0x75, 0x62, 0x74, 0x72, 0x65, 0x65, 0x49, 0x44, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0c, 0x6d, 0x74, - 0x63, 0x53, 0x75, 0x62, 0x74, 0x72, 0x65, 0x65, 0x49, 0x44, 0x32, 0x3a, 0x0a, 0x04, 0x4d, 0x54, - 0x43, 0x41, 0x12, 0x32, 0x0a, 0x05, 0x49, 0x73, 0x73, 0x75, 0x65, 0x12, 0x12, 0x2e, 0x6d, 0x74, - 0x63, 0x61, 0x2e, 0x49, 0x73, 0x73, 0x75, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x13, 0x2e, 0x6d, 0x74, 0x63, 0x61, 0x2e, 0x49, 0x73, 0x73, 0x75, 0x65, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x2b, 0x5a, 0x29, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, - 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6c, 0x65, 0x74, 0x73, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, - 0x2f, 0x62, 0x6f, 0x75, 0x6c, 0x64, 0x65, 0x72, 0x2f, 0x6d, 0x74, 0x63, 0x61, 0x2f, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x63, 0x53, 0x75, 0x62, 0x74, 0x72, 0x65, 0x65, 0x49, 0x44, 0x22, 0x82, 0x01, 0x0a, 0x16, 0x53, + 0x74, 0x61, 0x6e, 0x64, 0x61, 0x6c, 0x6f, 0x6e, 0x65, 0x52, 0x65, 0x61, 0x64, 0x79, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6d, 0x74, 0x63, 0x4c, 0x6f, 0x67, 0x49, + 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x74, 0x63, 0x4c, 0x6f, 0x67, 0x49, + 0x44, 0x12, 0x28, 0x0a, 0x0f, 0x6d, 0x74, 0x63, 0x53, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x4e, 0x75, + 0x6d, 0x62, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0f, 0x6d, 0x74, 0x63, 0x53, + 0x65, 0x72, 0x69, 0x61, 0x6c, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x22, 0x0a, 0x0c, 0x6d, + 0x74, 0x63, 0x53, 0x75, 0x62, 0x74, 0x72, 0x65, 0x65, 0x49, 0x44, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x03, 0x52, 0x0c, 0x6d, 0x74, 0x63, 0x53, 0x75, 0x62, 0x74, 0x72, 0x65, 0x65, 0x49, 0x44, 0x22, + 0x2f, 0x0a, 0x17, 0x53, 0x74, 0x61, 0x6e, 0x64, 0x61, 0x6c, 0x6f, 0x6e, 0x65, 0x52, 0x65, 0x61, + 0x64, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x72, 0x65, + 0x61, 0x64, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x72, 0x65, 0x61, 0x64, 0x79, + 0x32, 0x8c, 0x01, 0x0a, 0x04, 0x4d, 0x54, 0x43, 0x41, 0x12, 0x32, 0x0a, 0x05, 0x49, 0x73, 0x73, + 0x75, 0x65, 0x12, 0x12, 0x2e, 0x6d, 0x74, 0x63, 0x61, 0x2e, 0x49, 0x73, 0x73, 0x75, 0x65, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x6d, 0x74, 0x63, 0x61, 0x2e, 0x49, 0x73, + 0x73, 0x75, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x50, 0x0a, + 0x0f, 0x53, 0x74, 0x61, 0x6e, 0x64, 0x61, 0x6c, 0x6f, 0x6e, 0x65, 0x52, 0x65, 0x61, 0x64, 0x79, + 0x12, 0x1c, 0x2e, 0x6d, 0x74, 0x63, 0x61, 0x2e, 0x53, 0x74, 0x61, 0x6e, 0x64, 0x61, 0x6c, 0x6f, + 0x6e, 0x65, 0x52, 0x65, 0x61, 0x64, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, + 0x2e, 0x6d, 0x74, 0x63, 0x61, 0x2e, 0x53, 0x74, 0x61, 0x6e, 0x64, 0x61, 0x6c, 0x6f, 0x6e, 0x65, + 0x52, 0x65, 0x61, 0x64, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, + 0x2b, 0x5a, 0x29, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6c, 0x65, + 0x74, 0x73, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x2f, 0x62, 0x6f, 0x75, 0x6c, 0x64, 0x65, + 0x72, 0x2f, 0x6d, 0x74, 0x63, 0x61, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, }) var ( @@ -186,18 +309,22 @@ return file_mtca_proto_rawDescData } -var file_mtca_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_mtca_proto_msgTypes = make([]protoimpl.MessageInfo, 4) var file_mtca_proto_goTypes = []any{ - (*IssueRequest)(nil), // 0: mtca.IssueRequest - (*IssueResponse)(nil), // 1: mtca.IssueResponse - (*proto.Identifier)(nil), // 2: core.Identifier + (*IssueRequest)(nil), // 0: mtca.IssueRequest + (*IssueResponse)(nil), // 1: mtca.IssueResponse + (*StandaloneReadyRequest)(nil), // 2: mtca.StandaloneReadyRequest + (*StandaloneReadyResponse)(nil), // 3: mtca.StandaloneReadyResponse + (*proto.Identifier)(nil), // 4: core.Identifier } var file_mtca_proto_depIdxs = []int32{ - 2, // 0: mtca.IssueRequest.identifiers:type_name -> core.Identifier + 4, // 0: mtca.IssueRequest.identifiers:type_name -> core.Identifier 0, // 1: mtca.MTCA.Issue:input_type -> mtca.IssueRequest - 1, // 2: mtca.MTCA.Issue:output_type -> mtca.IssueResponse - 2, // [2:3] is the sub-list for method output_type - 1, // [1:2] is the sub-list for method input_type + 2, // 2: mtca.MTCA.StandaloneReady:input_type -> mtca.StandaloneReadyRequest + 1, // 3: mtca.MTCA.Issue:output_type -> mtca.IssueResponse + 3, // 4: mtca.MTCA.StandaloneReady:output_type -> mtca.StandaloneReadyResponse + 3, // [3:5] is the sub-list for method output_type + 1, // [1:3] is the sub-list for method input_type 1, // [1:1] is the sub-list for extension type_name 1, // [1:1] is the sub-list for extension extendee 0, // [0:1] is the sub-list for field type_name @@ -214,7 +341,7 @@ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: unsafe.Slice(unsafe.StringData(file_mtca_proto_rawDesc), len(file_mtca_proto_rawDesc)), NumEnums: 0, - NumMessages: 2, + NumMessages: 4, NumExtensions: 0, NumServices: 1, },
diff --git a/mtca/proto/mtca.proto b/mtca/proto/mtca.proto index 8bbe1dd..d88f6c2 100644 --- a/mtca/proto/mtca.proto +++ b/mtca/proto/mtca.proto
@@ -11,6 +11,11 @@ // for the given request. It returns once a checkpoint has been signed that includes // that certificate's TBSCertificateLogEntry, but does not wait for cosignatures. rpc Issue(IssueRequest) returns (IssueResponse) {} + + // StandaloneReady returns whether a given TBSCertificateLogEntry has sufficient signatures + // for a standalone certificate to be built. + // TODO(#8918): Make this part of MTCB instead. + rpc StandaloneReady(StandaloneReadyRequest) returns (StandaloneReadyResponse) {} } message IssueRequest { @@ -26,3 +31,15 @@ uint64 mtcSerialNumber = 2; uint64 mtcSubtreeID = 3; } + +message StandaloneReadyRequest { + // Next unused field number: 4 + string mtcLogID = 1; + uint64 mtcSerialNumber = 2; + int64 mtcSubtreeID = 3; +} + +message StandaloneReadyResponse { + // Next unused field number: 2 + bool ready = 1; +}
diff --git a/mtca/proto/mtca_grpc.pb.go b/mtca/proto/mtca_grpc.pb.go index dd9e6b8..71564a0 100644 --- a/mtca/proto/mtca_grpc.pb.go +++ b/mtca/proto/mtca_grpc.pb.go
@@ -19,7 +19,8 @@ const _ = grpc.SupportPackageIsVersion9 const ( - MTCA_Issue_FullMethodName = "/mtca.MTCA/Issue" + MTCA_Issue_FullMethodName = "/mtca.MTCA/Issue" + MTCA_StandaloneReady_FullMethodName = "/mtca.MTCA/StandaloneReady" ) // MTCAClient is the client API for MTCA service. @@ -32,6 +33,10 @@ // for the given request. It returns once a checkpoint has been signed that includes // that certificate's TBSCertificateLogEntry, but does not wait for cosignatures. Issue(ctx context.Context, in *IssueRequest, opts ...grpc.CallOption) (*IssueResponse, error) + // StandaloneReady returns whether a given TBSCertificateLogEntry has sufficient signatures + // for a standalone certificate to be built. + // TODO(#8918): Make this part of MTCB instead. + StandaloneReady(ctx context.Context, in *StandaloneReadyRequest, opts ...grpc.CallOption) (*StandaloneReadyResponse, error) } type mTCAClient struct { @@ -52,6 +57,16 @@ return out, nil } +func (c *mTCAClient) StandaloneReady(ctx context.Context, in *StandaloneReadyRequest, opts ...grpc.CallOption) (*StandaloneReadyResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(StandaloneReadyResponse) + err := c.cc.Invoke(ctx, MTCA_StandaloneReady_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + // MTCAServer is the server API for MTCA service. // All implementations must embed UnimplementedMTCAServer // for forward compatibility. @@ -62,6 +77,10 @@ // for the given request. It returns once a checkpoint has been signed that includes // that certificate's TBSCertificateLogEntry, but does not wait for cosignatures. Issue(context.Context, *IssueRequest) (*IssueResponse, error) + // StandaloneReady returns whether a given TBSCertificateLogEntry has sufficient signatures + // for a standalone certificate to be built. + // TODO(#8918): Make this part of MTCB instead. + StandaloneReady(context.Context, *StandaloneReadyRequest) (*StandaloneReadyResponse, error) mustEmbedUnimplementedMTCAServer() } @@ -75,6 +94,9 @@ func (UnimplementedMTCAServer) Issue(context.Context, *IssueRequest) (*IssueResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Issue not implemented") } +func (UnimplementedMTCAServer) StandaloneReady(context.Context, *StandaloneReadyRequest) (*StandaloneReadyResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method StandaloneReady not implemented") +} func (UnimplementedMTCAServer) mustEmbedUnimplementedMTCAServer() {} func (UnimplementedMTCAServer) testEmbeddedByValue() {} @@ -114,6 +136,24 @@ return interceptor(ctx, in, info, handler) } +func _MTCA_StandaloneReady_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(StandaloneReadyRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MTCAServer).StandaloneReady(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: MTCA_StandaloneReady_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MTCAServer).StandaloneReady(ctx, req.(*StandaloneReadyRequest)) + } + return interceptor(ctx, in, info, handler) +} + // MTCA_ServiceDesc is the grpc.ServiceDesc for MTCA service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -125,6 +165,10 @@ MethodName: "Issue", Handler: _MTCA_Issue_Handler, }, + { + MethodName: "StandaloneReady", + Handler: _MTCA_StandaloneReady_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "mtca.proto",
diff --git a/ra/proto/ra.pb.go b/ra/proto/ra.pb.go index b324507..27c1079 100644 --- a/ra/proto/ra.pb.go +++ b/ra/proto/ra.pb.go
@@ -651,6 +651,51 @@ return "" } +type GetOrderRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Next unused field number: 3 + OrderID int64 `protobuf:"varint,1,opt,name=orderID,proto3" json:"orderID,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetOrderRequest) Reset() { + *x = GetOrderRequest{} + mi := &file_ra_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetOrderRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetOrderRequest) ProtoMessage() {} + +func (x *GetOrderRequest) ProtoReflect() protoreflect.Message { + mi := &file_ra_proto_msgTypes[11] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetOrderRequest.ProtoReflect.Descriptor instead. +func (*GetOrderRequest) Descriptor() ([]byte, []int) { + return file_ra_proto_rawDescGZIP(), []int{11} +} + +func (x *GetOrderRequest) GetOrderID() int64 { + if x != nil { + return x.OrderID + } + return 0 +} + type GetAuthorizationRequest struct { state protoimpl.MessageState `protogen:"open.v1"` Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` @@ -660,7 +705,7 @@ func (x *GetAuthorizationRequest) Reset() { *x = GetAuthorizationRequest{} - mi := &file_ra_proto_msgTypes[11] + mi := &file_ra_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -672,7 +717,7 @@ func (*GetAuthorizationRequest) ProtoMessage() {} func (x *GetAuthorizationRequest) ProtoReflect() protoreflect.Message { - mi := &file_ra_proto_msgTypes[11] + mi := &file_ra_proto_msgTypes[12] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -685,7 +730,7 @@ // Deprecated: Use GetAuthorizationRequest.ProtoReflect.Descriptor instead. func (*GetAuthorizationRequest) Descriptor() ([]byte, []int) { - return file_ra_proto_rawDescGZIP(), []int{11} + return file_ra_proto_rawDescGZIP(), []int{12} } func (x *GetAuthorizationRequest) GetId() int64 { @@ -705,7 +750,7 @@ func (x *FinalizeOrderRequest) Reset() { *x = FinalizeOrderRequest{} - mi := &file_ra_proto_msgTypes[12] + mi := &file_ra_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -717,7 +762,7 @@ func (*FinalizeOrderRequest) ProtoMessage() {} func (x *FinalizeOrderRequest) ProtoReflect() protoreflect.Message { - mi := &file_ra_proto_msgTypes[12] + mi := &file_ra_proto_msgTypes[13] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -730,7 +775,7 @@ // Deprecated: Use FinalizeOrderRequest.ProtoReflect.Descriptor instead. func (*FinalizeOrderRequest) Descriptor() ([]byte, []int) { - return file_ra_proto_rawDescGZIP(), []int{12} + return file_ra_proto_rawDescGZIP(), []int{13} } func (x *FinalizeOrderRequest) GetOrder() *proto.Order { @@ -757,7 +802,7 @@ func (x *UnpauseAccountRequest) Reset() { *x = UnpauseAccountRequest{} - mi := &file_ra_proto_msgTypes[13] + mi := &file_ra_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -769,7 +814,7 @@ func (*UnpauseAccountRequest) ProtoMessage() {} func (x *UnpauseAccountRequest) ProtoReflect() protoreflect.Message { - mi := &file_ra_proto_msgTypes[13] + mi := &file_ra_proto_msgTypes[14] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -782,7 +827,7 @@ // Deprecated: Use UnpauseAccountRequest.ProtoReflect.Descriptor instead. func (*UnpauseAccountRequest) Descriptor() ([]byte, []int) { - return file_ra_proto_rawDescGZIP(), []int{13} + return file_ra_proto_rawDescGZIP(), []int{14} } func (x *UnpauseAccountRequest) GetRegistrationID() int64 { @@ -802,7 +847,7 @@ func (x *UnpauseAccountResponse) Reset() { *x = UnpauseAccountResponse{} - mi := &file_ra_proto_msgTypes[14] + mi := &file_ra_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -814,7 +859,7 @@ func (*UnpauseAccountResponse) ProtoMessage() {} func (x *UnpauseAccountResponse) ProtoReflect() protoreflect.Message { - mi := &file_ra_proto_msgTypes[14] + mi := &file_ra_proto_msgTypes[15] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -827,7 +872,7 @@ // Deprecated: Use UnpauseAccountResponse.ProtoReflect.Descriptor instead. func (*UnpauseAccountResponse) Descriptor() ([]byte, []int) { - return file_ra_proto_rawDescGZIP(), []int{14} + return file_ra_proto_rawDescGZIP(), []int{15} } func (x *UnpauseAccountResponse) GetCount() int64 { @@ -851,7 +896,7 @@ func (x *RateLimitOverride) Reset() { *x = RateLimitOverride{} - mi := &file_ra_proto_msgTypes[15] + mi := &file_ra_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -863,7 +908,7 @@ func (*RateLimitOverride) ProtoMessage() {} func (x *RateLimitOverride) ProtoReflect() protoreflect.Message { - mi := &file_ra_proto_msgTypes[15] + mi := &file_ra_proto_msgTypes[16] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -876,7 +921,7 @@ // Deprecated: Use RateLimitOverride.ProtoReflect.Descriptor instead. func (*RateLimitOverride) Descriptor() ([]byte, []int) { - return file_ra_proto_rawDescGZIP(), []int{15} + return file_ra_proto_rawDescGZIP(), []int{16} } func (x *RateLimitOverride) GetLimitEnum() int64 { @@ -930,7 +975,7 @@ func (x *AddRateLimitOverrideRequest) Reset() { *x = AddRateLimitOverrideRequest{} - mi := &file_ra_proto_msgTypes[16] + mi := &file_ra_proto_msgTypes[17] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -942,7 +987,7 @@ func (*AddRateLimitOverrideRequest) ProtoMessage() {} func (x *AddRateLimitOverrideRequest) ProtoReflect() protoreflect.Message { - mi := &file_ra_proto_msgTypes[16] + mi := &file_ra_proto_msgTypes[17] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -955,7 +1000,7 @@ // Deprecated: Use AddRateLimitOverrideRequest.ProtoReflect.Descriptor instead. func (*AddRateLimitOverrideRequest) Descriptor() ([]byte, []int) { - return file_ra_proto_rawDescGZIP(), []int{16} + return file_ra_proto_rawDescGZIP(), []int{17} } func (x *AddRateLimitOverrideRequest) GetOverride() *RateLimitOverride { @@ -976,7 +1021,7 @@ func (x *AddRateLimitOverrideResponse) Reset() { *x = AddRateLimitOverrideResponse{} - mi := &file_ra_proto_msgTypes[17] + mi := &file_ra_proto_msgTypes[18] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -988,7 +1033,7 @@ func (*AddRateLimitOverrideResponse) ProtoMessage() {} func (x *AddRateLimitOverrideResponse) ProtoReflect() protoreflect.Message { - mi := &file_ra_proto_msgTypes[17] + mi := &file_ra_proto_msgTypes[18] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1001,7 +1046,7 @@ // Deprecated: Use AddRateLimitOverrideResponse.ProtoReflect.Descriptor instead. func (*AddRateLimitOverrideResponse) Descriptor() ([]byte, []int) { - return file_ra_proto_rawDescGZIP(), []int{17} + return file_ra_proto_rawDescGZIP(), []int{18} } func (x *AddRateLimitOverrideResponse) GetInserted() bool { @@ -1109,118 +1154,124 @@ 0x65, 0x73, 0x53, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x72, 0x65, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x73, 0x53, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x4a, 0x04, 0x08, 0x02, 0x10, 0x03, 0x4a, 0x04, 0x08, 0x04, 0x10, 0x05, 0x4a, 0x04, 0x08, 0x06, 0x10, 0x07, - 0x22, 0x29, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x22, 0x4b, 0x0a, 0x14, 0x46, - 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x05, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, - 0x05, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x10, 0x0a, 0x03, 0x63, 0x73, 0x72, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0c, 0x52, 0x03, 0x63, 0x73, 0x72, 0x22, 0x3f, 0x0a, 0x15, 0x55, 0x6e, 0x70, 0x61, - 0x75, 0x73, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x26, 0x0a, 0x0e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0e, 0x72, 0x65, 0x67, 0x69, 0x73, - 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x22, 0x2e, 0x0a, 0x16, 0x55, 0x6e, 0x70, - 0x61, 0x75, 0x73, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x03, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0xc8, 0x01, 0x0a, 0x11, 0x52, 0x61, - 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x12, - 0x1c, 0x0a, 0x09, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x45, 0x6e, 0x75, 0x6d, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x03, 0x52, 0x09, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x1c, 0x0a, - 0x09, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x09, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x63, - 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, - 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x31, 0x0a, 0x06, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x52, 0x06, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x14, - 0x0a, 0x05, 0x62, 0x75, 0x72, 0x73, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x62, - 0x75, 0x72, 0x73, 0x74, 0x22, 0x50, 0x0a, 0x1b, 0x41, 0x64, 0x64, 0x52, 0x61, 0x74, 0x65, 0x4c, - 0x69, 0x6d, 0x69, 0x74, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x31, 0x0a, 0x08, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x72, 0x61, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, - 0x69, 0x6d, 0x69, 0x74, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x52, 0x08, 0x6f, 0x76, - 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x22, 0x87, 0x01, 0x0a, 0x1c, 0x41, 0x64, 0x64, 0x52, 0x61, - 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x6e, 0x73, 0x65, 0x72, - 0x74, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x69, 0x6e, 0x73, 0x65, 0x72, - 0x74, 0x65, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x31, 0x0a, - 0x08, 0x65, 0x78, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x15, 0x2e, 0x72, 0x61, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x4f, 0x76, - 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x52, 0x08, 0x65, 0x78, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, - 0x32, 0xf1, 0x07, 0x0a, 0x15, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x3b, 0x0a, 0x0f, 0x4e, 0x65, - 0x77, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x2e, - 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x1a, 0x12, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x00, 0x12, 0x4f, 0x0a, 0x15, 0x55, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4b, 0x65, 0x79, - 0x12, 0x20, 0x2e, 0x72, 0x61, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x67, 0x69, - 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x22, 0x2b, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x49, 0x44, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x49, 0x44, 0x22, 0x29, 0x0a, + 0x17, 0x47, 0x65, 0x74, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x22, 0x4b, 0x0a, 0x14, 0x46, 0x69, 0x6e, 0x61, + 0x6c, 0x69, 0x7a, 0x65, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x21, 0x0a, 0x05, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x0b, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x05, 0x6f, 0x72, + 0x64, 0x65, 0x72, 0x12, 0x10, 0x0a, 0x03, 0x63, 0x73, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, + 0x52, 0x03, 0x63, 0x73, 0x72, 0x22, 0x3f, 0x0a, 0x15, 0x55, 0x6e, 0x70, 0x61, 0x75, 0x73, 0x65, + 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x26, + 0x0a, 0x0e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x22, 0x2e, 0x0a, 0x16, 0x55, 0x6e, 0x70, 0x61, 0x75, 0x73, + 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0xc8, 0x01, 0x0a, 0x11, 0x52, 0x61, 0x74, 0x65, 0x4c, + 0x69, 0x6d, 0x69, 0x74, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x12, 0x1c, 0x0a, 0x09, + 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x45, 0x6e, 0x75, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x09, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x1c, 0x0a, 0x09, 0x62, 0x75, + 0x63, 0x6b, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x62, + 0x75, 0x63, 0x6b, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6d, 0x6d, + 0x65, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x65, + 0x6e, 0x74, 0x12, 0x31, 0x0a, 0x06, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x06, 0x70, + 0x65, 0x72, 0x69, 0x6f, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x62, + 0x75, 0x72, 0x73, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x62, 0x75, 0x72, 0x73, + 0x74, 0x22, 0x50, 0x0a, 0x1b, 0x41, 0x64, 0x64, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, + 0x74, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x31, 0x0a, 0x08, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x72, 0x61, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, + 0x74, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x52, 0x08, 0x6f, 0x76, 0x65, 0x72, 0x72, + 0x69, 0x64, 0x65, 0x22, 0x87, 0x01, 0x0a, 0x1c, 0x41, 0x64, 0x64, 0x52, 0x61, 0x74, 0x65, 0x4c, + 0x69, 0x6d, 0x69, 0x74, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x6e, 0x73, 0x65, 0x72, 0x74, 0x65, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x69, 0x6e, 0x73, 0x65, 0x72, 0x74, 0x65, 0x64, + 0x12, 0x18, 0x0a, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x31, 0x0a, 0x08, 0x65, 0x78, + 0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x72, + 0x61, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x4f, 0x76, 0x65, 0x72, 0x72, + 0x69, 0x64, 0x65, 0x52, 0x08, 0x65, 0x78, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x32, 0xa1, 0x08, + 0x0a, 0x15, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x75, + 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x3b, 0x0a, 0x0f, 0x4e, 0x65, 0x77, 0x52, 0x65, + 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x2e, 0x63, 0x6f, 0x72, + 0x65, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x12, + 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x22, 0x00, 0x12, 0x4f, 0x0a, 0x15, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, + 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4b, 0x65, 0x79, 0x12, 0x20, 0x2e, + 0x72, 0x61, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x12, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x22, 0x00, 0x12, 0x51, 0x0a, 0x16, 0x44, 0x65, 0x61, 0x63, 0x74, 0x69, 0x76, + 0x61, 0x74, 0x65, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x21, 0x2e, 0x72, 0x61, 0x2e, 0x44, 0x65, 0x61, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x52, + 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, - 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x00, 0x12, 0x51, 0x0a, 0x16, 0x44, 0x65, 0x61, 0x63, - 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x12, 0x21, 0x2e, 0x72, 0x61, 0x2e, 0x44, 0x65, 0x61, 0x63, 0x74, 0x69, 0x76, 0x61, - 0x74, 0x65, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x52, 0x65, 0x67, - 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x00, 0x12, 0x48, 0x0a, 0x11, 0x50, - 0x65, 0x72, 0x66, 0x6f, 0x72, 0x6d, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x12, 0x1c, 0x2e, 0x72, 0x61, 0x2e, 0x50, 0x65, 0x72, 0x66, 0x6f, 0x72, 0x6d, 0x56, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x13, - 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x22, 0x00, 0x12, 0x48, 0x0a, 0x17, 0x44, 0x65, 0x61, 0x63, 0x74, 0x69, 0x76, - 0x61, 0x74, 0x65, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x12, 0x13, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, - 0x53, 0x0a, 0x15, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x43, 0x65, 0x72, 0x74, 0x42, 0x79, 0x41, - 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x6e, 0x74, 0x12, 0x20, 0x2e, 0x72, 0x61, 0x2e, 0x52, 0x65, - 0x76, 0x6f, 0x6b, 0x65, 0x43, 0x65, 0x72, 0x74, 0x42, 0x79, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, - 0x61, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, - 0x74, 0x79, 0x22, 0x00, 0x12, 0x47, 0x0a, 0x0f, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x43, 0x65, - 0x72, 0x74, 0x42, 0x79, 0x4b, 0x65, 0x79, 0x12, 0x1a, 0x2e, 0x72, 0x61, 0x2e, 0x52, 0x65, 0x76, - 0x6f, 0x6b, 0x65, 0x43, 0x65, 0x72, 0x74, 0x42, 0x79, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x6b, 0x0a, - 0x21, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x76, 0x65, 0x6c, - 0x79, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, - 0x74, 0x65, 0x12, 0x2c, 0x2e, 0x72, 0x61, 0x2e, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x69, 0x73, 0x74, - 0x72, 0x61, 0x74, 0x69, 0x76, 0x65, 0x6c, 0x79, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x43, 0x65, - 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x2e, 0x0a, 0x08, 0x4e, 0x65, - 0x77, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x13, 0x2e, 0x72, 0x61, 0x2e, 0x4e, 0x65, 0x77, 0x4f, - 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0b, 0x2e, 0x63, 0x6f, - 0x72, 0x65, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x22, 0x00, 0x12, 0x46, 0x0a, 0x10, 0x47, 0x65, - 0x74, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1b, - 0x2e, 0x72, 0x61, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x00, 0x12, 0x48, 0x0a, 0x11, 0x50, 0x65, 0x72, 0x66, + 0x6f, 0x72, 0x6d, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1c, 0x2e, + 0x72, 0x61, 0x2e, 0x50, 0x65, 0x72, 0x66, 0x6f, 0x72, 0x6d, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x22, 0x00, 0x12, 0x38, 0x0a, 0x0d, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x4f, 0x72, - 0x64, 0x65, 0x72, 0x12, 0x18, 0x2e, 0x72, 0x61, 0x2e, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, - 0x65, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0b, 0x2e, - 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x22, 0x00, 0x12, 0x49, 0x0a, 0x0e, - 0x55, 0x6e, 0x70, 0x61, 0x75, 0x73, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x19, - 0x2e, 0x72, 0x61, 0x2e, 0x55, 0x6e, 0x70, 0x61, 0x75, 0x73, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x72, 0x61, 0x2e, 0x55, - 0x6e, 0x70, 0x61, 0x75, 0x73, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x5b, 0x0a, 0x14, 0x41, 0x64, 0x64, 0x52, 0x61, - 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x12, - 0x1f, 0x2e, 0x72, 0x61, 0x2e, 0x41, 0x64, 0x64, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, - 0x74, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x20, 0x2e, 0x72, 0x61, 0x2e, 0x41, 0x64, 0x64, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, - 0x69, 0x74, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x00, 0x32, 0x3b, 0x0a, 0x0b, 0x53, 0x43, 0x54, 0x50, 0x72, 0x6f, 0x76, 0x69, - 0x64, 0x65, 0x72, 0x12, 0x2c, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x53, 0x43, 0x54, 0x73, 0x12, 0x0e, - 0x2e, 0x72, 0x61, 0x2e, 0x53, 0x43, 0x54, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0f, - 0x2e, 0x72, 0x61, 0x2e, 0x53, 0x43, 0x54, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x00, 0x42, 0x29, 0x5a, 0x27, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, - 0x6c, 0x65, 0x74, 0x73, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x2f, 0x62, 0x6f, 0x75, 0x6c, - 0x64, 0x65, 0x72, 0x2f, 0x72, 0x61, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, + 0x22, 0x00, 0x12, 0x48, 0x0a, 0x17, 0x44, 0x65, 0x61, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, + 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x13, 0x2e, + 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x53, 0x0a, 0x15, + 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x43, 0x65, 0x72, 0x74, 0x42, 0x79, 0x41, 0x70, 0x70, 0x6c, + 0x69, 0x63, 0x61, 0x6e, 0x74, 0x12, 0x20, 0x2e, 0x72, 0x61, 0x2e, 0x52, 0x65, 0x76, 0x6f, 0x6b, + 0x65, 0x43, 0x65, 0x72, 0x74, 0x42, 0x79, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x6e, 0x74, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, + 0x00, 0x12, 0x47, 0x0a, 0x0f, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x43, 0x65, 0x72, 0x74, 0x42, + 0x79, 0x4b, 0x65, 0x79, 0x12, 0x1a, 0x2e, 0x72, 0x61, 0x2e, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, + 0x43, 0x65, 0x72, 0x74, 0x42, 0x79, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x6b, 0x0a, 0x21, 0x41, 0x64, + 0x6d, 0x69, 0x6e, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x76, 0x65, 0x6c, 0x79, 0x52, 0x65, + 0x76, 0x6f, 0x6b, 0x65, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x12, + 0x2c, 0x2e, 0x72, 0x61, 0x2e, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, + 0x69, 0x76, 0x65, 0x6c, 0x79, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x43, 0x65, 0x72, 0x74, 0x69, + 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x2e, 0x0a, 0x08, 0x4e, 0x65, 0x77, 0x4f, 0x72, + 0x64, 0x65, 0x72, 0x12, 0x13, 0x2e, 0x72, 0x61, 0x2e, 0x4e, 0x65, 0x77, 0x4f, 0x72, 0x64, 0x65, + 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0b, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, + 0x4f, 0x72, 0x64, 0x65, 0x72, 0x22, 0x00, 0x12, 0x2e, 0x0a, 0x08, 0x47, 0x65, 0x74, 0x4f, 0x72, + 0x64, 0x65, 0x72, 0x12, 0x13, 0x2e, 0x72, 0x61, 0x2e, 0x47, 0x65, 0x74, 0x4f, 0x72, 0x64, 0x65, + 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0b, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, + 0x4f, 0x72, 0x64, 0x65, 0x72, 0x22, 0x00, 0x12, 0x46, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x41, 0x75, + 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x2e, 0x72, 0x61, + 0x2e, 0x47, 0x65, 0x74, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, + 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x00, 0x12, + 0x38, 0x0a, 0x0d, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x4f, 0x72, 0x64, 0x65, 0x72, + 0x12, 0x18, 0x2e, 0x72, 0x61, 0x2e, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x4f, 0x72, + 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0b, 0x2e, 0x63, 0x6f, 0x72, + 0x65, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x22, 0x00, 0x12, 0x49, 0x0a, 0x0e, 0x55, 0x6e, 0x70, + 0x61, 0x75, 0x73, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x19, 0x2e, 0x72, 0x61, + 0x2e, 0x55, 0x6e, 0x70, 0x61, 0x75, 0x73, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x72, 0x61, 0x2e, 0x55, 0x6e, 0x70, 0x61, + 0x75, 0x73, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x00, 0x12, 0x5b, 0x0a, 0x14, 0x41, 0x64, 0x64, 0x52, 0x61, 0x74, 0x65, 0x4c, + 0x69, 0x6d, 0x69, 0x74, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x12, 0x1f, 0x2e, 0x72, + 0x61, 0x2e, 0x41, 0x64, 0x64, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x4f, 0x76, + 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, + 0x72, 0x61, 0x2e, 0x41, 0x64, 0x64, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x4f, + 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x00, 0x32, 0x3b, 0x0a, 0x0b, 0x53, 0x43, 0x54, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, + 0x12, 0x2c, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x53, 0x43, 0x54, 0x73, 0x12, 0x0e, 0x2e, 0x72, 0x61, + 0x2e, 0x53, 0x43, 0x54, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0f, 0x2e, 0x72, 0x61, + 0x2e, 0x53, 0x43, 0x54, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x29, + 0x5a, 0x27, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6c, 0x65, 0x74, + 0x73, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x2f, 0x62, 0x6f, 0x75, 0x6c, 0x64, 0x65, 0x72, + 0x2f, 0x72, 0x61, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, }) var ( @@ -1235,7 +1286,7 @@ return file_ra_proto_rawDescData } -var file_ra_proto_msgTypes = make([]protoimpl.MessageInfo, 18) +var file_ra_proto_msgTypes = make([]protoimpl.MessageInfo, 19) var file_ra_proto_goTypes = []any{ (*SCTRequest)(nil), // 0: ra.SCTRequest (*SCTResponse)(nil), // 1: ra.SCTResponse @@ -1248,60 +1299,63 @@ (*RevokeCertByKeyRequest)(nil), // 8: ra.RevokeCertByKeyRequest (*AdministrativelyRevokeCertificateRequest)(nil), // 9: ra.AdministrativelyRevokeCertificateRequest (*NewOrderRequest)(nil), // 10: ra.NewOrderRequest - (*GetAuthorizationRequest)(nil), // 11: ra.GetAuthorizationRequest - (*FinalizeOrderRequest)(nil), // 12: ra.FinalizeOrderRequest - (*UnpauseAccountRequest)(nil), // 13: ra.UnpauseAccountRequest - (*UnpauseAccountResponse)(nil), // 14: ra.UnpauseAccountResponse - (*RateLimitOverride)(nil), // 15: ra.RateLimitOverride - (*AddRateLimitOverrideRequest)(nil), // 16: ra.AddRateLimitOverrideRequest - (*AddRateLimitOverrideResponse)(nil), // 17: ra.AddRateLimitOverrideResponse - (*proto.Authorization)(nil), // 18: core.Authorization - (*proto.Challenge)(nil), // 19: core.Challenge - (*proto.Identifier)(nil), // 20: core.Identifier - (*proto.Order)(nil), // 21: core.Order - (*durationpb.Duration)(nil), // 22: google.protobuf.Duration - (*proto.Registration)(nil), // 23: core.Registration - (*emptypb.Empty)(nil), // 24: google.protobuf.Empty + (*GetOrderRequest)(nil), // 11: ra.GetOrderRequest + (*GetAuthorizationRequest)(nil), // 12: ra.GetAuthorizationRequest + (*FinalizeOrderRequest)(nil), // 13: ra.FinalizeOrderRequest + (*UnpauseAccountRequest)(nil), // 14: ra.UnpauseAccountRequest + (*UnpauseAccountResponse)(nil), // 15: ra.UnpauseAccountResponse + (*RateLimitOverride)(nil), // 16: ra.RateLimitOverride + (*AddRateLimitOverrideRequest)(nil), // 17: ra.AddRateLimitOverrideRequest + (*AddRateLimitOverrideResponse)(nil), // 18: ra.AddRateLimitOverrideResponse + (*proto.Authorization)(nil), // 19: core.Authorization + (*proto.Challenge)(nil), // 20: core.Challenge + (*proto.Identifier)(nil), // 21: core.Identifier + (*proto.Order)(nil), // 22: core.Order + (*durationpb.Duration)(nil), // 23: google.protobuf.Duration + (*proto.Registration)(nil), // 24: core.Registration + (*emptypb.Empty)(nil), // 25: google.protobuf.Empty } var file_ra_proto_depIdxs = []int32{ - 18, // 0: ra.UpdateAuthorizationRequest.authz:type_name -> core.Authorization - 19, // 1: ra.UpdateAuthorizationRequest.response:type_name -> core.Challenge - 18, // 2: ra.PerformValidationRequest.authz:type_name -> core.Authorization - 20, // 3: ra.NewOrderRequest.identifiers:type_name -> core.Identifier - 21, // 4: ra.FinalizeOrderRequest.order:type_name -> core.Order - 22, // 5: ra.RateLimitOverride.period:type_name -> google.protobuf.Duration - 15, // 6: ra.AddRateLimitOverrideRequest.override:type_name -> ra.RateLimitOverride - 15, // 7: ra.AddRateLimitOverrideResponse.existing:type_name -> ra.RateLimitOverride - 23, // 8: ra.RegistrationAuthority.NewRegistration:input_type -> core.Registration + 19, // 0: ra.UpdateAuthorizationRequest.authz:type_name -> core.Authorization + 20, // 1: ra.UpdateAuthorizationRequest.response:type_name -> core.Challenge + 19, // 2: ra.PerformValidationRequest.authz:type_name -> core.Authorization + 21, // 3: ra.NewOrderRequest.identifiers:type_name -> core.Identifier + 22, // 4: ra.FinalizeOrderRequest.order:type_name -> core.Order + 23, // 5: ra.RateLimitOverride.period:type_name -> google.protobuf.Duration + 16, // 6: ra.AddRateLimitOverrideRequest.override:type_name -> ra.RateLimitOverride + 16, // 7: ra.AddRateLimitOverrideResponse.existing:type_name -> ra.RateLimitOverride + 24, // 8: ra.RegistrationAuthority.NewRegistration:input_type -> core.Registration 3, // 9: ra.RegistrationAuthority.UpdateRegistrationKey:input_type -> ra.UpdateRegistrationKeyRequest 4, // 10: ra.RegistrationAuthority.DeactivateRegistration:input_type -> ra.DeactivateRegistrationRequest 6, // 11: ra.RegistrationAuthority.PerformValidation:input_type -> ra.PerformValidationRequest - 18, // 12: ra.RegistrationAuthority.DeactivateAuthorization:input_type -> core.Authorization + 19, // 12: ra.RegistrationAuthority.DeactivateAuthorization:input_type -> core.Authorization 7, // 13: ra.RegistrationAuthority.RevokeCertByApplicant:input_type -> ra.RevokeCertByApplicantRequest 8, // 14: ra.RegistrationAuthority.RevokeCertByKey:input_type -> ra.RevokeCertByKeyRequest 9, // 15: ra.RegistrationAuthority.AdministrativelyRevokeCertificate:input_type -> ra.AdministrativelyRevokeCertificateRequest 10, // 16: ra.RegistrationAuthority.NewOrder:input_type -> ra.NewOrderRequest - 11, // 17: ra.RegistrationAuthority.GetAuthorization:input_type -> ra.GetAuthorizationRequest - 12, // 18: ra.RegistrationAuthority.FinalizeOrder:input_type -> ra.FinalizeOrderRequest - 13, // 19: ra.RegistrationAuthority.UnpauseAccount:input_type -> ra.UnpauseAccountRequest - 16, // 20: ra.RegistrationAuthority.AddRateLimitOverride:input_type -> ra.AddRateLimitOverrideRequest - 0, // 21: ra.SCTProvider.GetSCTs:input_type -> ra.SCTRequest - 23, // 22: ra.RegistrationAuthority.NewRegistration:output_type -> core.Registration - 23, // 23: ra.RegistrationAuthority.UpdateRegistrationKey:output_type -> core.Registration - 23, // 24: ra.RegistrationAuthority.DeactivateRegistration:output_type -> core.Registration - 18, // 25: ra.RegistrationAuthority.PerformValidation:output_type -> core.Authorization - 24, // 26: ra.RegistrationAuthority.DeactivateAuthorization:output_type -> google.protobuf.Empty - 24, // 27: ra.RegistrationAuthority.RevokeCertByApplicant:output_type -> google.protobuf.Empty - 24, // 28: ra.RegistrationAuthority.RevokeCertByKey:output_type -> google.protobuf.Empty - 24, // 29: ra.RegistrationAuthority.AdministrativelyRevokeCertificate:output_type -> google.protobuf.Empty - 21, // 30: ra.RegistrationAuthority.NewOrder:output_type -> core.Order - 18, // 31: ra.RegistrationAuthority.GetAuthorization:output_type -> core.Authorization - 21, // 32: ra.RegistrationAuthority.FinalizeOrder:output_type -> core.Order - 14, // 33: ra.RegistrationAuthority.UnpauseAccount:output_type -> ra.UnpauseAccountResponse - 17, // 34: ra.RegistrationAuthority.AddRateLimitOverride:output_type -> ra.AddRateLimitOverrideResponse - 1, // 35: ra.SCTProvider.GetSCTs:output_type -> ra.SCTResponse - 22, // [22:36] is the sub-list for method output_type - 8, // [8:22] is the sub-list for method input_type + 11, // 17: ra.RegistrationAuthority.GetOrder:input_type -> ra.GetOrderRequest + 12, // 18: ra.RegistrationAuthority.GetAuthorization:input_type -> ra.GetAuthorizationRequest + 13, // 19: ra.RegistrationAuthority.FinalizeOrder:input_type -> ra.FinalizeOrderRequest + 14, // 20: ra.RegistrationAuthority.UnpauseAccount:input_type -> ra.UnpauseAccountRequest + 17, // 21: ra.RegistrationAuthority.AddRateLimitOverride:input_type -> ra.AddRateLimitOverrideRequest + 0, // 22: ra.SCTProvider.GetSCTs:input_type -> ra.SCTRequest + 24, // 23: ra.RegistrationAuthority.NewRegistration:output_type -> core.Registration + 24, // 24: ra.RegistrationAuthority.UpdateRegistrationKey:output_type -> core.Registration + 24, // 25: ra.RegistrationAuthority.DeactivateRegistration:output_type -> core.Registration + 19, // 26: ra.RegistrationAuthority.PerformValidation:output_type -> core.Authorization + 25, // 27: ra.RegistrationAuthority.DeactivateAuthorization:output_type -> google.protobuf.Empty + 25, // 28: ra.RegistrationAuthority.RevokeCertByApplicant:output_type -> google.protobuf.Empty + 25, // 29: ra.RegistrationAuthority.RevokeCertByKey:output_type -> google.protobuf.Empty + 25, // 30: ra.RegistrationAuthority.AdministrativelyRevokeCertificate:output_type -> google.protobuf.Empty + 22, // 31: ra.RegistrationAuthority.NewOrder:output_type -> core.Order + 22, // 32: ra.RegistrationAuthority.GetOrder:output_type -> core.Order + 19, // 33: ra.RegistrationAuthority.GetAuthorization:output_type -> core.Authorization + 22, // 34: ra.RegistrationAuthority.FinalizeOrder:output_type -> core.Order + 15, // 35: ra.RegistrationAuthority.UnpauseAccount:output_type -> ra.UnpauseAccountResponse + 18, // 36: ra.RegistrationAuthority.AddRateLimitOverride:output_type -> ra.AddRateLimitOverrideResponse + 1, // 37: ra.SCTProvider.GetSCTs:output_type -> ra.SCTResponse + 23, // [23:38] is the sub-list for method output_type + 8, // [8:23] is the sub-list for method input_type 8, // [8:8] is the sub-list for extension type_name 8, // [8:8] is the sub-list for extension extendee 0, // [0:8] is the sub-list for field type_name @@ -1318,7 +1372,7 @@ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: unsafe.Slice(unsafe.StringData(file_ra_proto_rawDesc), len(file_ra_proto_rawDesc)), NumEnums: 0, - NumMessages: 18, + NumMessages: 19, NumExtensions: 0, NumServices: 2, },
diff --git a/ra/proto/ra.proto b/ra/proto/ra.proto index 54fc0f6..d44fcd8 100644 --- a/ra/proto/ra.proto +++ b/ra/proto/ra.proto
@@ -17,6 +17,7 @@ rpc RevokeCertByKey(RevokeCertByKeyRequest) returns (google.protobuf.Empty) {} rpc AdministrativelyRevokeCertificate(AdministrativelyRevokeCertificateRequest) returns (google.protobuf.Empty) {} rpc NewOrder(NewOrderRequest) returns (core.Order) {} + rpc GetOrder(GetOrderRequest) returns (core.Order) {} rpc GetAuthorization(GetAuthorizationRequest) returns (core.Authorization) {} rpc FinalizeOrder(FinalizeOrderRequest) returns (core.Order) {} rpc UnpauseAccount(UnpauseAccountRequest) returns (UnpauseAccountResponse) {} @@ -106,6 +107,11 @@ reserved 6; // previously isRenewal } +message GetOrderRequest { + // Next unused field number: 3 + int64 orderID = 1; +} + message GetAuthorizationRequest { int64 id = 1; }
diff --git a/ra/proto/ra_grpc.pb.go b/ra/proto/ra_grpc.pb.go index 74bdfc8..eeb542c 100644 --- a/ra/proto/ra_grpc.pb.go +++ b/ra/proto/ra_grpc.pb.go
@@ -30,6 +30,7 @@ RegistrationAuthority_RevokeCertByKey_FullMethodName = "/ra.RegistrationAuthority/RevokeCertByKey" RegistrationAuthority_AdministrativelyRevokeCertificate_FullMethodName = "/ra.RegistrationAuthority/AdministrativelyRevokeCertificate" RegistrationAuthority_NewOrder_FullMethodName = "/ra.RegistrationAuthority/NewOrder" + RegistrationAuthority_GetOrder_FullMethodName = "/ra.RegistrationAuthority/GetOrder" RegistrationAuthority_GetAuthorization_FullMethodName = "/ra.RegistrationAuthority/GetAuthorization" RegistrationAuthority_FinalizeOrder_FullMethodName = "/ra.RegistrationAuthority/FinalizeOrder" RegistrationAuthority_UnpauseAccount_FullMethodName = "/ra.RegistrationAuthority/UnpauseAccount" @@ -49,6 +50,7 @@ RevokeCertByKey(ctx context.Context, in *RevokeCertByKeyRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) AdministrativelyRevokeCertificate(ctx context.Context, in *AdministrativelyRevokeCertificateRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) NewOrder(ctx context.Context, in *NewOrderRequest, opts ...grpc.CallOption) (*proto.Order, error) + GetOrder(ctx context.Context, in *GetOrderRequest, opts ...grpc.CallOption) (*proto.Order, error) GetAuthorization(ctx context.Context, in *GetAuthorizationRequest, opts ...grpc.CallOption) (*proto.Authorization, error) FinalizeOrder(ctx context.Context, in *FinalizeOrderRequest, opts ...grpc.CallOption) (*proto.Order, error) UnpauseAccount(ctx context.Context, in *UnpauseAccountRequest, opts ...grpc.CallOption) (*UnpauseAccountResponse, error) @@ -153,6 +155,16 @@ return out, nil } +func (c *registrationAuthorityClient) GetOrder(ctx context.Context, in *GetOrderRequest, opts ...grpc.CallOption) (*proto.Order, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(proto.Order) + err := c.cc.Invoke(ctx, RegistrationAuthority_GetOrder_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *registrationAuthorityClient) GetAuthorization(ctx context.Context, in *GetAuthorizationRequest, opts ...grpc.CallOption) (*proto.Authorization, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(proto.Authorization) @@ -206,6 +218,7 @@ RevokeCertByKey(context.Context, *RevokeCertByKeyRequest) (*emptypb.Empty, error) AdministrativelyRevokeCertificate(context.Context, *AdministrativelyRevokeCertificateRequest) (*emptypb.Empty, error) NewOrder(context.Context, *NewOrderRequest) (*proto.Order, error) + GetOrder(context.Context, *GetOrderRequest) (*proto.Order, error) GetAuthorization(context.Context, *GetAuthorizationRequest) (*proto.Authorization, error) FinalizeOrder(context.Context, *FinalizeOrderRequest) (*proto.Order, error) UnpauseAccount(context.Context, *UnpauseAccountRequest) (*UnpauseAccountResponse, error) @@ -247,6 +260,9 @@ func (UnimplementedRegistrationAuthorityServer) NewOrder(context.Context, *NewOrderRequest) (*proto.Order, error) { return nil, status.Errorf(codes.Unimplemented, "method NewOrder not implemented") } +func (UnimplementedRegistrationAuthorityServer) GetOrder(context.Context, *GetOrderRequest) (*proto.Order, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetOrder not implemented") +} func (UnimplementedRegistrationAuthorityServer) GetAuthorization(context.Context, *GetAuthorizationRequest) (*proto.Authorization, error) { return nil, status.Errorf(codes.Unimplemented, "method GetAuthorization not implemented") } @@ -442,6 +458,24 @@ return interceptor(ctx, in, info, handler) } +func _RegistrationAuthority_GetOrder_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetOrderRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RegistrationAuthorityServer).GetOrder(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: RegistrationAuthority_GetOrder_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RegistrationAuthorityServer).GetOrder(ctx, req.(*GetOrderRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _RegistrationAuthority_GetAuthorization_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(GetAuthorizationRequest) if err := dec(in); err != nil { @@ -558,6 +592,10 @@ Handler: _RegistrationAuthority_NewOrder_Handler, }, { + MethodName: "GetOrder", + Handler: _RegistrationAuthority_GetOrder_Handler, + }, + { MethodName: "GetAuthorization", Handler: _RegistrationAuthority_GetAuthorization_Handler, },
diff --git a/ra/ra.go b/ra/ra.go index 88d4157..ecf367a 100644 --- a/ra/ra.go +++ b/ra/ra.go
@@ -2422,6 +2422,48 @@ return storedOrder, nil } +// GetOrder returns an order object from the SA. If the SA returns an order in "processing" state, +// this method will return the same order but with "valid" state if: +// +// - It is an MTC order, and a call to an MTCA indicates that sufficient signatures are available to +// product a standalone certificate. +// - It is a non-MTC order and the certificateSerial field is nonempty. +func (ra *RegistrationAuthorityImpl) GetOrder(ctx context.Context, req *rapb.GetOrderRequest) (*corepb.Order, error) { + order, err := ra.SA.GetOrder(ctx, &sapb.OrderRequest{Id: req.OrderID}) + if err != nil { + return nil, err + } + + if order.Status != string(core.StatusProcessing) { + return order, nil + } + + if ra.isMTC(order) { + mtca, ok := ra.profileToMTCA[ra.profileName(order)] + if !ok { + return nil, fmt.Errorf("MTC order does not have a corresponding MTCA") + } + + resp, err := mtca.StandaloneReady(ctx, &mtcapb.StandaloneReadyRequest{ + MtcLogID: order.MtcLogID, + MtcSerialNumber: order.MtcSerialNumber, + MtcSubtreeID: order.MtcSubtreeID, + }) + if err != nil { + return nil, err + } + if resp.Ready { + order.Status = string(core.StatusValid) + } + } else { + if order.CertificateSerial != "" { + order.Status = string(core.StatusValid) + } + } + + return order, nil +} + // wildcardOverlap takes a slice of identifiers and returns an error if any of // them is a non-wildcard FQDN that overlaps with a wildcard domain in the map. func wildcardOverlap(idents identifier.ACMEIdentifiers) error {
diff --git a/ra/ra_test.go b/ra/ra_test.go index f237e12..f4b54ae7 100644 --- a/ra/ra_test.go +++ b/ra/ra_test.go
@@ -3379,6 +3379,12 @@ }, nil } +func (mtca mockMTCA) StandaloneReady(_ context.Context, req *mtcapb.StandaloneReadyRequest, _ ...grpc.CallOption) (*mtcapb.StandaloneReadyResponse, error) { + return &mtcapb.StandaloneReadyResponse{ + Ready: false, + }, nil +} + func TestIssueMTC(t *testing.T) { _, _, ra, _, fc, registration, cleanup := initAuthorities(t) defer cleanup()
diff --git a/sa/db/01-boulder_sa_next.sql b/sa/db/01-boulder_sa_next.sql index 798b9d6..a36466a7 100644 --- a/sa/db/01-boulder_sa_next.sql +++ b/sa/db/01-boulder_sa_next.sql
@@ -253,6 +253,6 @@ ADD COLUMN `mtcLogID` varchar(255) DEFAULT NULL, ADD COLUMN `mtcSerialNumber` bigint(20) unsigned DEFAULT NULL, -- A reference to the `subtreeCheckpoints` table. - ADD COLUMN `mtcSubtreeID` bigint(20) unsigned DEFAULT NULL; + ADD COLUMN `mtcSubtreeID` bigint(20) DEFAULT NULL; ALTER TABLE `authz2` ADD COLUMN `beganProcessing` tinyint(1) NOT NULL DEFAULT 0;
diff --git a/sa/model.go b/sa/model.go index 6466d59..3d2c71a7b 100644 --- a/sa/model.go +++ b/sa/model.go
@@ -352,7 +352,7 @@ MTCLogID *string MTCSerialNumber *uint64 - MTCSubtreeID *uint64 + MTCSubtreeID *int64 } // optionalStr returns "" if s is nil, otherwise *s. @@ -371,6 +371,14 @@ return *i } +// optionalInt64 returns 0 if i is nil, otherwise *i. +func optionalInt64(i *int64) int64 { + if i == nil { + return 0 + } + return *i +} + func unpackAuthzIDs(authzs []byte) ([]int64, error) { if len(authzs) == 0 { return nil, nil @@ -400,7 +408,7 @@ V2Authorizations: v2Authorizations, MtcLogID: optionalStr(om.MTCLogID), MtcSerialNumber: optionalUint64(om.MTCSerialNumber), - MtcSubtreeID: optionalUint64(om.MTCSubtreeID), + MtcSubtreeID: optionalInt64(om.MTCSubtreeID), } if len(om.Error) > 0 { var problem corepb.ProblemDetails
diff --git a/sa/sa_test.go b/sa/sa_test.go index 93662b6..7ce5e9f 100644 --- a/sa/sa_test.go +++ b/sa/sa_test.go
@@ -1446,7 +1446,7 @@ test.AssertNotError(t, err, "GetOrder failed") test.AssertEquals(t, updatedOrder.MtcLogID, "44947.4.1.0.44") test.AssertEquals(t, updatedOrder.MtcSerialNumber, uint64(23)) - test.AssertEquals(t, updatedOrder.MtcSubtreeID, uint64(99)) + test.AssertEquals(t, updatedOrder.MtcSubtreeID, int64(99)) test.AssertEquals(t, updatedOrder.Status, string(core.StatusProcessing))
diff --git a/test/config/wfe2.json b/test/config/wfe2.json index 27b6789..7b9f12f 100644 --- a/test/config/wfe2.json +++ b/test/config/wfe2.json
@@ -126,6 +126,7 @@ "Overrides": "test/config/ratelimit-overrides.yml" }, "features": { + "WFECallsRAForGetOrder": true, "CheckIdentifiersPaused": true }, "certProfiles": {
diff --git a/trees/treedb/treedb.go b/trees/treedb/treedb.go index e56591f..545e61b 100644 --- a/trees/treedb/treedb.go +++ b/trees/treedb/treedb.go
@@ -90,6 +90,35 @@ return nil } +// CheckpointSubtreeModel represents a row in the `checkpointSubtrees` table. +type CheckpointSubtreeModel struct { + ID int64 `db:"id"` + MTCLogID string `db:"mtcLogID"` + MTCASignature []byte `db:"mtcaSignature"` + MirrorID *string `db:"mirrorID"` + MirrorSignature []byte `db:"mirrorSignature"` + SubtreeStart uint64 `db:"subtreeStart"` + SubtreeEnd uint64 `db:"subtreeEnd"` + SubtreeHash []byte `db:"subtreeHash"` +} + +func (i *Impl) GetSubtree(ctx context.Context, mtcLogID string, id int64) (*CheckpointSubtreeModel, error) { + var checkpointSubtree CheckpointSubtreeModel + err := i.db.SelectOne(ctx, &checkpointSubtree, + `SELECT id, mtcLogID, mtcaSignature, + mirrorID, mirrorSignature, + subtreeStart, subtreeEnd, subtreeHash + FROM checkpointSubtrees + WHERE mtcLogID = ? AND + id = ?`, + mtcLogID, + id) + if err != nil { + return nil, err + } + return &checkpointSubtree, nil +} + func New(db *db.WrappedMap) *Impl { return &Impl{db} }
diff --git a/wfe2/wfe.go b/wfe2/wfe.go index ead9a67..fea883c 100644 --- a/wfe2/wfe.go +++ b/wfe2/wfe.go
@@ -2578,7 +2578,12 @@ return } - order, err := wfe.sa.GetOrder(ctx, &sapb.OrderRequest{Id: orderID}) + var order *corepb.Order + if features.Get().WFECallsRAForGetOrder { + order, err = wfe.ra.GetOrder(ctx, &rapb.GetOrderRequest{OrderID: orderID}) + } else { + order, err = wfe.sa.GetOrder(ctx, &sapb.OrderRequest{Id: orderID}) + } if err != nil { if errors.Is(err, berrors.NotFound) { wfe.sendError(response, logEvent, probs.NotFound(fmt.Sprintf("No order for ID %d", orderID)), nil) @@ -2660,7 +2665,12 @@ return } - order, err := wfe.sa.GetOrder(ctx, &sapb.OrderRequest{Id: orderID}) + var order *corepb.Order + if features.Get().WFECallsRAForGetOrder { + order, err = wfe.ra.GetOrder(ctx, &rapb.GetOrderRequest{OrderID: orderID}) + } else { + order, err = wfe.sa.GetOrder(ctx, &sapb.OrderRequest{Id: orderID}) + } if err != nil { if errors.Is(err, berrors.NotFound) { wfe.sendError(response, logEvent, probs.NotFound(fmt.Sprintf("No order for ID %d", orderID)), nil)