diff --git a/.codespell.ignore.txt b/.codespell.ignore.txt index f9f0980b534..ed00052c5a4 100644 --- a/.codespell.ignore.txt +++ b/.codespell.ignore.txt @@ -11,3 +11,4 @@ uint vas ede vai +nowns diff --git a/ca/ca.go b/ca/ca.go index 22392131987..d8c751ccbbe 100644 --- a/ca/ca.go +++ b/ca/ca.go @@ -187,10 +187,10 @@ func (ca *certificateAuthorityImpl) IssuePrecertificate(ctx context.Context, iss nowNanos := ca.clk.Now().UnixNano() expiresNanos := validity.NotAfter.UnixNano() _, err = ca.sa.AddSerial(ctx, &sapb.AddSerialRequest{ - Serial: serialHex, - RegID: regID, - Created: nowNanos, - Expires: expiresNanos, + Serial: serialHex, + RegID: regID, + CreatedNS: nowNanos, + ExpiresNS: expiresNanos, }) if err != nil { return nil, err @@ -297,9 +297,9 @@ func (ca *certificateAuthorityImpl) IssueCertificateForPrecertificate(ctx contex serialHex, req.RegistrationID, names, hex.EncodeToString(certDER)) _, err = ca.sa.AddCertificate(ctx, &sapb.AddCertificateRequest{ - Der: certDER, - RegID: req.RegistrationID, - Issued: ca.clk.Now().UnixNano(), + Der: certDER, + RegID: req.RegistrationID, + IssuedNS: ca.clk.Now().UnixNano(), }) if err != nil { ca.log.AuditErrf("Failed RPC to store at SA: serial=[%s], cert=[%s], issuerID=[%d], regID=[%d], orderID=[%d], err=[%v]", @@ -312,8 +312,8 @@ func (ca *certificateAuthorityImpl) IssueCertificateForPrecertificate(ctx contex Serial: core.SerialToString(precert.SerialNumber), Der: certDER, Digest: core.Fingerprint256(certDER), - Issued: precert.NotBefore.UnixNano(), - Expires: precert.NotAfter.UnixNano(), + IssuedNS: precert.NotBefore.UnixNano(), + ExpiresNS: precert.NotAfter.UnixNano(), }, nil } @@ -417,7 +417,7 @@ func (ca *certificateAuthorityImpl) issuePrecertificateInner(ctx context.Context _, err = ca.sa.AddPrecertificate(context.Background(), &sapb.AddCertificateRequest{ Der: lintCertBytes, RegID: issueReq.RegistrationID, - Issued: nowNanos, + IssuedNS: nowNanos, IssuerNameID: int64(issuer.Cert.NameID()), OcspNotReady: true, }) diff --git a/ca/crl.go b/ca/crl.go index 6ef8ec9ef0d..df3a88d5177 100644 --- a/ca/crl.go +++ b/ca/crl.go @@ -197,10 +197,10 @@ func (ci *crlImpl) GenerateCRL(stream capb.CRLGenerator_GenerateCRLServer) error } func (ci *crlImpl) metadataToTemplate(meta *capb.CRLMetadata) (*crl_x509.RevocationList, error) { - if meta.IssuerNameID == 0 || meta.ThisUpdate == 0 { + if meta.IssuerNameID == 0 || meta.ThisUpdateNS == 0 { return nil, errors.New("got incomplete metadata message") } - thisUpdate := time.Unix(0, meta.ThisUpdate) + thisUpdate := time.Unix(0, meta.ThisUpdateNS) number := bcrl.Number(thisUpdate) return &crl_x509.RevocationList{ @@ -216,10 +216,10 @@ func (ci *crlImpl) entryToRevokedCertificate(entry *corepb.CRLEntry) (*crl_x509. return nil, err } - if entry.RevokedAt == 0 { + if entry.RevokedAtNS == 0 { return nil, errors.New("got empty or zero revocation timestamp") } - revokedAt := time.Unix(0, entry.RevokedAt) + revokedAt := time.Unix(0, entry.RevokedAtNS) var reason *int if entry.Reason != 0 { diff --git a/ca/crl_test.go b/ca/crl_test.go index 4889b62a47f..15a914e6c40 100644 --- a/ca/crl_test.go +++ b/ca/crl_test.go @@ -75,7 +75,7 @@ func TestGenerateCRL(t *testing.T) { Payload: &capb.GenerateCRLRequest_Metadata{ Metadata: &capb.CRLMetadata{ IssuerNameID: 1, - ThisUpdate: time.Now().UnixNano(), + ThisUpdateNS: time.Now().UnixNano(), }, }, } @@ -93,7 +93,7 @@ func TestGenerateCRL(t *testing.T) { Payload: &capb.GenerateCRLRequest_Metadata{ Metadata: &capb.CRLMetadata{ IssuerNameID: int64(testCtx.boulderIssuers[0].Cert.NameID()), - ThisUpdate: time.Now().UnixNano(), + ThisUpdateNS: time.Now().UnixNano(), }, }, } @@ -101,7 +101,7 @@ func TestGenerateCRL(t *testing.T) { Payload: &capb.GenerateCRLRequest_Metadata{ Metadata: &capb.CRLMetadata{ IssuerNameID: int64(testCtx.boulderIssuers[0].Cert.NameID()), - ThisUpdate: time.Now().UnixNano(), + ThisUpdateNS: time.Now().UnixNano(), }, }, } @@ -118,9 +118,9 @@ func TestGenerateCRL(t *testing.T) { ins <- &capb.GenerateCRLRequest{ Payload: &capb.GenerateCRLRequest_Entry{ Entry: &corepb.CRLEntry{ - Serial: "123", - Reason: 1, - RevokedAt: time.Now().UnixNano(), + Serial: "123", + Reason: 1, + RevokedAtNS: time.Now().UnixNano(), }, }, } @@ -137,9 +137,9 @@ func TestGenerateCRL(t *testing.T) { ins <- &capb.GenerateCRLRequest{ Payload: &capb.GenerateCRLRequest_Entry{ Entry: &corepb.CRLEntry{ - Serial: "deadbeefdeadbeefdeadbeefdeadbeefdead", - Reason: 1, - RevokedAt: 0, + Serial: "deadbeefdeadbeefdeadbeefdeadbeefdead", + Reason: 1, + RevokedAtNS: 0, }, }, } @@ -167,7 +167,7 @@ func TestGenerateCRL(t *testing.T) { Payload: &capb.GenerateCRLRequest_Metadata{ Metadata: &capb.CRLMetadata{ IssuerNameID: int64(testCtx.boulderIssuers[0].Cert.NameID()), - ThisUpdate: time.Now().UnixNano(), + ThisUpdateNS: time.Now().UnixNano(), }, }, } @@ -201,15 +201,15 @@ func TestGenerateCRL(t *testing.T) { Payload: &capb.GenerateCRLRequest_Metadata{ Metadata: &capb.CRLMetadata{ IssuerNameID: int64(testCtx.boulderIssuers[0].Cert.NameID()), - ThisUpdate: time.Now().UnixNano(), + ThisUpdateNS: time.Now().UnixNano(), }, }, } ins <- &capb.GenerateCRLRequest{ Payload: &capb.GenerateCRLRequest_Entry{ Entry: &corepb.CRLEntry{ - Serial: "000000000000000000000000000000000000", - RevokedAt: time.Now().UnixNano(), + Serial: "000000000000000000000000000000000000", + RevokedAtNS: time.Now().UnixNano(), // Reason 0, Unspecified, is omitted. }, }, @@ -217,36 +217,36 @@ func TestGenerateCRL(t *testing.T) { ins <- &capb.GenerateCRLRequest{ Payload: &capb.GenerateCRLRequest_Entry{ Entry: &corepb.CRLEntry{ - Serial: "111111111111111111111111111111111111", - Reason: 1, // keyCompromise - RevokedAt: time.Now().UnixNano(), + Serial: "111111111111111111111111111111111111", + Reason: 1, // keyCompromise + RevokedAtNS: time.Now().UnixNano(), }, }, } ins <- &capb.GenerateCRLRequest{ Payload: &capb.GenerateCRLRequest_Entry{ Entry: &corepb.CRLEntry{ - Serial: "444444444444444444444444444444444444", - Reason: 4, // superseded - RevokedAt: time.Now().UnixNano(), + Serial: "444444444444444444444444444444444444", + Reason: 4, // superseded + RevokedAtNS: time.Now().UnixNano(), }, }, } ins <- &capb.GenerateCRLRequest{ Payload: &capb.GenerateCRLRequest_Entry{ Entry: &corepb.CRLEntry{ - Serial: "555555555555555555555555555555555555", - Reason: 5, // cessationOfOperation - RevokedAt: time.Now().UnixNano(), + Serial: "555555555555555555555555555555555555", + Reason: 5, // cessationOfOperation + RevokedAtNS: time.Now().UnixNano(), }, }, } ins <- &capb.GenerateCRLRequest{ Payload: &capb.GenerateCRLRequest_Entry{ Entry: &corepb.CRLEntry{ - Serial: "999999999999999999999999999999999999", - Reason: 9, // privilegeWithdrawn - RevokedAt: time.Now().UnixNano(), + Serial: "999999999999999999999999999999999999", + Reason: 9, // privilegeWithdrawn + RevokedAtNS: time.Now().UnixNano(), }, }, } diff --git a/ca/ocsp.go b/ca/ocsp.go index c829d678476..ba55c48a859 100644 --- a/ca/ocsp.go +++ b/ca/ocsp.go @@ -135,7 +135,7 @@ func (oi *ocspImpl) GenerateOCSP(ctx context.Context, req *capb.GenerateOCSPRequ NextUpdate: now.Add(oi.ocspLifetime - time.Second), } if tbsResponse.Status == ocsp.Revoked { - tbsResponse.RevokedAt = time.Unix(0, req.RevokedAt) + tbsResponse.RevokedAt = time.Unix(0, req.RevokedAtNS) tbsResponse.RevocationReason = int(req.Reason) } diff --git a/ca/proto/ca.pb.go b/ca/proto/ca.pb.go index 0d49637f9f2..683a00dda00 100644 --- a/ca/proto/ca.pb.go +++ b/ca/proto/ca.pb.go @@ -216,11 +216,11 @@ type GenerateOCSPRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Status string `protobuf:"bytes,2,opt,name=status,proto3" json:"status,omitempty"` - Reason int32 `protobuf:"varint,3,opt,name=reason,proto3" json:"reason,omitempty"` - RevokedAt int64 `protobuf:"varint,4,opt,name=revokedAt,proto3" json:"revokedAt,omitempty"` - Serial string `protobuf:"bytes,5,opt,name=serial,proto3" json:"serial,omitempty"` - IssuerID int64 `protobuf:"varint,6,opt,name=issuerID,proto3" json:"issuerID,omitempty"` + Status string `protobuf:"bytes,2,opt,name=status,proto3" json:"status,omitempty"` + Reason int32 `protobuf:"varint,3,opt,name=reason,proto3" json:"reason,omitempty"` + RevokedAtNS int64 `protobuf:"varint,4,opt,name=revokedAtNS,proto3" json:"revokedAtNS,omitempty"` // Unix timestamp (nanoseconds) + Serial string `protobuf:"bytes,5,opt,name=serial,proto3" json:"serial,omitempty"` + IssuerID int64 `protobuf:"varint,6,opt,name=issuerID,proto3" json:"issuerID,omitempty"` } func (x *GenerateOCSPRequest) Reset() { @@ -269,9 +269,9 @@ func (x *GenerateOCSPRequest) GetReason() int32 { return 0 } -func (x *GenerateOCSPRequest) GetRevokedAt() int64 { +func (x *GenerateOCSPRequest) GetRevokedAtNS() int64 { if x != nil { - return x.RevokedAt + return x.RevokedAtNS } return 0 } @@ -424,7 +424,7 @@ type CRLMetadata struct { unknownFields protoimpl.UnknownFields IssuerNameID int64 `protobuf:"varint,1,opt,name=issuerNameID,proto3" json:"issuerNameID,omitempty"` - ThisUpdate int64 `protobuf:"varint,2,opt,name=thisUpdate,proto3" json:"thisUpdate,omitempty"` // Unix timestamp (nanoseconds), also used for CRLNumber. + ThisUpdateNS int64 `protobuf:"varint,2,opt,name=thisUpdateNS,proto3" json:"thisUpdateNS,omitempty"` // Unix timestamp (nanoseconds), also used for CRLNumber. ShardIdx int64 `protobuf:"varint,3,opt,name=shardIdx,proto3" json:"shardIdx,omitempty"` } @@ -467,9 +467,9 @@ func (x *CRLMetadata) GetIssuerNameID() int64 { return 0 } -func (x *CRLMetadata) GetThisUpdate() int64 { +func (x *CRLMetadata) GetThisUpdateNS() int64 { if x != nil { - return x.ThisUpdate + return x.ThisUpdateNS } return 0 } @@ -555,63 +555,63 @@ var file_ca_proto_rawDesc = []byte{ 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x12, 0x18, 0x0a, 0x07, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x49, 0x44, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x49, 0x44, 0x22, - 0x97, 0x01, 0x0a, 0x13, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x4f, 0x43, 0x53, 0x50, + 0x9b, 0x01, 0x0a, 0x13, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x4f, 0x43, 0x53, 0x50, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, - 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x76, 0x6f, 0x6b, - 0x65, 0x64, 0x41, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x72, 0x65, 0x76, 0x6f, - 0x6b, 0x65, 0x64, 0x41, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x12, 0x1a, 0x0a, - 0x08, 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x49, 0x44, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, - 0x08, 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x49, 0x44, 0x22, 0x2a, 0x0a, 0x0c, 0x4f, 0x43, 0x53, - 0x50, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x72, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x76, 0x0a, 0x12, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, - 0x65, 0x43, 0x52, 0x4c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2d, 0x0a, 0x08, 0x6d, - 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, - 0x63, 0x61, 0x2e, 0x43, 0x52, 0x4c, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x48, 0x00, - 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x26, 0x0a, 0x05, 0x65, 0x6e, - 0x74, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x63, 0x6f, 0x72, 0x65, - 0x2e, 0x43, 0x52, 0x4c, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x48, 0x00, 0x52, 0x05, 0x65, 0x6e, 0x74, - 0x72, 0x79, 0x42, 0x09, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x22, 0x6d, 0x0a, - 0x0b, 0x43, 0x52, 0x4c, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x22, 0x0a, 0x0c, - 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x03, 0x52, 0x0c, 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x49, 0x44, - 0x12, 0x1e, 0x0a, 0x0a, 0x74, 0x68, 0x69, 0x73, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x74, 0x68, 0x69, 0x73, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x68, 0x61, 0x72, 0x64, 0x49, 0x64, 0x78, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x03, 0x52, 0x08, 0x73, 0x68, 0x61, 0x72, 0x64, 0x49, 0x64, 0x78, 0x22, 0x2b, 0x0a, 0x13, - 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x43, 0x52, 0x4c, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0c, 0x52, 0x05, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x32, 0xd5, 0x01, 0x0a, 0x14, 0x43, 0x65, - 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, - 0x74, 0x79, 0x12, 0x55, 0x0a, 0x13, 0x49, 0x73, 0x73, 0x75, 0x65, 0x50, 0x72, 0x65, 0x63, 0x65, - 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x12, 0x1b, 0x2e, 0x63, 0x61, 0x2e, 0x49, - 0x73, 0x73, 0x75, 0x65, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x63, 0x61, 0x2e, 0x49, 0x73, 0x73, 0x75, - 0x65, 0x50, 0x72, 0x65, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x66, 0x0a, 0x21, 0x49, 0x73, 0x73, - 0x75, 0x65, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x46, 0x6f, 0x72, - 0x50, 0x72, 0x65, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x12, 0x2c, - 0x2e, 0x63, 0x61, 0x2e, 0x49, 0x73, 0x73, 0x75, 0x65, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, - 0x63, 0x61, 0x74, 0x65, 0x46, 0x6f, 0x72, 0x50, 0x72, 0x65, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, - 0x69, 0x63, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e, 0x63, - 0x6f, 0x72, 0x65, 0x2e, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x22, - 0x00, 0x32, 0x4c, 0x0a, 0x0d, 0x4f, 0x43, 0x53, 0x50, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, - 0x6f, 0x72, 0x12, 0x3b, 0x0a, 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x4f, 0x43, - 0x53, 0x50, 0x12, 0x17, 0x2e, 0x63, 0x61, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, - 0x4f, 0x43, 0x53, 0x50, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x10, 0x2e, 0x63, 0x61, - 0x2e, 0x4f, 0x43, 0x53, 0x50, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x32, - 0x54, 0x0a, 0x0c, 0x43, 0x52, 0x4c, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x12, - 0x44, 0x0a, 0x0b, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x43, 0x52, 0x4c, 0x12, 0x16, + 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x12, 0x20, 0x0a, 0x0b, 0x72, 0x65, 0x76, 0x6f, 0x6b, + 0x65, 0x64, 0x41, 0x74, 0x4e, 0x53, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x72, 0x65, + 0x76, 0x6f, 0x6b, 0x65, 0x64, 0x41, 0x74, 0x4e, 0x53, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x65, 0x72, + 0x69, 0x61, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x65, 0x72, 0x69, 0x61, + 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x49, 0x44, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x08, 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x49, 0x44, 0x22, 0x2a, 0x0a, + 0x0c, 0x4f, 0x43, 0x53, 0x50, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1a, 0x0a, + 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, + 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x76, 0x0a, 0x12, 0x47, 0x65, 0x6e, + 0x65, 0x72, 0x61, 0x74, 0x65, 0x43, 0x52, 0x4c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x2d, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x0f, 0x2e, 0x63, 0x61, 0x2e, 0x43, 0x52, 0x4c, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0x48, 0x00, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x26, + 0x0a, 0x05, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, + 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x43, 0x52, 0x4c, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x48, 0x00, 0x52, + 0x05, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x42, 0x09, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, + 0x64, 0x22, 0x71, 0x0a, 0x0b, 0x43, 0x52, 0x4c, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0x12, 0x22, 0x0a, 0x0c, 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x49, 0x44, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x4e, 0x61, + 0x6d, 0x65, 0x49, 0x44, 0x12, 0x22, 0x0a, 0x0c, 0x74, 0x68, 0x69, 0x73, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x4e, 0x53, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x74, 0x68, 0x69, 0x73, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4e, 0x53, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x68, 0x61, 0x72, + 0x64, 0x49, 0x64, 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x73, 0x68, 0x61, 0x72, + 0x64, 0x49, 0x64, 0x78, 0x22, 0x2b, 0x0a, 0x13, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, + 0x43, 0x52, 0x4c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x63, + 0x68, 0x75, 0x6e, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x63, 0x68, 0x75, 0x6e, + 0x6b, 0x32, 0xd5, 0x01, 0x0a, 0x14, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, + 0x65, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x55, 0x0a, 0x13, 0x49, 0x73, + 0x73, 0x75, 0x65, 0x50, 0x72, 0x65, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, + 0x65, 0x12, 0x1b, 0x2e, 0x63, 0x61, 0x2e, 0x49, 0x73, 0x73, 0x75, 0x65, 0x43, 0x65, 0x72, 0x74, + 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, + 0x2e, 0x63, 0x61, 0x2e, 0x49, 0x73, 0x73, 0x75, 0x65, 0x50, 0x72, 0x65, 0x63, 0x65, 0x72, 0x74, + 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x00, 0x12, 0x66, 0x0a, 0x21, 0x49, 0x73, 0x73, 0x75, 0x65, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, + 0x69, 0x63, 0x61, 0x74, 0x65, 0x46, 0x6f, 0x72, 0x50, 0x72, 0x65, 0x63, 0x65, 0x72, 0x74, 0x69, + 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x12, 0x2c, 0x2e, 0x63, 0x61, 0x2e, 0x49, 0x73, 0x73, 0x75, + 0x65, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x46, 0x6f, 0x72, 0x50, + 0x72, 0x65, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x43, 0x65, 0x72, 0x74, + 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x22, 0x00, 0x32, 0x4c, 0x0a, 0x0d, 0x4f, 0x43, 0x53, + 0x50, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x3b, 0x0a, 0x0c, 0x47, 0x65, + 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x4f, 0x43, 0x53, 0x50, 0x12, 0x17, 0x2e, 0x63, 0x61, 0x2e, + 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x4f, 0x43, 0x53, 0x50, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x10, 0x2e, 0x63, 0x61, 0x2e, 0x4f, 0x43, 0x53, 0x50, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x32, 0x54, 0x0a, 0x0c, 0x43, 0x52, 0x4c, 0x47, 0x65, + 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x44, 0x0a, 0x0b, 0x47, 0x65, 0x6e, 0x65, 0x72, + 0x61, 0x74, 0x65, 0x43, 0x52, 0x4c, 0x12, 0x16, 0x2e, 0x63, 0x61, 0x2e, 0x47, 0x65, 0x6e, 0x65, + 0x72, 0x61, 0x74, 0x65, 0x43, 0x52, 0x4c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x63, 0x61, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x43, 0x52, 0x4c, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x63, 0x61, 0x2e, 0x47, 0x65, 0x6e, 0x65, - 0x72, 0x61, 0x74, 0x65, 0x43, 0x52, 0x4c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x00, 0x28, 0x01, 0x30, 0x01, 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, 0x63, 0x61, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x28, 0x01, 0x30, 0x01, 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, + 0x63, 0x61, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/ca/proto/ca.proto b/ca/proto/ca.proto index 702a139b383..454ef4ca55e 100644 --- a/ca/proto/ca.proto +++ b/ca/proto/ca.proto @@ -41,7 +41,7 @@ service OCSPGenerator { message GenerateOCSPRequest { string status = 2; int32 reason = 3; - int64 revokedAt = 4; + int64 revokedAtNS = 4; // Unix timestamp (nanoseconds) string serial = 5; int64 issuerID = 6; } @@ -64,7 +64,7 @@ message GenerateCRLRequest { message CRLMetadata { int64 issuerNameID = 1; - int64 thisUpdate = 2; // Unix timestamp (nanoseconds), also used for CRLNumber. + int64 thisUpdateNS = 2; // Unix timestamp (nanoseconds), also used for CRLNumber. int64 shardIdx = 3; } diff --git a/cmd/admin-revoker/main.go b/cmd/admin-revoker/main.go index ca60e313b33..5f9cccf7866 100644 --- a/cmd/admin-revoker/main.go +++ b/cmd/admin-revoker/main.go @@ -341,7 +341,7 @@ func (r *revoker) blockByPrivateKey(ctx context.Context, comment string, private req := &sapb.AddBlockedKeyRequest{ KeyHash: spkiHash, - Added: r.clk.Now().UnixNano(), + AddedNS: r.clk.Now().UnixNano(), Source: "admin-revoker", Comment: dbcomment, RevokedBy: 0, diff --git a/cmd/admin-revoker/main_test.go b/cmd/admin-revoker/main_test.go index 0fd7a92bc63..1ee19c3203c 100644 --- a/cmd/admin-revoker/main_test.go +++ b/cmd/admin-revoker/main_test.go @@ -412,7 +412,7 @@ func (c testCtx) addCertificate(t *testing.T, serial *big.Int, names []string, p context.Background(), &sapb.AddCertificateRequest{ Der: rawCert, RegID: regId, - Issued: time.Now().UnixNano(), + IssuedNS: time.Now().UnixNano(), IssuerNameID: 1, }, ) diff --git a/cmd/cert-checker/main_test.go b/cmd/cert-checker/main_test.go index f163be6ca80..3c6dd38feba 100644 --- a/cmd/cert-checker/main_test.go +++ b/cmd/cert-checker/main_test.go @@ -359,9 +359,9 @@ func TestGetAndProcessCerts(t *testing.T) { certDER, err := x509.CreateCertificate(rand.Reader, &rawCert, &rawCert, &testKey.PublicKey, testKey) test.AssertNotError(t, err, "Couldn't create certificate") _, err = sa.AddCertificate(context.Background(), &sapb.AddCertificateRequest{ - Der: certDER, - RegID: reg.Id, - Issued: fc.Now().UnixNano(), + Der: certDER, + RegID: reg.Id, + IssuedNS: fc.Now().UnixNano(), }) test.AssertNotError(t, err, "Couldn't add certificate") } diff --git a/cmd/rocsp-tool/client.go b/cmd/rocsp-tool/client.go index 1b89c19c132..0ff55144efd 100644 --- a/cmd/rocsp-tool/client.go +++ b/cmd/rocsp-tool/client.go @@ -209,11 +209,11 @@ func (cl *client) signAndStoreResponses(ctx context.Context, input <-chan *sa.Ce }() for status := range input { ocspReq := &capb.GenerateOCSPRequest{ - Serial: status.Serial, - IssuerID: status.IssuerID, - Status: string(status.Status), - Reason: int32(status.RevokedReason), - RevokedAt: status.RevokedDate.UnixNano(), + Serial: status.Serial, + IssuerID: status.IssuerID, + Status: string(status.Status), + Reason: int32(status.RevokedReason), + RevokedAtNS: status.RevokedDate.UnixNano(), } result, err := cl.ocspGenerator.GenerateOCSP(ctx, ocspReq) if err != nil { diff --git a/core/proto/core.pb.go b/core/proto/core.pb.go index 40693915df7..c06e0953e46 100644 --- a/core/proto/core.pb.go +++ b/core/proto/core.pb.go @@ -301,8 +301,8 @@ type Certificate struct { Serial string `protobuf:"bytes,2,opt,name=serial,proto3" json:"serial,omitempty"` Digest string `protobuf:"bytes,3,opt,name=digest,proto3" json:"digest,omitempty"` Der []byte `protobuf:"bytes,4,opt,name=der,proto3" json:"der,omitempty"` - Issued int64 `protobuf:"varint,5,opt,name=issued,proto3" json:"issued,omitempty"` // Unix timestamp (nanoseconds) - Expires int64 `protobuf:"varint,6,opt,name=expires,proto3" json:"expires,omitempty"` // Unix timestamp (nanoseconds) + IssuedNS int64 `protobuf:"varint,5,opt,name=issuedNS,proto3" json:"issuedNS,omitempty"` // Unix timestamp (nanoseconds) + ExpiresNS int64 `protobuf:"varint,6,opt,name=expiresNS,proto3" json:"expiresNS,omitempty"` // Unix timestamp (nanoseconds) } func (x *Certificate) Reset() { @@ -365,16 +365,16 @@ func (x *Certificate) GetDer() []byte { return nil } -func (x *Certificate) GetIssued() int64 { +func (x *Certificate) GetIssuedNS() int64 { if x != nil { - return x.Issued + return x.IssuedNS } return 0 } -func (x *Certificate) GetExpires() int64 { +func (x *Certificate) GetExpiresNS() int64 { if x != nil { - return x.Expires + return x.ExpiresNS } return 0 } @@ -384,15 +384,15 @@ type CertificateStatus struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Serial string `protobuf:"bytes,1,opt,name=serial,proto3" json:"serial,omitempty"` - Status string `protobuf:"bytes,3,opt,name=status,proto3" json:"status,omitempty"` - OcspLastUpdated int64 `protobuf:"varint,4,opt,name=ocspLastUpdated,proto3" json:"ocspLastUpdated,omitempty"` - RevokedDate int64 `protobuf:"varint,5,opt,name=revokedDate,proto3" json:"revokedDate,omitempty"` - RevokedReason int64 `protobuf:"varint,6,opt,name=revokedReason,proto3" json:"revokedReason,omitempty"` - LastExpirationNagSent int64 `protobuf:"varint,7,opt,name=lastExpirationNagSent,proto3" json:"lastExpirationNagSent,omitempty"` - NotAfter int64 `protobuf:"varint,9,opt,name=notAfter,proto3" json:"notAfter,omitempty"` - IsExpired bool `protobuf:"varint,10,opt,name=isExpired,proto3" json:"isExpired,omitempty"` - IssuerID int64 `protobuf:"varint,11,opt,name=issuerID,proto3" json:"issuerID,omitempty"` + Serial string `protobuf:"bytes,1,opt,name=serial,proto3" json:"serial,omitempty"` + Status string `protobuf:"bytes,3,opt,name=status,proto3" json:"status,omitempty"` + OcspLastUpdated int64 `protobuf:"varint,4,opt,name=ocspLastUpdated,proto3" json:"ocspLastUpdated,omitempty"` + RevokedDateNS int64 `protobuf:"varint,5,opt,name=revokedDateNS,proto3" json:"revokedDateNS,omitempty"` // Unix timestamp (nanoseconds) + RevokedReason int64 `protobuf:"varint,6,opt,name=revokedReason,proto3" json:"revokedReason,omitempty"` + LastExpirationNagSentNS int64 `protobuf:"varint,7,opt,name=lastExpirationNagSentNS,proto3" json:"lastExpirationNagSentNS,omitempty"` // Unix timestamp (nanoseconds) + NotAfterNS int64 `protobuf:"varint,9,opt,name=notAfterNS,proto3" json:"notAfterNS,omitempty"` // Unix timestamp (nanoseconds) + IsExpired bool `protobuf:"varint,10,opt,name=isExpired,proto3" json:"isExpired,omitempty"` + IssuerID int64 `protobuf:"varint,11,opt,name=issuerID,proto3" json:"issuerID,omitempty"` } func (x *CertificateStatus) Reset() { @@ -448,9 +448,9 @@ func (x *CertificateStatus) GetOcspLastUpdated() int64 { return 0 } -func (x *CertificateStatus) GetRevokedDate() int64 { +func (x *CertificateStatus) GetRevokedDateNS() int64 { if x != nil { - return x.RevokedDate + return x.RevokedDateNS } return 0 } @@ -462,16 +462,16 @@ func (x *CertificateStatus) GetRevokedReason() int64 { return 0 } -func (x *CertificateStatus) GetLastExpirationNagSent() int64 { +func (x *CertificateStatus) GetLastExpirationNagSentNS() int64 { if x != nil { - return x.LastExpirationNagSent + return x.LastExpirationNagSentNS } return 0 } -func (x *CertificateStatus) GetNotAfter() int64 { +func (x *CertificateStatus) GetNotAfterNS() int64 { if x != nil { - return x.NotAfter + return x.NotAfterNS } return 0 } @@ -501,7 +501,7 @@ type Registration struct { ContactsPresent bool `protobuf:"varint,4,opt,name=contactsPresent,proto3" json:"contactsPresent,omitempty"` Agreement string `protobuf:"bytes,5,opt,name=agreement,proto3" json:"agreement,omitempty"` InitialIP []byte `protobuf:"bytes,6,opt,name=initialIP,proto3" json:"initialIP,omitempty"` - CreatedAt int64 `protobuf:"varint,7,opt,name=createdAt,proto3" json:"createdAt,omitempty"` // Unix timestamp (nanoseconds) + CreatedAtNS int64 `protobuf:"varint,7,opt,name=createdAtNS,proto3" json:"createdAtNS,omitempty"` // Unix timestamp (nanoseconds) Status string `protobuf:"bytes,8,opt,name=status,proto3" json:"status,omitempty"` } @@ -579,9 +579,9 @@ func (x *Registration) GetInitialIP() []byte { return nil } -func (x *Registration) GetCreatedAt() int64 { +func (x *Registration) GetCreatedAtNS() int64 { if x != nil { - return x.CreatedAt + return x.CreatedAtNS } return 0 } @@ -602,7 +602,7 @@ type Authorization struct { Identifier string `protobuf:"bytes,2,opt,name=identifier,proto3" json:"identifier,omitempty"` RegistrationID int64 `protobuf:"varint,3,opt,name=registrationID,proto3" json:"registrationID,omitempty"` Status string `protobuf:"bytes,4,opt,name=status,proto3" json:"status,omitempty"` - Expires int64 `protobuf:"varint,5,opt,name=expires,proto3" json:"expires,omitempty"` // Unix timestamp (nanoseconds) + ExpiresNS int64 `protobuf:"varint,5,opt,name=expiresNS,proto3" json:"expiresNS,omitempty"` // Unix timestamp (nanoseconds) Challenges []*Challenge `protobuf:"bytes,6,rep,name=challenges,proto3" json:"challenges,omitempty"` } @@ -666,9 +666,9 @@ func (x *Authorization) GetStatus() string { return "" } -func (x *Authorization) GetExpires() int64 { +func (x *Authorization) GetExpiresNS() int64 { if x != nil { - return x.Expires + return x.ExpiresNS } return 0 } @@ -687,13 +687,13 @@ type Order struct { Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` RegistrationID int64 `protobuf:"varint,2,opt,name=registrationID,proto3" json:"registrationID,omitempty"` - Expires int64 `protobuf:"varint,3,opt,name=expires,proto3" json:"expires,omitempty"` + ExpiresNS int64 `protobuf:"varint,3,opt,name=expiresNS,proto3" json:"expiresNS,omitempty"` // Unix timestamp (nanoseconds) Error *ProblemDetails `protobuf:"bytes,4,opt,name=error,proto3" json:"error,omitempty"` CertificateSerial string `protobuf:"bytes,5,opt,name=certificateSerial,proto3" json:"certificateSerial,omitempty"` Status string `protobuf:"bytes,7,opt,name=status,proto3" json:"status,omitempty"` Names []string `protobuf:"bytes,8,rep,name=names,proto3" json:"names,omitempty"` BeganProcessing bool `protobuf:"varint,9,opt,name=beganProcessing,proto3" json:"beganProcessing,omitempty"` - Created int64 `protobuf:"varint,10,opt,name=created,proto3" json:"created,omitempty"` + CreatedNS int64 `protobuf:"varint,10,opt,name=createdNS,proto3" json:"createdNS,omitempty"` // Unix timestamp (nanoseconds) V2Authorizations []int64 `protobuf:"varint,11,rep,packed,name=v2Authorizations,proto3" json:"v2Authorizations,omitempty"` } @@ -743,9 +743,9 @@ func (x *Order) GetRegistrationID() int64 { return 0 } -func (x *Order) GetExpires() int64 { +func (x *Order) GetExpiresNS() int64 { if x != nil { - return x.Expires + return x.ExpiresNS } return 0 } @@ -785,9 +785,9 @@ func (x *Order) GetBeganProcessing() bool { return false } -func (x *Order) GetCreated() int64 { +func (x *Order) GetCreatedNS() int64 { if x != nil { - return x.Created + return x.CreatedNS } return 0 } @@ -804,9 +804,9 @@ type CRLEntry struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Serial string `protobuf:"bytes,1,opt,name=serial,proto3" json:"serial,omitempty"` - Reason int32 `protobuf:"varint,2,opt,name=reason,proto3" json:"reason,omitempty"` - RevokedAt int64 `protobuf:"varint,3,opt,name=revokedAt,proto3" json:"revokedAt,omitempty"` // Unix timestamp (nanoseconds) + Serial string `protobuf:"bytes,1,opt,name=serial,proto3" json:"serial,omitempty"` + Reason int32 `protobuf:"varint,2,opt,name=reason,proto3" json:"reason,omitempty"` + RevokedAtNS int64 `protobuf:"varint,3,opt,name=revokedAtNS,proto3" json:"revokedAtNS,omitempty"` // Unix timestamp (nanoseconds) } func (x *CRLEntry) Reset() { @@ -855,9 +855,9 @@ func (x *CRLEntry) GetReason() int32 { return 0 } -func (x *CRLEntry) GetRevokedAt() int64 { +func (x *CRLEntry) GetRevokedAtNS() int64 { if x != nil { - return x.RevokedAt + return x.RevokedAtNS } return 0 } @@ -906,7 +906,7 @@ var file_core_proto_rawDesc = []byte{ 0x6d, 0x54, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x12, 0x1e, 0x0a, 0x0a, 0x68, 0x74, 0x74, 0x70, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x05, 0x52, 0x0a, 0x68, 0x74, 0x74, 0x70, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0xa9, 0x01, + 0x05, 0x52, 0x0a, 0x68, 0x74, 0x74, 0x70, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0xb1, 0x01, 0x0a, 0x0b, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 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, @@ -914,65 +914,67 @@ var file_core_proto_rawDesc = []byte{ 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x12, 0x16, 0x0a, 0x06, 0x64, 0x69, 0x67, 0x65, 0x73, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x64, 0x69, 0x67, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x64, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x0c, 0x52, 0x03, 0x64, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x73, 0x73, 0x75, 0x65, - 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x69, 0x73, 0x73, 0x75, 0x65, 0x64, 0x12, - 0x18, 0x0a, 0x07, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, - 0x52, 0x07, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x22, 0xc7, 0x02, 0x0a, 0x11, 0x43, 0x65, - 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, - 0x16, 0x0a, 0x06, 0x73, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x06, 0x73, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, - 0x28, 0x0a, 0x0f, 0x6f, 0x63, 0x73, 0x70, 0x4c, 0x61, 0x73, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0f, 0x6f, 0x63, 0x73, 0x70, 0x4c, 0x61, - 0x73, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x72, 0x65, 0x76, - 0x6f, 0x6b, 0x65, 0x64, 0x44, 0x61, 0x74, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, - 0x72, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x64, 0x44, 0x61, 0x74, 0x65, 0x12, 0x24, 0x0a, 0x0d, 0x72, - 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x64, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, - 0x28, 0x03, 0x52, 0x0d, 0x72, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x64, 0x52, 0x65, 0x61, 0x73, 0x6f, - 0x6e, 0x12, 0x34, 0x0a, 0x15, 0x6c, 0x61, 0x73, 0x74, 0x45, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x4e, 0x61, 0x67, 0x53, 0x65, 0x6e, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, - 0x52, 0x15, 0x6c, 0x61, 0x73, 0x74, 0x45, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x4e, 0x61, 0x67, 0x53, 0x65, 0x6e, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6e, 0x6f, 0x74, 0x41, 0x66, - 0x74, 0x65, 0x72, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x6e, 0x6f, 0x74, 0x41, 0x66, - 0x74, 0x65, 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x69, 0x73, 0x45, 0x78, 0x70, 0x69, 0x72, 0x65, 0x64, - 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x69, 0x73, 0x45, 0x78, 0x70, 0x69, 0x72, 0x65, - 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x49, 0x44, 0x18, 0x0b, 0x20, - 0x01, 0x28, 0x03, 0x52, 0x08, 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x49, 0x44, 0x4a, 0x04, 0x08, - 0x02, 0x10, 0x03, 0x22, 0xe6, 0x01, 0x0a, 0x0c, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, - 0x52, 0x02, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0c, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x63, - 0x74, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x63, 0x74, - 0x12, 0x28, 0x0a, 0x0f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x63, 0x74, 0x73, 0x50, 0x72, 0x65, 0x73, - 0x65, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x63, 0x6f, 0x6e, 0x74, 0x61, - 0x63, 0x74, 0x73, 0x50, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x61, 0x67, - 0x72, 0x65, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, - 0x67, 0x72, 0x65, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x69, 0x6e, 0x69, 0x74, - 0x69, 0x61, 0x6c, 0x49, 0x50, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x69, 0x6e, 0x69, - 0x74, 0x69, 0x61, 0x6c, 0x49, 0x50, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, - 0x64, 0x41, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, - 0x65, 0x64, 0x41, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x08, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0xd6, 0x01, 0x0a, - 0x0d, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0e, - 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1e, - 0x0a, 0x0a, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0a, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x26, - 0x0a, 0x0e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x18, - 0x0a, 0x07, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, - 0x07, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x12, 0x2f, 0x0a, 0x0a, 0x63, 0x68, 0x61, 0x6c, - 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x63, - 0x6f, 0x72, 0x65, 0x2e, 0x43, 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x52, 0x0a, 0x63, - 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x73, 0x4a, 0x04, 0x08, 0x07, 0x10, 0x08, 0x4a, - 0x04, 0x08, 0x08, 0x10, 0x09, 0x22, 0xd7, 0x02, 0x0a, 0x05, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, - 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, - 0x26, 0x0a, 0x0e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, - 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x78, 0x70, 0x69, 0x72, - 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, - 0x73, 0x12, 0x2a, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, + 0x28, 0x0c, 0x52, 0x03, 0x64, 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x73, 0x73, 0x75, 0x65, + 0x64, 0x4e, 0x53, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x69, 0x73, 0x73, 0x75, 0x65, + 0x64, 0x4e, 0x53, 0x12, 0x1c, 0x0a, 0x09, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x4e, 0x53, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x4e, + 0x53, 0x22, 0xd3, 0x02, 0x0a, 0x11, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, + 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x65, 0x72, 0x69, 0x61, + 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x12, + 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x28, 0x0a, 0x0f, 0x6f, 0x63, 0x73, 0x70, 0x4c, + 0x61, 0x73, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x0f, 0x6f, 0x63, 0x73, 0x70, 0x4c, 0x61, 0x73, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x64, 0x12, 0x24, 0x0a, 0x0d, 0x72, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x64, 0x44, 0x61, 0x74, 0x65, + 0x4e, 0x53, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x72, 0x65, 0x76, 0x6f, 0x6b, 0x65, + 0x64, 0x44, 0x61, 0x74, 0x65, 0x4e, 0x53, 0x12, 0x24, 0x0a, 0x0d, 0x72, 0x65, 0x76, 0x6f, 0x6b, + 0x65, 0x64, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, + 0x72, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x64, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x12, 0x38, 0x0a, + 0x17, 0x6c, 0x61, 0x73, 0x74, 0x45, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, + 0x61, 0x67, 0x53, 0x65, 0x6e, 0x74, 0x4e, 0x53, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x17, + 0x6c, 0x61, 0x73, 0x74, 0x45, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x61, + 0x67, 0x53, 0x65, 0x6e, 0x74, 0x4e, 0x53, 0x12, 0x1e, 0x0a, 0x0a, 0x6e, 0x6f, 0x74, 0x41, 0x66, + 0x74, 0x65, 0x72, 0x4e, 0x53, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x6e, 0x6f, 0x74, + 0x41, 0x66, 0x74, 0x65, 0x72, 0x4e, 0x53, 0x12, 0x1c, 0x0a, 0x09, 0x69, 0x73, 0x45, 0x78, 0x70, + 0x69, 0x72, 0x65, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x69, 0x73, 0x45, 0x78, + 0x70, 0x69, 0x72, 0x65, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x49, + 0x44, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x49, + 0x44, 0x4a, 0x04, 0x08, 0x02, 0x10, 0x03, 0x22, 0xea, 0x01, 0x0a, 0x0c, 0x52, 0x65, 0x67, 0x69, + 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, + 0x6e, 0x74, 0x61, 0x63, 0x74, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e, + 0x74, 0x61, 0x63, 0x74, 0x12, 0x28, 0x0a, 0x0f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x63, 0x74, 0x73, + 0x50, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x63, + 0x6f, 0x6e, 0x74, 0x61, 0x63, 0x74, 0x73, 0x50, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x12, 0x1c, + 0x0a, 0x09, 0x61, 0x67, 0x72, 0x65, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x09, 0x61, 0x67, 0x72, 0x65, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x1c, 0x0a, 0x09, + 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x49, 0x50, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, 0x52, + 0x09, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x49, 0x50, 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x4e, 0x53, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x4e, 0x53, 0x12, 0x16, 0x0a, 0x06, + 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x22, 0xda, 0x01, 0x0a, 0x0d, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, + 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, + 0x66, 0x69, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x69, 0x64, 0x65, 0x6e, + 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x26, 0x0a, 0x0e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0e, + 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x12, 0x16, + 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, + 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, + 0x73, 0x4e, 0x53, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x65, 0x78, 0x70, 0x69, 0x72, + 0x65, 0x73, 0x4e, 0x53, 0x12, 0x2f, 0x0a, 0x0a, 0x63, 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, + 0x65, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, + 0x43, 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x52, 0x0a, 0x63, 0x68, 0x61, 0x6c, 0x6c, + 0x65, 0x6e, 0x67, 0x65, 0x73, 0x4a, 0x04, 0x08, 0x07, 0x10, 0x08, 0x4a, 0x04, 0x08, 0x08, 0x10, + 0x09, 0x22, 0xdf, 0x02, 0x0a, 0x05, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x26, 0x0a, 0x0e, 0x72, + 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x0e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x49, 0x44, 0x12, 0x1c, 0x0a, 0x09, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x4e, 0x53, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x4e, + 0x53, 0x12, 0x2a, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x50, 0x72, 0x6f, 0x62, 0x6c, 0x65, 0x6d, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x2c, 0x0a, 0x11, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x53, 0x65, 0x72, 0x69, @@ -983,20 +985,21 @@ var file_core_proto_rawDesc = []byte{ 0x28, 0x09, 0x52, 0x05, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x28, 0x0a, 0x0f, 0x62, 0x65, 0x67, 0x61, 0x6e, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x62, 0x65, 0x67, 0x61, 0x6e, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, - 0x69, 0x6e, 0x67, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x18, 0x0a, - 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x12, 0x2a, 0x0a, - 0x10, 0x76, 0x32, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x03, 0x52, 0x10, 0x76, 0x32, 0x41, 0x75, 0x74, 0x68, 0x6f, - 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x4a, 0x04, 0x08, 0x06, 0x10, 0x07, 0x22, - 0x58, 0x0a, 0x08, 0x43, 0x52, 0x4c, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x73, - 0x65, 0x72, 0x69, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x65, 0x72, - 0x69, 0x61, 0x6c, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x05, 0x52, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x72, - 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x64, 0x41, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, - 0x72, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x64, 0x41, 0x74, 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, 0x63, 0x6f, 0x72, 0x65, - 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x69, 0x6e, 0x67, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x4e, 0x53, + 0x18, 0x0a, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x4e, + 0x53, 0x12, 0x2a, 0x0a, 0x10, 0x76, 0x32, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x03, 0x52, 0x10, 0x76, 0x32, 0x41, + 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x4a, 0x04, 0x08, + 0x06, 0x10, 0x07, 0x22, 0x5c, 0x0a, 0x08, 0x43, 0x52, 0x4c, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, + 0x16, 0x0a, 0x06, 0x73, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x06, 0x73, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, + 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x12, + 0x20, 0x0a, 0x0b, 0x72, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x64, 0x41, 0x74, 0x4e, 0x53, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x72, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x64, 0x41, 0x74, 0x4e, + 0x53, 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, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/core/proto/core.proto b/core/proto/core.proto index d5ff87d4964..a08e852af75 100644 --- a/core/proto/core.proto +++ b/core/proto/core.proto @@ -40,8 +40,8 @@ message Certificate { string serial = 2; string digest = 3; bytes der = 4; - int64 issued = 5; // Unix timestamp (nanoseconds) - int64 expires = 6; // Unix timestamp (nanoseconds) + int64 issuedNS = 5; // Unix timestamp (nanoseconds) + int64 expiresNS = 6; // Unix timestamp (nanoseconds) } message CertificateStatus { @@ -49,10 +49,10 @@ message CertificateStatus { reserved 2; // previously subscriberApproved string status = 3; int64 ocspLastUpdated = 4; - int64 revokedDate = 5; + int64 revokedDateNS = 5; // Unix timestamp (nanoseconds) int64 revokedReason = 6; - int64 lastExpirationNagSent = 7; - int64 notAfter = 9; + int64 lastExpirationNagSentNS = 7; // Unix timestamp (nanoseconds) + int64 notAfterNS = 9; // Unix timestamp (nanoseconds) bool isExpired = 10; int64 issuerID = 11; } @@ -64,7 +64,7 @@ message Registration { bool contactsPresent = 4; string agreement = 5; bytes initialIP = 6; - int64 createdAt = 7; // Unix timestamp (nanoseconds) + int64 createdAtNS = 7; // Unix timestamp (nanoseconds) string status = 8; } @@ -73,7 +73,7 @@ message Authorization { string identifier = 2; int64 registrationID = 3; string status = 4; - int64 expires = 5; // Unix timestamp (nanoseconds) + int64 expiresNS = 5; // Unix timestamp (nanoseconds) repeated core.Challenge challenges = 6; reserved 7; // previously ACMEv1 combinations reserved 8; // previously v2 @@ -82,19 +82,19 @@ message Authorization { message Order { int64 id = 1; int64 registrationID = 2; - int64 expires = 3; + int64 expiresNS = 3; // Unix timestamp (nanoseconds) ProblemDetails error = 4; string certificateSerial = 5; reserved 6; // previously authorizations, deprecated in favor of v2Authorizations string status = 7; repeated string names = 8; bool beganProcessing = 9; - int64 created = 10; + int64 createdNS = 10; // Unix timestamp (nanoseconds) repeated int64 v2Authorizations = 11; } message CRLEntry { string serial = 1; int32 reason = 2; - int64 revokedAt = 3; // Unix timestamp (nanoseconds) + int64 revokedAtNS = 3; // Unix timestamp (nanoseconds) } diff --git a/crl/updater/updater.go b/crl/updater/updater.go index 7df31371d3f..ab0cc7e0d02 100644 --- a/crl/updater/updater.go +++ b/crl/updater/updater.go @@ -208,10 +208,10 @@ func (cu *crlUpdater) updateShard(ctx context.Context, atTime time.Time, issuerN var crlEntries []*proto.CRLEntry for _, chunk := range chunks { saStream, err := cu.sa.GetRevokedCerts(ctx, &sapb.GetRevokedCertsRequest{ - IssuerNameID: int64(issuerNameID), - ExpiresAfter: chunk.start.UnixNano(), - ExpiresBefore: chunk.end.UnixNano(), - RevokedBefore: atTime.UnixNano(), + IssuerNameID: int64(issuerNameID), + ExpiresAfterNS: chunk.start.UnixNano(), + ExpiresBeforeNS: chunk.end.UnixNano(), + RevokedBeforeNS: atTime.UnixNano(), }) if err != nil { return fmt.Errorf("connecting to SA: %w", err) @@ -243,7 +243,7 @@ func (cu *crlUpdater) updateShard(ctx context.Context, atTime time.Time, issuerN Payload: &capb.GenerateCRLRequest_Metadata{ Metadata: &capb.CRLMetadata{ IssuerNameID: int64(issuerNameID), - ThisUpdate: atTime.UnixNano(), + ThisUpdateNS: atTime.UnixNano(), ShardIdx: int64(shardIdx), }, }, diff --git a/grpc/interceptors_test.go b/grpc/interceptors_test.go index cacd21d81bf..9d7ac20eff0 100644 --- a/grpc/interceptors_test.go +++ b/grpc/interceptors_test.go @@ -112,7 +112,7 @@ func TestWaitForReadyTrue(t *testing.T) { c := test_proto.NewChillerClient(conn) start := time.Now() - _, err = c.Chill(context.Background(), &test_proto.Time{Time: time.Second.Nanoseconds()}) + _, err = c.Chill(context.Background(), &test_proto.Time{TimeNS: time.Second.Nanoseconds()}) if err == nil { t.Errorf("Successful Chill when we expected failure.") } @@ -144,7 +144,7 @@ func TestWaitForReadyFalse(t *testing.T) { c := test_proto.NewChillerClient(conn) start := time.Now() - _, err = c.Chill(context.Background(), &test_proto.Time{Time: time.Second.Nanoseconds()}) + _, err = c.Chill(context.Background(), &test_proto.Time{TimeNS: time.Second.Nanoseconds()}) if err == nil { t.Errorf("Successful Chill when we expected failure.") } @@ -165,9 +165,9 @@ func (s *testServer) Chill(ctx context.Context, in *test_proto.Time) (*test_prot // Sleep for either the requested amount of time, or the context times out or // is canceled. select { - case <-time.After(time.Duration(in.Time) * time.Nanosecond): + case <-time.After(time.Duration(in.TimeNS) * time.Nanosecond): spent := int64(time.Since(start) / time.Nanosecond) - return &test_proto.Time{Time: spent}, nil + return &test_proto.Time{TimeNS: spent}, nil case <-ctx.Done(): return nil, errors.New("unique error indicating that the server's shortened context timed itself out") } @@ -223,7 +223,7 @@ func TestTimeouts(t *testing.T) { t.Run(tc.timeout.String(), func(t *testing.T) { ctx, cancel := context.WithTimeout(context.Background(), tc.timeout) defer cancel() - _, err := c.Chill(ctx, &test_proto.Time{Time: time.Second.Nanoseconds()}) + _, err := c.Chill(ctx, &test_proto.Time{TimeNS: time.Second.Nanoseconds()}) if err == nil { t.Fatal("Got no error, expected a timeout") } @@ -282,7 +282,7 @@ func TestRequestTimeTagging(t *testing.T) { ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) defer cancel() delayTime := (time.Second * 5).Nanoseconds() - if _, err := c.Chill(ctx, &test_proto.Time{Time: delayTime}); err != nil { + if _, err := c.Chill(ctx, &test_proto.Time{TimeNS: delayTime}); err != nil { t.Fatalf("Unexpected error calling Chill RPC: %s", err) } @@ -308,7 +308,7 @@ func (s *blockedServer) Chill(_ context.Context, _ *test_proto.Time) (*test_prot // Wait for the roadblock to be cleared s.roadblock.Wait() // Return a dummy spent value to adhere to the chiller protocol - return &test_proto.Time{Time: int64(1)}, nil + return &test_proto.Time{TimeNS: int64(1)}, nil } func TestInFlightRPCStat(t *testing.T) { diff --git a/grpc/pb-marshalling.go b/grpc/pb-marshalling.go index 5429c1ee207..a685eba4741 100644 --- a/grpc/pb-marshalling.go +++ b/grpc/pb-marshalling.go @@ -240,7 +240,7 @@ func RegistrationToPB(reg core.Registration) (*corepb.Registration, error) { ContactsPresent: contactsPresent, Agreement: reg.Agreement, InitialIP: ipBytes, - CreatedAt: createdAt, + CreatedAtNS: createdAt, Status: string(reg.Status), }, nil } @@ -257,8 +257,8 @@ func PbToRegistration(pb *corepb.Registration) (core.Registration, error) { return core.Registration{}, err } var createdAt *time.Time - if pb.CreatedAt != 0 { - c := time.Unix(0, pb.CreatedAt).UTC() + if pb.CreatedAtNS != 0 { + c := time.Unix(0, pb.CreatedAtNS).UTC() createdAt = &c } var contacts *[]string @@ -304,7 +304,7 @@ func AuthzToPB(authz core.Authorization) (*corepb.Authorization, error) { Identifier: authz.Identifier.Value, RegistrationID: authz.RegistrationID, Status: string(authz.Status), - Expires: expires, + ExpiresNS: expires, Challenges: challs, }, nil } @@ -318,7 +318,7 @@ func PBToAuthz(pb *corepb.Authorization) (core.Authorization, error) { } challs[i] = chall } - expires := time.Unix(0, pb.Expires).UTC() + expires := time.Unix(0, pb.ExpiresNS).UTC() authz := core.Authorization{ ID: pb.Id, Identifier: identifier.ACMEIdentifier{Type: identifier.DNS, Value: pb.Identifier}, @@ -333,7 +333,7 @@ func PBToAuthz(pb *corepb.Authorization) (core.Authorization, error) { // orderValid checks that a corepb.Order is valid. In addition to the checks // from `newOrderValid` it ensures the order ID and the Created field are not nil. func orderValid(order *corepb.Order) bool { - return order.Id != 0 && order.Created != 0 && newOrderValid(order) + return order.Id != 0 && order.CreatedNS != 0 && newOrderValid(order) } // newOrderValid checks that a corepb.Order is valid. It allows for a nil @@ -344,7 +344,7 @@ func orderValid(order *corepb.Order) bool { // `order.CertificateSerial` to be nil such that it can be used in places where // the order has not been finalized yet. func newOrderValid(order *corepb.Order) bool { - return !(order.RegistrationID == 0 || order.Expires == 0 || len(order.Names) == 0) + return !(order.RegistrationID == 0 || order.ExpiresNS == 0 || len(order.Names) == 0) } func CertToPB(cert core.Certificate) *corepb.Certificate { @@ -353,8 +353,8 @@ func CertToPB(cert core.Certificate) *corepb.Certificate { Serial: cert.Serial, Digest: cert.Digest, Der: cert.DER, - Issued: cert.Issued.UnixNano(), - Expires: cert.Expires.UnixNano(), + IssuedNS: cert.Issued.UnixNano(), + ExpiresNS: cert.Expires.UnixNano(), } } @@ -364,22 +364,22 @@ func PBToCert(pb *corepb.Certificate) (core.Certificate, error) { Serial: pb.Serial, Digest: pb.Digest, DER: pb.Der, - Issued: time.Unix(0, pb.Issued), - Expires: time.Unix(0, pb.Expires), + Issued: time.Unix(0, pb.IssuedNS), + Expires: time.Unix(0, pb.ExpiresNS), }, nil } func CertStatusToPB(certStatus core.CertificateStatus) *corepb.CertificateStatus { return &corepb.CertificateStatus{ - Serial: certStatus.Serial, - Status: string(certStatus.Status), - OcspLastUpdated: certStatus.OCSPLastUpdated.UnixNano(), - RevokedDate: certStatus.RevokedDate.UnixNano(), - RevokedReason: int64(certStatus.RevokedReason), - LastExpirationNagSent: certStatus.LastExpirationNagSent.UnixNano(), - NotAfter: certStatus.NotAfter.UnixNano(), - IsExpired: certStatus.IsExpired, - IssuerID: certStatus.IssuerNameID, + Serial: certStatus.Serial, + Status: string(certStatus.Status), + OcspLastUpdated: certStatus.OCSPLastUpdated.UnixNano(), + RevokedDateNS: certStatus.RevokedDate.UnixNano(), + RevokedReason: int64(certStatus.RevokedReason), + LastExpirationNagSentNS: certStatus.LastExpirationNagSent.UnixNano(), + NotAfterNS: certStatus.NotAfter.UnixNano(), + IsExpired: certStatus.IsExpired, + IssuerID: certStatus.IssuerNameID, } } @@ -388,10 +388,10 @@ func PBToCertStatus(pb *corepb.CertificateStatus) (core.CertificateStatus, error Serial: pb.Serial, Status: core.OCSPStatus(pb.Status), OCSPLastUpdated: time.Unix(0, pb.OcspLastUpdated), - RevokedDate: time.Unix(0, pb.RevokedDate), + RevokedDate: time.Unix(0, pb.RevokedDateNS), RevokedReason: revocation.Reason(pb.RevokedReason), - LastExpirationNagSent: time.Unix(0, pb.LastExpirationNagSent), - NotAfter: time.Unix(0, pb.NotAfter), + LastExpirationNagSent: time.Unix(0, pb.LastExpirationNagSentNS), + NotAfter: time.Unix(0, pb.NotAfterNS), IsExpired: pb.IsExpired, IssuerNameID: pb.IssuerID, }, nil diff --git a/grpc/pb-marshalling_test.go b/grpc/pb-marshalling_test.go index 179768cb318..0bb17db0f3d 100644 --- a/grpc/pb-marshalling_test.go +++ b/grpc/pb-marshalling_test.go @@ -251,12 +251,12 @@ func TestOrderValid(t *testing.T) { Order: &corepb.Order{ Id: 1, RegistrationID: 1, - Expires: 1, + ExpiresNS: 1, CertificateSerial: "", V2Authorizations: []int64{}, Names: []string{"example.com"}, BeganProcessing: false, - Created: 1, + CreatedNS: 1, }, ExpectedValid: true, }, @@ -265,11 +265,11 @@ func TestOrderValid(t *testing.T) { Order: &corepb.Order{ Id: 1, RegistrationID: 1, - Expires: 1, + ExpiresNS: 1, V2Authorizations: []int64{}, Names: []string{"example.com"}, BeganProcessing: false, - Created: 1, + CreatedNS: 1, }, ExpectedValid: true, }, @@ -282,7 +282,7 @@ func TestOrderValid(t *testing.T) { Order: &corepb.Order{ Id: 0, RegistrationID: 1, - Expires: 1, + ExpiresNS: 1, CertificateSerial: "", V2Authorizations: []int64{}, Names: []string{"example.com"}, @@ -294,7 +294,7 @@ func TestOrderValid(t *testing.T) { Order: &corepb.Order{ Id: 1, RegistrationID: 0, - Expires: 1, + ExpiresNS: 1, CertificateSerial: "", V2Authorizations: []int64{}, Names: []string{"example.com"}, @@ -306,7 +306,7 @@ func TestOrderValid(t *testing.T) { Order: &corepb.Order{ Id: 1, RegistrationID: 1, - Expires: 0, + ExpiresNS: 0, CertificateSerial: "", V2Authorizations: []int64{}, Names: []string{"example.com"}, @@ -318,7 +318,7 @@ func TestOrderValid(t *testing.T) { Order: &corepb.Order{ Id: 1, RegistrationID: 1, - Expires: 1, + ExpiresNS: 1, CertificateSerial: "", V2Authorizations: []int64{}, Names: []string{}, diff --git a/grpc/test_proto/interceptors_test.pb.go b/grpc/test_proto/interceptors_test.pb.go index 8aff48bcd74..9b350fcfb35 100644 --- a/grpc/test_proto/interceptors_test.pb.go +++ b/grpc/test_proto/interceptors_test.pb.go @@ -25,7 +25,7 @@ type Time struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Time int64 `protobuf:"varint,1,opt,name=time,proto3" json:"time,omitempty"` // In nanoseconds + TimeNS int64 `protobuf:"varint,1,opt,name=timeNS,proto3" json:"timeNS,omitempty"` // Unix timestamp (nanoseconds) } func (x *Time) Reset() { @@ -60,9 +60,9 @@ func (*Time) Descriptor() ([]byte, []int) { return file_interceptors_test_proto_rawDescGZIP(), []int{0} } -func (x *Time) GetTime() int64 { +func (x *Time) GetTimeNS() int64 { if x != nil { - return x.Time + return x.TimeNS } return 0 } @@ -71,15 +71,15 @@ var File_interceptors_test_proto protoreflect.FileDescriptor var file_interceptors_test_proto_rawDesc = []byte{ 0x0a, 0x17, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x63, 0x65, 0x70, 0x74, 0x6f, 0x72, 0x73, 0x5f, 0x74, - 0x65, 0x73, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x1a, 0x0a, 0x04, 0x54, 0x69, 0x6d, - 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, - 0x04, 0x74, 0x69, 0x6d, 0x65, 0x32, 0x22, 0x0a, 0x07, 0x43, 0x68, 0x69, 0x6c, 0x6c, 0x65, 0x72, - 0x12, 0x17, 0x0a, 0x05, 0x43, 0x68, 0x69, 0x6c, 0x6c, 0x12, 0x05, 0x2e, 0x54, 0x69, 0x6d, 0x65, - 0x1a, 0x05, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x22, 0x00, 0x42, 0x30, 0x5a, 0x2e, 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, 0x67, 0x72, 0x70, 0x63, - 0x2f, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, + 0x65, 0x73, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x1e, 0x0a, 0x04, 0x54, 0x69, 0x6d, + 0x65, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x69, 0x6d, 0x65, 0x4e, 0x53, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x03, 0x52, 0x06, 0x74, 0x69, 0x6d, 0x65, 0x4e, 0x53, 0x32, 0x22, 0x0a, 0x07, 0x43, 0x68, 0x69, + 0x6c, 0x6c, 0x65, 0x72, 0x12, 0x17, 0x0a, 0x05, 0x43, 0x68, 0x69, 0x6c, 0x6c, 0x12, 0x05, 0x2e, + 0x54, 0x69, 0x6d, 0x65, 0x1a, 0x05, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x22, 0x00, 0x42, 0x30, 0x5a, + 0x2e, 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, + 0x67, 0x72, 0x70, 0x63, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/grpc/test_proto/interceptors_test.proto b/grpc/test_proto/interceptors_test.proto index ef6f1e567db..3b9ce35e424 100644 --- a/grpc/test_proto/interceptors_test.proto +++ b/grpc/test_proto/interceptors_test.proto @@ -8,5 +8,5 @@ service Chiller { } message Time { - int64 time = 1; // In nanoseconds + int64 timeNS = 1; // Unix timestamp (nanoseconds) } diff --git a/mocks/ca.go b/mocks/ca.go index 1fce53bf406..ba289666161 100644 --- a/mocks/ca.go +++ b/mocks/ca.go @@ -39,8 +39,8 @@ func (ca *MockCA) IssueCertificateForPrecertificate(ctx context.Context, req *ca RegistrationID: 1, Serial: "mock", Digest: "mock", - Issued: 1, - Expires: 1, + IssuedNS: 1, + ExpiresNS: 1, }, nil } diff --git a/mocks/mocks.go b/mocks/mocks.go index 9fc56829947..63f2bbdefbc 100644 --- a/mocks/mocks.go +++ b/mocks/mocks.go @@ -120,7 +120,7 @@ func (sa *StorageAuthorityReadOnly) GetRegistration(_ context.Context, req *sapb goodReg.InitialIP, _ = net.ParseIP("5.6.7.8").MarshalText() createdAt := time.Date(2003, 9, 27, 0, 0, 0, 0, time.UTC) - goodReg.CreatedAt = createdAt.UnixNano() + goodReg.CreatedAtNS = createdAt.UnixNano() return goodReg, nil } @@ -202,8 +202,8 @@ func (sa *StorageAuthorityReadOnly) GetSerialMetadata(ctx context.Context, req * return &sapb.SerialMetadata{ Serial: req.Serial, RegistrationID: 1, - Created: sa.clk.Now().Add(-1 * time.Hour).UnixNano(), - Expires: sa.clk.Now().Add(2159 * time.Hour).UnixNano(), + CreatedNS: sa.clk.Now().Add(-1 * time.Hour).UnixNano(), + ExpiresNS: sa.clk.Now().Add(2159 * time.Hour).UnixNano(), }, nil } @@ -216,7 +216,7 @@ func (sa *StorageAuthorityReadOnly) GetCertificate(_ context.Context, req *sapb. return &corepb.Certificate{ RegistrationID: 1, Der: certBlock.Bytes, - Issued: sa.clk.Now().Add(-1 * time.Hour).UnixNano(), + IssuedNS: sa.clk.Now().Add(-1 * time.Hour).UnixNano(), }, nil } else if req.Serial == "0000000000000000000000000000000000b2" { certPemBytes, _ := os.ReadFile("test/178.crt") @@ -224,7 +224,7 @@ func (sa *StorageAuthorityReadOnly) GetCertificate(_ context.Context, req *sapb. return &corepb.Certificate{ RegistrationID: 1, Der: certBlock.Bytes, - Issued: sa.clk.Now().Add(-1 * time.Hour).UnixNano(), + IssuedNS: sa.clk.Now().Add(-1 * time.Hour).UnixNano(), }, nil } else if req.Serial == "000000000000000000000000000000626164" { return nil, errors.New("bad") @@ -358,12 +358,12 @@ func (sa *StorageAuthority) NewOrderAndAuthzs(_ context.Context, req *sapb.NewOr response := &corepb.Order{ // Fields from the input new order request. RegistrationID: req.NewOrder.RegistrationID, - Expires: req.NewOrder.Expires, + ExpiresNS: req.NewOrder.ExpiresNS, Names: req.NewOrder.Names, V2Authorizations: req.NewOrder.V2Authorizations, // Mock new fields generated by the database transaction. - Id: rand.Int63(), - Created: time.Now().UnixNano(), + Id: rand.Int63(), + CreatedNS: time.Now().UnixNano(), // A new order is never processing because it can't have been finalized yet. BeganProcessing: false, Status: string(core.StatusPending), @@ -399,8 +399,8 @@ func (sa *StorageAuthorityReadOnly) GetOrder(_ context.Context, req *sapb.OrderR validOrder := &corepb.Order{ Id: req.Id, RegistrationID: 1, - Created: created, - Expires: exp, + CreatedNS: created, + ExpiresNS: exp, Names: []string{"example.com"}, Status: string(core.StatusValid), V2Authorizations: []int64{1}, @@ -426,7 +426,7 @@ func (sa *StorageAuthorityReadOnly) GetOrder(_ context.Context, req *sapb.OrderR // Order ID 7 is ready, but expired if req.Id == 7 { validOrder.Status = string(core.StatusReady) - validOrder.Expires = sa.clk.Now().AddDate(-30, 0, 0).Unix() + validOrder.ExpiresNS = sa.clk.Now().AddDate(-30, 0, 0).Unix() } if req.Id == 8 { @@ -435,7 +435,7 @@ func (sa *StorageAuthorityReadOnly) GetOrder(_ context.Context, req *sapb.OrderR // Order 9 is fresh if req.Id == 9 { - validOrder.Created = sa.clk.Now().AddDate(0, 0, 1).Unix() + validOrder.CreatedNS = sa.clk.Now().AddDate(0, 0, 1).Unix() } // Order 10 is processing @@ -474,7 +474,7 @@ func (sa *StorageAuthorityReadOnly) GetValidAuthorizations2(ctx context.Context, if req.RegistrationID != 1 && req.RegistrationID != 5 && req.RegistrationID != 4 { return &sapb.Authorizations{}, nil } - now := time.Unix(0, req.Now) + now := time.Unix(0, req.NowNS) auths := &sapb.Authorizations{} for _, name := range req.Domains { exp := now.AddDate(100, 0, 0) diff --git a/ra/mock_test.go b/ra/mock_test.go index 2d836b7d5fa..68578264a13 100644 --- a/ra/mock_test.go +++ b/ra/mock_test.go @@ -56,7 +56,7 @@ func (sa *mockInvalidPlusValidAuthzAuthority) GetAuthorizations2(ctx context.Con Status: "valid", Identifier: sa.domainWithFailures, RegistrationID: 1234, - Expires: time.Date(2101, 12, 3, 0, 0, 0, 0, time.UTC).Unix(), + ExpiresNS: time.Date(2101, 12, 3, 0, 0, 0, 0, time.UTC).Unix(), }, }, }, diff --git a/ra/ra.go b/ra/ra.go index 2978b43e065..8000e6ad0fa 100644 --- a/ra/ra.go +++ b/ra/ra.go @@ -377,8 +377,8 @@ func (ra *RegistrationAuthorityImpl) checkRegistrationIPLimit(ctx context.Contex count, err := counter(ctx, &sapb.CountRegistrationsByIPRequest{ Ip: ip, Range: &sapb.Range{ - Earliest: limit.WindowBegin(now).UnixNano(), - Latest: now.UnixNano(), + EarliestNS: limit.WindowBegin(now).UnixNano(), + LatestNS: now.UnixNano(), }, }) if err != nil { @@ -631,8 +631,8 @@ func (ra *RegistrationAuthorityImpl) checkInvalidAuthorizationLimit(ctx context. RegistrationID: regID, Hostname: hostname, Range: &sapb.Range{ - Earliest: earliest.UnixNano(), - Latest: latest.UnixNano(), + EarliestNS: earliest.UnixNano(), + LatestNS: latest.UnixNano(), }, } count, err := ra.SA.CountInvalidAuthorizations2(ctx, req) @@ -662,8 +662,8 @@ func (ra *RegistrationAuthorityImpl) checkNewOrdersPerAccountLimit(ctx context.C count, err := ra.SA.CountOrders(ctx, &sapb.CountOrdersRequest{ AccountID: acctID, Range: &sapb.Range{ - Earliest: now.Add(-limit.Window.Duration).UnixNano(), - Latest: now.UnixNano(), + EarliestNS: now.Add(-limit.Window.Duration).UnixNano(), + LatestNS: now.UnixNano(), }, }) if err != nil { @@ -1038,7 +1038,7 @@ func (ra *RegistrationAuthorityImpl) FinalizeOrder(ctx context.Context, req *rap // Observe the age of this order, so we know how quickly most clients complete // issuance flows. - ra.orderAges.WithLabelValues("FinalizeOrder").Observe(ra.clk.Since(time.Unix(0, req.Order.Created)).Seconds()) + ra.orderAges.WithLabelValues("FinalizeOrder").Observe(ra.clk.Since(time.Unix(0, req.Order.CreatedNS)).Seconds()) // Step 2: Set the Order to Processing status // @@ -1394,8 +1394,8 @@ func (ra *RegistrationAuthorityImpl) enforceNameCounts(ctx context.Context, name req := &sapb.CountCertificatesByNamesRequest{ Names: names, Range: &sapb.Range{ - Earliest: limit.WindowBegin(now).UnixNano(), - Latest: now.UnixNano(), + EarliestNS: limit.WindowBegin(now).UnixNano(), + LatestNS: now.UnixNano(), }, } @@ -1486,11 +1486,11 @@ func (ra *RegistrationAuthorityImpl) checkCertificatesPerFQDNSetLimit(ctx contex if isOverridden { clientId := fmt.Sprintf("%d:%s", regID, strings.Join(names, ",")) - utilization := float64(len(prevIssuances.Timestamps)) / float64(threshold) + utilization := float64(len(prevIssuances.TimestampsNS)) / float64(threshold) ra.rlOverrideUsageGauge.WithLabelValues(ratelimit.CertificatesPerFQDNSet, clientId).Set(utilization) } - if int64(len(prevIssuances.Timestamps)) < threshold { + if int64(len(prevIssuances.TimestampsNS)) < threshold { // Issuance in window is below the threshold, no need to limit. return nil } else { @@ -1499,7 +1499,7 @@ func (ra *RegistrationAuthorityImpl) checkCertificatesPerFQDNSetLimit(ctx contex // limit.Window/threshold from the time of each issuance timestamp. now := ra.clk.Now() nsPerToken := limit.Window.Nanoseconds() / threshold - for i, timestamp := range prevIssuances.Timestamps { + for i, timestamp := range prevIssuances.TimestampsNS { tokensGeneratedSince := now.Add(-time.Duration(int64(i+1) * nsPerToken)) if time.Unix(0, timestamp).Before(tokensGeneratedSince) { // We know `i+1` tokens were generated since `tokenGeneratedSince`, @@ -1508,7 +1508,7 @@ func (ra *RegistrationAuthorityImpl) checkCertificatesPerFQDNSetLimit(ctx contex return nil } } - retryTime := time.Unix(0, prevIssuances.Timestamps[0]).Add(time.Duration(nsPerToken)) + retryTime := time.Unix(0, prevIssuances.TimestampsNS[0]).Add(time.Duration(nsPerToken)) retryAfter := retryTime.Sub(now) return berrors.DuplicateCertificateError( retryAfter, @@ -1673,7 +1673,7 @@ func mergeUpdate(base *corepb.Registration, update *corepb.Registration) (*corep ContactsPresent: base.ContactsPresent, Agreement: base.Agreement, InitialIP: base.InitialIP, - CreatedAt: base.CreatedAt, + CreatedAtNS: base.CreatedAtNS, Status: base.Status, } @@ -1734,9 +1734,9 @@ func (ra *RegistrationAuthorityImpl) recordValidation(ctx context.Context, authI _, err = ra.SA.FinalizeAuthorization2(ctx, &sapb.FinalizeAuthorizationRequest{ Id: authzID, Status: string(challenge.Status), - Expires: expires, + ExpiresNS: expires, Attempted: string(challenge.Type), - AttemptedAt: validated, + AttemptedAtNS: validated, ValidationRecords: vr.Records, ValidationError: vr.Problems, }) @@ -1756,7 +1756,7 @@ func (ra *RegistrationAuthorityImpl) PerformValidation( // Clock for start of PerformValidation. vStart := ra.clk.Now() - if req.Authz == nil || req.Authz.Id == "" || req.Authz.Identifier == "" || req.Authz.Status == "" || req.Authz.Expires == 0 { + if req.Authz == nil || req.Authz.Id == "" || req.Authz.Identifier == "" || req.Authz.Status == "" || req.Authz.ExpiresNS == 0 { return nil, errIncompleteGRPCRequest } @@ -1903,7 +1903,7 @@ func (ra *RegistrationAuthorityImpl) revokeCertificate(ctx context.Context, seri _, err := ra.SA.RevokeCertificate(ctx, &sapb.RevokeCertificateRequest{ Serial: serialString, Reason: int64(reason), - Date: revokedAt, + DateNS: revokedAt, IssuerID: issuerID, }) if err != nil { @@ -1938,11 +1938,11 @@ func (ra *RegistrationAuthorityImpl) updateRevocationForKeyCompromise(ctx contex } _, err = ra.SA.UpdateRevokedCertificate(ctx, &sapb.RevokeCertificateRequest{ - Serial: serialString, - Reason: int64(ocsp.KeyCompromise), - Date: thisUpdate, - Backdate: status.RevokedDate, - IssuerID: issuerID, + Serial: serialString, + Reason: int64(ocsp.KeyCompromise), + DateNS: thisUpdate, + BackdateNS: status.RevokedDateNS, + IssuerID: issuerID, }) if err != nil { return err @@ -2042,7 +2042,7 @@ func (ra *RegistrationAuthorityImpl) RevokeCertByApplicant(ctx context.Context, authzMapPB, err = ra.SA.GetValidAuthorizations2(ctx, &sapb.GetValidAuthorizationsRequest{ RegistrationID: req.RegID, Domains: cert.DNSNames, - Now: ra.clk.Now().UnixNano(), + NowNS: ra.clk.Now().UnixNano(), }) if err != nil { return nil, err @@ -2095,7 +2095,7 @@ func (ra *RegistrationAuthorityImpl) addToBlockedKeys(ctx context.Context, key c // Add the public key to the blocked keys list. _, err = ra.SA.AddBlockedKey(ctx, &sapb.AddBlockedKeyRequest{ KeyHash: digest[:], - Added: ra.clk.Now().UnixNano(), + AddedNS: ra.clk.Now().UnixNano(), Source: src, Comment: comment, }) @@ -2370,17 +2370,17 @@ func (ra *RegistrationAuthorityImpl) GenerateOCSP(ctx context.Context, req *rapb return nil, errors.New("serial belongs to a certificate that errored during issuance") } - notAfter := time.Unix(0, status.NotAfter).UTC() + notAfter := time.Unix(0, status.NotAfterNS).UTC() if ra.clk.Now().After(notAfter) { return nil, berrors.NotFoundError("certificate is expired") } return ra.OCSP.GenerateOCSP(ctx, &capb.GenerateOCSPRequest{ - Serial: req.Serial, - Status: status.Status, - Reason: int32(status.RevokedReason), - RevokedAt: status.RevokedDate, - IssuerID: status.IssuerID, + Serial: req.Serial, + Status: status.Status, + Reason: int32(status.RevokedReason), + RevokedAtNS: status.RevokedDateNS, + IssuerID: status.IssuerID, }) } @@ -2427,11 +2427,11 @@ func (ra *RegistrationAuthorityImpl) NewOrder(ctx context.Context, req *rapb.New // Error if an incomplete order is returned. if existingOrder != nil { // Check to see if the expected fields of the existing order are set. - if existingOrder.Id == 0 || existingOrder.Created == 0 || existingOrder.Status == "" || existingOrder.RegistrationID == 0 || existingOrder.Expires == 0 || len(existingOrder.Names) == 0 { + if existingOrder.Id == 0 || existingOrder.CreatedNS == 0 || existingOrder.Status == "" || existingOrder.RegistrationID == 0 || existingOrder.ExpiresNS == 0 || len(existingOrder.Names) == 0 { return nil, errIncompleteGRPCResponse } // Track how often we reuse an existing order and how old that order is. - ra.orderAges.WithLabelValues("NewOrder").Observe(ra.clk.Since(time.Unix(0, existingOrder.Created)).Seconds()) + ra.orderAges.WithLabelValues("NewOrder").Observe(ra.clk.Since(time.Unix(0, existingOrder.CreatedNS)).Seconds()) return existingOrder, nil } @@ -2452,7 +2452,7 @@ func (ra *RegistrationAuthorityImpl) NewOrder(ctx context.Context, req *rapb.New getAuthReq := &sapb.GetAuthorizationsRequest{ RegistrationID: newOrder.RegistrationID, - Now: authzExpiryCutoff, + NowNS: authzExpiryCutoff, Domains: newOrder.Names, } existingAuthz, err := ra.SA.GetAuthorizations2(ctx, getAuthReq) @@ -2478,7 +2478,7 @@ func (ra *RegistrationAuthorityImpl) NewOrder(ctx context.Context, req *rapb.New continue } authz := nameToExistingAuthz[name] - authzAge := (ra.authorizationLifetime - time.Unix(0, authz.Expires).Sub(ra.clk.Now())).Seconds() + authzAge := (ra.authorizationLifetime - time.Unix(0, authz.ExpiresNS).Sub(ra.clk.Now())).Seconds() // If the identifier is a wildcard and the existing authz only has one // DNS-01 type challenge we can reuse it. In theory we will // never get back an authorization for a domain with a wildcard prefix @@ -2552,14 +2552,14 @@ func (ra *RegistrationAuthorityImpl) NewOrder(ctx context.Context, req *rapb.New // minExpiry (the order's lifetime) for _, authz := range nameToExistingAuthz { // An authz without an expiry is an unexpected internal server event - if authz.Expires == 0 { + if authz.ExpiresNS == 0 { return nil, berrors.InternalServerError( "SA.GetAuthorizations returned an authz (%s) with zero expiry", authz.Id) } // If the reused authorization expires before the minExpiry, it's expiry // is the new minExpiry. - authzExpiry := time.Unix(0, authz.Expires) + authzExpiry := time.Unix(0, authz.ExpiresNS) if authzExpiry.Before(minExpiry) { minExpiry = authzExpiry } @@ -2574,7 +2574,7 @@ func (ra *RegistrationAuthorityImpl) NewOrder(ctx context.Context, req *rapb.New } // Set the order's expiry to the minimum expiry. The db doesn't store // sub-second values, so truncate here. - newOrder.Expires = minExpiry.Truncate(time.Second).UnixNano() + newOrder.ExpiresNS = minExpiry.Truncate(time.Second).UnixNano() newOrderAndAuthzsReq := &sapb.NewOrderAndAuthzsRequest{ NewOrder: newOrder, @@ -2584,7 +2584,7 @@ func (ra *RegistrationAuthorityImpl) NewOrder(ctx context.Context, req *rapb.New if err != nil { return nil, err } - if storedOrder.Id == 0 || storedOrder.Created == 0 || storedOrder.Status == "" || storedOrder.RegistrationID == 0 || storedOrder.Expires == 0 || len(storedOrder.Names) == 0 { + if storedOrder.Id == 0 || storedOrder.CreatedNS == 0 || storedOrder.Status == "" || storedOrder.RegistrationID == 0 || storedOrder.ExpiresNS == 0 || len(storedOrder.Names) == 0 { return nil, errIncompleteGRPCResponse } ra.orderAges.WithLabelValues("NewOrder").Observe(0) @@ -2603,7 +2603,7 @@ func (ra *RegistrationAuthorityImpl) createPendingAuthz(reg int64, identifier id Identifier: identifier.Value, RegistrationID: reg, Status: string(core.StatusPending), - Expires: ra.clk.Now().Add(ra.pendingAuthorizationLifetime).Truncate(time.Second).UnixNano(), + ExpiresNS: ra.clk.Now().Add(ra.pendingAuthorizationLifetime).Truncate(time.Second).UnixNano(), } // Create challenges. The WFE will update them with URIs before sending them out. diff --git a/ra/ra_test.go b/ra/ra_test.go index 7f205f3ef27..a25a87bc515 100644 --- a/ra/ra_test.go +++ b/ra/ra_test.go @@ -100,7 +100,7 @@ func createPendingAuthorization(t *testing.T, sa sapb.StorageAuthorityClient, do res, err := sa.NewOrderAndAuthzs(context.Background(), &sapb.NewOrderAndAuthzsRequest{ NewOrder: &sapb.NewOrderRequest{ RegistrationID: Registration.Id, - Expires: exp.UnixNano(), + ExpiresNS: exp.UnixNano(), Names: []string{domain}, }, NewAuthzs: []*corepb.Authorization{authzPB}, @@ -116,11 +116,11 @@ func createFinalizedAuthorization(t *testing.T, sa sapb.StorageAuthorityClient, pendingID, err := strconv.ParseInt(pending.Id, 10, 64) test.AssertNotError(t, err, "strconv.ParseInt failed") _, err = sa.FinalizeAuthorization2(context.Background(), &sapb.FinalizeAuthorizationRequest{ - Id: pendingID, - Status: "valid", - Expires: exp.UnixNano(), - Attempted: string(chall), - AttemptedAt: attemptedAt.UnixNano(), + Id: pendingID, + Status: "valid", + ExpiresNS: exp.UnixNano(), + Attempted: string(chall), + AttemptedAtNS: attemptedAt.UnixNano(), }) test.AssertNotError(t, err, "sa.FinalizeAuthorizations2 failed") return pendingID @@ -893,7 +893,7 @@ func TestPerformValidationSuccess(t *testing.T) { // The DB authz's expiry should be equal to the current time plus the // configured authorization lifetime - test.AssertEquals(t, time.Unix(0, dbAuthzPB.Expires).String(), fc.Now().Add(ra.authorizationLifetime).String()) + test.AssertEquals(t, time.Unix(0, dbAuthzPB.ExpiresNS).String(), fc.Now().Add(ra.authorizationLifetime).String()) // Check that validated timestamp was recorded, stored, and retrieved expectedValidated := fc.Now() @@ -958,7 +958,7 @@ func TestCertificateKeyNotEqualAccountKey(t *testing.T) { order, err := sa.NewOrderAndAuthzs(context.Background(), &sapb.NewOrderAndAuthzsRequest{ NewOrder: &sapb.NewOrderRequest{ RegistrationID: Registration.Id, - Expires: exp.UnixNano(), + ExpiresNS: exp.UnixNano(), Names: []string{"www.example.com"}, V2Authorizations: []int64{authzID}, }, @@ -1188,12 +1188,12 @@ type mockSAWithNameCounts struct { func (m mockSAWithNameCounts) CountCertificatesByNames(ctx context.Context, req *sapb.CountCertificatesByNamesRequest, _ ...grpc.CallOption) (*sapb.CountByNames, error) { expectedLatest := m.clk.Now().UnixNano() - if req.Range.Latest != expectedLatest { - m.t.Errorf("incorrect latest: got '%d', expected '%d'", req.Range.Latest, expectedLatest) + if req.Range.LatestNS != expectedLatest { + m.t.Errorf("incorrect latest: got '%d', expected '%d'", req.Range.LatestNS, expectedLatest) } expectedEarliest := m.clk.Now().Add(-23 * time.Hour).UnixNano() - if req.Range.Earliest != expectedEarliest { - m.t.Errorf("incorrect earliest: got '%d', expected '%d'", req.Range.Earliest, expectedEarliest) + if req.Range.EarliestNS != expectedEarliest { + m.t.Errorf("incorrect earliest: got '%d', expected '%d'", req.Range.EarliestNS, expectedEarliest) } counts := make(map[string]int64) for _, name := range req.Names { @@ -1318,10 +1318,10 @@ func TestCheckExactCertificateLimit(t *testing.T) { expectRetryAfter := time.Unix(0, issuanceTimestamps[0]).Add(time.Hour * 8).Format(time.RFC3339) ra.SA = &mockSAWithFQDNSet{ issuanceTimestamps: map[string]*sapb.Timestamps{ - "none.example.com": {Timestamps: []int64{}}, - "under.example.com": {Timestamps: issuanceTimestamps[3:3]}, - "equalbutvalid.example.com": {Timestamps: issuanceTimestamps[1:3]}, - "over.example.com": {Timestamps: issuanceTimestamps[0:3]}, + "none.example.com": {TimestampsNS: []int64{}}, + "under.example.com": {TimestampsNS: issuanceTimestamps[3:3]}, + "equalbutvalid.example.com": {TimestampsNS: issuanceTimestamps[1:3]}, + "over.example.com": {TimestampsNS: issuanceTimestamps[0:3]}, }, t: t, } @@ -1500,7 +1500,7 @@ func (m mockSAWithFQDNSet) CountCertificatesByNames(ctx context.Context, req *sa for _, name := range req.Names { entry, ok := m.issuanceTimestamps[name] if ok { - counts[name] = int64(len(entry.Timestamps)) + counts[name] = int64(len(entry.TimestampsNS)) } } return &sapb.CountByNames{Counts: counts}, nil @@ -1511,7 +1511,7 @@ func (m mockSAWithFQDNSet) CountFQDNSets(_ context.Context, req *sapb.CountFQDNS for _, name := range req.Domains { entry, ok := m.issuanceTimestamps[name] if ok { - total += int64(len(entry.Timestamps)) + total += int64(len(entry.TimestampsNS)) } } return &sapb.Count{Count: total}, nil @@ -1546,8 +1546,8 @@ func TestCheckFQDNSetRateLimitOverride(t *testing.T) { ts := ra.clk.Now().UnixNano() mockSA := &mockSAWithFQDNSet{ issuanceTimestamps: map[string]*sapb.Timestamps{ - "example.com": {Timestamps: []int64{ts, ts}}, - "zombo.com": {Timestamps: []int64{ts, ts}}, + "example.com": {TimestampsNS: []int64{ts, ts}}, + "zombo.com": {TimestampsNS: []int64{ts, ts}}, }, fqdnSet: map[string]bool{}, t: t, @@ -1990,7 +1990,7 @@ func TestNewOrder(t *testing.T) { }) test.AssertNotError(t, err, "ra.NewOrder failed") test.AssertEquals(t, orderA.RegistrationID, int64(1)) - test.AssertEquals(t, orderA.Expires, fc.Now().Add(time.Hour).UnixNano()) + test.AssertEquals(t, orderA.ExpiresNS, fc.Now().Add(time.Hour).UnixNano()) test.AssertEquals(t, len(orderA.Names), 3) // We expect the order names to have been sorted, deduped, and lowercased test.AssertDeepEquals(t, orderA.Names, []string{"a.com", "b.com", "c.com"}) @@ -2004,7 +2004,7 @@ func TestNewOrder(t *testing.T) { }) test.AssertNotError(t, err, "ra.NewOrder failed") test.AssertEquals(t, orderB.RegistrationID, int64(1)) - test.AssertEquals(t, orderB.Expires, fc.Now().Add(time.Hour).UnixNano()) + test.AssertEquals(t, orderB.ExpiresNS, fc.Now().Add(time.Hour).UnixNano()) // We expect orderB's ID to match orderA's because of pending order reuse test.AssertEquals(t, orderB.Id, orderA.Id) test.AssertEquals(t, len(orderB.Names), 3) @@ -2021,7 +2021,7 @@ func TestNewOrder(t *testing.T) { }) test.AssertNotError(t, err, "ra.NewOrder failed") test.AssertEquals(t, orderC.RegistrationID, int64(1)) - test.AssertEquals(t, orderC.Expires, fc.Now().Add(time.Hour).UnixNano()) + test.AssertEquals(t, orderC.ExpiresNS, fc.Now().Add(time.Hour).UnixNano()) test.AssertEquals(t, len(orderC.Names), 4) test.AssertDeepEquals(t, orderC.Names, []string{"a.com", "b.com", "c.com", "d.com"}) // We expect orderC's ID to not match orderA/orderB's because it is for @@ -2165,11 +2165,11 @@ func TestNewOrderReuseInvalidAuthz(t *testing.T) { test.AssertEquals(t, numAuthorizations(order), 1) _, err = ra.SA.FinalizeAuthorization2(ctx, &sapb.FinalizeAuthorizationRequest{ - Id: order.V2Authorizations[0], - Status: string(core.StatusInvalid), - Expires: order.Expires, - Attempted: string(core.ChallengeTypeDNS01), - AttemptedAt: ra.clk.Now().UnixNano(), + Id: order.V2Authorizations[0], + Status: string(core.StatusInvalid), + ExpiresNS: order.ExpiresNS, + Attempted: string(core.ChallengeTypeDNS01), + AttemptedAtNS: ra.clk.Now().UnixNano(), }) test.AssertNotError(t, err, "FinalizeAuthorization2 failed") @@ -2599,7 +2599,7 @@ func TestNewOrderExpiry(t *testing.T) { test.AssertEquals(t, order.V2Authorizations[0], int64(1)) // The order's expiry should be the fake authz's expiry since it is sooner // than the order's own expiry. - test.AssertEquals(t, order.Expires, fakeAuthzExpires.UnixNano()) + test.AssertEquals(t, order.ExpiresNS, fakeAuthzExpires.UnixNano()) // Set the order lifetime to be lower than the fakeAuthzLifetime ra.orderLifetime = 12 * time.Hour @@ -2613,7 +2613,7 @@ func TestNewOrderExpiry(t *testing.T) { test.AssertEquals(t, order.V2Authorizations[0], int64(1)) // The order's expiry should be the order's own expiry since it is sooner than // the fake authz's expiry. - test.AssertEquals(t, order.Expires, expectedOrderExpiry) + test.AssertEquals(t, order.ExpiresNS, expectedOrderExpiry) } func TestFinalizeOrder(t *testing.T) { @@ -2694,7 +2694,7 @@ func TestFinalizeOrder(t *testing.T) { validatedOrder, err := sa.NewOrderAndAuthzs(context.Background(), &sapb.NewOrderAndAuthzsRequest{ NewOrder: &sapb.NewOrderRequest{ RegistrationID: Registration.Id, - Expires: exp.UnixNano(), + ExpiresNS: exp.UnixNano(), Names: []string{"not-example.com", "www.not-example.com"}, V2Authorizations: []int64{authzIDA, authzIDB}, }, @@ -2825,7 +2825,7 @@ func TestFinalizeOrder(t *testing.T) { RegistrationID: 1, Status: string(core.StatusReady), Names: []string{"example.org"}, - Expires: exp.UnixNano(), + ExpiresNS: exp.UnixNano(), CertificateSerial: "", BeganProcessing: false, }, @@ -2841,10 +2841,10 @@ func TestFinalizeOrder(t *testing.T) { Names: []string{"a.com"}, Id: fakeRegOrder.Id, RegistrationID: fakeRegID, - Expires: exp.UnixNano(), + ExpiresNS: exp.UnixNano(), CertificateSerial: "", BeganProcessing: false, - Created: ra.clk.Now().UnixNano(), + CreatedNS: ra.clk.Now().UnixNano(), }, Csr: oneDomainCSR, }, @@ -2858,10 +2858,10 @@ func TestFinalizeOrder(t *testing.T) { Names: []string{"a.com", "b.com"}, Id: missingAuthzOrder.Id, RegistrationID: Registration.Id, - Expires: exp.UnixNano(), + ExpiresNS: exp.UnixNano(), CertificateSerial: "", BeganProcessing: false, - Created: ra.clk.Now().UnixNano(), + CreatedNS: ra.clk.Now().UnixNano(), }, Csr: twoDomainCSR, }, @@ -2917,7 +2917,7 @@ func TestFinalizeOrderWithMixedSANAndCN(t *testing.T) { mixedOrder, err := sa.NewOrderAndAuthzs(context.Background(), &sapb.NewOrderAndAuthzsRequest{ NewOrder: &sapb.NewOrderRequest{ RegistrationID: Registration.Id, - Expires: exp.UnixNano(), + ExpiresNS: exp.UnixNano(), Names: []string{"not-example.com", "www.not-example.com"}, V2Authorizations: []int64{authzIDA, authzIDB}, }, @@ -3037,11 +3037,11 @@ func TestFinalizeOrderWildcard(t *testing.T) { // Finalize the authorization with the challenge validated _, err = sa.FinalizeAuthorization2(ctx, &sapb.FinalizeAuthorizationRequest{ - Id: validOrder.V2Authorizations[0], - Status: string(core.StatusValid), - Expires: ra.clk.Now().Add(time.Hour * 24 * 7).UnixNano(), - Attempted: string(core.ChallengeTypeDNS01), - AttemptedAt: ra.clk.Now().UnixNano(), + Id: validOrder.V2Authorizations[0], + Status: string(core.StatusValid), + ExpiresNS: ra.clk.Now().Add(time.Hour * 24 * 7).UnixNano(), + Attempted: string(core.ChallengeTypeDNS01), + AttemptedAtNS: ra.clk.Now().UnixNano(), }) test.AssertNotError(t, err, "sa.FinalizeAuthorization2 failed") @@ -3081,7 +3081,7 @@ func TestIssueCertificateAuditLog(t *testing.T) { order, err := sa.NewOrderAndAuthzs(context.Background(), &sapb.NewOrderAndAuthzsRequest{ NewOrder: &sapb.NewOrderRequest{ RegistrationID: Registration.Id, - Expires: exp.UnixNano(), + ExpiresNS: exp.UnixNano(), Names: names, V2Authorizations: authzIDs, }, @@ -3212,7 +3212,7 @@ func TestIssueCertificateCAACheckLog(t *testing.T) { order, err := sa.NewOrderAndAuthzs(context.Background(), &sapb.NewOrderAndAuthzsRequest{ NewOrder: &sapb.NewOrderRequest{ RegistrationID: Registration.Id, - Expires: exp.UnixNano(), + ExpiresNS: exp.UnixNano(), Names: names, V2Authorizations: authzIDs, }, @@ -3376,7 +3376,7 @@ func TestCTPolicyMeasurements(t *testing.T) { order, err := ra.SA.NewOrderAndAuthzs(context.Background(), &sapb.NewOrderAndAuthzsRequest{ NewOrder: &sapb.NewOrderRequest{ RegistrationID: Registration.Id, - Expires: exp.UnixNano(), + ExpiresNS: exp.UnixNano(), Names: []string{"not-example.com", "www.not-example.com"}, V2Authorizations: []int64{authzIDA, authzIDB}, }, @@ -3506,7 +3506,7 @@ func TestIssueCertificateInnerErrs(t *testing.T) { order, err := sa.NewOrderAndAuthzs(context.Background(), &sapb.NewOrderAndAuthzsRequest{ NewOrder: &sapb.NewOrderRequest{ RegistrationID: Registration.Id, - Expires: exp.UnixNano(), + ExpiresNS: exp.UnixNano(), Names: names, V2Authorizations: authzIDs, }, @@ -3739,9 +3739,9 @@ type mockSAGenerateOCSP struct { func (msgo *mockSAGenerateOCSP) GetCertificateStatus(_ context.Context, req *sapb.Serial, _ ...grpc.CallOption) (*corepb.CertificateStatus, error) { return &corepb.CertificateStatus{ - Serial: req.Serial, - Status: "good", - NotAfter: msgo.expiration.UTC().UnixNano(), + Serial: req.Serial, + Status: "good", + NotAfterNS: msgo.expiration.UTC().UnixNano(), }, nil } diff --git a/sa/model.go b/sa/model.go index 49fac3bcedf..3512d6616bd 100644 --- a/sa/model.go +++ b/sa/model.go @@ -305,8 +305,8 @@ func registrationPbToModel(reg *corepb.Registration) (*regModel, error) { // the time.Time zero-value (the former is 1970; the latter is year 0), // so we have to do this check. var createdAt time.Time - if reg.CreatedAt != 0 { - createdAt = time.Unix(0, reg.CreatedAt) + if reg.CreatedAtNS != 0 { + createdAt = time.Unix(0, reg.CreatedAtNS) } return ®Model{ @@ -353,7 +353,7 @@ func registrationModelToPb(reg *regModel) (*corepb.Registration, error) { ContactsPresent: contactsPresent, Agreement: reg.Agreement, InitialIP: ipBytes, - CreatedAt: reg.CreatedAt.UTC().UnixNano(), + CreatedAtNS: reg.CreatedAt.UTC().UnixNano(), Status: reg.Status, }, nil } @@ -400,8 +400,8 @@ func orderToModel(order *corepb.Order) (*orderModel, error) { om := &orderModel{ ID: order.Id, RegistrationID: order.RegistrationID, - Expires: time.Unix(0, order.Expires), - Created: time.Unix(0, order.Created), + Expires: time.Unix(0, order.ExpiresNS), + Created: time.Unix(0, order.CreatedNS), BeganProcessing: order.BeganProcessing, CertificateSerial: order.CertificateSerial, } @@ -423,8 +423,8 @@ func modelToOrder(om *orderModel) (*corepb.Order, error) { order := &corepb.Order{ Id: om.ID, RegistrationID: om.RegistrationID, - Expires: om.Expires.UnixNano(), - Created: om.Created.UnixNano(), + ExpiresNS: om.Expires.UnixNano(), + CreatedNS: om.Created.UnixNano(), CertificateSerial: om.CertificateSerial, BeganProcessing: om.BeganProcessing, } @@ -635,7 +635,7 @@ func authzPBToModel(authz *corepb.Authorization) (*authzModel, error) { IdentifierValue: authz.Identifier, RegistrationID: authz.RegistrationID, Status: statusToUint[core.AcmeStatus(authz.Status)], - Expires: time.Unix(0, authz.Expires).UTC(), + Expires: time.Unix(0, authz.ExpiresNS).UTC(), } if authz.Id != "" { // The v1 internal authorization objects use a string for the ID, the v2 @@ -778,7 +778,7 @@ func modelToAuthzPB(am authzModel) (*corepb.Authorization, error) { Status: string(uintToStatus[am.Status]), Identifier: am.IdentifierValue, RegistrationID: am.RegistrationID, - Expires: am.Expires.UTC().UnixNano(), + ExpiresNS: am.Expires.UTC().UnixNano(), } // Populate authorization challenge array. We do this by iterating through // the challenge type bitmap and creating a challenge of each type if its @@ -850,7 +850,7 @@ func incidentModelToPB(i incidentModel) sapb.Incident { Id: i.ID, SerialTable: i.SerialTable, Url: i.URL, - RenewBy: i.RenewBy.UnixNano(), + RenewByNS: i.RenewBy.UnixNano(), Enabled: i.Enabled, } } @@ -1007,7 +1007,7 @@ func statusForOrder(ctx context.Context, s db.Selector, order *corepb.Order, now // in ra.NewOrder), and expired authorizations may be purged from the DB. // Because of this purging fetching the authz's for an expired order may // return fewer authz objects than expected, triggering a 500 error response. - orderExpiry := time.Unix(0, order.Expires) + orderExpiry := time.Unix(0, order.ExpiresNS) if orderExpiry.Before(now) { return string(core.StatusInvalid), nil } diff --git a/sa/model_test.go b/sa/model_test.go index 93ef86b0d77..4276def12f4 100644 --- a/sa/model_test.go +++ b/sa/model_test.go @@ -67,7 +67,7 @@ func TestAuthzModel(t *testing.T) { Identifier: "example.com", RegistrationID: 1, Status: string(core.StatusValid), - Expires: 1234, + ExpiresNS: 1234, Challenges: []*corepb.Challenge{ { Type: string(core.ChallengeTypeHTTP01), @@ -111,7 +111,7 @@ func TestAuthzModel(t *testing.T) { Identifier: "example.com", RegistrationID: 1, Status: string(core.StatusValid), - Expires: 1234, + ExpiresNS: 1234, Challenges: []*corepb.Challenge{ { Type: string(core.ChallengeTypeHTTP01), @@ -160,7 +160,7 @@ func TestAuthzModel(t *testing.T) { Identifier: "example.com", RegistrationID: 1, Status: string(core.StatusInvalid), - Expires: 1234, + ExpiresNS: 1234, Challenges: []*corepb.Challenge{ { Type: string(core.ChallengeTypeHTTP01), @@ -199,7 +199,7 @@ func TestAuthzModel(t *testing.T) { Identifier: "example.com", RegistrationID: 1, Status: string(core.StatusValid), - Expires: 1234, + ExpiresNS: 1234, Challenges: []*corepb.Challenge{ { Type: string(core.ChallengeTypeHTTP01), diff --git a/sa/proto/sa.pb.go b/sa/proto/sa.pb.go index 699d85e3fc8..d29a20c1f69 100644 --- a/sa/proto/sa.pb.go +++ b/sa/proto/sa.pb.go @@ -173,7 +173,7 @@ type GetPendingAuthorizationRequest struct { IdentifierType string `protobuf:"bytes,2,opt,name=identifierType,proto3" json:"identifierType,omitempty"` IdentifierValue string `protobuf:"bytes,3,opt,name=identifierValue,proto3" json:"identifierValue,omitempty"` // Result must be valid until at least this Unix timestamp (nanos) - ValidUntil int64 `protobuf:"varint,4,opt,name=validUntil,proto3" json:"validUntil,omitempty"` + ValidUntilNS int64 `protobuf:"varint,4,opt,name=validUntilNS,proto3" json:"validUntilNS,omitempty"` } func (x *GetPendingAuthorizationRequest) Reset() { @@ -229,9 +229,9 @@ func (x *GetPendingAuthorizationRequest) GetIdentifierValue() string { return "" } -func (x *GetPendingAuthorizationRequest) GetValidUntil() int64 { +func (x *GetPendingAuthorizationRequest) GetValidUntilNS() int64 { if x != nil { - return x.ValidUntil + return x.ValidUntilNS } return 0 } @@ -243,7 +243,7 @@ type GetValidAuthorizationsRequest struct { RegistrationID int64 `protobuf:"varint,1,opt,name=registrationID,proto3" json:"registrationID,omitempty"` Domains []string `protobuf:"bytes,2,rep,name=domains,proto3" json:"domains,omitempty"` - Now int64 `protobuf:"varint,3,opt,name=now,proto3" json:"now,omitempty"` // Unix timestamp (nanoseconds) + NowNS int64 `protobuf:"varint,3,opt,name=nowNS,proto3" json:"nowNS,omitempty"` // Unix timestamp (nanoseconds) } func (x *GetValidAuthorizationsRequest) Reset() { @@ -292,9 +292,9 @@ func (x *GetValidAuthorizationsRequest) GetDomains() []string { return nil } -func (x *GetValidAuthorizationsRequest) GetNow() int64 { +func (x *GetValidAuthorizationsRequest) GetNowNS() int64 { if x != nil { - return x.Now + return x.NowNS } return 0 } @@ -400,8 +400,8 @@ type SerialMetadata struct { Serial string `protobuf:"bytes,1,opt,name=serial,proto3" json:"serial,omitempty"` RegistrationID int64 `protobuf:"varint,2,opt,name=registrationID,proto3" json:"registrationID,omitempty"` - Created int64 `protobuf:"varint,3,opt,name=created,proto3" json:"created,omitempty"` // Unix timestamp (nanoseconds) - Expires int64 `protobuf:"varint,4,opt,name=expires,proto3" json:"expires,omitempty"` // Unix timestamp (nanoseconds) + CreatedNS int64 `protobuf:"varint,3,opt,name=createdNS,proto3" json:"createdNS,omitempty"` // Unix timestamp (nanoseconds) + ExpiresNS int64 `protobuf:"varint,4,opt,name=expiresNS,proto3" json:"expiresNS,omitempty"` // Unix timestamp (nanoseconds) } func (x *SerialMetadata) Reset() { @@ -450,16 +450,16 @@ func (x *SerialMetadata) GetRegistrationID() int64 { return 0 } -func (x *SerialMetadata) GetCreated() int64 { +func (x *SerialMetadata) GetCreatedNS() int64 { if x != nil { - return x.Created + return x.CreatedNS } return 0 } -func (x *SerialMetadata) GetExpires() int64 { +func (x *SerialMetadata) GetExpiresNS() int64 { if x != nil { - return x.Expires + return x.ExpiresNS } return 0 } @@ -469,8 +469,8 @@ type Range struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Earliest int64 `protobuf:"varint,1,opt,name=earliest,proto3" json:"earliest,omitempty"` // Unix timestamp (nanoseconds) - Latest int64 `protobuf:"varint,2,opt,name=latest,proto3" json:"latest,omitempty"` // Unix timestamp (nanoseconds) + EarliestNS int64 `protobuf:"varint,1,opt,name=earliestNS,proto3" json:"earliestNS,omitempty"` // Unix timestamp (nanoseconds) + LatestNS int64 `protobuf:"varint,2,opt,name=latestNS,proto3" json:"latestNS,omitempty"` // Unix timestamp (nanoseconds) } func (x *Range) Reset() { @@ -505,16 +505,16 @@ func (*Range) Descriptor() ([]byte, []int) { return file_sa_proto_rawDescGZIP(), []int{8} } -func (x *Range) GetEarliest() int64 { +func (x *Range) GetEarliestNS() int64 { if x != nil { - return x.Earliest + return x.EarliestNS } return 0 } -func (x *Range) GetLatest() int64 { +func (x *Range) GetLatestNS() int64 { if x != nil { - return x.Latest + return x.LatestNS } return 0 } @@ -571,7 +571,7 @@ type Timestamps struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Timestamps []int64 `protobuf:"varint,1,rep,packed,name=timestamps,proto3" json:"timestamps,omitempty"` // Unix timestamp (nanoseconds) + TimestampsNS []int64 `protobuf:"varint,1,rep,packed,name=timestampsNS,proto3" json:"timestampsNS,omitempty"` // Unix timestamp (nanoseconds) } func (x *Timestamps) Reset() { @@ -606,9 +606,9 @@ func (*Timestamps) Descriptor() ([]byte, []int) { return file_sa_proto_rawDescGZIP(), []int{10} } -func (x *Timestamps) GetTimestamps() []int64 { +func (x *Timestamps) GetTimestampsNS() []int64 { if x != nil { - return x.Timestamps + return x.TimestampsNS } return nil } @@ -1106,10 +1106,10 @@ type AddSerialRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - RegID int64 `protobuf:"varint,1,opt,name=regID,proto3" json:"regID,omitempty"` - Serial string `protobuf:"bytes,2,opt,name=serial,proto3" json:"serial,omitempty"` - Created int64 `protobuf:"varint,3,opt,name=created,proto3" json:"created,omitempty"` // Unix timestamp (nanoseconds) - Expires int64 `protobuf:"varint,4,opt,name=expires,proto3" json:"expires,omitempty"` // Unix timestamp (nanoseconds) + RegID int64 `protobuf:"varint,1,opt,name=regID,proto3" json:"regID,omitempty"` + Serial string `protobuf:"bytes,2,opt,name=serial,proto3" json:"serial,omitempty"` + CreatedNS int64 `protobuf:"varint,3,opt,name=createdNS,proto3" json:"createdNS,omitempty"` // Unix timestamp (nanoseconds) + ExpiresNS int64 `protobuf:"varint,4,opt,name=expiresNS,proto3" json:"expiresNS,omitempty"` // Unix timestamp (nanoseconds) } func (x *AddSerialRequest) Reset() { @@ -1158,16 +1158,16 @@ func (x *AddSerialRequest) GetSerial() string { return "" } -func (x *AddSerialRequest) GetCreated() int64 { +func (x *AddSerialRequest) GetCreatedNS() int64 { if x != nil { - return x.Created + return x.CreatedNS } return 0 } -func (x *AddSerialRequest) GetExpires() int64 { +func (x *AddSerialRequest) GetExpiresNS() int64 { if x != nil { - return x.Expires + return x.ExpiresNS } return 0 } @@ -1181,7 +1181,7 @@ type AddCertificateRequest struct { RegID int64 `protobuf:"varint,2,opt,name=regID,proto3" json:"regID,omitempty"` // An issued time. When not present the SA defaults to using // the current time. - Issued int64 `protobuf:"varint,4,opt,name=issued,proto3" json:"issued,omitempty"` + IssuedNS int64 `protobuf:"varint,4,opt,name=issuedNS,proto3" json:"issuedNS,omitempty"` // Unix timestamp (nanoseconds) IssuerNameID int64 `protobuf:"varint,5,opt,name=issuerNameID,proto3" json:"issuerNameID,omitempty"` // https://pkg.go.dev/github.com/letsencrypt/boulder/issuance#IssuerNameID // If this is set to true, the certificateStatus.status column will be set to // "wait", which will cause us to serve internalError responses with OCSP is @@ -1245,9 +1245,9 @@ func (x *AddCertificateRequest) GetRegID() int64 { return 0 } -func (x *AddCertificateRequest) GetIssued() int64 { +func (x *AddCertificateRequest) GetIssuedNS() int64 { if x != nil { - return x.Issued + return x.IssuedNS } return 0 } @@ -1319,7 +1319,7 @@ type NewOrderRequest struct { unknownFields protoimpl.UnknownFields RegistrationID int64 `protobuf:"varint,1,opt,name=registrationID,proto3" json:"registrationID,omitempty"` - Expires int64 `protobuf:"varint,2,opt,name=expires,proto3" json:"expires,omitempty"` + ExpiresNS int64 `protobuf:"varint,2,opt,name=expiresNS,proto3" json:"expiresNS,omitempty"` // Unix timestamp (nanoseconds) Names []string `protobuf:"bytes,3,rep,name=names,proto3" json:"names,omitempty"` V2Authorizations []int64 `protobuf:"varint,4,rep,packed,name=v2Authorizations,proto3" json:"v2Authorizations,omitempty"` } @@ -1363,9 +1363,9 @@ func (x *NewOrderRequest) GetRegistrationID() int64 { return 0 } -func (x *NewOrderRequest) GetExpires() int64 { +func (x *NewOrderRequest) GetExpiresNS() int64 { if x != nil { - return x.Expires + return x.ExpiresNS } return 0 } @@ -1666,7 +1666,7 @@ type GetAuthorizationsRequest struct { RegistrationID int64 `protobuf:"varint,1,opt,name=registrationID,proto3" json:"registrationID,omitempty"` Domains []string `protobuf:"bytes,2,rep,name=domains,proto3" json:"domains,omitempty"` - Now int64 `protobuf:"varint,3,opt,name=now,proto3" json:"now,omitempty"` // Unix timestamp (nanoseconds) + NowNS int64 `protobuf:"varint,3,opt,name=nowNS,proto3" json:"nowNS,omitempty"` // Unix timestamp (nanoseconds) } func (x *GetAuthorizationsRequest) Reset() { @@ -1715,9 +1715,9 @@ func (x *GetAuthorizationsRequest) GetDomains() []string { return nil } -func (x *GetAuthorizationsRequest) GetNow() int64 { +func (x *GetAuthorizationsRequest) GetNowNS() int64 { if x != nil { - return x.Now + return x.NowNS } return 0 } @@ -1868,12 +1868,12 @@ type RevokeCertificateRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Serial string `protobuf:"bytes,1,opt,name=serial,proto3" json:"serial,omitempty"` - Reason int64 `protobuf:"varint,2,opt,name=reason,proto3" json:"reason,omitempty"` - Date int64 `protobuf:"varint,3,opt,name=date,proto3" json:"date,omitempty"` // Unix timestamp (nanoseconds) - Backdate int64 `protobuf:"varint,5,opt,name=backdate,proto3" json:"backdate,omitempty"` // Unix timestamp (nanoseconds) - Response []byte `protobuf:"bytes,4,opt,name=response,proto3" json:"response,omitempty"` - IssuerID int64 `protobuf:"varint,6,opt,name=issuerID,proto3" json:"issuerID,omitempty"` + Serial string `protobuf:"bytes,1,opt,name=serial,proto3" json:"serial,omitempty"` + Reason int64 `protobuf:"varint,2,opt,name=reason,proto3" json:"reason,omitempty"` + DateNS int64 `protobuf:"varint,3,opt,name=dateNS,proto3" json:"dateNS,omitempty"` // Unix timestamp (nanoseconds) + BackdateNS int64 `protobuf:"varint,5,opt,name=backdateNS,proto3" json:"backdateNS,omitempty"` // Unix timestamp (nanoseconds) + Response []byte `protobuf:"bytes,4,opt,name=response,proto3" json:"response,omitempty"` + IssuerID int64 `protobuf:"varint,6,opt,name=issuerID,proto3" json:"issuerID,omitempty"` } func (x *RevokeCertificateRequest) Reset() { @@ -1922,16 +1922,16 @@ func (x *RevokeCertificateRequest) GetReason() int64 { return 0 } -func (x *RevokeCertificateRequest) GetDate() int64 { +func (x *RevokeCertificateRequest) GetDateNS() int64 { if x != nil { - return x.Date + return x.DateNS } return 0 } -func (x *RevokeCertificateRequest) GetBackdate() int64 { +func (x *RevokeCertificateRequest) GetBackdateNS() int64 { if x != nil { - return x.Backdate + return x.BackdateNS } return 0 } @@ -1957,11 +1957,11 @@ type FinalizeAuthorizationRequest struct { Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` Status string `protobuf:"bytes,2,opt,name=status,proto3" json:"status,omitempty"` - Expires int64 `protobuf:"varint,3,opt,name=expires,proto3" json:"expires,omitempty"` // Unix timestamp (nanoseconds) + ExpiresNS int64 `protobuf:"varint,3,opt,name=expiresNS,proto3" json:"expiresNS,omitempty"` // Unix timestamp (nanoseconds) Attempted string `protobuf:"bytes,4,opt,name=attempted,proto3" json:"attempted,omitempty"` ValidationRecords []*proto.ValidationRecord `protobuf:"bytes,5,rep,name=validationRecords,proto3" json:"validationRecords,omitempty"` ValidationError *proto.ProblemDetails `protobuf:"bytes,6,opt,name=validationError,proto3" json:"validationError,omitempty"` - AttemptedAt int64 `protobuf:"varint,7,opt,name=attemptedAt,proto3" json:"attemptedAt,omitempty"` // Unix timestamp (nanoseconds) + AttemptedAtNS int64 `protobuf:"varint,7,opt,name=attemptedAtNS,proto3" json:"attemptedAtNS,omitempty"` // Unix timestamp (nanoseconds) } func (x *FinalizeAuthorizationRequest) Reset() { @@ -2010,9 +2010,9 @@ func (x *FinalizeAuthorizationRequest) GetStatus() string { return "" } -func (x *FinalizeAuthorizationRequest) GetExpires() int64 { +func (x *FinalizeAuthorizationRequest) GetExpiresNS() int64 { if x != nil { - return x.Expires + return x.ExpiresNS } return 0 } @@ -2038,9 +2038,9 @@ func (x *FinalizeAuthorizationRequest) GetValidationError() *proto.ProblemDetail return nil } -func (x *FinalizeAuthorizationRequest) GetAttemptedAt() int64 { +func (x *FinalizeAuthorizationRequest) GetAttemptedAtNS() int64 { if x != nil { - return x.AttemptedAt + return x.AttemptedAtNS } return 0 } @@ -2051,7 +2051,7 @@ type AddBlockedKeyRequest struct { unknownFields protoimpl.UnknownFields KeyHash []byte `protobuf:"bytes,1,opt,name=keyHash,proto3" json:"keyHash,omitempty"` - Added int64 `protobuf:"varint,2,opt,name=added,proto3" json:"added,omitempty"` // Unix timestamp (nanoseconds) + AddedNS int64 `protobuf:"varint,2,opt,name=addedNS,proto3" json:"addedNS,omitempty"` // Unix timestamp (nanoseconds) Source string `protobuf:"bytes,3,opt,name=source,proto3" json:"source,omitempty"` Comment string `protobuf:"bytes,4,opt,name=comment,proto3" json:"comment,omitempty"` RevokedBy int64 `protobuf:"varint,5,opt,name=revokedBy,proto3" json:"revokedBy,omitempty"` @@ -2096,9 +2096,9 @@ func (x *AddBlockedKeyRequest) GetKeyHash() []byte { return nil } -func (x *AddBlockedKeyRequest) GetAdded() int64 { +func (x *AddBlockedKeyRequest) GetAddedNS() int64 { if x != nil { - return x.Added + return x.AddedNS } return 0 } @@ -2179,7 +2179,7 @@ type Incident struct { Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` SerialTable string `protobuf:"bytes,2,opt,name=serialTable,proto3" json:"serialTable,omitempty"` Url string `protobuf:"bytes,3,opt,name=url,proto3" json:"url,omitempty"` - RenewBy int64 `protobuf:"varint,4,opt,name=renewBy,proto3" json:"renewBy,omitempty"` // Unix timestamp (nanoseconds) + RenewByNS int64 `protobuf:"varint,4,opt,name=renewByNS,proto3" json:"renewByNS,omitempty"` // Unix timestamp (nanoseconds) Enabled bool `protobuf:"varint,5,opt,name=enabled,proto3" json:"enabled,omitempty"` } @@ -2236,9 +2236,9 @@ func (x *Incident) GetUrl() string { return "" } -func (x *Incident) GetRenewBy() int64 { +func (x *Incident) GetRenewByNS() int64 { if x != nil { - return x.RenewBy + return x.RenewByNS } return 0 } @@ -2349,10 +2349,10 @@ type IncidentSerial struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Serial string `protobuf:"bytes,1,opt,name=serial,proto3" json:"serial,omitempty"` - RegistrationID int64 `protobuf:"varint,2,opt,name=registrationID,proto3" json:"registrationID,omitempty"` // May be 0 (NULL) - OrderID int64 `protobuf:"varint,3,opt,name=orderID,proto3" json:"orderID,omitempty"` // May be 0 (NULL) - LastNoticeSent int64 `protobuf:"varint,4,opt,name=lastNoticeSent,proto3" json:"lastNoticeSent,omitempty"` // Unix timestamp (nanoseconds), may be 0 (NULL) + Serial string `protobuf:"bytes,1,opt,name=serial,proto3" json:"serial,omitempty"` + RegistrationID int64 `protobuf:"varint,2,opt,name=registrationID,proto3" json:"registrationID,omitempty"` // May be 0 (NULL) + OrderID int64 `protobuf:"varint,3,opt,name=orderID,proto3" json:"orderID,omitempty"` // May be 0 (NULL) + LastNoticeSentNS int64 `protobuf:"varint,4,opt,name=lastNoticeSentNS,proto3" json:"lastNoticeSentNS,omitempty"` // Unix timestamp (nanoseconds), may be 0 (NULL) } func (x *IncidentSerial) Reset() { @@ -2408,9 +2408,9 @@ func (x *IncidentSerial) GetOrderID() int64 { return 0 } -func (x *IncidentSerial) GetLastNoticeSent() int64 { +func (x *IncidentSerial) GetLastNoticeSentNS() int64 { if x != nil { - return x.LastNoticeSent + return x.LastNoticeSentNS } return 0 } @@ -2420,10 +2420,10 @@ type GetRevokedCertsRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - IssuerNameID int64 `protobuf:"varint,1,opt,name=issuerNameID,proto3" json:"issuerNameID,omitempty"` - ExpiresAfter int64 `protobuf:"varint,2,opt,name=expiresAfter,proto3" json:"expiresAfter,omitempty"` // Unix timestamp (nanoseconds), inclusive - ExpiresBefore int64 `protobuf:"varint,3,opt,name=expiresBefore,proto3" json:"expiresBefore,omitempty"` // Unix timestamp (nanoseconds), exclusive - RevokedBefore int64 `protobuf:"varint,4,opt,name=revokedBefore,proto3" json:"revokedBefore,omitempty"` // Unix timestamp (nanoseconds) + IssuerNameID int64 `protobuf:"varint,1,opt,name=issuerNameID,proto3" json:"issuerNameID,omitempty"` + ExpiresAfterNS int64 `protobuf:"varint,2,opt,name=expiresAfterNS,proto3" json:"expiresAfterNS,omitempty"` // Unix timestamp (nanoseconds), inclusive + ExpiresBeforeNS int64 `protobuf:"varint,3,opt,name=expiresBeforeNS,proto3" json:"expiresBeforeNS,omitempty"` // Unix timestamp (nanoseconds), exclusive + RevokedBeforeNS int64 `protobuf:"varint,4,opt,name=revokedBeforeNS,proto3" json:"revokedBeforeNS,omitempty"` // Unix timestamp (nanoseconds) } func (x *GetRevokedCertsRequest) Reset() { @@ -2465,23 +2465,23 @@ func (x *GetRevokedCertsRequest) GetIssuerNameID() int64 { return 0 } -func (x *GetRevokedCertsRequest) GetExpiresAfter() int64 { +func (x *GetRevokedCertsRequest) GetExpiresAfterNS() int64 { if x != nil { - return x.ExpiresAfter + return x.ExpiresAfterNS } return 0 } -func (x *GetRevokedCertsRequest) GetExpiresBefore() int64 { +func (x *GetRevokedCertsRequest) GetExpiresBeforeNS() int64 { if x != nil { - return x.ExpiresBefore + return x.ExpiresBeforeNS } return 0 } -func (x *GetRevokedCertsRequest) GetRevokedBefore() int64 { +func (x *GetRevokedCertsRequest) GetRevokedBeforeNS() int64 { if x != nil { - return x.RevokedBefore + return x.RevokedBeforeNS } return 0 } @@ -2871,7 +2871,7 @@ var file_sa_proto_rawDesc = []byte{ 0x4b, 0x65, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6a, 0x77, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x03, 0x6a, 0x77, 0x6b, 0x22, 0x21, 0x0a, 0x0f, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0xba, 0x01, 0x0a, 0x1e, 0x47, 0x65, 0x74, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0xbe, 0x01, 0x0a, 0x1e, 0x47, 0x65, 0x74, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 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, @@ -2881,161 +2881,164 @@ var file_sa_proto_rawDesc = []byte{ 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x12, 0x28, 0x0a, 0x0f, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, - 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x55, 0x6e, - 0x74, 0x69, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x76, 0x61, 0x6c, 0x69, 0x64, - 0x55, 0x6e, 0x74, 0x69, 0x6c, 0x22, 0x73, 0x0a, 0x1d, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x69, - 0x64, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 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, 0x12, 0x18, - 0x0a, 0x07, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, - 0x07, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x6e, 0x6f, 0x77, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x6e, 0x6f, 0x77, 0x22, 0xa0, 0x01, 0x0a, 0x13, 0x56, - 0x61, 0x6c, 0x69, 0x64, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x12, 0x38, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x18, 0x01, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x22, 0x2e, 0x73, 0x61, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x41, 0x75, 0x74, 0x68, - 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x4d, 0x61, 0x70, 0x45, 0x6c, - 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x1a, 0x4f, 0x0a, 0x0a, - 0x4d, 0x61, 0x70, 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x64, 0x6f, - 0x6d, 0x61, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x64, 0x6f, 0x6d, 0x61, - 0x69, 0x6e, 0x12, 0x29, 0x0a, 0x05, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x13, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, - 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x05, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x22, 0x20, 0x0a, - 0x06, 0x53, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x65, 0x72, 0x69, 0x61, - 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x22, - 0x84, 0x01, 0x0a, 0x0e, 0x53, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, - 0x74, 0x61, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x06, 0x73, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x12, 0x26, 0x0a, 0x0e, 0x72, 0x65, - 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, + 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x55, 0x6e, + 0x74, 0x69, 0x6c, 0x4e, 0x53, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x76, 0x61, 0x6c, + 0x69, 0x64, 0x55, 0x6e, 0x74, 0x69, 0x6c, 0x4e, 0x53, 0x22, 0x77, 0x0a, 0x1d, 0x47, 0x65, 0x74, + 0x56, 0x61, 0x6c, 0x69, 0x64, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 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, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x03, 0x52, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x12, 0x18, 0x0a, 0x07, - 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x65, - 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x22, 0x3b, 0x0a, 0x05, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, - 0x1a, 0x0a, 0x08, 0x65, 0x61, 0x72, 0x6c, 0x69, 0x65, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x03, 0x52, 0x08, 0x65, 0x61, 0x72, 0x6c, 0x69, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x6c, - 0x61, 0x74, 0x65, 0x73, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x6c, 0x61, 0x74, - 0x65, 0x73, 0x74, 0x22, 0x1d, 0x0a, 0x05, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x14, 0x0a, 0x05, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x22, 0x2c, 0x0a, 0x0a, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x73, - 0x12, 0x1e, 0x0a, 0x0a, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x73, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x03, 0x52, 0x0a, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x73, - 0x22, 0x58, 0x0a, 0x1f, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, - 0x63, 0x61, 0x74, 0x65, 0x73, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x05, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x73, 0x61, 0x2e, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x05, 0x72, - 0x61, 0x6e, 0x67, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x02, 0x20, - 0x03, 0x28, 0x09, 0x52, 0x05, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x22, 0xb7, 0x01, 0x0a, 0x0c, 0x43, - 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x34, 0x0a, 0x06, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x73, 0x61, - 0x2e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x2e, 0x43, 0x6f, - 0x75, 0x6e, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x73, 0x12, 0x36, 0x0a, 0x08, 0x65, 0x61, 0x72, 0x6c, 0x69, 0x65, 0x73, 0x74, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, - 0x08, 0x65, 0x61, 0x72, 0x6c, 0x69, 0x65, 0x73, 0x74, 0x1a, 0x39, 0x0a, 0x0b, 0x43, 0x6f, 0x75, - 0x6e, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x3a, 0x02, 0x38, 0x01, 0x22, 0x50, 0x0a, 0x1d, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x67, - 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x79, 0x49, 0x50, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0c, 0x52, 0x02, 0x69, 0x70, 0x12, 0x1f, 0x0a, 0x05, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x73, 0x61, 0x2e, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x52, - 0x05, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x22, 0x88, 0x01, 0x0a, 0x21, 0x43, 0x6f, 0x75, 0x6e, 0x74, - 0x49, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 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, 0x12, 0x1a, 0x0a, 0x08, 0x68, 0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x68, 0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, - 0x12, 0x1f, 0x0a, 0x05, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x09, 0x2e, 0x73, 0x61, 0x2e, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x05, 0x72, 0x61, 0x6e, 0x67, - 0x65, 0x22, 0x53, 0x0a, 0x12, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x61, 0x63, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x61, 0x63, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x49, 0x44, 0x12, 0x1f, 0x0a, 0x05, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x73, 0x61, 0x2e, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x52, - 0x05, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x22, 0x48, 0x0a, 0x14, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x46, - 0x51, 0x44, 0x4e, 0x53, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, - 0x0a, 0x06, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, - 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x12, 0x18, 0x0a, 0x07, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, - 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x73, - 0x22, 0x30, 0x0a, 0x14, 0x46, 0x51, 0x44, 0x4e, 0x53, 0x65, 0x74, 0x45, 0x78, 0x69, 0x73, 0x74, - 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x64, 0x6f, 0x6d, 0x61, - 0x69, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x64, 0x6f, 0x6d, 0x61, 0x69, - 0x6e, 0x73, 0x22, 0x50, 0x0a, 0x20, 0x50, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x43, 0x65, - 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x45, 0x78, 0x69, 0x73, 0x74, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x12, 0x14, - 0x0a, 0x05, 0x72, 0x65, 0x67, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x72, - 0x65, 0x67, 0x49, 0x44, 0x22, 0x20, 0x0a, 0x06, 0x45, 0x78, 0x69, 0x73, 0x74, 0x73, 0x12, 0x16, - 0x0a, 0x06, 0x65, 0x78, 0x69, 0x73, 0x74, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, - 0x65, 0x78, 0x69, 0x73, 0x74, 0x73, 0x22, 0x74, 0x0a, 0x10, 0x41, 0x64, 0x64, 0x53, 0x65, 0x72, - 0x69, 0x61, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x72, 0x65, - 0x67, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x72, 0x65, 0x67, 0x49, 0x44, - 0x12, 0x16, 0x0a, 0x06, 0x73, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x06, 0x73, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, - 0x74, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, - 0x65, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x03, 0x52, 0x07, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x22, 0xa5, 0x01, 0x0a, - 0x15, 0x41, 0x64, 0x64, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0c, 0x52, 0x03, 0x64, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x72, 0x65, 0x67, 0x49, - 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x72, 0x65, 0x67, 0x49, 0x44, 0x12, 0x16, - 0x0a, 0x06, 0x69, 0x73, 0x73, 0x75, 0x65, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, - 0x69, 0x73, 0x73, 0x75, 0x65, 0x64, 0x12, 0x22, 0x0a, 0x0c, 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, - 0x4e, 0x61, 0x6d, 0x65, 0x49, 0x44, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x69, 0x73, - 0x73, 0x75, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x49, 0x44, 0x12, 0x22, 0x0a, 0x0c, 0x6f, 0x63, - 0x73, 0x70, 0x4e, 0x6f, 0x74, 0x52, 0x65, 0x61, 0x64, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x0c, 0x6f, 0x63, 0x73, 0x70, 0x4e, 0x6f, 0x74, 0x52, 0x65, 0x61, 0x64, 0x79, 0x4a, 0x04, - 0x08, 0x03, 0x10, 0x04, 0x22, 0x1e, 0x0a, 0x0c, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, - 0x52, 0x02, 0x69, 0x64, 0x22, 0x95, 0x01, 0x0a, 0x0f, 0x4e, 0x65, 0x77, 0x4f, 0x72, 0x64, 0x65, - 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x26, 0x0a, 0x0e, 0x72, 0x65, 0x67, 0x69, + 0x49, 0x44, 0x12, 0x18, 0x0a, 0x07, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x73, 0x18, 0x02, 0x20, + 0x03, 0x28, 0x09, 0x52, 0x07, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x73, 0x12, 0x14, 0x0a, 0x05, + 0x6e, 0x6f, 0x77, 0x4e, 0x53, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x6e, 0x6f, 0x77, + 0x4e, 0x53, 0x22, 0xa0, 0x01, 0x0a, 0x13, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x41, 0x75, 0x74, 0x68, + 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x38, 0x0a, 0x05, 0x76, 0x61, + 0x6c, 0x69, 0x64, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x73, 0x61, 0x2e, 0x56, + 0x61, 0x6c, 0x69, 0x64, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x2e, 0x4d, 0x61, 0x70, 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x05, 0x76, + 0x61, 0x6c, 0x69, 0x64, 0x1a, 0x4f, 0x0a, 0x0a, 0x4d, 0x61, 0x70, 0x45, 0x6c, 0x65, 0x6d, 0x65, + 0x6e, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x06, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x12, 0x29, 0x0a, 0x05, 0x61, 0x75, + 0x74, 0x68, 0x7a, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x63, 0x6f, 0x72, 0x65, + 0x2e, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x05, + 0x61, 0x75, 0x74, 0x68, 0x7a, 0x22, 0x20, 0x0a, 0x06, 0x53, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x12, + 0x16, 0x0a, 0x06, 0x73, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x06, 0x73, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x22, 0x8c, 0x01, 0x0a, 0x0e, 0x53, 0x65, 0x72, 0x69, + 0x61, 0x6c, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x65, + 0x72, 0x69, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x65, 0x72, 0x69, + 0x61, 0x6c, 0x12, 0x26, 0x0a, 0x0e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0e, 0x72, 0x65, 0x67, 0x69, + 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x64, 0x4e, 0x53, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x63, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x4e, 0x53, 0x12, 0x1c, 0x0a, 0x09, 0x65, 0x78, 0x70, 0x69, + 0x72, 0x65, 0x73, 0x4e, 0x53, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x65, 0x78, 0x70, + 0x69, 0x72, 0x65, 0x73, 0x4e, 0x53, 0x22, 0x43, 0x0a, 0x05, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, + 0x1e, 0x0a, 0x0a, 0x65, 0x61, 0x72, 0x6c, 0x69, 0x65, 0x73, 0x74, 0x4e, 0x53, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x0a, 0x65, 0x61, 0x72, 0x6c, 0x69, 0x65, 0x73, 0x74, 0x4e, 0x53, 0x12, + 0x1a, 0x0a, 0x08, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x4e, 0x53, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x03, 0x52, 0x08, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x4e, 0x53, 0x22, 0x1d, 0x0a, 0x05, 0x43, + 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x30, 0x0a, 0x0a, 0x54, 0x69, + 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x73, 0x12, 0x22, 0x0a, 0x0c, 0x74, 0x69, 0x6d, 0x65, + 0x73, 0x74, 0x61, 0x6d, 0x70, 0x73, 0x4e, 0x53, 0x18, 0x01, 0x20, 0x03, 0x28, 0x03, 0x52, 0x0c, + 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x73, 0x4e, 0x53, 0x22, 0x58, 0x0a, 0x1f, + 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, + 0x73, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x1f, 0x0a, 0x05, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, + 0x2e, 0x73, 0x61, 0x2e, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x05, 0x72, 0x61, 0x6e, 0x67, 0x65, + 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, + 0x05, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x22, 0xb7, 0x01, 0x0a, 0x0c, 0x43, 0x6f, 0x75, 0x6e, 0x74, + 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x34, 0x0a, 0x06, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x73, 0x61, 0x2e, 0x43, 0x6f, 0x75, + 0x6e, 0x74, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x73, + 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x12, 0x36, 0x0a, + 0x08, 0x65, 0x61, 0x72, 0x6c, 0x69, 0x65, 0x73, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x08, 0x65, 0x61, 0x72, + 0x6c, 0x69, 0x65, 0x73, 0x74, 0x1a, 0x39, 0x0a, 0x0b, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x45, + 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, + 0x22, 0x50, 0x0a, 0x1d, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x79, 0x49, 0x50, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x02, 0x69, + 0x70, 0x12, 0x1f, 0x0a, 0x05, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x09, 0x2e, 0x73, 0x61, 0x2e, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x05, 0x72, 0x61, 0x6e, + 0x67, 0x65, 0x22, 0x88, 0x01, 0x0a, 0x21, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x76, 0x61, + 0x6c, 0x69, 0x64, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 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, - 0x12, 0x18, 0x0a, 0x07, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x03, 0x52, 0x07, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x61, - 0x6d, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x6e, 0x61, 0x6d, 0x65, 0x73, - 0x12, 0x2a, 0x0a, 0x10, 0x76, 0x32, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x03, 0x52, 0x10, 0x76, 0x32, 0x41, 0x75, - 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x7e, 0x0a, 0x18, - 0x4e, 0x65, 0x77, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x41, 0x6e, 0x64, 0x41, 0x75, 0x74, 0x68, 0x7a, - 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2f, 0x0a, 0x08, 0x6e, 0x65, 0x77, 0x4f, - 0x72, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x73, 0x61, 0x2e, - 0x4e, 0x65, 0x77, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, - 0x08, 0x6e, 0x65, 0x77, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x31, 0x0a, 0x09, 0x6e, 0x65, 0x77, - 0x41, 0x75, 0x74, 0x68, 0x7a, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x63, - 0x6f, 0x72, 0x65, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x52, 0x09, 0x6e, 0x65, 0x77, 0x41, 0x75, 0x74, 0x68, 0x7a, 0x73, 0x22, 0x52, 0x0a, 0x14, - 0x53, 0x65, 0x74, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, - 0x52, 0x02, 0x69, 0x64, 0x12, 0x2a, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x50, 0x72, 0x6f, 0x62, 0x6c, - 0x65, 0x6d, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, - 0x22, 0x4c, 0x0a, 0x22, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x4f, 0x72, 0x64, 0x65, - 0x72, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x63, 0x63, 0x74, 0x49, 0x44, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x61, 0x63, 0x63, 0x74, 0x49, 0x44, 0x22, 0x47, - 0x0a, 0x17, 0x47, 0x65, 0x74, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x46, 0x6f, 0x72, 0x4e, 0x61, 0x6d, - 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x63, 0x63, - 0x74, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x61, 0x63, 0x63, 0x74, 0x49, - 0x44, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, - 0x52, 0x05, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x22, 0x54, 0x0a, 0x14, 0x46, 0x69, 0x6e, 0x61, 0x6c, - 0x69, 0x7a, 0x65, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, - 0x2c, 0x0a, 0x11, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x53, 0x65, - 0x72, 0x69, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x63, 0x65, 0x72, 0x74, - 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x53, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x22, 0x6e, 0x0a, - 0x18, 0x47, 0x65, 0x74, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 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, 0x12, 0x18, 0x0a, 0x07, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, - 0x28, 0x09, 0x52, 0x07, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x6e, - 0x6f, 0x77, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x6e, 0x6f, 0x77, 0x22, 0x96, 0x01, + 0x12, 0x1a, 0x0a, 0x08, 0x68, 0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x08, 0x68, 0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1f, 0x0a, 0x05, + 0x72, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x73, 0x61, + 0x2e, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x05, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x22, 0x53, 0x0a, + 0x12, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x44, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, + 0x44, 0x12, 0x1f, 0x0a, 0x05, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x09, 0x2e, 0x73, 0x61, 0x2e, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x05, 0x72, 0x61, 0x6e, + 0x67, 0x65, 0x22, 0x48, 0x0a, 0x14, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x46, 0x51, 0x44, 0x4e, 0x53, + 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x77, 0x69, + 0x6e, 0x64, 0x6f, 0x77, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x77, 0x69, 0x6e, 0x64, + 0x6f, 0x77, 0x12, 0x18, 0x0a, 0x07, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x73, 0x18, 0x02, 0x20, + 0x03, 0x28, 0x09, 0x52, 0x07, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x73, 0x22, 0x30, 0x0a, 0x14, + 0x46, 0x51, 0x44, 0x4e, 0x53, 0x65, 0x74, 0x45, 0x78, 0x69, 0x73, 0x74, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x73, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x73, 0x22, 0x50, + 0x0a, 0x20, 0x50, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, + 0x69, 0x63, 0x61, 0x74, 0x65, 0x45, 0x78, 0x69, 0x73, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x06, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x72, 0x65, + 0x67, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x72, 0x65, 0x67, 0x49, 0x44, + 0x22, 0x20, 0x0a, 0x06, 0x45, 0x78, 0x69, 0x73, 0x74, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x65, 0x78, + 0x69, 0x73, 0x74, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x65, 0x78, 0x69, 0x73, + 0x74, 0x73, 0x22, 0x7c, 0x0a, 0x10, 0x41, 0x64, 0x64, 0x53, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x72, 0x65, 0x67, 0x49, 0x44, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x72, 0x65, 0x67, 0x49, 0x44, 0x12, 0x16, 0x0a, 0x06, + 0x73, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x65, + 0x72, 0x69, 0x61, 0x6c, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x4e, + 0x53, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, + 0x4e, 0x53, 0x12, 0x1c, 0x0a, 0x09, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x4e, 0x53, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x4e, 0x53, + 0x22, 0xa9, 0x01, 0x0a, 0x15, 0x41, 0x64, 0x64, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, + 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x64, 0x65, + 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x03, 0x64, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, + 0x72, 0x65, 0x67, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x72, 0x65, 0x67, + 0x49, 0x44, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x73, 0x73, 0x75, 0x65, 0x64, 0x4e, 0x53, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x69, 0x73, 0x73, 0x75, 0x65, 0x64, 0x4e, 0x53, 0x12, 0x22, + 0x0a, 0x0c, 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x49, 0x44, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, + 0x49, 0x44, 0x12, 0x22, 0x0a, 0x0c, 0x6f, 0x63, 0x73, 0x70, 0x4e, 0x6f, 0x74, 0x52, 0x65, 0x61, + 0x64, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x6f, 0x63, 0x73, 0x70, 0x4e, 0x6f, + 0x74, 0x52, 0x65, 0x61, 0x64, 0x79, 0x4a, 0x04, 0x08, 0x03, 0x10, 0x04, 0x22, 0x1e, 0x0a, 0x0c, + 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x22, 0x99, 0x01, 0x0a, + 0x0f, 0x4e, 0x65, 0x77, 0x4f, 0x72, 0x64, 0x65, 0x72, 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, 0x12, 0x1c, 0x0a, 0x09, 0x65, 0x78, 0x70, 0x69, + 0x72, 0x65, 0x73, 0x4e, 0x53, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x65, 0x78, 0x70, + 0x69, 0x72, 0x65, 0x73, 0x4e, 0x53, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, + 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x2a, 0x0a, 0x10, + 0x76, 0x32, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x18, 0x04, 0x20, 0x03, 0x28, 0x03, 0x52, 0x10, 0x76, 0x32, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, + 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x7e, 0x0a, 0x18, 0x4e, 0x65, 0x77, 0x4f, + 0x72, 0x64, 0x65, 0x72, 0x41, 0x6e, 0x64, 0x41, 0x75, 0x74, 0x68, 0x7a, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x2f, 0x0a, 0x08, 0x6e, 0x65, 0x77, 0x4f, 0x72, 0x64, 0x65, 0x72, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x73, 0x61, 0x2e, 0x4e, 0x65, 0x77, 0x4f, + 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x08, 0x6e, 0x65, 0x77, + 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x31, 0x0a, 0x09, 0x6e, 0x65, 0x77, 0x41, 0x75, 0x74, 0x68, + 0x7a, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, + 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x6e, + 0x65, 0x77, 0x41, 0x75, 0x74, 0x68, 0x7a, 0x73, 0x22, 0x52, 0x0a, 0x14, 0x53, 0x65, 0x74, 0x4f, + 0x72, 0x64, 0x65, 0x72, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, + 0x12, 0x2a, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x14, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x50, 0x72, 0x6f, 0x62, 0x6c, 0x65, 0x6d, 0x44, 0x65, + 0x74, 0x61, 0x69, 0x6c, 0x73, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x4c, 0x0a, 0x22, + 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x41, 0x75, 0x74, + 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, + 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x63, 0x63, 0x74, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x06, 0x61, 0x63, 0x63, 0x74, 0x49, 0x44, 0x22, 0x47, 0x0a, 0x17, 0x47, 0x65, + 0x74, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x46, 0x6f, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x63, 0x63, 0x74, 0x49, 0x44, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x61, 0x63, 0x63, 0x74, 0x49, 0x44, 0x12, 0x14, 0x0a, + 0x05, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x6e, 0x61, + 0x6d, 0x65, 0x73, 0x22, 0x54, 0x0a, 0x14, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x4f, + 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x2c, 0x0a, 0x11, 0x63, + 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x53, 0x65, 0x72, 0x69, 0x61, 0x6c, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, + 0x61, 0x74, 0x65, 0x53, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x22, 0x72, 0x0a, 0x18, 0x47, 0x65, 0x74, + 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 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, 0x12, 0x18, 0x0a, + 0x07, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, + 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x6f, 0x77, 0x4e, 0x53, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x6e, 0x6f, 0x77, 0x4e, 0x53, 0x22, 0x96, 0x01, 0x0a, 0x0e, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x33, 0x0a, 0x05, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x73, 0x61, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, @@ -3050,447 +3053,449 @@ var file_sa_proto_rawDesc = []byte{ 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x03, 0x69, 0x64, 0x73, 0x22, 0x22, 0x0a, 0x10, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x32, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, - 0x22, 0xb2, 0x01, 0x0a, 0x18, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x43, 0x65, 0x72, 0x74, 0x69, + 0x22, 0xba, 0x01, 0x0a, 0x18, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x12, 0x12, 0x0a, - 0x04, 0x64, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x64, 0x61, 0x74, - 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x62, 0x61, 0x63, 0x6b, 0x64, 0x61, 0x74, 0x65, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x03, 0x52, 0x08, 0x62, 0x61, 0x63, 0x6b, 0x64, 0x61, 0x74, 0x65, 0x12, 0x1a, 0x0a, - 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, - 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x73, 0x73, - 0x75, 0x65, 0x72, 0x49, 0x44, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x69, 0x73, 0x73, - 0x75, 0x65, 0x72, 0x49, 0x44, 0x22, 0xa6, 0x02, 0x0a, 0x1c, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, - 0x7a, 0x65, 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, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x18, - 0x0a, 0x07, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, - 0x07, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x61, 0x74, 0x74, 0x65, - 0x6d, 0x70, 0x74, 0x65, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x74, 0x74, - 0x65, 0x6d, 0x70, 0x74, 0x65, 0x64, 0x12, 0x44, 0x0a, 0x11, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x16, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x11, 0x76, 0x61, 0x6c, 0x69, 0x64, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x12, 0x3e, 0x0a, 0x0f, - 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x18, - 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x50, 0x72, 0x6f, - 0x62, 0x6c, 0x65, 0x6d, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x52, 0x0f, 0x76, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x20, 0x0a, 0x0b, - 0x61, 0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x65, 0x64, 0x41, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, - 0x03, 0x52, 0x0b, 0x61, 0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0x96, + 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x12, 0x16, 0x0a, + 0x06, 0x64, 0x61, 0x74, 0x65, 0x4e, 0x53, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x64, + 0x61, 0x74, 0x65, 0x4e, 0x53, 0x12, 0x1e, 0x0a, 0x0a, 0x62, 0x61, 0x63, 0x6b, 0x64, 0x61, 0x74, + 0x65, 0x4e, 0x53, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x62, 0x61, 0x63, 0x6b, 0x64, + 0x61, 0x74, 0x65, 0x4e, 0x53, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x49, 0x44, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x08, 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x49, 0x44, 0x22, 0xae, 0x02, + 0x0a, 0x1c, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 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, 0x12, 0x16, + 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, + 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, + 0x73, 0x4e, 0x53, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x65, 0x78, 0x70, 0x69, 0x72, + 0x65, 0x73, 0x4e, 0x53, 0x12, 0x1c, 0x0a, 0x09, 0x61, 0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x65, + 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, + 0x65, 0x64, 0x12, 0x44, 0x0a, 0x11, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, + 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x11, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x12, 0x3e, 0x0a, 0x0f, 0x76, 0x61, 0x6c, 0x69, + 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x14, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x50, 0x72, 0x6f, 0x62, 0x6c, 0x65, 0x6d, + 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x52, 0x0f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x24, 0x0a, 0x0d, 0x61, 0x74, 0x74, 0x65, + 0x6d, 0x70, 0x74, 0x65, 0x64, 0x41, 0x74, 0x4e, 0x53, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x0d, 0x61, 0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x65, 0x64, 0x41, 0x74, 0x4e, 0x53, 0x22, 0x9a, 0x01, 0x0a, 0x14, 0x41, 0x64, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x65, 0x64, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x6b, 0x65, 0x79, 0x48, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x6b, 0x65, 0x79, 0x48, 0x61, 0x73, - 0x68, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x64, 0x64, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, - 0x52, 0x05, 0x61, 0x64, 0x64, 0x65, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, - 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x76, - 0x6f, 0x6b, 0x65, 0x64, 0x42, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x72, 0x65, - 0x76, 0x6f, 0x6b, 0x65, 0x64, 0x42, 0x79, 0x22, 0x2d, 0x0a, 0x11, 0x4b, 0x65, 0x79, 0x42, 0x6c, - 0x6f, 0x63, 0x6b, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, - 0x6b, 0x65, 0x79, 0x48, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x6b, - 0x65, 0x79, 0x48, 0x61, 0x73, 0x68, 0x22, 0x82, 0x01, 0x0a, 0x08, 0x49, 0x6e, 0x63, 0x69, 0x64, - 0x65, 0x6e, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, - 0x02, 0x69, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x73, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x54, 0x61, 0x62, - 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x65, 0x72, 0x69, 0x61, 0x6c, - 0x54, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x6e, 0x65, 0x77, - 0x42, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x72, 0x65, 0x6e, 0x65, 0x77, 0x42, - 0x79, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x22, 0x37, 0x0a, 0x09, 0x49, - 0x6e, 0x63, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x2a, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x69, - 0x64, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x73, 0x61, - 0x2e, 0x49, 0x6e, 0x63, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x69, 0x64, - 0x65, 0x6e, 0x74, 0x73, 0x22, 0x41, 0x0a, 0x19, 0x53, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x73, 0x46, - 0x6f, 0x72, 0x49, 0x6e, 0x63, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x24, 0x0a, 0x0d, 0x69, 0x6e, 0x63, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x54, 0x61, 0x62, - 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x69, 0x6e, 0x63, 0x69, 0x64, 0x65, - 0x6e, 0x74, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x22, 0x92, 0x01, 0x0a, 0x0e, 0x49, 0x6e, 0x63, 0x69, - 0x64, 0x65, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x65, - 0x72, 0x69, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x65, 0x72, 0x69, - 0x61, 0x6c, 0x12, 0x26, 0x0a, 0x0e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0e, 0x72, 0x65, 0x67, 0x69, - 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x12, 0x18, 0x0a, 0x07, 0x6f, 0x72, - 0x64, 0x65, 0x72, 0x49, 0x44, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x6f, 0x72, 0x64, - 0x65, 0x72, 0x49, 0x44, 0x12, 0x26, 0x0a, 0x0e, 0x6c, 0x61, 0x73, 0x74, 0x4e, 0x6f, 0x74, 0x69, - 0x63, 0x65, 0x53, 0x65, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0e, 0x6c, 0x61, - 0x73, 0x74, 0x4e, 0x6f, 0x74, 0x69, 0x63, 0x65, 0x53, 0x65, 0x6e, 0x74, 0x22, 0xac, 0x01, 0x0a, - 0x16, 0x47, 0x65, 0x74, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x64, 0x43, 0x65, 0x72, 0x74, 0x73, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x22, 0x0a, 0x0c, 0x69, 0x73, 0x73, 0x75, 0x65, - 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x69, - 0x73, 0x73, 0x75, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x49, 0x44, 0x12, 0x22, 0x0a, 0x0c, 0x65, - 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x41, 0x66, 0x74, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x03, 0x52, 0x0c, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x41, 0x66, 0x74, 0x65, 0x72, 0x12, - 0x24, 0x0a, 0x0d, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x42, 0x65, 0x66, 0x6f, 0x72, 0x65, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x42, - 0x65, 0x66, 0x6f, 0x72, 0x65, 0x12, 0x24, 0x0a, 0x0d, 0x72, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x64, - 0x42, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x72, 0x65, - 0x76, 0x6f, 0x6b, 0x65, 0x64, 0x42, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x22, 0x8e, 0x01, 0x0a, 0x10, - 0x52, 0x65, 0x76, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, - 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x24, 0x0a, 0x0d, 0x72, 0x65, 0x76, 0x6f, - 0x6b, 0x65, 0x64, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, - 0x0d, 0x72, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x64, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x12, 0x3c, - 0x0a, 0x0b, 0x72, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x64, 0x44, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, - 0x0b, 0x72, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x64, 0x44, 0x61, 0x74, 0x65, 0x22, 0xb0, 0x01, 0x0a, - 0x14, 0x4c, 0x65, 0x61, 0x73, 0x65, 0x43, 0x52, 0x4c, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x22, 0x0a, 0x0c, 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x4e, - 0x61, 0x6d, 0x65, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x69, 0x73, 0x73, - 0x75, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x49, 0x44, 0x12, 0x20, 0x0a, 0x0b, 0x6d, 0x69, 0x6e, - 0x53, 0x68, 0x61, 0x72, 0x64, 0x49, 0x64, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, - 0x6d, 0x69, 0x6e, 0x53, 0x68, 0x61, 0x72, 0x64, 0x49, 0x64, 0x78, 0x12, 0x20, 0x0a, 0x0b, 0x6d, - 0x61, 0x78, 0x53, 0x68, 0x61, 0x72, 0x64, 0x49, 0x64, 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, - 0x52, 0x0b, 0x6d, 0x61, 0x78, 0x53, 0x68, 0x61, 0x72, 0x64, 0x49, 0x64, 0x78, 0x12, 0x30, 0x0a, - 0x05, 0x75, 0x6e, 0x74, 0x69, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, - 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x05, 0x75, 0x6e, 0x74, 0x69, 0x6c, 0x22, - 0x57, 0x0a, 0x15, 0x4c, 0x65, 0x61, 0x73, 0x65, 0x43, 0x52, 0x4c, 0x53, 0x68, 0x61, 0x72, 0x64, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x69, 0x73, 0x73, 0x75, - 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, - 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x49, 0x44, 0x12, 0x1a, 0x0a, 0x08, - 0x73, 0x68, 0x61, 0x72, 0x64, 0x49, 0x64, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, - 0x73, 0x68, 0x61, 0x72, 0x64, 0x49, 0x64, 0x78, 0x22, 0xcf, 0x01, 0x0a, 0x15, 0x55, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x43, 0x52, 0x4c, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x22, 0x0a, 0x0c, 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, - 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, - 0x4e, 0x61, 0x6d, 0x65, 0x49, 0x44, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x68, 0x61, 0x72, 0x64, 0x49, - 0x64, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x73, 0x68, 0x61, 0x72, 0x64, 0x49, - 0x64, 0x78, 0x12, 0x3a, 0x0a, 0x0a, 0x74, 0x68, 0x69, 0x73, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, - 0x6d, 0x70, 0x52, 0x0a, 0x74, 0x68, 0x69, 0x73, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x3a, - 0x0a, 0x0a, 0x6e, 0x65, 0x78, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, - 0x6e, 0x65, 0x78, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x32, 0xfc, 0x0e, 0x0a, 0x18, 0x53, - 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x52, - 0x65, 0x61, 0x64, 0x4f, 0x6e, 0x6c, 0x79, 0x12, 0x53, 0x0a, 0x18, 0x43, 0x6f, 0x75, 0x6e, 0x74, - 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x73, 0x42, 0x79, 0x4e, 0x61, - 0x6d, 0x65, 0x73, 0x12, 0x23, 0x2e, 0x73, 0x61, 0x2e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x43, 0x65, - 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x73, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, - 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x10, 0x2e, 0x73, 0x61, 0x2e, 0x43, 0x6f, - 0x75, 0x6e, 0x74, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x22, 0x00, 0x12, 0x36, 0x0a, 0x0d, - 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x46, 0x51, 0x44, 0x4e, 0x53, 0x65, 0x74, 0x73, 0x12, 0x18, 0x2e, - 0x73, 0x61, 0x2e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x46, 0x51, 0x44, 0x4e, 0x53, 0x65, 0x74, 0x73, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x09, 0x2e, 0x73, 0x61, 0x2e, 0x43, 0x6f, 0x75, - 0x6e, 0x74, 0x22, 0x00, 0x12, 0x51, 0x0a, 0x1b, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x76, - 0x61, 0x6c, 0x69, 0x64, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x32, 0x12, 0x25, 0x2e, 0x73, 0x61, 0x2e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, - 0x76, 0x61, 0x6c, 0x69, 0x64, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x09, 0x2e, 0x73, 0x61, 0x2e, - 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x00, 0x12, 0x32, 0x0a, 0x0b, 0x43, 0x6f, 0x75, 0x6e, 0x74, - 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x12, 0x16, 0x2e, 0x73, 0x61, 0x2e, 0x43, 0x6f, 0x75, 0x6e, - 0x74, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x09, - 0x2e, 0x73, 0x61, 0x2e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x00, 0x12, 0x3e, 0x0a, 0x1b, 0x43, - 0x6f, 0x75, 0x6e, 0x74, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x41, 0x75, 0x74, 0x68, 0x6f, - 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x32, 0x12, 0x12, 0x2e, 0x73, 0x61, 0x2e, - 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x1a, 0x09, - 0x2e, 0x73, 0x61, 0x2e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x00, 0x12, 0x48, 0x0a, 0x16, 0x43, - 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x42, 0x79, 0x49, 0x50, 0x12, 0x21, 0x2e, 0x73, 0x61, 0x2e, 0x43, 0x6f, 0x75, 0x6e, 0x74, - 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x79, 0x49, - 0x50, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x09, 0x2e, 0x73, 0x61, 0x2e, 0x43, 0x6f, - 0x75, 0x6e, 0x74, 0x22, 0x00, 0x12, 0x4d, 0x0a, 0x1b, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, - 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x79, 0x49, 0x50, 0x52, - 0x61, 0x6e, 0x67, 0x65, 0x12, 0x21, 0x2e, 0x73, 0x61, 0x2e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, - 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x79, 0x49, 0x50, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x09, 0x2e, 0x73, 0x61, 0x2e, 0x43, 0x6f, 0x75, - 0x6e, 0x74, 0x22, 0x00, 0x12, 0x37, 0x0a, 0x0d, 0x46, 0x51, 0x44, 0x4e, 0x53, 0x65, 0x74, 0x45, - 0x78, 0x69, 0x73, 0x74, 0x73, 0x12, 0x18, 0x2e, 0x73, 0x61, 0x2e, 0x46, 0x51, 0x44, 0x4e, 0x53, - 0x65, 0x74, 0x45, 0x78, 0x69, 0x73, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x0a, 0x2e, 0x73, 0x61, 0x2e, 0x45, 0x78, 0x69, 0x73, 0x74, 0x73, 0x22, 0x00, 0x12, 0x48, 0x0a, - 0x1a, 0x46, 0x51, 0x44, 0x4e, 0x53, 0x65, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, - 0x70, 0x73, 0x46, 0x6f, 0x72, 0x57, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x12, 0x18, 0x2e, 0x73, 0x61, - 0x2e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x46, 0x51, 0x44, 0x4e, 0x53, 0x65, 0x74, 0x73, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x73, 0x61, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, - 0x74, 0x61, 0x6d, 0x70, 0x73, 0x22, 0x00, 0x12, 0x40, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x41, 0x75, - 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x32, 0x12, 0x14, 0x2e, 0x73, - 0x61, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, - 0x44, 0x32, 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, 0x12, 0x47, 0x65, 0x74, - 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x32, 0x12, - 0x1c, 0x2e, 0x73, 0x61, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, - 0x73, 0x61, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x22, 0x00, 0x12, 0x31, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, - 0x69, 0x63, 0x61, 0x74, 0x65, 0x12, 0x0a, 0x2e, 0x73, 0x61, 0x2e, 0x53, 0x65, 0x72, 0x69, 0x61, - 0x6c, 0x1a, 0x11, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, - 0x63, 0x61, 0x74, 0x65, 0x22, 0x00, 0x12, 0x3d, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x43, 0x65, 0x72, - 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x0a, - 0x2e, 0x73, 0x61, 0x2e, 0x53, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x1a, 0x17, 0x2e, 0x63, 0x6f, 0x72, - 0x65, 0x2e, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x22, 0x00, 0x12, 0x48, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x4d, 0x61, 0x78, 0x45, - 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, - 0x79, 0x1a, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, 0x00, 0x12, - 0x2b, 0x0a, 0x08, 0x47, 0x65, 0x74, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x10, 0x2e, 0x73, 0x61, - 0x2e, 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, 0x3e, 0x0a, 0x10, - 0x47, 0x65, 0x74, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x46, 0x6f, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x73, - 0x12, 0x1b, 0x2e, 0x73, 0x61, 0x2e, 0x47, 0x65, 0x74, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x46, 0x6f, - 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0b, 0x2e, - 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x22, 0x00, 0x12, 0x55, 0x0a, 0x18, - 0x47, 0x65, 0x74, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, - 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x32, 0x12, 0x22, 0x2e, 0x73, 0x61, 0x2e, 0x47, 0x65, - 0x74, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 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, 0x3b, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, - 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x2e, 0x73, 0x61, 0x2e, 0x52, 0x65, 0x67, 0x69, - 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x1a, 0x12, 0x2e, 0x63, 0x6f, 0x72, - 0x65, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x00, - 0x12, 0x3c, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x42, 0x79, 0x4b, 0x65, 0x79, 0x12, 0x0e, 0x2e, 0x73, 0x61, 0x2e, 0x4a, 0x53, - 0x4f, 0x4e, 0x57, 0x65, 0x62, 0x4b, 0x65, 0x79, 0x1a, 0x12, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, - 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x00, 0x12, 0x39, - 0x0a, 0x13, 0x47, 0x65, 0x74, 0x52, 0x65, 0x76, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x0a, 0x2e, 0x73, 0x61, 0x2e, 0x53, 0x65, 0x72, 0x69, 0x61, - 0x6c, 0x1a, 0x14, 0x2e, 0x73, 0x61, 0x2e, 0x52, 0x65, 0x76, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x00, 0x12, 0x41, 0x0a, 0x0f, 0x47, 0x65, 0x74, - 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x64, 0x43, 0x65, 0x72, 0x74, 0x73, 0x12, 0x1a, 0x2e, 0x73, - 0x61, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x64, 0x43, 0x65, 0x72, 0x74, - 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, - 0x43, 0x52, 0x4c, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x22, 0x00, 0x30, 0x01, 0x12, 0x35, 0x0a, 0x11, - 0x47, 0x65, 0x74, 0x53, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, - 0x61, 0x12, 0x0a, 0x2e, 0x73, 0x61, 0x2e, 0x53, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x1a, 0x12, 0x2e, - 0x73, 0x61, 0x2e, 0x53, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, - 0x61, 0x22, 0x00, 0x12, 0x52, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x41, - 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x32, 0x12, 0x21, - 0x2e, 0x73, 0x61, 0x2e, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x41, 0x75, 0x74, 0x68, - 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x12, 0x2e, 0x73, 0x61, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x00, 0x12, 0x5c, 0x0a, 0x1c, 0x47, 0x65, 0x74, 0x56, 0x61, - 0x6c, 0x69, 0x64, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x32, 0x12, 0x26, 0x2e, 0x73, 0x61, 0x2e, 0x47, 0x65, 0x74, - 0x56, 0x61, 0x6c, 0x69, 0x64, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, - 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x12, 0x2e, 0x73, 0x61, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x22, 0x00, 0x12, 0x31, 0x0a, 0x12, 0x49, 0x6e, 0x63, 0x69, 0x64, 0x65, 0x6e, - 0x74, 0x73, 0x46, 0x6f, 0x72, 0x53, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x12, 0x0a, 0x2e, 0x73, 0x61, - 0x2e, 0x53, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x1a, 0x0d, 0x2e, 0x73, 0x61, 0x2e, 0x49, 0x6e, 0x63, - 0x69, 0x64, 0x65, 0x6e, 0x74, 0x73, 0x22, 0x00, 0x12, 0x31, 0x0a, 0x0a, 0x4b, 0x65, 0x79, 0x42, - 0x6c, 0x6f, 0x63, 0x6b, 0x65, 0x64, 0x12, 0x15, 0x2e, 0x73, 0x61, 0x2e, 0x4b, 0x65, 0x79, 0x42, - 0x6c, 0x6f, 0x63, 0x6b, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0a, 0x2e, - 0x73, 0x61, 0x2e, 0x45, 0x78, 0x69, 0x73, 0x74, 0x73, 0x22, 0x00, 0x12, 0x4f, 0x0a, 0x19, 0x50, - 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, - 0x74, 0x65, 0x45, 0x78, 0x69, 0x73, 0x74, 0x73, 0x12, 0x24, 0x2e, 0x73, 0x61, 0x2e, 0x50, 0x72, - 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, - 0x65, 0x45, 0x78, 0x69, 0x73, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0a, - 0x2e, 0x73, 0x61, 0x2e, 0x45, 0x78, 0x69, 0x73, 0x74, 0x73, 0x22, 0x00, 0x12, 0x4b, 0x0a, 0x12, + 0x68, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x65, 0x64, 0x4e, 0x53, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x07, 0x61, 0x64, 0x64, 0x65, 0x64, 0x4e, 0x53, 0x12, 0x16, 0x0a, 0x06, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x1c, 0x0a, + 0x09, 0x72, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x64, 0x42, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x09, 0x72, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x64, 0x42, 0x79, 0x22, 0x2d, 0x0a, 0x11, 0x4b, + 0x65, 0x79, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x18, 0x0a, 0x07, 0x6b, 0x65, 0x79, 0x48, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0c, 0x52, 0x07, 0x6b, 0x65, 0x79, 0x48, 0x61, 0x73, 0x68, 0x22, 0x86, 0x01, 0x0a, 0x08, 0x49, + 0x6e, 0x63, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x73, 0x65, 0x72, 0x69, 0x61, + 0x6c, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x65, + 0x72, 0x69, 0x61, 0x6c, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x12, 0x1c, 0x0a, 0x09, 0x72, + 0x65, 0x6e, 0x65, 0x77, 0x42, 0x79, 0x4e, 0x53, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, + 0x72, 0x65, 0x6e, 0x65, 0x77, 0x42, 0x79, 0x4e, 0x53, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x6e, 0x61, + 0x62, 0x6c, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x65, 0x6e, 0x61, 0x62, + 0x6c, 0x65, 0x64, 0x22, 0x37, 0x0a, 0x09, 0x49, 0x6e, 0x63, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x73, + 0x12, 0x2a, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x73, 0x61, 0x2e, 0x49, 0x6e, 0x63, 0x69, 0x64, 0x65, 0x6e, + 0x74, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x73, 0x22, 0x41, 0x0a, 0x19, 0x53, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x73, 0x46, 0x6f, 0x72, 0x49, 0x6e, 0x63, 0x69, 0x64, 0x65, - 0x6e, 0x74, 0x12, 0x1d, 0x2e, 0x73, 0x61, 0x2e, 0x53, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x73, 0x46, - 0x6f, 0x72, 0x49, 0x6e, 0x63, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x12, 0x2e, 0x73, 0x61, 0x2e, 0x49, 0x6e, 0x63, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x53, - 0x65, 0x72, 0x69, 0x61, 0x6c, 0x22, 0x00, 0x30, 0x01, 0x32, 0xf3, 0x18, 0x0a, 0x10, 0x53, 0x74, - 0x6f, 0x72, 0x61, 0x67, 0x65, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x53, - 0x0a, 0x18, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, - 0x74, 0x65, 0x73, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x23, 0x2e, 0x73, 0x61, 0x2e, - 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, - 0x73, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x10, 0x2e, 0x73, 0x61, 0x2e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, - 0x73, 0x22, 0x00, 0x12, 0x36, 0x0a, 0x0d, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x46, 0x51, 0x44, 0x4e, - 0x53, 0x65, 0x74, 0x73, 0x12, 0x18, 0x2e, 0x73, 0x61, 0x2e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x46, - 0x51, 0x44, 0x4e, 0x53, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x09, - 0x2e, 0x73, 0x61, 0x2e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x00, 0x12, 0x51, 0x0a, 0x1b, 0x43, - 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x41, 0x75, 0x74, 0x68, 0x6f, - 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x32, 0x12, 0x25, 0x2e, 0x73, 0x61, 0x2e, + 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x24, 0x0a, 0x0d, 0x69, 0x6e, 0x63, + 0x69, 0x64, 0x65, 0x6e, 0x74, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0d, 0x69, 0x6e, 0x63, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x22, + 0x96, 0x01, 0x0a, 0x0e, 0x49, 0x6e, 0x63, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x69, + 0x61, 0x6c, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x06, 0x73, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x12, 0x26, 0x0a, 0x0e, 0x72, 0x65, + 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x0e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x49, 0x44, 0x12, 0x18, 0x0a, 0x07, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x49, 0x44, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x07, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x49, 0x44, 0x12, 0x2a, 0x0a, 0x10, + 0x6c, 0x61, 0x73, 0x74, 0x4e, 0x6f, 0x74, 0x69, 0x63, 0x65, 0x53, 0x65, 0x6e, 0x74, 0x4e, 0x53, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x10, 0x6c, 0x61, 0x73, 0x74, 0x4e, 0x6f, 0x74, 0x69, + 0x63, 0x65, 0x53, 0x65, 0x6e, 0x74, 0x4e, 0x53, 0x22, 0xb8, 0x01, 0x0a, 0x16, 0x47, 0x65, 0x74, + 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x64, 0x43, 0x65, 0x72, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x22, 0x0a, 0x0c, 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x4e, 0x61, 0x6d, + 0x65, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x69, 0x73, 0x73, 0x75, 0x65, + 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x49, 0x44, 0x12, 0x26, 0x0a, 0x0e, 0x65, 0x78, 0x70, 0x69, 0x72, + 0x65, 0x73, 0x41, 0x66, 0x74, 0x65, 0x72, 0x4e, 0x53, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x0e, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x41, 0x66, 0x74, 0x65, 0x72, 0x4e, 0x53, 0x12, + 0x28, 0x0a, 0x0f, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x42, 0x65, 0x66, 0x6f, 0x72, 0x65, + 0x4e, 0x53, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0f, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, + 0x73, 0x42, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x4e, 0x53, 0x12, 0x28, 0x0a, 0x0f, 0x72, 0x65, 0x76, + 0x6f, 0x6b, 0x65, 0x64, 0x42, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x4e, 0x53, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x0f, 0x72, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x64, 0x42, 0x65, 0x66, 0x6f, 0x72, + 0x65, 0x4e, 0x53, 0x22, 0x8e, 0x01, 0x0a, 0x10, 0x52, 0x65, 0x76, 0x6f, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x12, 0x24, 0x0a, 0x0d, 0x72, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x64, 0x52, 0x65, 0x61, 0x73, 0x6f, + 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x72, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x64, + 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x12, 0x3c, 0x0a, 0x0b, 0x72, 0x65, 0x76, 0x6f, 0x6b, 0x65, + 0x64, 0x44, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, + 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0b, 0x72, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x64, + 0x44, 0x61, 0x74, 0x65, 0x22, 0xb0, 0x01, 0x0a, 0x14, 0x4c, 0x65, 0x61, 0x73, 0x65, 0x43, 0x52, + 0x4c, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x22, 0x0a, + 0x0c, 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x49, 0x44, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x0c, 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x49, + 0x44, 0x12, 0x20, 0x0a, 0x0b, 0x6d, 0x69, 0x6e, 0x53, 0x68, 0x61, 0x72, 0x64, 0x49, 0x64, 0x78, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x6d, 0x69, 0x6e, 0x53, 0x68, 0x61, 0x72, 0x64, + 0x49, 0x64, 0x78, 0x12, 0x20, 0x0a, 0x0b, 0x6d, 0x61, 0x78, 0x53, 0x68, 0x61, 0x72, 0x64, 0x49, + 0x64, 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x6d, 0x61, 0x78, 0x53, 0x68, 0x61, + 0x72, 0x64, 0x49, 0x64, 0x78, 0x12, 0x30, 0x0a, 0x05, 0x75, 0x6e, 0x74, 0x69, 0x6c, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, + 0x52, 0x05, 0x75, 0x6e, 0x74, 0x69, 0x6c, 0x22, 0x57, 0x0a, 0x15, 0x4c, 0x65, 0x61, 0x73, 0x65, + 0x43, 0x52, 0x4c, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x22, 0x0a, 0x0c, 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x49, 0x44, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x4e, 0x61, + 0x6d, 0x65, 0x49, 0x44, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x68, 0x61, 0x72, 0x64, 0x49, 0x64, 0x78, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x73, 0x68, 0x61, 0x72, 0x64, 0x49, 0x64, 0x78, + 0x22, 0xcf, 0x01, 0x0a, 0x15, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x52, 0x4c, 0x53, 0x68, + 0x61, 0x72, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x22, 0x0a, 0x0c, 0x69, 0x73, + 0x73, 0x75, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x0c, 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x49, 0x44, 0x12, 0x1a, + 0x0a, 0x08, 0x73, 0x68, 0x61, 0x72, 0x64, 0x49, 0x64, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x08, 0x73, 0x68, 0x61, 0x72, 0x64, 0x49, 0x64, 0x78, 0x12, 0x3a, 0x0a, 0x0a, 0x74, 0x68, + 0x69, 0x73, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x74, 0x68, 0x69, 0x73, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x3a, 0x0a, 0x0a, 0x6e, 0x65, 0x78, 0x74, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x6e, 0x65, 0x78, 0x74, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x32, 0xfc, 0x0e, 0x0a, 0x18, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x41, 0x75, + 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x52, 0x65, 0x61, 0x64, 0x4f, 0x6e, 0x6c, 0x79, 0x12, + 0x53, 0x0a, 0x18, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, + 0x61, 0x74, 0x65, 0x73, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x23, 0x2e, 0x73, 0x61, + 0x2e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, + 0x65, 0x73, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x10, 0x2e, 0x73, 0x61, 0x2e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x79, 0x4e, 0x61, 0x6d, + 0x65, 0x73, 0x22, 0x00, 0x12, 0x36, 0x0a, 0x0d, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x46, 0x51, 0x44, + 0x4e, 0x53, 0x65, 0x74, 0x73, 0x12, 0x18, 0x2e, 0x73, 0x61, 0x2e, 0x43, 0x6f, 0x75, 0x6e, 0x74, + 0x46, 0x51, 0x44, 0x4e, 0x53, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x09, 0x2e, 0x73, 0x61, 0x2e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x00, 0x12, 0x51, 0x0a, 0x1b, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x41, 0x75, 0x74, 0x68, - 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x09, 0x2e, 0x73, 0x61, 0x2e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x00, 0x12, 0x32, - 0x0a, 0x0b, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x12, 0x16, 0x2e, - 0x73, 0x61, 0x2e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x09, 0x2e, 0x73, 0x61, 0x2e, 0x43, 0x6f, 0x75, 0x6e, 0x74, - 0x22, 0x00, 0x12, 0x3e, 0x0a, 0x1b, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x50, 0x65, 0x6e, 0x64, 0x69, - 0x6e, 0x67, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x32, 0x12, 0x12, 0x2e, 0x73, 0x61, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x1a, 0x09, 0x2e, 0x73, 0x61, 0x2e, 0x43, 0x6f, 0x75, 0x6e, 0x74, - 0x22, 0x00, 0x12, 0x48, 0x0a, 0x16, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x67, 0x69, 0x73, - 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x79, 0x49, 0x50, 0x12, 0x21, 0x2e, 0x73, + 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x32, 0x12, 0x25, 0x2e, 0x73, 0x61, + 0x2e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x41, 0x75, 0x74, + 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x09, 0x2e, 0x73, 0x61, 0x2e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x00, 0x12, + 0x32, 0x0a, 0x0b, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x12, 0x16, + 0x2e, 0x73, 0x61, 0x2e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x09, 0x2e, 0x73, 0x61, 0x2e, 0x43, 0x6f, 0x75, 0x6e, + 0x74, 0x22, 0x00, 0x12, 0x3e, 0x0a, 0x1b, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x50, 0x65, 0x6e, 0x64, + 0x69, 0x6e, 0x67, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x32, 0x12, 0x12, 0x2e, 0x73, 0x61, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x1a, 0x09, 0x2e, 0x73, 0x61, 0x2e, 0x43, 0x6f, 0x75, 0x6e, + 0x74, 0x22, 0x00, 0x12, 0x48, 0x0a, 0x16, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x67, 0x69, + 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x79, 0x49, 0x50, 0x12, 0x21, 0x2e, + 0x73, 0x61, 0x2e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x79, 0x49, 0x50, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x09, 0x2e, 0x73, 0x61, 0x2e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x00, 0x12, 0x4d, 0x0a, + 0x1b, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x42, 0x79, 0x49, 0x50, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x21, 0x2e, 0x73, 0x61, 0x2e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x79, 0x49, 0x50, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x09, 0x2e, 0x73, 0x61, 0x2e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x00, 0x12, 0x4d, 0x0a, 0x1b, - 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x42, 0x79, 0x49, 0x50, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x21, 0x2e, 0x73, 0x61, - 0x2e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x42, 0x79, 0x49, 0x50, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x09, - 0x2e, 0x73, 0x61, 0x2e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x00, 0x12, 0x37, 0x0a, 0x0d, 0x46, - 0x51, 0x44, 0x4e, 0x53, 0x65, 0x74, 0x45, 0x78, 0x69, 0x73, 0x74, 0x73, 0x12, 0x18, 0x2e, 0x73, - 0x61, 0x2e, 0x46, 0x51, 0x44, 0x4e, 0x53, 0x65, 0x74, 0x45, 0x78, 0x69, 0x73, 0x74, 0x73, 0x52, + 0x09, 0x2e, 0x73, 0x61, 0x2e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x00, 0x12, 0x37, 0x0a, 0x0d, + 0x46, 0x51, 0x44, 0x4e, 0x53, 0x65, 0x74, 0x45, 0x78, 0x69, 0x73, 0x74, 0x73, 0x12, 0x18, 0x2e, + 0x73, 0x61, 0x2e, 0x46, 0x51, 0x44, 0x4e, 0x53, 0x65, 0x74, 0x45, 0x78, 0x69, 0x73, 0x74, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0a, 0x2e, 0x73, 0x61, 0x2e, 0x45, 0x78, 0x69, + 0x73, 0x74, 0x73, 0x22, 0x00, 0x12, 0x48, 0x0a, 0x1a, 0x46, 0x51, 0x44, 0x4e, 0x53, 0x65, 0x74, + 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x73, 0x46, 0x6f, 0x72, 0x57, 0x69, 0x6e, + 0x64, 0x6f, 0x77, 0x12, 0x18, 0x2e, 0x73, 0x61, 0x2e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x46, 0x51, + 0x44, 0x4e, 0x53, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, + 0x73, 0x61, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x73, 0x22, 0x00, 0x12, + 0x40, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x32, 0x12, 0x14, 0x2e, 0x73, 0x61, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, + 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x32, 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, 0x12, 0x47, 0x65, 0x74, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x32, 0x12, 0x1c, 0x2e, 0x73, 0x61, 0x2e, 0x47, 0x65, 0x74, + 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x73, 0x61, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x6f, + 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x00, 0x12, 0x31, 0x0a, 0x0e, 0x47, + 0x65, 0x74, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x12, 0x0a, 0x2e, + 0x73, 0x61, 0x2e, 0x53, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x1a, 0x11, 0x2e, 0x63, 0x6f, 0x72, 0x65, + 0x2e, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x22, 0x00, 0x12, 0x3d, + 0x0a, 0x14, 0x47, 0x65, 0x74, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, + 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x0a, 0x2e, 0x73, 0x61, 0x2e, 0x53, 0x65, 0x72, 0x69, + 0x61, 0x6c, 0x1a, 0x17, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, + 0x69, 0x63, 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x00, 0x12, 0x48, 0x0a, + 0x10, 0x47, 0x65, 0x74, 0x4d, 0x61, 0x78, 0x45, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, + 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, 0x00, 0x12, 0x2b, 0x0a, 0x08, 0x47, 0x65, 0x74, 0x4f, 0x72, + 0x64, 0x65, 0x72, 0x12, 0x10, 0x2e, 0x73, 0x61, 0x2e, 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, 0x3e, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x4f, 0x72, 0x64, 0x65, 0x72, + 0x46, 0x6f, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x1b, 0x2e, 0x73, 0x61, 0x2e, 0x47, 0x65, + 0x74, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x46, 0x6f, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0b, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x4f, 0x72, 0x64, + 0x65, 0x72, 0x22, 0x00, 0x12, 0x55, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x50, 0x65, 0x6e, 0x64, 0x69, + 0x6e, 0x67, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x32, + 0x12, 0x22, 0x2e, 0x73, 0x61, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, + 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, 0x3b, 0x0a, 0x0f, 0x47, + 0x65, 0x74, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, + 0x2e, 0x73, 0x61, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x49, 0x44, 0x1a, 0x12, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x00, 0x12, 0x3c, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x52, + 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x79, 0x4b, 0x65, 0x79, + 0x12, 0x0e, 0x2e, 0x73, 0x61, 0x2e, 0x4a, 0x53, 0x4f, 0x4e, 0x57, 0x65, 0x62, 0x4b, 0x65, 0x79, + 0x1a, 0x12, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x00, 0x12, 0x39, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x52, 0x65, 0x76, + 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x0a, 0x2e, + 0x73, 0x61, 0x2e, 0x53, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x1a, 0x14, 0x2e, 0x73, 0x61, 0x2e, 0x52, + 0x65, 0x76, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, + 0x00, 0x12, 0x41, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x64, 0x43, + 0x65, 0x72, 0x74, 0x73, 0x12, 0x1a, 0x2e, 0x73, 0x61, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x76, + 0x6f, 0x6b, 0x65, 0x64, 0x43, 0x65, 0x72, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x0e, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x43, 0x52, 0x4c, 0x45, 0x6e, 0x74, 0x72, 0x79, + 0x22, 0x00, 0x30, 0x01, 0x12, 0x35, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x53, 0x65, 0x72, 0x69, 0x61, + 0x6c, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x0a, 0x2e, 0x73, 0x61, 0x2e, 0x53, + 0x65, 0x72, 0x69, 0x61, 0x6c, 0x1a, 0x12, 0x2e, 0x73, 0x61, 0x2e, 0x53, 0x65, 0x72, 0x69, 0x61, + 0x6c, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0x00, 0x12, 0x52, 0x0a, 0x17, 0x47, + 0x65, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x32, 0x12, 0x21, 0x2e, 0x73, 0x61, 0x2e, 0x47, 0x65, 0x74, 0x56, + 0x61, 0x6c, 0x69, 0x64, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x73, 0x61, 0x2e, 0x41, + 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x00, 0x12, + 0x5c, 0x0a, 0x1c, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x4f, 0x72, 0x64, 0x65, 0x72, + 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x32, 0x12, + 0x26, 0x2e, 0x73, 0x61, 0x2e, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x4f, 0x72, 0x64, + 0x65, 0x72, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x73, 0x61, 0x2e, 0x41, 0x75, 0x74, + 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x00, 0x12, 0x31, 0x0a, + 0x12, 0x49, 0x6e, 0x63, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x73, 0x46, 0x6f, 0x72, 0x53, 0x65, 0x72, + 0x69, 0x61, 0x6c, 0x12, 0x0a, 0x2e, 0x73, 0x61, 0x2e, 0x53, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x1a, + 0x0d, 0x2e, 0x73, 0x61, 0x2e, 0x49, 0x6e, 0x63, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x73, 0x22, 0x00, + 0x12, 0x31, 0x0a, 0x0a, 0x4b, 0x65, 0x79, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x65, 0x64, 0x12, 0x15, + 0x2e, 0x73, 0x61, 0x2e, 0x4b, 0x65, 0x79, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x65, 0x64, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0a, 0x2e, 0x73, 0x61, 0x2e, 0x45, 0x78, 0x69, 0x73, 0x74, + 0x73, 0x22, 0x00, 0x12, 0x4f, 0x0a, 0x19, 0x50, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x43, + 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x45, 0x78, 0x69, 0x73, 0x74, 0x73, + 0x12, 0x24, 0x2e, 0x73, 0x61, 0x2e, 0x50, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x43, 0x65, + 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x45, 0x78, 0x69, 0x73, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0a, 0x2e, 0x73, 0x61, 0x2e, 0x45, 0x78, 0x69, 0x73, - 0x74, 0x73, 0x22, 0x00, 0x12, 0x48, 0x0a, 0x1a, 0x46, 0x51, 0x44, 0x4e, 0x53, 0x65, 0x74, 0x54, - 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x73, 0x46, 0x6f, 0x72, 0x57, 0x69, 0x6e, 0x64, - 0x6f, 0x77, 0x12, 0x18, 0x2e, 0x73, 0x61, 0x2e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x46, 0x51, 0x44, - 0x4e, 0x53, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x73, - 0x61, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x73, 0x22, 0x00, 0x12, 0x40, - 0x0a, 0x11, 0x47, 0x65, 0x74, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x32, 0x12, 0x14, 0x2e, 0x73, 0x61, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, - 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x32, 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, 0x12, 0x47, 0x65, 0x74, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x32, 0x12, 0x1c, 0x2e, 0x73, 0x61, 0x2e, 0x47, 0x65, 0x74, 0x41, - 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x73, 0x61, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, - 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x00, 0x12, 0x31, 0x0a, 0x0e, 0x47, 0x65, - 0x74, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x12, 0x0a, 0x2e, 0x73, - 0x61, 0x2e, 0x53, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x1a, 0x11, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, - 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x22, 0x00, 0x12, 0x3d, 0x0a, - 0x14, 0x47, 0x65, 0x74, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x53, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x0a, 0x2e, 0x73, 0x61, 0x2e, 0x53, 0x65, 0x72, 0x69, 0x61, - 0x6c, 0x1a, 0x17, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, - 0x63, 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x00, 0x12, 0x48, 0x0a, 0x10, - 0x47, 0x65, 0x74, 0x4d, 0x61, 0x78, 0x45, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, - 0x74, 0x61, 0x6d, 0x70, 0x22, 0x00, 0x12, 0x2b, 0x0a, 0x08, 0x47, 0x65, 0x74, 0x4f, 0x72, 0x64, - 0x65, 0x72, 0x12, 0x10, 0x2e, 0x73, 0x61, 0x2e, 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, 0x3e, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x46, - 0x6f, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x1b, 0x2e, 0x73, 0x61, 0x2e, 0x47, 0x65, 0x74, - 0x4f, 0x72, 0x64, 0x65, 0x72, 0x46, 0x6f, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0b, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x4f, 0x72, 0x64, 0x65, - 0x72, 0x22, 0x00, 0x12, 0x55, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, - 0x67, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x32, 0x12, - 0x22, 0x2e, 0x73, 0x61, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 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, 0x3b, 0x0a, 0x0f, 0x47, 0x65, - 0x74, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x2e, - 0x73, 0x61, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, - 0x44, 0x1a, 0x12, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x00, 0x12, 0x3c, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x52, 0x65, - 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x79, 0x4b, 0x65, 0x79, 0x12, - 0x0e, 0x2e, 0x73, 0x61, 0x2e, 0x4a, 0x53, 0x4f, 0x4e, 0x57, 0x65, 0x62, 0x4b, 0x65, 0x79, 0x1a, - 0x12, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x22, 0x00, 0x12, 0x39, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x52, 0x65, 0x76, 0x6f, - 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x0a, 0x2e, 0x73, - 0x61, 0x2e, 0x53, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x1a, 0x14, 0x2e, 0x73, 0x61, 0x2e, 0x52, 0x65, - 0x76, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x00, - 0x12, 0x41, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x64, 0x43, 0x65, - 0x72, 0x74, 0x73, 0x12, 0x1a, 0x2e, 0x73, 0x61, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x76, 0x6f, - 0x6b, 0x65, 0x64, 0x43, 0x65, 0x72, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x0e, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x43, 0x52, 0x4c, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x22, - 0x00, 0x30, 0x01, 0x12, 0x35, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x53, 0x65, 0x72, 0x69, 0x61, 0x6c, - 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x0a, 0x2e, 0x73, 0x61, 0x2e, 0x53, 0x65, - 0x72, 0x69, 0x61, 0x6c, 0x1a, 0x12, 0x2e, 0x73, 0x61, 0x2e, 0x53, 0x65, 0x72, 0x69, 0x61, 0x6c, - 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0x00, 0x12, 0x52, 0x0a, 0x17, 0x47, 0x65, - 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x32, 0x12, 0x21, 0x2e, 0x73, 0x61, 0x2e, 0x47, 0x65, 0x74, 0x56, 0x61, + 0x74, 0x73, 0x22, 0x00, 0x12, 0x4b, 0x0a, 0x12, 0x53, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x73, 0x46, + 0x6f, 0x72, 0x49, 0x6e, 0x63, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x12, 0x1d, 0x2e, 0x73, 0x61, 0x2e, + 0x53, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x73, 0x46, 0x6f, 0x72, 0x49, 0x6e, 0x63, 0x69, 0x64, 0x65, + 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x73, 0x61, 0x2e, 0x49, + 0x6e, 0x63, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x22, 0x00, 0x30, + 0x01, 0x32, 0xf3, 0x18, 0x0a, 0x10, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x41, 0x75, 0x74, + 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x53, 0x0a, 0x18, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x43, + 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x73, 0x42, 0x79, 0x4e, 0x61, 0x6d, + 0x65, 0x73, 0x12, 0x23, 0x2e, 0x73, 0x61, 0x2e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x43, 0x65, 0x72, + 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x73, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x10, 0x2e, 0x73, 0x61, 0x2e, 0x43, 0x6f, 0x75, + 0x6e, 0x74, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x22, 0x00, 0x12, 0x36, 0x0a, 0x0d, 0x43, + 0x6f, 0x75, 0x6e, 0x74, 0x46, 0x51, 0x44, 0x4e, 0x53, 0x65, 0x74, 0x73, 0x12, 0x18, 0x2e, 0x73, + 0x61, 0x2e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x46, 0x51, 0x44, 0x4e, 0x53, 0x65, 0x74, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x09, 0x2e, 0x73, 0x61, 0x2e, 0x43, 0x6f, 0x75, 0x6e, + 0x74, 0x22, 0x00, 0x12, 0x51, 0x0a, 0x1b, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x73, 0x61, 0x2e, 0x41, 0x75, - 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x00, 0x12, 0x5c, - 0x0a, 0x1c, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x41, - 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x32, 0x12, 0x26, - 0x2e, 0x73, 0x61, 0x2e, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x4f, 0x72, 0x64, 0x65, - 0x72, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x73, 0x61, 0x2e, 0x41, 0x75, 0x74, 0x68, - 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x00, 0x12, 0x31, 0x0a, 0x12, - 0x49, 0x6e, 0x63, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x73, 0x46, 0x6f, 0x72, 0x53, 0x65, 0x72, 0x69, - 0x61, 0x6c, 0x12, 0x0a, 0x2e, 0x73, 0x61, 0x2e, 0x53, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x1a, 0x0d, - 0x2e, 0x73, 0x61, 0x2e, 0x49, 0x6e, 0x63, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x73, 0x22, 0x00, 0x12, - 0x31, 0x0a, 0x0a, 0x4b, 0x65, 0x79, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x65, 0x64, 0x12, 0x15, 0x2e, - 0x73, 0x61, 0x2e, 0x4b, 0x65, 0x79, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x65, 0x64, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0a, 0x2e, 0x73, 0x61, 0x2e, 0x45, 0x78, 0x69, 0x73, 0x74, 0x73, - 0x22, 0x00, 0x12, 0x4f, 0x0a, 0x19, 0x50, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x43, 0x65, - 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x45, 0x78, 0x69, 0x73, 0x74, 0x73, 0x12, - 0x24, 0x2e, 0x73, 0x61, 0x2e, 0x50, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x43, 0x65, 0x72, - 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x45, 0x78, 0x69, 0x73, 0x74, 0x73, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0a, 0x2e, 0x73, 0x61, 0x2e, 0x45, 0x78, 0x69, 0x73, 0x74, - 0x73, 0x22, 0x00, 0x12, 0x4b, 0x0a, 0x12, 0x53, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x73, 0x46, 0x6f, - 0x72, 0x49, 0x6e, 0x63, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x12, 0x1d, 0x2e, 0x73, 0x61, 0x2e, 0x53, - 0x65, 0x72, 0x69, 0x61, 0x6c, 0x73, 0x46, 0x6f, 0x72, 0x49, 0x6e, 0x63, 0x69, 0x64, 0x65, 0x6e, - 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x73, 0x61, 0x2e, 0x49, 0x6e, - 0x63, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x22, 0x00, 0x30, 0x01, - 0x12, 0x43, 0x0a, 0x0d, 0x41, 0x64, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x65, 0x64, 0x4b, 0x65, - 0x79, 0x12, 0x18, 0x2e, 0x73, 0x61, 0x2e, 0x41, 0x64, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x65, - 0x64, 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, 0x45, 0x0a, 0x0e, 0x41, 0x64, 0x64, 0x43, 0x65, 0x72, 0x74, - 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x12, 0x19, 0x2e, 0x73, 0x61, 0x2e, 0x41, 0x64, 0x64, - 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, 0x48, 0x0a, 0x11, - 0x41, 0x64, 0x64, 0x50, 0x72, 0x65, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, - 0x65, 0x12, 0x19, 0x2e, 0x73, 0x61, 0x2e, 0x41, 0x64, 0x64, 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, 0x41, 0x0a, 0x19, 0x53, 0x65, 0x74, 0x43, 0x65, 0x72, - 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, - 0x61, 0x64, 0x79, 0x12, 0x0a, 0x2e, 0x73, 0x61, 0x2e, 0x53, 0x65, 0x72, 0x69, 0x61, 0x6c, 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, 0x3b, 0x0a, 0x09, 0x41, 0x64, 0x64, - 0x53, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x12, 0x14, 0x2e, 0x73, 0x61, 0x2e, 0x41, 0x64, 0x64, 0x53, - 0x65, 0x72, 0x69, 0x61, 0x6c, 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, 0x4a, 0x0a, 0x18, 0x44, 0x65, 0x61, 0x63, 0x74, 0x69, - 0x76, 0x61, 0x74, 0x65, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x32, 0x12, 0x14, 0x2e, 0x73, 0x61, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x32, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x73, 0x32, 0x12, 0x25, 0x2e, 0x73, 0x61, 0x2e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x76, + 0x61, 0x6c, 0x69, 0x64, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x09, 0x2e, 0x73, 0x61, 0x2e, 0x43, + 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x00, 0x12, 0x32, 0x0a, 0x0b, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x4f, + 0x72, 0x64, 0x65, 0x72, 0x73, 0x12, 0x16, 0x2e, 0x73, 0x61, 0x2e, 0x43, 0x6f, 0x75, 0x6e, 0x74, + 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x09, 0x2e, + 0x73, 0x61, 0x2e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x00, 0x12, 0x3e, 0x0a, 0x1b, 0x43, 0x6f, + 0x75, 0x6e, 0x74, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, + 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x32, 0x12, 0x12, 0x2e, 0x73, 0x61, 0x2e, 0x52, + 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x1a, 0x09, 0x2e, + 0x73, 0x61, 0x2e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x00, 0x12, 0x48, 0x0a, 0x16, 0x43, 0x6f, + 0x75, 0x6e, 0x74, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x42, 0x79, 0x49, 0x50, 0x12, 0x21, 0x2e, 0x73, 0x61, 0x2e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, + 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x79, 0x49, 0x50, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x09, 0x2e, 0x73, 0x61, 0x2e, 0x43, 0x6f, 0x75, + 0x6e, 0x74, 0x22, 0x00, 0x12, 0x4d, 0x0a, 0x1b, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x67, + 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x79, 0x49, 0x50, 0x52, 0x61, + 0x6e, 0x67, 0x65, 0x12, 0x21, 0x2e, 0x73, 0x61, 0x2e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, + 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x79, 0x49, 0x50, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x09, 0x2e, 0x73, 0x61, 0x2e, 0x43, 0x6f, 0x75, 0x6e, + 0x74, 0x22, 0x00, 0x12, 0x37, 0x0a, 0x0d, 0x46, 0x51, 0x44, 0x4e, 0x53, 0x65, 0x74, 0x45, 0x78, + 0x69, 0x73, 0x74, 0x73, 0x12, 0x18, 0x2e, 0x73, 0x61, 0x2e, 0x46, 0x51, 0x44, 0x4e, 0x53, 0x65, + 0x74, 0x45, 0x78, 0x69, 0x73, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0a, + 0x2e, 0x73, 0x61, 0x2e, 0x45, 0x78, 0x69, 0x73, 0x74, 0x73, 0x22, 0x00, 0x12, 0x48, 0x0a, 0x1a, + 0x46, 0x51, 0x44, 0x4e, 0x53, 0x65, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, + 0x73, 0x46, 0x6f, 0x72, 0x57, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x12, 0x18, 0x2e, 0x73, 0x61, 0x2e, + 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x46, 0x51, 0x44, 0x4e, 0x53, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x73, 0x61, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, + 0x61, 0x6d, 0x70, 0x73, 0x22, 0x00, 0x12, 0x40, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x41, 0x75, 0x74, + 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x32, 0x12, 0x14, 0x2e, 0x73, 0x61, + 0x2e, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, + 0x32, 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, 0x12, 0x47, 0x65, 0x74, 0x41, + 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x32, 0x12, 0x1c, + 0x2e, 0x73, 0x61, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x73, + 0x61, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x22, 0x00, 0x12, 0x31, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, + 0x63, 0x61, 0x74, 0x65, 0x12, 0x0a, 0x2e, 0x73, 0x61, 0x2e, 0x53, 0x65, 0x72, 0x69, 0x61, 0x6c, + 0x1a, 0x11, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, + 0x61, 0x74, 0x65, 0x22, 0x00, 0x12, 0x3d, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x43, 0x65, 0x72, 0x74, + 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x0a, 0x2e, + 0x73, 0x61, 0x2e, 0x53, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x1a, 0x17, 0x2e, 0x63, 0x6f, 0x72, 0x65, + 0x2e, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x22, 0x00, 0x12, 0x48, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x4d, 0x61, 0x78, 0x45, 0x78, + 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 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, 0x46, 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, 0x12, 0x2e, 0x73, - 0x61, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, - 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, 0x54, 0x0a, 0x16, 0x46, 0x69, - 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x32, 0x12, 0x20, 0x2e, 0x73, 0x61, 0x2e, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, - 0x7a, 0x65, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 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, 0x43, 0x0a, 0x0d, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x4f, 0x72, 0x64, 0x65, - 0x72, 0x12, 0x18, 0x2e, 0x73, 0x61, 0x2e, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x4f, - 0x72, 0x64, 0x65, 0x72, 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, 0x40, 0x0a, 0x11, 0x4e, 0x65, 0x77, 0x4f, 0x72, 0x64, 0x65, - 0x72, 0x41, 0x6e, 0x64, 0x41, 0x75, 0x74, 0x68, 0x7a, 0x73, 0x12, 0x1c, 0x2e, 0x73, 0x61, 0x2e, - 0x4e, 0x65, 0x77, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x41, 0x6e, 0x64, 0x41, 0x75, 0x74, 0x68, 0x7a, - 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0b, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, - 0x4f, 0x72, 0x64, 0x65, 0x72, 0x22, 0x00, 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, 0x4b, 0x0a, 0x11, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x43, 0x65, - 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x12, 0x1c, 0x2e, 0x73, 0x61, 0x2e, 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, + 0x1a, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, 0x00, 0x12, 0x2b, + 0x0a, 0x08, 0x47, 0x65, 0x74, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x10, 0x2e, 0x73, 0x61, 0x2e, + 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, 0x3e, 0x0a, 0x10, 0x47, + 0x65, 0x74, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x46, 0x6f, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x12, + 0x1b, 0x2e, 0x73, 0x61, 0x2e, 0x47, 0x65, 0x74, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x46, 0x6f, 0x72, + 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0b, 0x2e, 0x63, + 0x6f, 0x72, 0x65, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x22, 0x00, 0x12, 0x55, 0x0a, 0x18, 0x47, + 0x65, 0x74, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, + 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x32, 0x12, 0x22, 0x2e, 0x73, 0x61, 0x2e, 0x47, 0x65, 0x74, + 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 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, 0x3b, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x2e, 0x73, 0x61, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, + 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x1a, 0x12, 0x2e, 0x63, 0x6f, 0x72, 0x65, + 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x00, 0x12, + 0x3c, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x42, 0x79, 0x4b, 0x65, 0x79, 0x12, 0x0e, 0x2e, 0x73, 0x61, 0x2e, 0x4a, 0x53, 0x4f, + 0x4e, 0x57, 0x65, 0x62, 0x4b, 0x65, 0x79, 0x1a, 0x12, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x52, + 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x00, 0x12, 0x39, 0x0a, + 0x13, 0x47, 0x65, 0x74, 0x52, 0x65, 0x76, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x12, 0x0a, 0x2e, 0x73, 0x61, 0x2e, 0x53, 0x65, 0x72, 0x69, 0x61, 0x6c, + 0x1a, 0x14, 0x2e, 0x73, 0x61, 0x2e, 0x52, 0x65, 0x76, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x00, 0x12, 0x41, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x52, + 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x64, 0x43, 0x65, 0x72, 0x74, 0x73, 0x12, 0x1a, 0x2e, 0x73, 0x61, + 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x64, 0x43, 0x65, 0x72, 0x74, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x43, + 0x52, 0x4c, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x22, 0x00, 0x30, 0x01, 0x12, 0x35, 0x0a, 0x11, 0x47, + 0x65, 0x74, 0x53, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0x12, 0x0a, 0x2e, 0x73, 0x61, 0x2e, 0x53, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x1a, 0x12, 0x2e, 0x73, + 0x61, 0x2e, 0x53, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0x22, 0x00, 0x12, 0x52, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x41, 0x75, + 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x32, 0x12, 0x21, 0x2e, + 0x73, 0x61, 0x2e, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x41, 0x75, 0x74, 0x68, 0x6f, + 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x12, 0x2e, 0x73, 0x61, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x00, 0x12, 0x5c, 0x0a, 0x1c, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, + 0x69, 0x64, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x32, 0x12, 0x26, 0x2e, 0x73, 0x61, 0x2e, 0x47, 0x65, 0x74, 0x56, + 0x61, 0x6c, 0x69, 0x64, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, + 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, + 0x2e, 0x73, 0x61, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x22, 0x00, 0x12, 0x31, 0x0a, 0x12, 0x49, 0x6e, 0x63, 0x69, 0x64, 0x65, 0x6e, 0x74, + 0x73, 0x46, 0x6f, 0x72, 0x53, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x12, 0x0a, 0x2e, 0x73, 0x61, 0x2e, + 0x53, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x1a, 0x0d, 0x2e, 0x73, 0x61, 0x2e, 0x49, 0x6e, 0x63, 0x69, + 0x64, 0x65, 0x6e, 0x74, 0x73, 0x22, 0x00, 0x12, 0x31, 0x0a, 0x0a, 0x4b, 0x65, 0x79, 0x42, 0x6c, + 0x6f, 0x63, 0x6b, 0x65, 0x64, 0x12, 0x15, 0x2e, 0x73, 0x61, 0x2e, 0x4b, 0x65, 0x79, 0x42, 0x6c, + 0x6f, 0x63, 0x6b, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0a, 0x2e, 0x73, + 0x61, 0x2e, 0x45, 0x78, 0x69, 0x73, 0x74, 0x73, 0x22, 0x00, 0x12, 0x4f, 0x0a, 0x19, 0x50, 0x72, + 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, + 0x65, 0x45, 0x78, 0x69, 0x73, 0x74, 0x73, 0x12, 0x24, 0x2e, 0x73, 0x61, 0x2e, 0x50, 0x72, 0x65, + 0x76, 0x69, 0x6f, 0x75, 0x73, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, + 0x45, 0x78, 0x69, 0x73, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0a, 0x2e, + 0x73, 0x61, 0x2e, 0x45, 0x78, 0x69, 0x73, 0x74, 0x73, 0x22, 0x00, 0x12, 0x4b, 0x0a, 0x12, 0x53, + 0x65, 0x72, 0x69, 0x61, 0x6c, 0x73, 0x46, 0x6f, 0x72, 0x49, 0x6e, 0x63, 0x69, 0x64, 0x65, 0x6e, + 0x74, 0x12, 0x1d, 0x2e, 0x73, 0x61, 0x2e, 0x53, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x73, 0x46, 0x6f, + 0x72, 0x49, 0x6e, 0x63, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x12, 0x2e, 0x73, 0x61, 0x2e, 0x49, 0x6e, 0x63, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x53, 0x65, + 0x72, 0x69, 0x61, 0x6c, 0x22, 0x00, 0x30, 0x01, 0x12, 0x43, 0x0a, 0x0d, 0x41, 0x64, 0x64, 0x42, + 0x6c, 0x6f, 0x63, 0x6b, 0x65, 0x64, 0x4b, 0x65, 0x79, 0x12, 0x18, 0x2e, 0x73, 0x61, 0x2e, 0x41, + 0x64, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x65, 0x64, 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, 0x45, 0x0a, + 0x0e, 0x41, 0x64, 0x64, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x12, + 0x19, 0x2e, 0x73, 0x61, 0x2e, 0x41, 0x64, 0x64, 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, 0x48, 0x0a, 0x11, 0x41, 0x64, 0x64, 0x50, 0x72, 0x65, 0x63, 0x65, + 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x12, 0x19, 0x2e, 0x73, 0x61, 0x2e, 0x41, + 0x64, 0x64, 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, 0x41, + 0x0a, 0x19, 0x53, 0x65, 0x74, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, + 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x61, 0x64, 0x79, 0x12, 0x0a, 0x2e, 0x73, 0x61, + 0x2e, 0x53, 0x65, 0x72, 0x69, 0x61, 0x6c, 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, 0x43, 0x0a, 0x0d, 0x53, 0x65, 0x74, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x45, 0x72, 0x72, - 0x6f, 0x72, 0x12, 0x18, 0x2e, 0x73, 0x61, 0x2e, 0x53, 0x65, 0x74, 0x4f, 0x72, 0x64, 0x65, 0x72, - 0x45, 0x72, 0x72, 0x6f, 0x72, 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, 0x40, 0x0a, 0x12, 0x53, 0x65, 0x74, 0x4f, 0x72, 0x64, - 0x65, 0x72, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x12, 0x10, 0x2e, 0x73, - 0x61, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, + 0x00, 0x12, 0x3b, 0x0a, 0x09, 0x41, 0x64, 0x64, 0x53, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x12, 0x14, + 0x2e, 0x73, 0x61, 0x2e, 0x41, 0x64, 0x64, 0x53, 0x65, 0x72, 0x69, 0x61, 0x6c, 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, 0x4a, + 0x0a, 0x18, 0x44, 0x65, 0x61, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x41, 0x75, 0x74, 0x68, + 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x32, 0x12, 0x14, 0x2e, 0x73, 0x61, 0x2e, + 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x32, + 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, 0x46, 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, 0x12, 0x2e, 0x73, 0x61, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 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, 0x54, 0x0a, 0x16, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x41, 0x75, + 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x32, 0x12, 0x20, 0x2e, 0x73, + 0x61, 0x2e, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, + 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 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, 0x42, 0x0a, 0x12, 0x55, 0x70, 0x64, 0x61, - 0x74, 0x65, 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, 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, 0x52, 0x0a, 0x18, - 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x64, 0x43, 0x65, 0x72, - 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x12, 0x1c, 0x2e, 0x73, 0x61, 0x2e, 0x52, 0x65, - 0x76, 0x6f, 0x6b, 0x65, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x52, + 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x43, 0x0a, 0x0d, 0x46, 0x69, 0x6e, 0x61, + 0x6c, 0x69, 0x7a, 0x65, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x18, 0x2e, 0x73, 0x61, 0x2e, 0x46, + 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x4f, 0x72, 0x64, 0x65, 0x72, 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, 0x40, 0x0a, + 0x11, 0x4e, 0x65, 0x77, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x41, 0x6e, 0x64, 0x41, 0x75, 0x74, 0x68, + 0x7a, 0x73, 0x12, 0x1c, 0x2e, 0x73, 0x61, 0x2e, 0x4e, 0x65, 0x77, 0x4f, 0x72, 0x64, 0x65, 0x72, + 0x41, 0x6e, 0x64, 0x41, 0x75, 0x74, 0x68, 0x7a, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x0b, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x22, 0x00, 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, 0x4b, 0x0a, 0x11, + 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, + 0x65, 0x12, 0x1c, 0x2e, 0x73, 0x61, 0x2e, 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, 0x43, 0x0a, 0x0d, 0x53, 0x65, 0x74, + 0x4f, 0x72, 0x64, 0x65, 0x72, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x18, 0x2e, 0x73, 0x61, 0x2e, + 0x53, 0x65, 0x74, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x45, 0x72, 0x72, 0x6f, 0x72, 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, 0x40, + 0x0a, 0x12, 0x53, 0x65, 0x74, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, + 0x73, 0x69, 0x6e, 0x67, 0x12, 0x10, 0x2e, 0x73, 0x61, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 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, 0x46, 0x0a, 0x0d, 0x4c, 0x65, 0x61, 0x73, 0x65, 0x43, 0x52, 0x4c, 0x53, 0x68, 0x61, 0x72, - 0x64, 0x12, 0x18, 0x2e, 0x73, 0x61, 0x2e, 0x4c, 0x65, 0x61, 0x73, 0x65, 0x43, 0x52, 0x4c, 0x53, - 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x73, 0x61, - 0x2e, 0x4c, 0x65, 0x61, 0x73, 0x65, 0x43, 0x52, 0x4c, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x45, 0x0a, 0x0e, 0x55, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x43, 0x52, 0x4c, 0x53, 0x68, 0x61, 0x72, 0x64, 0x12, 0x19, 0x2e, 0x73, 0x61, 0x2e, - 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x52, 0x4c, 0x53, 0x68, 0x61, 0x72, 0x64, 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, 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, 0x73, 0x61, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, + 0x12, 0x42, 0x0a, 0x12, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 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, 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, 0x52, 0x0a, 0x18, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, + 0x76, 0x6f, 0x6b, 0x65, 0x64, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, + 0x12, 0x1c, 0x2e, 0x73, 0x61, 0x2e, 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, 0x46, 0x0a, 0x0d, 0x4c, 0x65, 0x61, 0x73, + 0x65, 0x43, 0x52, 0x4c, 0x53, 0x68, 0x61, 0x72, 0x64, 0x12, 0x18, 0x2e, 0x73, 0x61, 0x2e, 0x4c, + 0x65, 0x61, 0x73, 0x65, 0x43, 0x52, 0x4c, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x73, 0x61, 0x2e, 0x4c, 0x65, 0x61, 0x73, 0x65, 0x43, 0x52, + 0x4c, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, + 0x12, 0x45, 0x0a, 0x0e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x52, 0x4c, 0x53, 0x68, 0x61, + 0x72, 0x64, 0x12, 0x19, 0x2e, 0x73, 0x61, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x52, + 0x4c, 0x53, 0x68, 0x61, 0x72, 0x64, 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, 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, 0x73, 0x61, 0x2f, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/sa/proto/sa.proto b/sa/proto/sa.proto index 043fd287ab1..acc21ab7a8a 100644 --- a/sa/proto/sa.proto +++ b/sa/proto/sa.proto @@ -108,13 +108,13 @@ message GetPendingAuthorizationRequest { string identifierType = 2; string identifierValue = 3; // Result must be valid until at least this Unix timestamp (nanos) - int64 validUntil = 4; + int64 validUntilNS = 4; } message GetValidAuthorizationsRequest { int64 registrationID = 1; repeated string domains = 2; - int64 now = 3; // Unix timestamp (nanoseconds) + int64 nowNS = 3; // Unix timestamp (nanoseconds) } message ValidAuthorizations { @@ -132,13 +132,13 @@ message Serial { message SerialMetadata { string serial = 1; int64 registrationID = 2; - int64 created = 3; // Unix timestamp (nanoseconds) - int64 expires = 4; // Unix timestamp (nanoseconds) + int64 createdNS = 3; // Unix timestamp (nanoseconds) + int64 expiresNS = 4; // Unix timestamp (nanoseconds) } message Range { - int64 earliest = 1; // Unix timestamp (nanoseconds) - int64 latest = 2; // Unix timestamp (nanoseconds) + int64 earliestNS = 1; // Unix timestamp (nanoseconds) + int64 latestNS = 2; // Unix timestamp (nanoseconds) } message Count { @@ -146,7 +146,7 @@ message Count { } message Timestamps { - repeated int64 timestamps = 1; // Unix timestamp (nanoseconds) + repeated int64 timestampsNS = 1; // Unix timestamp (nanoseconds) } message CountCertificatesByNamesRequest { @@ -197,8 +197,8 @@ message Exists { message AddSerialRequest { int64 regID = 1; string serial = 2; - int64 created = 3; // Unix timestamp (nanoseconds) - int64 expires = 4; // Unix timestamp (nanoseconds) + int64 createdNS = 3; // Unix timestamp (nanoseconds) + int64 expiresNS = 4; // Unix timestamp (nanoseconds) } message AddCertificateRequest { @@ -207,7 +207,7 @@ message AddCertificateRequest { reserved 3; // previously ocsp // An issued time. When not present the SA defaults to using // the current time. - int64 issued = 4; + int64 issuedNS = 4; // Unix timestamp (nanoseconds) int64 issuerNameID = 5; // https://pkg.go.dev/github.com/letsencrypt/boulder/issuance#IssuerNameID // If this is set to true, the certificateStatus.status column will be set to @@ -232,7 +232,7 @@ message OrderRequest { message NewOrderRequest { int64 registrationID = 1; - int64 expires = 2; + int64 expiresNS = 2; // Unix timestamp (nanoseconds) repeated string names = 3; repeated int64 v2Authorizations = 4; } @@ -265,7 +265,7 @@ message FinalizeOrderRequest { message GetAuthorizationsRequest { int64 registrationID = 1; repeated string domains = 2; - int64 now = 3; // Unix timestamp (nanoseconds) + int64 nowNS = 3; // Unix timestamp (nanoseconds) } message Authorizations { @@ -287,8 +287,8 @@ message AuthorizationID2 { message RevokeCertificateRequest { string serial = 1; int64 reason = 2; - int64 date = 3; // Unix timestamp (nanoseconds) - int64 backdate = 5; // Unix timestamp (nanoseconds) + int64 dateNS = 3; // Unix timestamp (nanoseconds) + int64 backdateNS = 5; // Unix timestamp (nanoseconds) bytes response = 4; int64 issuerID = 6; } @@ -296,16 +296,16 @@ message RevokeCertificateRequest { message FinalizeAuthorizationRequest { int64 id = 1; string status = 2; - int64 expires = 3; // Unix timestamp (nanoseconds) + int64 expiresNS = 3; // Unix timestamp (nanoseconds) string attempted = 4; repeated core.ValidationRecord validationRecords = 5; core.ProblemDetails validationError = 6; - int64 attemptedAt = 7; // Unix timestamp (nanoseconds) + int64 attemptedAtNS = 7; // Unix timestamp (nanoseconds) } message AddBlockedKeyRequest { bytes keyHash = 1; - int64 added = 2; // Unix timestamp (nanoseconds) + int64 addedNS = 2; // Unix timestamp (nanoseconds) string source = 3; string comment = 4; int64 revokedBy = 5; @@ -319,7 +319,7 @@ message Incident { int64 id = 1; string serialTable = 2; string url = 3; - int64 renewBy = 4; // Unix timestamp (nanoseconds) + int64 renewByNS = 4; // Unix timestamp (nanoseconds) bool enabled = 5; } @@ -335,14 +335,14 @@ message IncidentSerial { string serial = 1; int64 registrationID = 2; // May be 0 (NULL) int64 orderID = 3; // May be 0 (NULL) - int64 lastNoticeSent = 4; // Unix timestamp (nanoseconds), may be 0 (NULL) + int64 lastNoticeSentNS = 4; // Unix timestamp (nanoseconds), may be 0 (NULL) } message GetRevokedCertsRequest { int64 issuerNameID = 1; - int64 expiresAfter = 2; // Unix timestamp (nanoseconds), inclusive - int64 expiresBefore = 3; // Unix timestamp (nanoseconds), exclusive - int64 revokedBefore = 4; // Unix timestamp (nanoseconds) + int64 expiresAfterNS = 2; // Unix timestamp (nanoseconds), inclusive + int64 expiresBeforeNS = 3; // Unix timestamp (nanoseconds), exclusive + int64 revokedBeforeNS = 4; // Unix timestamp (nanoseconds) } message RevocationStatus { diff --git a/sa/rate_limits.go b/sa/rate_limits.go index 36cdd0d8e29..be5c569d8c5 100644 --- a/sa/rate_limits.go +++ b/sa/rate_limits.go @@ -58,7 +58,7 @@ func (ssa *SQLStorageAuthority) addCertificatesPerName(ctx context.Context, db d // countCertificates returns the count of certificates issued for a domain's // eTLD+1 (aka base domain), during a given time range. func (ssa *SQLStorageAuthorityRO) countCertificates(ctx context.Context, dbMap db.Selector, domain string, timeRange *sapb.Range) (int64, time.Time, error) { - latest := time.Unix(0, timeRange.Latest) + latest := time.Unix(0, timeRange.LatestNS) var results []struct { Count int64 Time time.Time @@ -72,7 +72,7 @@ func (ssa *SQLStorageAuthorityRO) countCertificates(ctx context.Context, dbMap d time <= :latest`, map[string]interface{}{ "baseDomain": baseDomain(domain), - "earliest": time.Unix(0, timeRange.Earliest), + "earliest": time.Unix(0, timeRange.EarliestNS), "latest": latest, }) if err != nil { @@ -128,8 +128,8 @@ func countNewOrders(ctx context.Context, dbMap db.Selector, req *sapb.CountOrder time <= :latest`, map[string]interface{}{ "regID": req.AccountID, - "earliest": time.Unix(0, req.Range.Earliest), - "latest": time.Unix(0, req.Range.Latest), + "earliest": time.Unix(0, req.Range.EarliestNS), + "latest": time.Unix(0, req.Range.LatestNS), }, ) if err != nil { diff --git a/sa/rate_limits_test.go b/sa/rate_limits_test.go index e310d6fb78c..0ec081b79d8 100644 --- a/sa/rate_limits_test.go +++ b/sa/rate_limits_test.go @@ -78,8 +78,8 @@ func TestCertsPerNameRateLimitTable(t *testing.T) { for _, tc := range testCases { t.Run(tc.caseName, func(t *testing.T) { timeRange := &sapb.Range{ - Earliest: aprilFirst.Add(-1 * time.Second).UnixNano(), - Latest: aprilFirst.Add(aWeek).UnixNano(), + EarliestNS: aprilFirst.Add(-1 * time.Second).UnixNano(), + LatestNS: aprilFirst.Add(aWeek).UnixNano(), } count, earliest, err := sa.countCertificatesByName(ctx, sa.dbMap, tc.domainName, timeRange) if err != nil { @@ -107,8 +107,8 @@ func TestNewOrdersRateLimitTable(t *testing.T) { req := &sapb.CountOrdersRequest{ AccountID: 1, Range: &sapb.Range{ - Earliest: start.UnixNano(), - Latest: start.Add(time.Minute * 10).UnixNano(), + EarliestNS: start.UnixNano(), + LatestNS: start.Add(time.Minute * 10).UnixNano(), }, } @@ -131,8 +131,8 @@ func TestNewOrdersRateLimitTable(t *testing.T) { test.AssertNotError(t, err, "countNewOrders failed") test.AssertEquals(t, count.Count, int64(65)) - req.Range.Earliest = start.Add(time.Minute * 5).UnixNano() - req.Range.Latest = start.Add(time.Minute * 10).UnixNano() + req.Range.EarliestNS = start.Add(time.Minute * 5).UnixNano() + req.Range.LatestNS = start.Add(time.Minute * 10).UnixNano() count, err = countNewOrders(ctx, sa.dbMap, req) test.AssertNotError(t, err, "countNewOrders failed") test.AssertEquals(t, count.Count, int64(45)) diff --git a/sa/sa.go b/sa/sa.go index ec36d53b024..8628038fbd2 100644 --- a/sa/sa.go +++ b/sa/sa.go @@ -157,14 +157,14 @@ func (ssa *SQLStorageAuthority) UpdateRegistration(ctx context.Context, req *cor // AddSerial writes a record of a serial number generation to the DB. func (ssa *SQLStorageAuthority) AddSerial(ctx context.Context, req *sapb.AddSerialRequest) (*emptypb.Empty, error) { - if req.Serial == "" || req.RegID == 0 || req.Created == 0 || req.Expires == 0 { + if req.Serial == "" || req.RegID == 0 || req.CreatedNS == 0 || req.ExpiresNS == 0 { return nil, errIncompleteRequest } err := ssa.dbMap.Insert(ctx, &recordedSerialModel{ Serial: req.Serial, RegistrationID: req.RegID, - Created: time.Unix(0, req.Created), - Expires: time.Unix(0, req.Expires), + Created: time.Unix(0, req.CreatedNS), + Expires: time.Unix(0, req.ExpiresNS), }) if err != nil { return nil, err @@ -203,7 +203,7 @@ func (ssa *SQLStorageAuthority) SetCertificateStatusReady(ctx context.Context, r // certificate multiple times. Calling code needs to first insert the cert's // serial into the Serials table to ensure uniqueness. func (ssa *SQLStorageAuthority) AddPrecertificate(ctx context.Context, req *sapb.AddCertificateRequest) (*emptypb.Empty, error) { - if len(req.Der) == 0 || req.RegID == 0 || req.Issued == 0 || req.IssuerNameID == 0 { + if len(req.Der) == 0 || req.RegID == 0 || req.IssuedNS == 0 || req.IssuerNameID == 0 { return nil, errIncompleteRequest } parsed, err := x509.ParseCertificate(req.Der) @@ -216,7 +216,7 @@ func (ssa *SQLStorageAuthority) AddPrecertificate(ctx context.Context, req *sapb Serial: serialHex, RegistrationID: req.RegID, DER: req.Der, - Issued: time.Unix(0, req.Issued), + Issued: time.Unix(0, req.IssuedNS), Expires: parsed.NotAfter, } @@ -294,7 +294,7 @@ func (ssa *SQLStorageAuthority) AddPrecertificate(ctx context.Context, req *sapb // AddCertificate stores an issued certificate, returning an error if it is a // duplicate or if any other failure occurs. func (ssa *SQLStorageAuthority) AddCertificate(ctx context.Context, req *sapb.AddCertificateRequest) (*emptypb.Empty, error) { - if len(req.Der) == 0 || req.RegID == 0 || req.Issued == 0 { + if len(req.Der) == 0 || req.RegID == 0 || req.IssuedNS == 0 { return nil, errIncompleteRequest } parsedCertificate, err := x509.ParseCertificate(req.Der) @@ -309,7 +309,7 @@ func (ssa *SQLStorageAuthority) AddCertificate(ctx context.Context, req *sapb.Ad Serial: serial, Digest: digest, DER: req.Der, - Issued: time.Unix(0, req.Issued), + Issued: time.Unix(0, req.IssuedNS), Expires: parsedCertificate.NotAfter, } @@ -495,7 +495,7 @@ func (ssa *SQLStorageAuthority) NewOrderAndAuthzs(ctx context.Context, req *sapb // Second, insert the new order. order := &orderModel{ RegistrationID: req.NewOrder.RegistrationID, - Expires: time.Unix(0, req.NewOrder.Expires), + Expires: time.Unix(0, req.NewOrder.ExpiresNS), Created: ssa.clk.Now(), } err := tx.Insert(ctx, order) @@ -550,11 +550,11 @@ func (ssa *SQLStorageAuthority) NewOrderAndAuthzs(ctx context.Context, req *sapb // Finally, build the overall Order PB. res := &corepb.Order{ // ID and Created were auto-populated on the order model when it was inserted. - Id: order.ID, - Created: order.Created.UnixNano(), + Id: order.ID, + CreatedNS: order.Created.UnixNano(), // These are carried over from the original request unchanged. RegistrationID: req.NewOrder.RegistrationID, - Expires: req.NewOrder.Expires, + ExpiresNS: req.NewOrder.ExpiresNS, Names: req.NewOrder.Names, // Have to combine the already-associated and newly-reacted authzs. V2Authorizations: append(req.NewOrder.V2Authorizations, newAuthzIDs...), @@ -704,7 +704,7 @@ func (ssa *SQLStorageAuthority) FinalizeOrder(ctx context.Context, req *sapb.Fin // the authorization is being moved to invalid the validationError field must be set. If the // authorization is being moved to valid the validationRecord and expires fields must be set. func (ssa *SQLStorageAuthority) FinalizeAuthorization2(ctx context.Context, req *sapb.FinalizeAuthorizationRequest) (*emptypb.Empty, error) { - if req.Status == "" || req.Attempted == "" || req.Expires == 0 || req.Id == 0 { + if req.Status == "" || req.Attempted == "" || req.ExpiresNS == 0 || req.Id == 0 { return nil, errIncompleteRequest } @@ -754,8 +754,8 @@ func (ssa *SQLStorageAuthority) FinalizeAuthorization2(ctx context.Context, req // the the database attemptedAt field Null instead of // 1970-01-01 00:00:00. var attemptedTime *time.Time - if req.AttemptedAt != 0 { - val := time.Unix(0, req.AttemptedAt).UTC() + if req.AttemptedAtNS != 0 { + val := time.Unix(0, req.AttemptedAtNS).UTC() attemptedTime = &val } params := map[string]interface{}{ @@ -765,7 +765,7 @@ func (ssa *SQLStorageAuthority) FinalizeAuthorization2(ctx context.Context, req "validationRecord": vrJSON, "id": req.Id, "pending": statusUint(core.StatusPending), - "expires": time.Unix(0, req.Expires).UTC(), + "expires": time.Unix(0, req.ExpiresNS).UTC(), // if req.ValidationError is nil veJSON should also be nil // which should result in a NULL field "validationError": veJSON, @@ -790,11 +790,11 @@ func (ssa *SQLStorageAuthority) FinalizeAuthorization2(ctx context.Context, req // RevokeCertificate stores revocation information about a certificate. It will only store this // information if the certificate is not already marked as revoked. func (ssa *SQLStorageAuthority) RevokeCertificate(ctx context.Context, req *sapb.RevokeCertificateRequest) (*emptypb.Empty, error) { - if req.Serial == "" || req.Date == 0 { + if req.Serial == "" || req.DateNS == 0 { return nil, errIncompleteRequest } - revokedDate := time.Unix(0, req.Date) + revokedDate := time.Unix(0, req.DateNS) res, err := ssa.dbMap.ExecContext(ctx, `UPDATE certificateStatus SET @@ -829,15 +829,15 @@ func (ssa *SQLStorageAuthority) RevokeCertificate(ctx context.Context, req *sapb // cert is already revoked, if the new revocation reason is `KeyCompromise`, // and if the revokedDate is identical to the current revokedDate. func (ssa *SQLStorageAuthority) UpdateRevokedCertificate(ctx context.Context, req *sapb.RevokeCertificateRequest) (*emptypb.Empty, error) { - if req.Serial == "" || req.Date == 0 || req.Backdate == 0 { + if req.Serial == "" || req.DateNS == 0 || req.BackdateNS == 0 { return nil, errIncompleteRequest } if req.Reason != ocsp.KeyCompromise { return nil, fmt.Errorf("cannot update revocation for any reason other than keyCompromise (1); got: %d", req.Reason) } - thisUpdate := time.Unix(0, req.Date) - revokedDate := time.Unix(0, req.Backdate) + thisUpdate := time.Unix(0, req.DateNS) + revokedDate := time.Unix(0, req.BackdateNS) res, err := ssa.dbMap.ExecContext(ctx, `UPDATE certificateStatus SET @@ -869,7 +869,7 @@ func (ssa *SQLStorageAuthority) UpdateRevokedCertificate(ctx context.Context, re // AddBlockedKey adds a key hash to the blockedKeys table func (ssa *SQLStorageAuthority) AddBlockedKey(ctx context.Context, req *sapb.AddBlockedKeyRequest) (*emptypb.Empty, error) { - if core.IsAnyNilOrZero(req.KeyHash, req.Added, req.Source) { + if core.IsAnyNilOrZero(req.KeyHash, req.AddedNS, req.Source) { return nil, errIncompleteRequest } sourceInt, ok := stringToSourceInt[req.Source] @@ -879,7 +879,7 @@ func (ssa *SQLStorageAuthority) AddBlockedKey(ctx context.Context, req *sapb.Add cols, qs := blockedKeysColumns, "?, ?, ?, ?" vals := []interface{}{ req.KeyHash, - time.Unix(0, req.Added), + time.Unix(0, req.AddedNS), sourceInt, req.Comment, } diff --git a/sa/sa_test.go b/sa/sa_test.go index 9f5c8e6784d..a41cb8a063b 100644 --- a/sa/sa_test.go +++ b/sa/sa_test.go @@ -98,11 +98,11 @@ func initSA(t *testing.T) (*SQLStorageAuthority, clock.FakeClock, func()) { func createWorkingRegistration(t *testing.T, sa *SQLStorageAuthority) *corepb.Registration { initialIP, _ := net.ParseIP("88.77.66.11").MarshalText() reg, err := sa.NewRegistration(context.Background(), &corepb.Registration{ - Key: []byte(theKey), - Contact: []string{"mailto:foo@example.com"}, - InitialIP: initialIP, - CreatedAt: time.Date(2003, 5, 10, 0, 0, 0, 0, time.UTC).UnixNano(), - Status: string(core.StatusValid), + Key: []byte(theKey), + Contact: []string{"mailto:foo@example.com"}, + InitialIP: initialIP, + CreatedAtNS: time.Date(2003, 5, 10, 0, 0, 0, 0, time.UTC).UnixNano(), + Status: string(core.StatusValid), }) if err != nil { t.Fatalf("Unable to create new registration: %s", err) @@ -141,11 +141,11 @@ func createFinalizedAuthorization(t *testing.T, sa *SQLStorageAuthority, domain attempted := string(core.ChallengeTypeHTTP01) attemptedAtInt := attemptedAt.UnixNano() _, err := sa.FinalizeAuthorization2(context.Background(), &sapb.FinalizeAuthorizationRequest{ - Id: pendingID, - Status: status, - Expires: expInt, - Attempted: attempted, - AttemptedAt: attemptedAtInt, + Id: pendingID, + Status: status, + ExpiresNS: expInt, + Attempted: attempted, + AttemptedAtNS: attemptedAtInt, }) test.AssertNotError(t, err, "sa.FinalizeAuthorizations2 failed") return pendingID @@ -189,7 +189,7 @@ func TestAddRegistration(t *testing.T) { createdAt := clk.Now() test.AssertEquals(t, dbReg.Id, reg.Id) test.AssertByteEquals(t, dbReg.Key, jwkJSON) - test.AssertDeepEquals(t, dbReg.CreatedAt, createdAt.UnixNano()) + test.AssertDeepEquals(t, dbReg.CreatedAtNS, createdAt.UnixNano()) initialIP, _ = net.ParseIP("72.72.72.72").MarshalText() newReg := &corepb.Registration{ @@ -325,38 +325,38 @@ func TestAddSerial(t *testing.T) { serial, testCert := test.ThrowAwayCert(t, 1) _, err := sa.AddSerial(context.Background(), &sapb.AddSerialRequest{ - RegID: reg.Id, - Created: testCert.NotBefore.UnixNano(), - Expires: testCert.NotAfter.UnixNano(), + RegID: reg.Id, + CreatedNS: testCert.NotBefore.UnixNano(), + ExpiresNS: testCert.NotAfter.UnixNano(), }) test.AssertError(t, err, "adding without serial should fail") _, err = sa.AddSerial(context.Background(), &sapb.AddSerialRequest{ - Serial: serial, - Created: testCert.NotBefore.UnixNano(), - Expires: testCert.NotAfter.UnixNano(), + Serial: serial, + CreatedNS: testCert.NotBefore.UnixNano(), + ExpiresNS: testCert.NotAfter.UnixNano(), }) test.AssertError(t, err, "adding without regid should fail") _, err = sa.AddSerial(context.Background(), &sapb.AddSerialRequest{ - Serial: serial, - RegID: reg.Id, - Expires: testCert.NotAfter.UnixNano(), + Serial: serial, + RegID: reg.Id, + ExpiresNS: testCert.NotAfter.UnixNano(), }) test.AssertError(t, err, "adding without created should fail") _, err = sa.AddSerial(context.Background(), &sapb.AddSerialRequest{ - Serial: serial, - RegID: reg.Id, - Created: testCert.NotBefore.UnixNano(), + Serial: serial, + RegID: reg.Id, + CreatedNS: testCert.NotBefore.UnixNano(), }) test.AssertError(t, err, "adding without expires should fail") _, err = sa.AddSerial(context.Background(), &sapb.AddSerialRequest{ - Serial: serial, - RegID: reg.Id, - Created: testCert.NotBefore.UnixNano(), - Expires: testCert.NotAfter.UnixNano(), + Serial: serial, + RegID: reg.Id, + CreatedNS: testCert.NotBefore.UnixNano(), + ExpiresNS: testCert.NotAfter.UnixNano(), }) test.AssertNotError(t, err, "adding serial should have succeeded") } @@ -372,10 +372,10 @@ func TestGetSerialMetadata(t *testing.T) { test.AssertError(t, err, "getting nonexistent serial should have failed") _, err = sa.AddSerial(context.Background(), &sapb.AddSerialRequest{ - Serial: serial, - RegID: reg.Id, - Created: clk.Now().UnixNano(), - Expires: clk.Now().Add(time.Hour).UnixNano(), + Serial: serial, + RegID: reg.Id, + CreatedNS: clk.Now().UnixNano(), + ExpiresNS: clk.Now().Add(time.Hour).UnixNano(), }) test.AssertNotError(t, err, "failed to add test serial") @@ -384,8 +384,8 @@ func TestGetSerialMetadata(t *testing.T) { test.AssertNotError(t, err, "getting serial should have succeeded") test.AssertEquals(t, m.Serial, serial) test.AssertEquals(t, m.RegistrationID, reg.Id) - test.AssertEquals(t, time.Unix(0, m.Created).UTC(), clk.Now()) - test.AssertEquals(t, time.Unix(0, m.Expires).UTC(), clk.Now().Add(time.Hour)) + test.AssertEquals(t, time.Unix(0, m.CreatedNS).UTC(), clk.Now()) + test.AssertEquals(t, time.Unix(0, m.ExpiresNS).UTC(), clk.Now().Add(time.Hour)) } func TestAddPrecertificate(t *testing.T) { @@ -405,7 +405,7 @@ func TestAddPrecertificate(t *testing.T) { _, err := sa.AddPrecertificate(ctx, &sapb.AddCertificateRequest{ Der: testCert.Raw, RegID: regID, - Issued: issuedTime.UnixNano(), + IssuedNS: issuedTime.UnixNano(), IssuerNameID: 1, }) test.AssertNotError(t, err, "Couldn't add test cert") @@ -425,9 +425,9 @@ func TestAddPrecertificate(t *testing.T) { // without it being an error. The duplicate err on inserting to // issuedNames should be ignored. _, err = sa.AddCertificate(ctx, &sapb.AddCertificateRequest{ - Der: testCert.Raw, - RegID: regID, - Issued: issuedTime.UnixNano(), + Der: testCert.Raw, + RegID: regID, + IssuedNS: issuedTime.UnixNano(), }) test.AssertNotError(t, err, "unexpected err adding final cert after precert") } @@ -444,7 +444,7 @@ func TestAddPrecertificateNoOCSP(t *testing.T) { _, err := sa.AddPrecertificate(ctx, &sapb.AddCertificateRequest{ Der: testCert.Raw, RegID: regID, - Issued: issuedTime.UnixNano(), + IssuedNS: issuedTime.UnixNano(), IssuerNameID: 1, }) test.AssertNotError(t, err, "Couldn't add test cert") @@ -460,7 +460,7 @@ func TestAddPreCertificateDuplicate(t *testing.T) { _, err := sa.AddPrecertificate(ctx, &sapb.AddCertificateRequest{ Der: testCert.Raw, - Issued: clk.Now().UnixNano(), + IssuedNS: clk.Now().UnixNano(), RegID: reg.Id, IssuerNameID: 1, }) @@ -468,7 +468,7 @@ func TestAddPreCertificateDuplicate(t *testing.T) { _, err = sa.AddPrecertificate(ctx, &sapb.AddCertificateRequest{ Der: testCert.Raw, - Issued: clk.Now().UnixNano(), + IssuedNS: clk.Now().UnixNano(), RegID: reg.Id, IssuerNameID: 1, }) @@ -488,9 +488,9 @@ func TestAddPrecertificateIncomplete(t *testing.T) { // Add the cert as a precertificate regID := reg.Id _, err := sa.AddPrecertificate(ctx, &sapb.AddCertificateRequest{ - Der: testCert.Raw, - RegID: regID, - Issued: time.Date(2018, 4, 1, 7, 0, 0, 0, time.UTC).UnixNano(), + Der: testCert.Raw, + RegID: regID, + IssuedNS: time.Date(2018, 4, 1, 7, 0, 0, 0, time.UTC).UnixNano(), // Leaving out IssuerNameID }) @@ -506,7 +506,7 @@ func TestAddPrecertificateKeyHash(t *testing.T) { _, err := sa.AddPrecertificate(ctx, &sapb.AddCertificateRequest{ Der: testCert.Raw, RegID: reg.Id, - Issued: testCert.NotBefore.UnixNano(), + IssuedNS: testCert.NotBefore.UnixNano(), IssuerNameID: 1, }) test.AssertNotError(t, err, "failed to add precert") @@ -533,9 +533,9 @@ func TestAddCertificate(t *testing.T) { // Calling AddCertificate with a non-nil issued should succeed _, err = sa.AddCertificate(ctx, &sapb.AddCertificateRequest{ - Der: certDER, - RegID: reg.Id, - Issued: sa.clk.Now().UnixNano(), + Der: certDER, + RegID: reg.Id, + IssuedNS: sa.clk.Now().UnixNano(), }) test.AssertNotError(t, err, "Couldn't add www.eff.org.der") @@ -544,7 +544,7 @@ func TestAddCertificate(t *testing.T) { test.AssertByteEquals(t, certDER, retrievedCert.Der) // Because nil was provided as the Issued time we expect the cert was stored // with an issued time equal to now - test.AssertEquals(t, retrievedCert.Issued, clk.Now().UnixNano()) + test.AssertEquals(t, retrievedCert.IssuedNS, clk.Now().UnixNano()) // Test cert generated locally by Boulder, with names [example.com, // www.example.com, admin.example.com] @@ -555,9 +555,9 @@ func TestAddCertificate(t *testing.T) { // Add the certificate with a specific issued time instead of nil issuedTime := time.Date(2018, 4, 1, 7, 0, 0, 0, time.UTC) _, err = sa.AddCertificate(ctx, &sapb.AddCertificateRequest{ - Der: certDER2, - RegID: reg.Id, - Issued: issuedTime.UnixNano(), + Der: certDER2, + RegID: reg.Id, + IssuedNS: issuedTime.UnixNano(), }) test.AssertNotError(t, err, "Couldn't add test-cert.der") @@ -566,7 +566,7 @@ func TestAddCertificate(t *testing.T) { test.AssertByteEquals(t, certDER2, retrievedCert2.Der) // The cert should have been added with the specific issued time we provided // as the issued field. - test.AssertEquals(t, retrievedCert2.Issued, issuedTime.UnixNano()) + test.AssertEquals(t, retrievedCert2.IssuedNS, issuedTime.UnixNano()) } func TestAddCertificateDuplicate(t *testing.T) { @@ -579,16 +579,16 @@ func TestAddCertificateDuplicate(t *testing.T) { issuedTime := clk.Now() _, err := sa.AddCertificate(ctx, &sapb.AddCertificateRequest{ - Der: testCert.Raw, - RegID: reg.Id, - Issued: issuedTime.UnixNano(), + Der: testCert.Raw, + RegID: reg.Id, + IssuedNS: issuedTime.UnixNano(), }) test.AssertNotError(t, err, "Couldn't add test certificate") _, err = sa.AddCertificate(ctx, &sapb.AddCertificateRequest{ - Der: testCert.Raw, - RegID: reg.Id, - Issued: issuedTime.UnixNano(), + Der: testCert.Raw, + RegID: reg.Id, + IssuedNS: issuedTime.UnixNano(), }) test.AssertDeepEquals(t, err, berrors.DuplicateError("cannot add a duplicate cert")) @@ -618,8 +618,8 @@ func TestCountCertificatesByNames(t *testing.T) { req := &sapb.CountCertificatesByNamesRequest{ Names: []string{"example.com"}, Range: &sapb.Range{ - Earliest: yesterday, - Latest: now.UnixNano(), + EarliestNS: yesterday, + LatestNS: now.UnixNano(), }, } counts, err := sa.CountCertificatesByNames(ctx, req) @@ -631,9 +631,9 @@ func TestCountCertificatesByNames(t *testing.T) { reg := createWorkingRegistration(t, sa) issued := sa.clk.Now() _, err = sa.AddCertificate(ctx, &sapb.AddCertificateRequest{ - Der: certDER, - RegID: reg.Id, - Issued: issued.UnixNano(), + Der: certDER, + RegID: reg.Id, + IssuedNS: issued.UnixNano(), }) test.AssertNotError(t, err, "Couldn't add test-cert.der") @@ -644,8 +644,8 @@ func TestCountCertificatesByNames(t *testing.T) { test.AssertEquals(t, counts.Counts["example.com"], int64(1)) // Time range between two days ago and yesterday should not. - req.Range.Earliest = twoDaysAgo - req.Range.Latest = yesterday + req.Range.EarliestNS = twoDaysAgo + req.Range.LatestNS = yesterday counts, err = sa.CountCertificatesByNames(ctx, req) test.AssertNotError(t, err, "Error counting certs.") test.AssertEquals(t, len(counts.Counts), 1) @@ -653,8 +653,8 @@ func TestCountCertificatesByNames(t *testing.T) { // Time range between now and tomorrow also should not (time ranges are // inclusive at the tail end, but not the beginning end). - req.Range.Earliest = now.UnixNano() - req.Range.Latest = tomorrow + req.Range.EarliestNS = now.UnixNano() + req.Range.LatestNS = tomorrow counts, err = sa.CountCertificatesByNames(ctx, req) test.AssertNotError(t, err, "Error counting certs.") test.AssertEquals(t, len(counts.Counts), 1) @@ -679,14 +679,14 @@ func TestCountCertificatesByNames(t *testing.T) { certDER2, err := os.ReadFile("test-cert2.der") test.AssertNotError(t, err, "Couldn't read test-cert2.der") _, err = sa.AddCertificate(ctx, &sapb.AddCertificateRequest{ - Der: certDER2, - RegID: reg.Id, - Issued: issued.UnixNano(), + Der: certDER2, + RegID: reg.Id, + IssuedNS: issued.UnixNano(), }) test.AssertNotError(t, err, "Couldn't add test-cert2.der") req.Names = names - req.Range.Earliest = yesterday - req.Range.Latest = now.Add(10000 * time.Hour).UnixNano() + req.Range.EarliestNS = yesterday + req.Range.LatestNS = now.Add(10000 * time.Hour).UnixNano() counts, err = sa.CountCertificatesByNames(ctx, req) test.AssertNotError(t, err, "Error counting certs.") test.AssertEquals(t, len(counts.Counts), 3) @@ -740,8 +740,8 @@ func TestCountRegistrationsByIP(t *testing.T) { req := &sapb.CountRegistrationsByIPRequest{ Ip: net.ParseIP("1.1.1.1"), Range: &sapb.Range{ - Earliest: fc.Now().Add(-time.Hour * 24).UnixNano(), - Latest: fc.Now().UnixNano(), + EarliestNS: fc.Now().Add(-time.Hour * 24).UnixNano(), + LatestNS: fc.Now().UnixNano(), }, } @@ -812,8 +812,8 @@ func TestCountRegistrationsByIPRange(t *testing.T) { req := &sapb.CountRegistrationsByIPRequest{ Ip: net.ParseIP("1.1.1.1"), Range: &sapb.Range{ - Earliest: fc.Now().Add(-time.Hour * 24).UnixNano(), - Latest: fc.Now().UnixNano(), + EarliestNS: fc.Now().Add(-time.Hour * 24).UnixNano(), + LatestNS: fc.Now().UnixNano(), }, } @@ -929,7 +929,7 @@ func TestFQDNSetTimestampsForWindow(t *testing.T) { // Ensure zero issuance has occurred for names. resp, err := sa.FQDNSetTimestampsForWindow(ctx, req) test.AssertNotError(t, err, "Failed to count name sets") - test.AssertEquals(t, len(resp.Timestamps), 0) + test.AssertEquals(t, len(resp.TimestampsNS), 0) // Add an issuance for names inside the window. expires := fc.Now().Add(time.Hour * 2).UTC() @@ -941,15 +941,15 @@ func TestFQDNSetTimestampsForWindow(t *testing.T) { // Ensure there's 1 issuance timestamp for names inside the window. resp, err = sa.FQDNSetTimestampsForWindow(ctx, req) test.AssertNotError(t, err, "Failed to count name sets") - test.AssertEquals(t, len(resp.Timestamps), 1) - test.AssertEquals(t, firstIssued, time.Unix(0, resp.Timestamps[len(resp.Timestamps)-1]).UTC()) + test.AssertEquals(t, len(resp.TimestampsNS), 1) + test.AssertEquals(t, firstIssued, time.Unix(0, resp.TimestampsNS[len(resp.TimestampsNS)-1]).UTC()) // Ensure that the hash isn't affected by changing name order/casing. req.Domains = []string{"b.example.com", "A.example.COM"} resp, err = sa.FQDNSetTimestampsForWindow(ctx, req) test.AssertNotError(t, err, "Failed to count name sets") - test.AssertEquals(t, len(resp.Timestamps), 1) - test.AssertEquals(t, firstIssued, time.Unix(0, resp.Timestamps[len(resp.Timestamps)-1]).UTC()) + test.AssertEquals(t, len(resp.TimestampsNS), 1) + test.AssertEquals(t, firstIssued, time.Unix(0, resp.TimestampsNS[len(resp.TimestampsNS)-1]).UTC()) // Add another issuance for names inside the window. tx, err = sa.dbMap.BeginTx(ctx) @@ -962,8 +962,8 @@ func TestFQDNSetTimestampsForWindow(t *testing.T) { req.Domains = names resp, err = sa.FQDNSetTimestampsForWindow(ctx, req) test.AssertNotError(t, err, "Failed to count name sets") - test.AssertEquals(t, len(resp.Timestamps), 2) - test.AssertEquals(t, firstIssued, time.Unix(0, resp.Timestamps[len(resp.Timestamps)-1]).UTC()) + test.AssertEquals(t, len(resp.TimestampsNS), 2) + test.AssertEquals(t, firstIssued, time.Unix(0, resp.TimestampsNS[len(resp.TimestampsNS)-1]).UTC()) // Add another issuance for names but just outside the window. tx, err = sa.dbMap.BeginTx(ctx) @@ -975,8 +975,8 @@ func TestFQDNSetTimestampsForWindow(t *testing.T) { // Ensure there are still only two issuance timestamps in the window. resp, err = sa.FQDNSetTimestampsForWindow(ctx, req) test.AssertNotError(t, err, "Failed to count name sets") - test.AssertEquals(t, len(resp.Timestamps), 2) - test.AssertEquals(t, firstIssued, time.Unix(0, resp.Timestamps[len(resp.Timestamps)-1]).UTC()) + test.AssertEquals(t, len(resp.TimestampsNS), 2) + test.AssertEquals(t, firstIssued, time.Unix(0, resp.TimestampsNS[len(resp.TimestampsNS)-1]).UTC()) } func TestFQDNSetsExists(t *testing.T) { @@ -1128,15 +1128,15 @@ func TestPreviousCertificateExists(t *testing.T) { issued := sa.clk.Now() _, err = sa.AddPrecertificate(ctx, &sapb.AddCertificateRequest{ Der: certDER, - Issued: issued.UnixNano(), + IssuedNS: issued.UnixNano(), RegID: reg.Id, IssuerNameID: 1, }) test.AssertNotError(t, err, "Failed to add precertificate") _, err = sa.AddCertificate(ctx, &sapb.AddCertificateRequest{ - Der: certDER, - RegID: reg.Id, - Issued: issued.UnixNano(), + Der: certDER, + RegID: reg.Id, + IssuedNS: issued.UnixNano(), }) test.AssertNotError(t, err, "calling AddCertificate") @@ -1239,7 +1239,7 @@ func TestNewOrderAndAuthzs(t *testing.T) { // Insert an order for four names, two of which already have authzs NewOrder: &sapb.NewOrderRequest{ RegistrationID: reg.Id, - Expires: 1, + ExpiresNS: 1, Names: []string{"a.com", "b.com", "c.com", "d.com"}, V2Authorizations: []int64{1, 2}, }, @@ -1248,14 +1248,14 @@ func TestNewOrderAndAuthzs(t *testing.T) { { Identifier: "c.com", RegistrationID: reg.Id, - Expires: sa.clk.Now().Add(time.Hour).UnixNano(), + ExpiresNS: sa.clk.Now().Add(time.Hour).UnixNano(), Status: "pending", Challenges: []*corepb.Challenge{{Token: core.NewToken()}}, }, { Identifier: "d.com", RegistrationID: reg.Id, - Expires: sa.clk.Now().Add(time.Hour).UnixNano(), + ExpiresNS: sa.clk.Now().Add(time.Hour).UnixNano(), Status: "pending", Challenges: []*corepb.Challenge{{Token: core.NewToken()}}, }, @@ -1296,7 +1296,7 @@ func TestNewOrderAndAuthzs_NonNilInnerOrder(t *testing.T) { { Identifier: "a.com", RegistrationID: reg.Id, - Expires: fc.Now().Add(2 * time.Hour).UnixNano(), + ExpiresNS: fc.Now().Add(2 * time.Hour).UnixNano(), Status: "pending", Challenges: []*corepb.Challenge{{Token: core.NewToken()}}, }, @@ -1328,7 +1328,7 @@ func TestNewOrderAndAuthzs_NewAuthzExpectedFields(t *testing.T) { { Identifier: domain, RegistrationID: reg.Id, - Expires: expires, + ExpiresNS: expires, Status: string(core.StatusPending), Challenges: []*corepb.Challenge{ { @@ -1340,7 +1340,7 @@ func TestNewOrderAndAuthzs_NewAuthzExpectedFields(t *testing.T) { }, NewOrder: &sapb.NewOrderRequest{ RegistrationID: reg.Id, - Expires: expires, + ExpiresNS: expires, Names: []string{domain}, }, }) @@ -1392,7 +1392,7 @@ func TestSetOrderProcessing(t *testing.T) { order, err := sa.NewOrderAndAuthzs(context.Background(), &sapb.NewOrderAndAuthzsRequest{ NewOrder: &sapb.NewOrderRequest{ RegistrationID: reg.Id, - Expires: sa.clk.Now().Add(365 * 24 * time.Hour).UnixNano(), + ExpiresNS: sa.clk.Now().Add(365 * 24 * time.Hour).UnixNano(), Names: []string{"example.com"}, V2Authorizations: []int64{authzID}, }, @@ -1440,7 +1440,7 @@ func TestFinalizeOrder(t *testing.T) { order, err := sa.NewOrderAndAuthzs(context.Background(), &sapb.NewOrderAndAuthzsRequest{ NewOrder: &sapb.NewOrderRequest{ RegistrationID: reg.Id, - Expires: sa.clk.Now().Add(365 * 24 * time.Hour).UnixNano(), + ExpiresNS: sa.clk.Now().Add(365 * 24 * time.Hour).UnixNano(), Names: []string{"example.com"}, V2Authorizations: []int64{authzID}, }, @@ -1487,7 +1487,7 @@ func TestOrder(t *testing.T) { inputOrder := &corepb.Order{ RegistrationID: reg.Id, - Expires: expires, + ExpiresNS: expires, Names: []string{"example.com"}, V2Authorizations: []int64{authzID}, } @@ -1496,7 +1496,7 @@ func TestOrder(t *testing.T) { order, err := sa.NewOrderAndAuthzs(context.Background(), &sapb.NewOrderAndAuthzsRequest{ NewOrder: &sapb.NewOrderRequest{ RegistrationID: inputOrder.RegistrationID, - Expires: inputOrder.Expires, + ExpiresNS: inputOrder.ExpiresNS, Names: inputOrder.Names, V2Authorizations: inputOrder.V2Authorizations, }, @@ -1510,7 +1510,7 @@ func TestOrder(t *testing.T) { RegistrationID: inputOrder.RegistrationID, V2Authorizations: inputOrder.V2Authorizations, Names: inputOrder.Names, - Expires: inputOrder.Expires, + ExpiresNS: inputOrder.ExpiresNS, // The ID should have been set to 1 by the SA Id: 1, // The status should be pending @@ -1520,7 +1520,7 @@ func TestOrder(t *testing.T) { // We should not be processing it BeganProcessing: false, // The created timestamp should have been set to the current time - Created: sa.clk.Now().UnixNano(), + CreatedNS: sa.clk.Now().UnixNano(), } // Fetch the order by its ID and make sure it matches the expected @@ -1587,7 +1587,7 @@ func TestGetAuthorizations2(t *testing.T) { authz, err := sa.GetAuthorizations2(context.Background(), &sapb.GetAuthorizationsRequest{ RegistrationID: reg.Id, Domains: idents, - Now: expiryCutoff, + NowNS: expiryCutoff, }) // It should not fail test.AssertNotError(t, err, "sa.GetAuthorizations2 failed") @@ -1599,7 +1599,7 @@ func TestGetAuthorizations2(t *testing.T) { authz, err = sa.GetAuthorizations2(context.Background(), &sapb.GetAuthorizationsRequest{ RegistrationID: reg.Id, Domains: append(idents, identD), - Now: expiryCutoff, + NowNS: expiryCutoff, }) // It should not fail test.AssertNotError(t, err, "sa.GetAuthorizations2 failed") @@ -1618,8 +1618,8 @@ func TestCountOrders(t *testing.T) { req := &sapb.CountOrdersRequest{ AccountID: 12345, Range: &sapb.Range{ - Earliest: now.Add(-time.Hour).UnixNano(), - Latest: now.Add(time.Second).UnixNano(), + EarliestNS: now.Add(-time.Hour).UnixNano(), + LatestNS: now.Add(time.Second).UnixNano(), }, } @@ -1635,7 +1635,7 @@ func TestCountOrders(t *testing.T) { order, err := sa.NewOrderAndAuthzs(ctx, &sapb.NewOrderAndAuthzsRequest{ NewOrder: &sapb.NewOrderRequest{ RegistrationID: reg.Id, - Expires: expires.UnixNano(), + ExpiresNS: expires.UnixNano(), Names: []string{"example.com"}, V2Authorizations: []int64{authzID}, }, @@ -1650,9 +1650,9 @@ func TestCountOrders(t *testing.T) { // Moving the count window to after the order was created should return the // count to 0 - earliest := time.Unix(0, order.Created).Add(time.Minute) - req.Range.Earliest = earliest.UnixNano() - req.Range.Latest = earliest.Add(time.Hour).UnixNano() + earliest := time.Unix(0, order.CreatedNS).Add(time.Minute) + req.Range.EarliestNS = earliest.UnixNano() + req.Range.LatestNS = earliest.Add(time.Hour).UnixNano() count, err = sa.CountOrders(ctx, req) test.AssertNotError(t, err, "Couldn't count new orders for reg ID") test.AssertEquals(t, count.Count, int64(0)) @@ -1679,7 +1679,7 @@ func TestFasterGetOrderForNames(t *testing.T) { _, err = sa.NewOrderAndAuthzs(ctx, &sapb.NewOrderAndAuthzsRequest{ NewOrder: &sapb.NewOrderRequest{ RegistrationID: reg.Id, - Expires: expiresNano, + ExpiresNS: expiresNano, V2Authorizations: []int64{authzIDs}, Names: []string{domain}, }, @@ -1689,7 +1689,7 @@ func TestFasterGetOrderForNames(t *testing.T) { _, err = sa.NewOrderAndAuthzs(ctx, &sapb.NewOrderAndAuthzsRequest{ NewOrder: &sapb.NewOrderRequest{ RegistrationID: reg.Id, - Expires: expiresNano, + ExpiresNS: expiresNano, V2Authorizations: []int64{authzIDs}, Names: []string{domain}, }, @@ -1746,7 +1746,7 @@ func TestGetOrderForNames(t *testing.T) { order, err := sa.NewOrderAndAuthzs(ctx, &sapb.NewOrderAndAuthzsRequest{ NewOrder: &sapb.NewOrderRequest{ RegistrationID: regA.Id, - Expires: expires, + ExpiresNS: expires, V2Authorizations: []int64{authzIDA, authzIDB}, Names: names, }, @@ -1809,7 +1809,7 @@ func TestGetOrderForNames(t *testing.T) { order, err = sa.NewOrderAndAuthzs(ctx, &sapb.NewOrderAndAuthzsRequest{ NewOrder: &sapb.NewOrderRequest{ RegistrationID: regA.Id, - Expires: fc.Now().Add(orderLifetime).UnixNano(), + ExpiresNS: fc.Now().Add(orderLifetime).UnixNano(), V2Authorizations: []int64{authzIDC, authzIDD}, Names: names, }, @@ -1958,7 +1958,7 @@ func TestStatusForOrder(t *testing.T) { newOrder, err := sa.NewOrderAndAuthzs(ctx, &sapb.NewOrderAndAuthzsRequest{ NewOrder: &sapb.NewOrderRequest{ RegistrationID: reg.Id, - Expires: orderExpiry, + ExpiresNS: orderExpiry, V2Authorizations: tc.AuthorizationIDs, Names: tc.OrderNames, }, @@ -2023,7 +2023,7 @@ func TestRevokeCertificate(t *testing.T) { _, err = sa.AddPrecertificate(ctx, &sapb.AddCertificateRequest{ Der: certDER, RegID: reg.Id, - Issued: sa.clk.Now().UnixNano(), + IssuedNS: sa.clk.Now().UnixNano(), IssuerNameID: 1, }) test.AssertNotError(t, err, "Couldn't add www.eff.org.der") @@ -2041,7 +2041,7 @@ func TestRevokeCertificate(t *testing.T) { _, err = sa.RevokeCertificate(context.Background(), &sapb.RevokeCertificateRequest{ Serial: serial, - Date: now.UnixNano(), + DateNS: now.UnixNano(), Reason: reason, }) test.AssertNotError(t, err, "RevokeCertificate with no OCSP response should succeed") @@ -2050,12 +2050,12 @@ func TestRevokeCertificate(t *testing.T) { test.AssertNotError(t, err, "GetCertificateStatus failed") test.AssertEquals(t, core.OCSPStatus(status.Status), core.OCSPStatusRevoked) test.AssertEquals(t, status.RevokedReason, reason) - test.AssertEquals(t, status.RevokedDate, now.UnixNano()) + test.AssertEquals(t, status.RevokedDateNS, now.UnixNano()) test.AssertEquals(t, status.OcspLastUpdated, now.UnixNano()) _, err = sa.RevokeCertificate(context.Background(), &sapb.RevokeCertificateRequest{ Serial: serial, - Date: now.UnixNano(), + DateNS: now.UnixNano(), Reason: reason, }) test.AssertError(t, err, "RevokeCertificate should've failed when certificate already revoked") @@ -2074,7 +2074,7 @@ func TestUpdateRevokedCertificate(t *testing.T) { _, err = sa.AddPrecertificate(ctx, &sapb.AddCertificateRequest{ Der: certDER, RegID: reg.Id, - Issued: issuedTime, + IssuedNS: issuedTime, IssuerNameID: 1, }) test.AssertNotError(t, err, "Couldn't add www.eff.org.der") @@ -2082,11 +2082,11 @@ func TestUpdateRevokedCertificate(t *testing.T) { // Try to update it before its been revoked _, err = sa.UpdateRevokedCertificate(context.Background(), &sapb.RevokeCertificateRequest{ - Serial: serial, - Date: fc.Now().UnixNano(), - Backdate: fc.Now().UnixNano(), - Reason: ocsp.KeyCompromise, - Response: []byte{4, 5, 6}, + Serial: serial, + DateNS: fc.Now().UnixNano(), + BackdateNS: fc.Now().UnixNano(), + Reason: ocsp.KeyCompromise, + Response: []byte{4, 5, 6}, }) test.AssertError(t, err, "UpdateRevokedCertificate should have failed") test.AssertContains(t, err.Error(), "no certificate with serial") @@ -2095,7 +2095,7 @@ func TestUpdateRevokedCertificate(t *testing.T) { revokedTime := fc.Now().UnixNano() _, err = sa.RevokeCertificate(context.Background(), &sapb.RevokeCertificateRequest{ Serial: serial, - Date: revokedTime, + DateNS: revokedTime, Reason: ocsp.CessationOfOperation, Response: []byte{1, 2, 3}, }) @@ -2111,7 +2111,7 @@ func TestUpdateRevokedCertificate(t *testing.T) { // Try to update its revocation info with no backdate _, err = sa.UpdateRevokedCertificate(context.Background(), &sapb.RevokeCertificateRequest{ Serial: serial, - Date: fc.Now().UnixNano(), + DateNS: fc.Now().UnixNano(), Reason: ocsp.KeyCompromise, Response: []byte{4, 5, 6}, }) @@ -2120,44 +2120,44 @@ func TestUpdateRevokedCertificate(t *testing.T) { // Try to update its revocation info for a reason other than keyCompromise _, err = sa.UpdateRevokedCertificate(context.Background(), &sapb.RevokeCertificateRequest{ - Serial: serial, - Date: fc.Now().UnixNano(), - Backdate: revokedTime, - Reason: ocsp.Unspecified, - Response: []byte{4, 5, 6}, + Serial: serial, + DateNS: fc.Now().UnixNano(), + BackdateNS: revokedTime, + Reason: ocsp.Unspecified, + Response: []byte{4, 5, 6}, }) test.AssertError(t, err, "UpdateRevokedCertificate should have failed") test.AssertContains(t, err.Error(), "cannot update revocation for any reason other than keyCompromise") // Try to update the revocation info of the wrong certificate _, err = sa.UpdateRevokedCertificate(context.Background(), &sapb.RevokeCertificateRequest{ - Serial: "000000000000000000000000000000021bd5", - Date: fc.Now().UnixNano(), - Backdate: revokedTime, - Reason: ocsp.KeyCompromise, - Response: []byte{4, 5, 6}, + Serial: "000000000000000000000000000000021bd5", + DateNS: fc.Now().UnixNano(), + BackdateNS: revokedTime, + Reason: ocsp.KeyCompromise, + Response: []byte{4, 5, 6}, }) test.AssertError(t, err, "UpdateRevokedCertificate should have failed") test.AssertContains(t, err.Error(), "no certificate with serial") // Try to update its revocation info with the wrong backdate _, err = sa.UpdateRevokedCertificate(context.Background(), &sapb.RevokeCertificateRequest{ - Serial: serial, - Date: fc.Now().UnixNano(), - Backdate: fc.Now().UnixNano(), - Reason: ocsp.KeyCompromise, - Response: []byte{4, 5, 6}, + Serial: serial, + DateNS: fc.Now().UnixNano(), + BackdateNS: fc.Now().UnixNano(), + Reason: ocsp.KeyCompromise, + Response: []byte{4, 5, 6}, }) test.AssertError(t, err, "UpdateRevokedCertificate should have failed") test.AssertContains(t, err.Error(), "no certificate with serial") // Try to update its revocation info correctly _, err = sa.UpdateRevokedCertificate(context.Background(), &sapb.RevokeCertificateRequest{ - Serial: serial, - Date: fc.Now().UnixNano(), - Backdate: revokedTime, - Reason: ocsp.KeyCompromise, - Response: []byte{4, 5, 6}, + Serial: serial, + DateNS: fc.Now().UnixNano(), + BackdateNS: revokedTime, + Reason: ocsp.KeyCompromise, + Response: []byte{4, 5, 6}, }) test.AssertNotError(t, err, "UpdateRevokedCertificate failed") } @@ -2189,15 +2189,15 @@ func TestAddCertificateRenewalBit(t *testing.T) { // Add the certificate with the same names. _, err = sa.AddPrecertificate(ctx, &sapb.AddCertificateRequest{ Der: certDER, - Issued: issued.UnixNano(), + IssuedNS: issued.UnixNano(), RegID: reg.Id, IssuerNameID: 1, }) test.AssertNotError(t, err, "Failed to add precertificate") _, err = sa.AddCertificate(ctx, &sapb.AddCertificateRequest{ - Der: certDER, - RegID: reg.Id, - Issued: issued.UnixNano(), + Der: certDER, + RegID: reg.Id, + IssuedNS: issued.UnixNano(), }) test.AssertNotError(t, err, "Failed to add certificate") @@ -2231,15 +2231,15 @@ func TestAddCertificateRenewalBit(t *testing.T) { _, err = sa.AddPrecertificate(ctx, &sapb.AddCertificateRequest{ Der: certDER, - Issued: issued.UnixNano(), + IssuedNS: issued.UnixNano(), RegID: reg.Id, IssuerNameID: 1, }) test.AssertNotError(t, err, "Failed to add precertificate") _, err = sa.AddCertificate(ctx, &sapb.AddCertificateRequest{ - Der: certDER, - RegID: reg.Id, - Issued: issued.UnixNano(), + Der: certDER, + RegID: reg.Id, + IssuedNS: issued.UnixNano(), }) test.AssertNotError(t, err, "Failed to add certificate") @@ -2293,8 +2293,8 @@ func TestCountCertificatesRenewalBit(t *testing.T) { req := &sapb.CountCertificatesByNamesRequest{ Names: []string{expectedName}, Range: &sapb.Range{ - Earliest: fc.Now().Add(-5 * time.Hour).UnixNano(), - Latest: fc.Now().Add(5 * time.Hour).UnixNano(), + EarliestNS: fc.Now().Add(-5 * time.Hour).UnixNano(), + LatestNS: fc.Now().Add(5 * time.Hour).UnixNano(), }, } counts, err := sa.CountCertificatesByNames(context.Background(), req) @@ -2310,9 +2310,9 @@ func TestCountCertificatesRenewalBit(t *testing.T) { // Add the first certificate - it won't be considered a renewal. issued := certA.NotBefore _, err = sa.AddCertificate(ctx, &sapb.AddCertificateRequest{ - Der: certADER, - RegID: reg.Id, - Issued: issued.UnixNano(), + Der: certADER, + RegID: reg.Id, + IssuedNS: issued.UnixNano(), }) test.AssertNotError(t, err, "Failed to add CertA test certificate") @@ -2322,9 +2322,9 @@ func TestCountCertificatesRenewalBit(t *testing.T) { // Add the second certificate - it should be considered a renewal issued = certB.NotBefore _, err = sa.AddCertificate(ctx, &sapb.AddCertificateRequest{ - Der: certBDER, - RegID: reg.Id, - Issued: issued.UnixNano(), + Der: certBDER, + RegID: reg.Id, + IssuedNS: issued.UnixNano(), }) test.AssertNotError(t, err, "Failed to add CertB test certificate") @@ -2334,9 +2334,9 @@ func TestCountCertificatesRenewalBit(t *testing.T) { // Add the third certificate - it should not be considered a renewal _, err = sa.AddCertificate(ctx, &sapb.AddCertificateRequest{ - Der: certCDER, - RegID: reg.Id, - Issued: issued.UnixNano(), + Der: certCDER, + RegID: reg.Id, + IssuedNS: issued.UnixNano(), }) test.AssertNotError(t, err, "Failed to add CertC test certificate") @@ -2366,17 +2366,17 @@ func TestFinalizeAuthorization2(t *testing.T) { AddressUsed: ip, }, }, - Status: string(core.StatusValid), - Expires: expires, - Attempted: string(core.ChallengeTypeHTTP01), - AttemptedAt: attemptedAt, + Status: string(core.StatusValid), + ExpiresNS: expires, + Attempted: string(core.ChallengeTypeHTTP01), + AttemptedAtNS: attemptedAt, }) test.AssertNotError(t, err, "sa.FinalizeAuthorization2 failed") dbVer, err := sa.GetAuthorization2(context.Background(), &sapb.AuthorizationID2{Id: authzID}) test.AssertNotError(t, err, "sa.GetAuthorization2 failed") test.AssertEquals(t, dbVer.Status, string(core.StatusValid)) - test.AssertEquals(t, time.Unix(0, dbVer.Expires).UTC(), fc.Now().Add(time.Hour*2).UTC()) + test.AssertEquals(t, time.Unix(0, dbVer.ExpiresNS).UTC(), fc.Now().Add(time.Hour*2).UTC()) test.AssertEquals(t, dbVer.Challenges[0].Status, string(core.StatusValid)) test.AssertEquals(t, len(dbVer.Challenges[0].Validationrecords), 1) test.AssertEquals(t, dbVer.Challenges[0].Validationrecords[0].Hostname, "example.com") @@ -2399,7 +2399,7 @@ func TestFinalizeAuthorization2(t *testing.T) { ValidationError: prob, Status: string(core.StatusInvalid), Attempted: string(core.ChallengeTypeHTTP01), - Expires: expires, + ExpiresNS: expires, }) test.AssertNotError(t, err, "sa.FinalizeAuthorization2 failed") @@ -2435,10 +2435,10 @@ func TestRehydrateHostPort(t *testing.T) { AddressUsed: ip, }, }, - Status: string(core.StatusValid), - Expires: expires, - Attempted: string(core.ChallengeTypeHTTP01), - AttemptedAt: attemptedAt, + Status: string(core.StatusValid), + ExpiresNS: expires, + Attempted: string(core.ChallengeTypeHTTP01), + AttemptedAtNS: attemptedAt, }) test.AssertNotError(t, err, "sa.FinalizeAuthorization2 failed") _, err = sa.GetAuthorization2(context.Background(), &sapb.AuthorizationID2{Id: authzID}) @@ -2456,10 +2456,10 @@ func TestRehydrateHostPort(t *testing.T) { AddressUsed: ip, }, }, - Status: string(core.StatusValid), - Expires: expires, - Attempted: string(core.ChallengeTypeHTTP01), - AttemptedAt: attemptedAt, + Status: string(core.StatusValid), + ExpiresNS: expires, + Attempted: string(core.ChallengeTypeHTTP01), + AttemptedAtNS: attemptedAt, }) test.AssertNotError(t, err, "sa.FinalizeAuthorization2 failed") _, err = sa.GetAuthorization2(context.Background(), &sapb.AuthorizationID2{Id: authzID}) @@ -2477,10 +2477,10 @@ func TestRehydrateHostPort(t *testing.T) { AddressUsed: ip, }, }, - Status: string(core.StatusValid), - Expires: expires, - Attempted: string(core.ChallengeTypeHTTP01), - AttemptedAt: attemptedAt, + Status: string(core.StatusValid), + ExpiresNS: expires, + Attempted: string(core.ChallengeTypeHTTP01), + AttemptedAtNS: attemptedAt, }) test.AssertNotError(t, err, "sa.FinalizeAuthorization2 failed") _, err = sa.GetAuthorization2(context.Background(), &sapb.AuthorizationID2{Id: authzID}) @@ -2498,10 +2498,10 @@ func TestRehydrateHostPort(t *testing.T) { AddressUsed: ip, }, }, - Status: string(core.StatusValid), - Expires: expires, - Attempted: string(core.ChallengeTypeHTTP01), - AttemptedAt: attemptedAt, + Status: string(core.StatusValid), + ExpiresNS: expires, + Attempted: string(core.ChallengeTypeHTTP01), + AttemptedAtNS: attemptedAt, }) test.AssertNotError(t, err, "sa.FinalizeAuthorization2 failed") _, err = sa.GetAuthorization2(context.Background(), &sapb.AuthorizationID2{Id: authzID}) @@ -2518,10 +2518,10 @@ func TestRehydrateHostPort(t *testing.T) { AddressUsed: ip, }, }, - Status: string(core.StatusValid), - Expires: expires, - Attempted: string(core.ChallengeTypeHTTP01), - AttemptedAt: attemptedAt, + Status: string(core.StatusValid), + ExpiresNS: expires, + Attempted: string(core.ChallengeTypeHTTP01), + AttemptedAtNS: attemptedAt, }) test.AssertNotError(t, err, "sa.FinalizeAuthorization2 failed") _, err = sa.GetAuthorization2(context.Background(), &sapb.AuthorizationID2{Id: authzID}) @@ -2543,7 +2543,7 @@ func TestGetPendingAuthorization2(t *testing.T) { dbVer, err := sa.GetPendingAuthorization2(context.Background(), &sapb.GetPendingAuthorizationRequest{ RegistrationID: regID, IdentifierValue: domain, - ValidUntil: validUntil, + ValidUntilNS: validUntil, }) test.AssertNotError(t, err, "sa.GetPendingAuthorization2 failed") test.AssertEquals(t, fmt.Sprintf("%d", authzIDB), dbVer.Id) @@ -2552,7 +2552,7 @@ func TestGetPendingAuthorization2(t *testing.T) { dbVer, err = sa.GetPendingAuthorization2(context.Background(), &sapb.GetPendingAuthorizationRequest{ RegistrationID: regID, IdentifierValue: domain, - ValidUntil: validUntil, + ValidUntilNS: validUntil, }) test.AssertNotError(t, err, "sa.GetPendingAuthorization2 failed") test.AssertEquals(t, fmt.Sprintf("%d", authzIDA), dbVer.Id) @@ -2639,9 +2639,9 @@ func TestAuthzModelMapToPB(t *testing.T) { test.AssertEquals(t, authzPB.Identifier, model.IdentifierValue) test.AssertEquals(t, authzPB.RegistrationID, model.RegistrationID) test.AssertEquals(t, authzPB.Status, string(uintToStatus[model.Status])) - gotTime := time.Unix(0, authzPB.Expires).UTC() + gotTime := time.Unix(0, authzPB.ExpiresNS).UTC() if !model.Expires.Equal(gotTime) { - t.Errorf("Times didn't match. Got %s, expected %s (%d)", gotTime, model.Expires, authzPB.Expires) + t.Errorf("Times didn't match. Got %s, expected %s (%d)", gotTime, model.Expires, authzPB.ExpiresNS) } if len(el.Authz.Challenges) != bits.OnesCount(uint(model.Challenges)) { t.Errorf("wrong number of challenges for %q: got %d, expected %d", el.Domain, @@ -2682,7 +2682,7 @@ func TestGetValidOrderAuthorizations2(t *testing.T) { order, err := sa.NewOrderAndAuthzs(context.Background(), &sapb.NewOrderAndAuthzsRequest{ NewOrder: &sapb.NewOrderRequest{ RegistrationID: reg.Id, - Expires: fc.Now().Truncate(time.Second).UnixNano(), + ExpiresNS: fc.Now().Truncate(time.Second).UnixNano(), Names: []string{"a.example.com", "b.example.com"}, V2Authorizations: []int64{authzIDA, authzIDB}, }, @@ -2704,7 +2704,7 @@ func TestGetValidOrderAuthorizations2(t *testing.T) { if fmt.Sprintf("%d", namesToCheck[a.Authz.Identifier]) != a.Authz.Id { t.Fatalf("incorrect identifier %q with id %s", a.Authz.Identifier, a.Authz.Id) } - test.AssertEquals(t, a.Authz.Expires, expires.UnixNano()) + test.AssertEquals(t, a.Authz.ExpiresNS, expires.UnixNano()) delete(namesToCheck, a.Authz.Identifier) } @@ -2751,8 +2751,8 @@ func TestCountInvalidAuthorizations2(t *testing.T) { RegistrationID: reg.Id, Hostname: ident, Range: &sapb.Range{ - Earliest: earliest, - Latest: latest, + EarliestNS: earliest, + LatestNS: latest, }, }) test.AssertNotError(t, err, "sa.CountInvalidAuthorizations2 failed") @@ -2777,7 +2777,7 @@ func TestGetValidAuthorizations2(t *testing.T) { "bbb", }, RegistrationID: regID, - Now: now, + NowNS: now, }) test.AssertNotError(t, err, "sa.GetValidAuthorizations2 failed") test.AssertEquals(t, len(authzs.Authz), 1) @@ -2794,7 +2794,7 @@ func TestGetOrderExpired(t *testing.T) { order, err := sa.NewOrderAndAuthzs(context.Background(), &sapb.NewOrderAndAuthzsRequest{ NewOrder: &sapb.NewOrderRequest{ RegistrationID: reg.Id, - Expires: fc.Now().Add(-time.Hour).UnixNano(), + ExpiresNS: fc.Now().Add(-time.Hour).UnixNano(), Names: []string{"example.com"}, V2Authorizations: []int64{666}, }, @@ -2820,13 +2820,13 @@ func TestBlockedKey(t *testing.T) { source := "API" _, err := sa.AddBlockedKey(context.Background(), &sapb.AddBlockedKeyRequest{ KeyHash: hashA, - Added: added, + AddedNS: added, Source: source, }) test.AssertNotError(t, err, "AddBlockedKey failed") _, err = sa.AddBlockedKey(context.Background(), &sapb.AddBlockedKeyRequest{ KeyHash: hashA, - Added: added, + AddedNS: added, Source: source, }) test.AssertNotError(t, err, "AddBlockedKey failed with duplicate insert") @@ -2834,7 +2834,7 @@ func TestBlockedKey(t *testing.T) { comment := "testing comments" _, err = sa.AddBlockedKey(context.Background(), &sapb.AddBlockedKeyRequest{ KeyHash: hashB, - Added: added, + AddedNS: added, Source: source, Comment: comment, }) @@ -2866,7 +2866,7 @@ func TestAddBlockedKeyUnknownSource(t *testing.T) { _, err := sa.AddBlockedKey(context.Background(), &sapb.AddBlockedKeyRequest{ KeyHash: []byte{1, 2, 3}, - Added: 1, + AddedNS: 1, Source: "heyo", }) test.AssertError(t, err, "AddBlockedKey didn't fail with unknown source") @@ -2879,14 +2879,14 @@ func TestBlockedKeyRevokedBy(t *testing.T) { _, err := sa.AddBlockedKey(context.Background(), &sapb.AddBlockedKeyRequest{ KeyHash: []byte{1}, - Added: 1, + AddedNS: 1, Source: "API", }) test.AssertNotError(t, err, "AddBlockedKey failed") _, err = sa.AddBlockedKey(context.Background(), &sapb.AddBlockedKeyRequest{ KeyHash: []byte{2}, - Added: 1, + AddedNS: 1, Source: "API", RevokedBy: 1, }) @@ -3134,7 +3134,7 @@ func TestGetRevokedCerts(t *testing.T) { _, err = sa.AddPrecertificate(ctx, &sapb.AddCertificateRequest{ Der: eeCert.Raw, RegID: reg.Id, - Issued: eeCert.NotBefore.UnixNano(), + IssuedNS: eeCert.NotBefore.UnixNano(), IssuerNameID: 1, }) test.AssertNotError(t, err, "failed to add test cert") @@ -3164,10 +3164,10 @@ func TestGetRevokedCerts(t *testing.T) { // Asking for revoked certs now should return no results. count, err := countRevokedCerts(&sapb.GetRevokedCertsRequest{ - IssuerNameID: 1, - ExpiresAfter: time.Date(2023, time.March, 1, 0, 0, 0, 0, time.UTC).UnixNano(), - ExpiresBefore: time.Date(2023, time.April, 1, 0, 0, 0, 0, time.UTC).UnixNano(), - RevokedBefore: time.Date(2023, time.April, 1, 0, 0, 0, 0, time.UTC).UnixNano(), + IssuerNameID: 1, + ExpiresAfterNS: time.Date(2023, time.March, 1, 0, 0, 0, 0, time.UTC).UnixNano(), + ExpiresBeforeNS: time.Date(2023, time.April, 1, 0, 0, 0, 0, time.UTC).UnixNano(), + RevokedBeforeNS: time.Date(2023, time.April, 1, 0, 0, 0, 0, time.UTC).UnixNano(), }) test.AssertNotError(t, err, "zero rows shouldn't result in error") test.AssertEquals(t, count, 0) @@ -3175,7 +3175,7 @@ func TestGetRevokedCerts(t *testing.T) { // Revoke the certificate. _, err = sa.RevokeCertificate(context.Background(), &sapb.RevokeCertificateRequest{ Serial: core.SerialToString(eeCert.SerialNumber), - Date: time.Date(2023, time.January, 1, 0, 0, 0, 0, time.UTC).UnixNano(), + DateNS: time.Date(2023, time.January, 1, 0, 0, 0, 0, time.UTC).UnixNano(), Reason: 1, Response: []byte{1, 2, 3}, }) @@ -3183,20 +3183,20 @@ func TestGetRevokedCerts(t *testing.T) { // Asking for revoked certs now should return one result. count, err = countRevokedCerts(&sapb.GetRevokedCertsRequest{ - IssuerNameID: 1, - ExpiresAfter: time.Date(2023, time.March, 1, 0, 0, 0, 0, time.UTC).UnixNano(), - ExpiresBefore: time.Date(2023, time.April, 1, 0, 0, 0, 0, time.UTC).UnixNano(), - RevokedBefore: time.Date(2023, time.April, 1, 0, 0, 0, 0, time.UTC).UnixNano(), + IssuerNameID: 1, + ExpiresAfterNS: time.Date(2023, time.March, 1, 0, 0, 0, 0, time.UTC).UnixNano(), + ExpiresBeforeNS: time.Date(2023, time.April, 1, 0, 0, 0, 0, time.UTC).UnixNano(), + RevokedBeforeNS: time.Date(2023, time.April, 1, 0, 0, 0, 0, time.UTC).UnixNano(), }) test.AssertNotError(t, err, "normal usage shouldn't result in error") test.AssertEquals(t, count, 1) // Asking for revoked certs with an old RevokedBefore should return no results. count, err = countRevokedCerts(&sapb.GetRevokedCertsRequest{ - IssuerNameID: 1, - ExpiresAfter: time.Date(2023, time.March, 1, 0, 0, 0, 0, time.UTC).UnixNano(), - ExpiresBefore: time.Date(2023, time.April, 1, 0, 0, 0, 0, time.UTC).UnixNano(), - RevokedBefore: time.Date(2020, time.March, 1, 0, 0, 0, 0, time.UTC).UnixNano(), + IssuerNameID: 1, + ExpiresAfterNS: time.Date(2023, time.March, 1, 0, 0, 0, 0, time.UTC).UnixNano(), + ExpiresBeforeNS: time.Date(2023, time.April, 1, 0, 0, 0, 0, time.UTC).UnixNano(), + RevokedBeforeNS: time.Date(2020, time.March, 1, 0, 0, 0, 0, time.UTC).UnixNano(), }) test.AssertNotError(t, err, "zero rows shouldn't result in error") test.AssertEquals(t, count, 0) @@ -3204,10 +3204,10 @@ func TestGetRevokedCerts(t *testing.T) { // Asking for revoked certs in a time period that does not cover this cert's // notAfter timestamp should return zero results. count, err = countRevokedCerts(&sapb.GetRevokedCertsRequest{ - IssuerNameID: 1, - ExpiresAfter: time.Date(2022, time.March, 1, 0, 0, 0, 0, time.UTC).UnixNano(), - ExpiresBefore: time.Date(2022, time.April, 1, 0, 0, 0, 0, time.UTC).UnixNano(), - RevokedBefore: time.Date(2023, time.April, 1, 0, 0, 0, 0, time.UTC).UnixNano(), + IssuerNameID: 1, + ExpiresAfterNS: time.Date(2022, time.March, 1, 0, 0, 0, 0, time.UTC).UnixNano(), + ExpiresBeforeNS: time.Date(2022, time.April, 1, 0, 0, 0, 0, time.UTC).UnixNano(), + RevokedBeforeNS: time.Date(2023, time.April, 1, 0, 0, 0, 0, time.UTC).UnixNano(), }) test.AssertNotError(t, err, "zero rows shouldn't result in error") test.AssertEquals(t, count, 0) @@ -3226,7 +3226,7 @@ func TestGetMaxExpiration(t *testing.T) { _, err = sa.AddPrecertificate(ctx, &sapb.AddCertificateRequest{ Der: eeCert.Raw, RegID: reg.Id, - Issued: eeCert.NotBefore.UnixNano(), + IssuedNS: eeCert.NotBefore.UnixNano(), IssuerNameID: 1, }) test.AssertNotError(t, err, "failed to add test cert") diff --git a/sa/saro.go b/sa/saro.go index 12a077873dc..6b0f19637c4 100644 --- a/sa/saro.go +++ b/sa/saro.go @@ -218,7 +218,7 @@ func ipRange(ip net.IP) (net.IP, net.IP) { // CountRegistrationsByIP returns the number of registrations created in the // time range for a single IP address. func (ssa *SQLStorageAuthorityRO) CountRegistrationsByIP(ctx context.Context, req *sapb.CountRegistrationsByIPRequest) (*sapb.Count, error) { - if len(req.Ip) == 0 || req.Range.Earliest == 0 || req.Range.Latest == 0 { + if len(req.Ip) == 0 || req.Range.EarliestNS == 0 || req.Range.LatestNS == 0 { return nil, errIncompleteRequest } @@ -233,8 +233,8 @@ func (ssa *SQLStorageAuthorityRO) CountRegistrationsByIP(ctx context.Context, re createdAt <= :latest`, map[string]interface{}{ "ip": req.Ip, - "earliest": time.Unix(0, req.Range.Earliest), - "latest": time.Unix(0, req.Range.Latest), + "earliest": time.Unix(0, req.Range.EarliestNS), + "latest": time.Unix(0, req.Range.LatestNS), }) if err != nil { return nil, err @@ -251,7 +251,7 @@ func (ssa *SQLStorageAuthority) CountRegistrationsByIP(ctx context.Context, req // the single IP. For IPv6 addresses, that range is a /48, since it's not // uncommon for one person to have a /48 to themselves. func (ssa *SQLStorageAuthorityRO) CountRegistrationsByIPRange(ctx context.Context, req *sapb.CountRegistrationsByIPRequest) (*sapb.Count, error) { - if len(req.Ip) == 0 || req.Range.Earliest == 0 || req.Range.Latest == 0 { + if len(req.Ip) == 0 || req.Range.EarliestNS == 0 || req.Range.LatestNS == 0 { return nil, errIncompleteRequest } @@ -267,8 +267,8 @@ func (ssa *SQLStorageAuthorityRO) CountRegistrationsByIPRange(ctx context.Contex :earliest < createdAt AND createdAt <= :latest`, map[string]interface{}{ - "earliest": time.Unix(0, req.Range.Earliest), - "latest": time.Unix(0, req.Range.Latest), + "earliest": time.Unix(0, req.Range.EarliestNS), + "latest": time.Unix(0, req.Range.LatestNS), "beginIP": beginIP, "endIP": endIP, }) @@ -290,7 +290,7 @@ func (ssa *SQLStorageAuthority) CountRegistrationsByIPRange(ctx context.Context, // issued for any of the domains during the provided range of time. Queries will // be run in parallel. If any of them error, only one error will be returned. func (ssa *SQLStorageAuthorityRO) CountCertificatesByNames(ctx context.Context, req *sapb.CountCertificatesByNamesRequest) (*sapb.CountByNames, error) { - if len(req.Names) == 0 || req.Range.Earliest == 0 || req.Range.Latest == 0 { + if len(req.Names) == 0 || req.Range.EarliestNS == 0 || req.Range.LatestNS == 0 { return nil, errIncompleteRequest } @@ -343,7 +343,7 @@ func (ssa *SQLStorageAuthorityRO) CountCertificatesByNames(ctx context.Context, // Set earliest to the latest possible time, so that we can find the // earliest certificate in the results. - earliest := timestamppb.New(time.Unix(0, req.Range.Latest)) + earliest := timestamppb.New(time.Unix(0, req.Range.LatestNS)) counts := make(map[string]int64) for r := range results { if r.err != nil { @@ -404,8 +404,8 @@ func (ssa *SQLStorageAuthorityRO) GetSerialMetadata(ctx context.Context, req *sa return &sapb.SerialMetadata{ Serial: recordedSerial.Serial, RegistrationID: recordedSerial.RegistrationID, - Created: recordedSerial.Created.UnixNano(), - Expires: recordedSerial.Expires.UnixNano(), + CreatedNS: recordedSerial.Created.UnixNano(), + ExpiresNS: recordedSerial.Expires.UnixNano(), }, nil } @@ -491,7 +491,7 @@ func (ssa *SQLStorageAuthority) GetRevocationStatus(ctx context.Context, req *sa } func (ssa *SQLStorageAuthorityRO) CountOrders(ctx context.Context, req *sapb.CountOrdersRequest) (*sapb.Count, error) { - if req.AccountID == 0 || req.Range.Earliest == 0 || req.Range.Latest == 0 { + if req.AccountID == 0 || req.Range.EarliestNS == 0 || req.Range.LatestNS == 0 { return nil, errIncompleteRequest } @@ -555,7 +555,7 @@ func (ssa *SQLStorageAuthorityRO) FQDNSetTimestampsForWindow(ctx context.Context for _, i := range rows { results = append(results, i.Issued.UnixNano()) } - return &sapb.Timestamps{Timestamps: results}, nil + return &sapb.Timestamps{TimestampsNS: results}, nil } func (ssa *SQLStorageAuthority) FQDNSetTimestampsForWindow(ctx context.Context, req *sapb.CountFQDNSetsRequest) (*sapb.Timestamps, error) { @@ -683,7 +683,7 @@ func (ssa *SQLStorageAuthorityRO) GetOrder(ctx context.Context, req *sapb.OrderR return nil, err } - orderExp := time.Unix(0, order.Expires) + orderExp := time.Unix(0, order.ExpiresNS) if orderExp.Before(ssa.clk.Now()) { return nil, berrors.NotFoundError("no order found for ID %d", req.Id) } @@ -869,7 +869,7 @@ func authzModelMapToPB(m map[string]authzModel) (*sapb.Authorizations, error) { // GetAuthorizations2 returns any valid or pending authorizations that exist for the list of domains // provided. If both a valid and pending authorization exist only the valid one will be returned. func (ssa *SQLStorageAuthorityRO) GetAuthorizations2(ctx context.Context, req *sapb.GetAuthorizationsRequest) (*sapb.Authorizations, error) { - if len(req.Domains) == 0 || req.RegistrationID == 0 || req.Now == 0 { + if len(req.Domains) == 0 || req.RegistrationID == 0 || req.NowNS == 0 { return nil, errIncompleteRequest } var authzModels []authzModel @@ -877,7 +877,7 @@ func (ssa *SQLStorageAuthorityRO) GetAuthorizations2(ctx context.Context, req *s req.RegistrationID, statusUint(core.StatusValid), statusUint(core.StatusPending), - time.Unix(0, req.Now), + time.Unix(0, req.NowNS), identifierTypeToUint[string(identifier.DNS)], } @@ -930,7 +930,7 @@ func (ssa *SQLStorageAuthority) GetAuthorizations2(ctx context.Context, req *sap // the given identifier, if available. This method only supports DNS identifier types. // TODO(#5816): Consider removing this method, as it has no callers. func (ssa *SQLStorageAuthorityRO) GetPendingAuthorization2(ctx context.Context, req *sapb.GetPendingAuthorizationRequest) (*corepb.Authorization, error) { - if req.RegistrationID == 0 || req.IdentifierValue == "" || req.ValidUntil == 0 { + if req.RegistrationID == 0 || req.IdentifierValue == "" || req.ValidUntilNS == 0 { return nil, errIncompleteRequest } var am authzModel @@ -948,7 +948,7 @@ func (ssa *SQLStorageAuthorityRO) GetPendingAuthorization2(ctx context.Context, map[string]interface{}{ "regID": req.RegistrationID, "status": statusUint(core.StatusPending), - "validUntil": time.Unix(0, req.ValidUntil), + "validUntil": time.Unix(0, req.ValidUntilNS), "dnsType": identifierTypeToUint[string(identifier.DNS)], "ident": req.IdentifierValue, }, @@ -1056,7 +1056,7 @@ func (ssa *SQLStorageAuthority) GetValidOrderAuthorizations2(ctx context.Context // CountInvalidAuthorizations2 counts invalid authorizations for a user expiring // in a given time range. This method only supports DNS identifier types. func (ssa *SQLStorageAuthorityRO) CountInvalidAuthorizations2(ctx context.Context, req *sapb.CountInvalidAuthorizationsRequest) (*sapb.Count, error) { - if req.RegistrationID == 0 || req.Hostname == "" || req.Range.Earliest == 0 || req.Range.Latest == 0 { + if req.RegistrationID == 0 || req.Hostname == "" || req.Range.EarliestNS == 0 || req.Range.LatestNS == 0 { return nil, errIncompleteRequest } @@ -1075,8 +1075,8 @@ func (ssa *SQLStorageAuthorityRO) CountInvalidAuthorizations2(ctx context.Contex "regID": req.RegistrationID, "dnsType": identifierTypeToUint[string(identifier.DNS)], "ident": req.Hostname, - "expiresEarliest": time.Unix(0, req.Range.Earliest), - "expiresLatest": time.Unix(0, req.Range.Latest), + "expiresEarliest": time.Unix(0, req.Range.EarliestNS), + "expiresLatest": time.Unix(0, req.Range.LatestNS), "status": statusUint(core.StatusInvalid), }, ) @@ -1094,7 +1094,7 @@ func (ssa *SQLStorageAuthority) CountInvalidAuthorizations2(ctx context.Context, // domain names that the account has authorizations for. This method // only supports DNS identifier types. func (ssa *SQLStorageAuthorityRO) GetValidAuthorizations2(ctx context.Context, req *sapb.GetValidAuthorizationsRequest) (*sapb.Authorizations, error) { - if len(req.Domains) == 0 || req.RegistrationID == 0 || req.Now == 0 { + if len(req.Domains) == 0 || req.RegistrationID == 0 || req.NowNS == 0 { return nil, errIncompleteRequest } @@ -1112,7 +1112,7 @@ func (ssa *SQLStorageAuthorityRO) GetValidAuthorizations2(ctx context.Context, r params := []interface{}{ req.RegistrationID, statusUint(core.StatusValid), - time.Unix(0, req.Now), + time.Unix(0, req.NowNS), identifierTypeToUint[string(identifier.DNS)], } for _, domain := range req.Domains { @@ -1260,7 +1260,7 @@ func (ssa *SQLStorageAuthorityRO) SerialsForIncident(req *sapb.SerialsForInciden ispb.OrderID = *ism.OrderID } if ism.LastNoticeSent != nil { - ispb.LastNoticeSent = ism.LastNoticeSent.UnixNano() + ispb.LastNoticeSentNS = ism.LastNoticeSent.UnixNano() } err = stream.Send(ispb) @@ -1287,7 +1287,7 @@ func (ssa *SQLStorageAuthority) SerialsForIncident(req *sapb.SerialsForIncidentR // notAfter date are included), but the ending timestamp is exclusive (certs // with exactly that notAfter date are *not* included). func (ssa *SQLStorageAuthorityRO) GetRevokedCerts(req *sapb.GetRevokedCertsRequest, stream sapb.StorageAuthorityReadOnly_GetRevokedCertsServer) error { - atTime := time.Unix(0, req.RevokedBefore) + atTime := time.Unix(0, req.RevokedBeforeNS) clauses := ` WHERE notAfter >= ? @@ -1295,8 +1295,8 @@ func (ssa *SQLStorageAuthorityRO) GetRevokedCerts(req *sapb.GetRevokedCertsReque AND issuerID = ? AND status = ?` params := []interface{}{ - time.Unix(0, req.ExpiresAfter), - time.Unix(0, req.ExpiresBefore), + time.Unix(0, req.ExpiresAfterNS), + time.Unix(0, req.ExpiresBeforeNS), req.IssuerNameID, core.OCSPStatusRevoked, } @@ -1333,9 +1333,9 @@ func (ssa *SQLStorageAuthorityRO) GetRevokedCerts(req *sapb.GetRevokedCertsReque } err = stream.Send(&corepb.CRLEntry{ - Serial: row.Serial, - Reason: int32(row.RevokedReason), - RevokedAt: row.RevokedDate.UnixNano(), + Serial: row.Serial, + Reason: int32(row.RevokedReason), + RevokedAtNS: row.RevokedDate.UnixNano(), }) if err != nil { return fmt.Errorf("sending crl entry: %w", err) diff --git a/sa/satest/satest.go b/sa/satest/satest.go index 4fe811a637f..01b28fbce5a 100644 --- a/sa/satest/satest.go +++ b/sa/satest/satest.go @@ -22,10 +22,10 @@ func CreateWorkingRegistration(t *testing.T, sa sapb.StorageAuthorityClient) *co "n": "n4EPtAOCc9AlkeQHPzHStgAbgs7bTZLwUBZdR8_KuKPEHLd4rHVTeT-O-XV2jRojdNhxJWTDvNd7nqQ0VEiZQHz_AJmSCpMaJMRBSFKrKb2wqVwGU_NsYOYL-QtiWN2lbzcEe6XC0dApr5ydQLrHqkHHig3RBordaZ6Aj-oBHqFEHYpPe7Tpe-OfVfHd1E6cS6M1FZcD1NNLYD5lFHpPI9bTwJlsde3uhGqC0ZCuEHg8lhzwOHrtIQbS0FVbb9k3-tVTU4fg_3L_vniUFAKwuCLqKnS2BYwdq_mzSnbLY7h_qixoR7jig3__kRhuaxwUkRz5iaiQkqgc5gHdrNP5zw", "e": "AQAB" }`), - Contact: []string{"mailto:foo@example.com"}, - InitialIP: initialIP, - CreatedAt: time.Date(2003, 5, 10, 0, 0, 0, 0, time.UTC).UnixNano(), - Status: string(core.StatusValid), + Contact: []string{"mailto:foo@example.com"}, + InitialIP: initialIP, + CreatedAtNS: time.Date(2003, 5, 10, 0, 0, 0, 0, time.UTC).UnixNano(), + Status: string(core.StatusValid), }) if err != nil { t.Fatalf("Unable to create new registration: %s", err) diff --git a/wfe2/stale.go b/wfe2/stale.go index 4e58b06d0b6..b9f91ac686d 100644 --- a/wfe2/stale.go +++ b/wfe2/stale.go @@ -24,13 +24,13 @@ func requiredStale(req *http.Request, logEvent *web.RequestEvent) bool { // in the past to be acceptably stale for accessing via the Boulder specific GET // API. func (wfe *WebFrontEndImpl) staleEnoughToGETOrder(order *corepb.Order) *probs.ProblemDetails { - return wfe.staleEnoughToGET("Order", time.Unix(0, order.Created)) + return wfe.staleEnoughToGET("Order", time.Unix(0, order.CreatedNS)) } // staleEnoughToGETCert checks if the given cert was issued long enough in the // past to be acceptably stale for accessing via the Boulder specific GET API. func (wfe *WebFrontEndImpl) staleEnoughToGETCert(cert *corepb.Certificate) *probs.ProblemDetails { - return wfe.staleEnoughToGET("Certificate", time.Unix(0, cert.Issued)) + return wfe.staleEnoughToGET("Certificate", time.Unix(0, cert.IssuedNS)) } // staleEnoughToGETAuthz checks if the given authorization was created long @@ -50,11 +50,11 @@ func (wfe *WebFrontEndImpl) staleEnoughToGETAuthz(authzPB *corepb.Authorization) // pendingAuthorization lifetime from the expiry. This will be inaccurate if // we change the pendingAuthorizationLifetime but is sufficient for the weak // staleness requirements of the GET API. - createdTime := time.Unix(0, authzPB.Expires).Add(-wfe.pendingAuthorizationLifetime) + createdTime := time.Unix(0, authzPB.ExpiresNS).Add(-wfe.pendingAuthorizationLifetime) // if the authz is valid then we need to subtract the authorizationLifetime // instead of the pendingAuthorizationLifetime. if core.AcmeStatus(authzPB.Status) == core.StatusValid { - createdTime = time.Unix(0, authzPB.Expires).Add(-wfe.authorizationLifetime) + createdTime = time.Unix(0, authzPB.ExpiresNS).Add(-wfe.authorizationLifetime) } return wfe.staleEnoughToGET("Authorization", createdTime) } diff --git a/wfe2/stale_test.go b/wfe2/stale_test.go index 22abc03e8da..6ea5d27b3ef 100644 --- a/wfe2/stale_test.go +++ b/wfe2/stale_test.go @@ -53,7 +53,7 @@ func TestSaleEnoughToGETOrder(t *testing.T) { created := fc.Now().UnixNano() fc.Add(time.Hour) prob := wfe.staleEnoughToGETOrder(&corepb.Order{ - Created: created, + CreatedNS: created, }) test.Assert(t, prob == nil, "wfe.staleEnoughToGETOrder returned a non-nil problem") } @@ -70,8 +70,8 @@ func TestStaleEnoughToGETAuthzDeactivated(t *testing.T) { expires := fc.Now().Add(wfe.authorizationLifetime).UnixNano() fc.Add(time.Hour) prob := wfe.staleEnoughToGETAuthz(&corepb.Authorization{ - Status: string(core.StatusDeactivated), - Expires: expires, + Status: string(core.StatusDeactivated), + ExpiresNS: expires, }) test.Assert(t, prob == nil, "wfe.staleEnoughToGETOrder returned a non-nil problem") } diff --git a/wfe2/wfe.go b/wfe2/wfe.go index 91e49449676..2847adee596 100644 --- a/wfe2/wfe.go +++ b/wfe2/wfe.go @@ -1034,7 +1034,7 @@ func (wfe *WebFrontEndImpl) Challenge( } // Ensure gRPC response is complete. - if authzPB.Id == "" || authzPB.Identifier == "" || authzPB.Status == "" || authzPB.Expires == 0 { + if authzPB.Id == "" || authzPB.Identifier == "" || authzPB.Status == "" || authzPB.ExpiresNS == 0 { wfe.sendError(response, logEvent, probs.ServerInternal("Problem getting authorization"), errIncompleteGRPCResponse) return } @@ -1232,7 +1232,7 @@ func (wfe *WebFrontEndImpl) postChallenge( Authz: authzPB, ChallengeIndex: int64(challengeIndex), }) - if err != nil || authzPB == nil || authzPB.Id == "" || authzPB.Identifier == "" || authzPB.Status == "" || authzPB.Expires == 0 { + if err != nil || authzPB == nil || authzPB.Id == "" || authzPB.Identifier == "" || authzPB.Status == "" || authzPB.ExpiresNS == 0 { wfe.sendError(response, logEvent, web.ProblemDetailsForError(err, "Unable to update challenge"), err) return } @@ -1476,7 +1476,7 @@ func (wfe *WebFrontEndImpl) Authorization( } // Ensure gRPC response is complete. - if authzPB.Id == "" || authzPB.Identifier == "" || authzPB.Status == "" || authzPB.Expires == 0 { + if authzPB.Id == "" || authzPB.Identifier == "" || authzPB.Status == "" || authzPB.ExpiresNS == 0 { wfe.sendError(response, logEvent, probs.ServerInternal("Problem getting authorization"), errIncompleteGRPCResponse) return } @@ -1487,7 +1487,7 @@ func (wfe *WebFrontEndImpl) Authorization( logEvent.Status = authzPB.Status // After expiring, authorizations are inaccessible - if time.Unix(0, authzPB.Expires).Before(wfe.clk.Now()) { + if time.Unix(0, authzPB.ExpiresNS).Before(wfe.clk.Now()) { wfe.sendError(response, logEvent, probs.NotFound("Expired authorization"), nil) return } @@ -1910,7 +1910,7 @@ func (wfe *WebFrontEndImpl) orderToOrderJSON(request *http.Request, order *corep fmt.Sprintf("%s%d/%d", finalizeOrderPath, order.RegistrationID, order.Id)) respObj := orderJSON{ Status: core.AcmeStatus(order.Status), - Expires: time.Unix(0, order.Expires).UTC(), + Expires: time.Unix(0, order.ExpiresNS).UTC(), Identifiers: idents, Finalize: finalizeURL, } @@ -2013,7 +2013,7 @@ func (wfe *WebFrontEndImpl) NewOrder( RegistrationID: acct.ID, Names: names, }) - if err != nil || order == nil || order.Id == 0 || order.Created == 0 || order.RegistrationID == 0 || order.Expires == 0 || len(order.Names) == 0 { + if err != nil || order == nil || order.Id == 0 || order.CreatedNS == 0 || order.RegistrationID == 0 || order.ExpiresNS == 0 || len(order.Names) == 0 { wfe.sendError(response, logEvent, web.ProblemDetailsForError(err, "Error creating new order"), err) return } @@ -2073,7 +2073,7 @@ func (wfe *WebFrontEndImpl) GetOrder(ctx context.Context, logEvent *web.RequestE return } - if order.Id == 0 || order.Created == 0 || order.Status == "" || order.RegistrationID == 0 || order.Expires == 0 || len(order.Names) == 0 { + if order.Id == 0 || order.CreatedNS == 0 || order.Status == "" || order.RegistrationID == 0 || order.ExpiresNS == 0 || len(order.Names) == 0 { wfe.sendError(response, logEvent, probs.ServerInternal(fmt.Sprintf("Failed to retrieve order for ID %d", orderID)), errIncompleteGRPCResponse) return } @@ -2153,7 +2153,7 @@ func (wfe *WebFrontEndImpl) FinalizeOrder(ctx context.Context, logEvent *web.Req return } - if order.Id == 0 || order.Created == 0 || order.Status == "" || order.RegistrationID == 0 || order.Expires == 0 || len(order.Names) == 0 { + if order.Id == 0 || order.CreatedNS == 0 || order.Status == "" || order.RegistrationID == 0 || order.ExpiresNS == 0 || len(order.Names) == 0 { wfe.sendError(response, logEvent, probs.ServerInternal(fmt.Sprintf("Failed to retrieve order for ID %d", orderID)), errIncompleteGRPCResponse) return } @@ -2181,7 +2181,7 @@ func (wfe *WebFrontEndImpl) FinalizeOrder(ctx context.Context, logEvent *web.Req } // If the order is expired we can not finalize it and must return an error - orderExpiry := time.Unix(order.Expires, 0) + orderExpiry := time.Unix(order.ExpiresNS, 0) if orderExpiry.Before(wfe.clk.Now()) { wfe.sendError(response, logEvent, probs.NotFound(fmt.Sprintf("Order %d is expired", order.Id)), nil) return @@ -2214,7 +2214,7 @@ func (wfe *WebFrontEndImpl) FinalizeOrder(ctx context.Context, logEvent *web.Req wfe.sendError(response, logEvent, web.ProblemDetailsForError(err, "Error finalizing order"), err) return } - if updatedOrder == nil || order.Id == 0 || order.Created == 0 || order.RegistrationID == 0 || order.Expires == 0 || len(order.Names) == 0 { + if updatedOrder == nil || order.Id == 0 || order.CreatedNS == 0 || order.RegistrationID == 0 || order.ExpiresNS == 0 || len(order.Names) == 0 { wfe.sendError(response, logEvent, web.ProblemDetailsForError(err, "Error validating order"), errIncompleteGRPCResponse) return } @@ -2347,8 +2347,8 @@ func (wfe *WebFrontEndImpl) RenewalInfo(ctx context.Context, logEvent *web.Reque // comparing those to the ones in the request. sendRI(core.RenewalInfoSimple( - time.Unix(0, cert.Issued).UTC(), - time.Unix(0, cert.Expires).UTC())) + time.Unix(0, cert.IssuedNS).UTC(), + time.Unix(0, cert.ExpiresNS).UTC())) } // UpdateRenewal is used by the client to inform the server that they have diff --git a/wfe2/wfe_test.go b/wfe2/wfe_test.go index ee2fac550ae..121de90a8fb 100644 --- a/wfe2/wfe_test.go +++ b/wfe2/wfe_test.go @@ -186,7 +186,7 @@ type MockRegistrationAuthority struct { func (ra *MockRegistrationAuthority) NewRegistration(ctx context.Context, in *corepb.Registration, _ ...grpc.CallOption) (*corepb.Registration, error) { in.Id = 1 - in.CreatedAt = time.Date(2021, 1, 1, 0, 0, 0, 0, time.UTC).UnixNano() + in.CreatedAtNS = time.Date(2021, 1, 1, 0, 0, 0, 0, time.UTC).UnixNano() return in, nil } @@ -235,8 +235,8 @@ func (ra *MockRegistrationAuthority) NewOrder(ctx context.Context, in *rapb.NewO return &corepb.Order{ Id: 1, RegistrationID: in.RegistrationID, - Created: time.Date(2021, 1, 1, 1, 1, 1, 0, time.UTC).UnixNano(), - Expires: time.Date(2021, 2, 1, 1, 1, 1, 0, time.UTC).UnixNano(), + CreatedNS: time.Date(2021, 1, 1, 1, 1, 1, 0, time.UTC).UnixNano(), + ExpiresNS: time.Date(2021, 2, 1, 1, 1, 1, 0, time.UTC).UnixNano(), Names: in.Names, Status: string(core.StatusPending), V2Authorizations: []int64{1}, @@ -1805,8 +1805,8 @@ func (sa *mockSAWithCert) GetCertificate(_ context.Context, req *sapb.Serial, _ return &corepb.Certificate{ RegistrationID: 1, Serial: core.SerialToString(sa.cert.SerialNumber), - Issued: sa.cert.NotBefore.UnixNano(), - Expires: sa.cert.NotAfter.UnixNano(), + IssuedNS: sa.cert.NotBefore.UnixNano(), + ExpiresNS: sa.cert.NotAfter.UnixNano(), Der: sa.cert.Raw, }, nil } @@ -1840,7 +1840,7 @@ func newMockSAWithIncident(sa sapb.StorageAuthorityReadOnlyClient, serial []stri Id: 0, SerialTable: "incident_foo", Url: agreementURL, - RenewBy: 0, + RenewByNS: 0, Enabled: true, }, }, @@ -2103,7 +2103,7 @@ func (sa *mockSAWithNewCert) GetCertificate(_ context.Context, req *sapb.Serial, return &corepb.Certificate{ RegistrationID: 1, Serial: core.SerialToString(cert.SerialNumber), - Issued: sa.clk.Now().Add(-1 * time.Second).UnixNano(), + IssuedNS: sa.clk.Now().Add(-1 * time.Second).UnixNano(), Der: cert.Raw, }, nil } @@ -3341,7 +3341,7 @@ func TestOrderToOrderJSONV2Authorizations(t *testing.T) { RegistrationID: 1, Names: []string{"a"}, Status: string(core.StatusPending), - Expires: fc.Now().UnixNano(), + ExpiresNS: fc.Now().UnixNano(), V2Authorizations: []int64{1, 2}, }) test.AssertDeepEquals(t, orderJSON.Authorizations, []string{