Skip to content
Snippets Groups Projects
Commit 45caf28d authored by Malte Bauch's avatar Malte Bauch
Browse files

Identifier for peer map changed to peer kms id

See merge request !55
parent d0fdb7c9
Branches
No related tags found
1 merge request!55Identifier for peer map changed to peer kms id
Pipeline #186122 passed
Showing
with 286 additions and 268 deletions
Id: '0ff33c82-7fe1-482b-a0ca-67565806ee4b' Id: "0ff33c82-7fe1-482b-a0ca-67565806ee4b"
Name: ekms01 Name: ekms01
InterComAddr: 172.100.20.10:50910 InterComAddr: 172.100.20.10:50910
GRPCAddr: 172.100.20.10:50900 GRPCAddr: 172.100.20.10:50900
AkmsURL: "http://172.100.20.22:4444/api/v1/keys/push_ksa_key" AkmsURL: "http://172.100.20.22:4444/api/v1/keys/push_ksa_key"
AkmsCkmsServerPort: "9696" AkmsCkmsServerPort: "9696"
Peers: Peers:
# peer to ekms02 # peer to ekms02
- PeerId: '5e41c291-6121-4335-84f6-41e04b8bdaa2' - PeerId: "5e41c291-6121-4335-84f6-41e04b8bdaa2"
PeerInterComAddr: 172.100.20.11:50910 PeerInterComAddr: 172.100.20.11:50910
Sync: true Sync: true
# quantum module of type emulated at the given address Type: danet
QuantumModule: # quantum module of type emulated at the given address
Type: emulated QuantumModule:
Address: 172.100.20.14 Type: emulated
# peer to ekms03 Address: 172.100.20.14
- PeerId: 'f80db2c0-2480-46b9-b7d1-b63f954e8227' # peer to ekms03
PeerInterComAddr: 172.100.20.12:50910 - PeerId: "f80db2c0-2480-46b9-b7d1-b63f954e8227"
Sync: false PeerInterComAddr: 172.100.20.12:50910
# quantum module of type emulated at the given address Sync: false
QuantumModule: Type: danet
Type: emulated # quantum module of type emulated at the given address
Address: 172.100.20.18 QuantumModule:
Type: emulated
Address: 172.100.20.18
Id: '5e41c291-6121-4335-84f6-41e04b8bdaa2' Id: "5e41c291-6121-4335-84f6-41e04b8bdaa2"
Name: ekms02 Name: ekms02
InterComAddr: 172.100.20.11:50910 InterComAddr: 172.100.20.11:50910
GRPCAddr: 172.100.20.11:50900 GRPCAddr: 172.100.20.11:50900
Peers: Peers:
# peer to ekms01 # peer to ekms01
- PeerId: '0ff33c82-7fe1-482b-a0ca-67565806ee4b' - PeerId: "0ff33c82-7fe1-482b-a0ca-67565806ee4b"
PeerInterComAddr: 172.100.20.10:50910 PeerInterComAddr: 172.100.20.10:50910
Sync: false Sync: false
# quantum module of type emulated at the given address Type: danet
QuantumModule: # quantum module of type emulated at the given address
Type: emulated QuantumModule:
Address: 172.100.20.15 Type: emulated
# peer to ekms04 Address: 172.100.20.15
- PeerId: '968fd594-b0e7-41f0-ba4b-de259047a933' # peer to ekms04
PeerInterComAddr: 172.100.20.13:50910 - PeerId: "968fd594-b0e7-41f0-ba4b-de259047a933"
Sync: true PeerInterComAddr: 172.100.20.13:50910
# quantum module of type emulated at the given address Sync: true
QuantumModule: Type: danet
Type: emulated # quantum module of type emulated at the given address
Address: 172.100.20.16 QuantumModule:
Type: emulated
Address: 172.100.20.16
Id: 'f80db2c0-2480-46b9-b7d1-b63f954e8227' Id: "f80db2c0-2480-46b9-b7d1-b63f954e8227"
Name: ekms03 Name: ekms03
InterComAddr: 172.100.20.12:50910 InterComAddr: 172.100.20.12:50910
GRPCAddr: 172.100.20.12:50900 GRPCAddr: 172.100.20.12:50900
Peers: Peers:
# peer to ekms01 # peer to ekms01
- PeerId: '0ff33c82-7fe1-482b-a0ca-67565806ee4b' - PeerId: "0ff33c82-7fe1-482b-a0ca-67565806ee4b"
PeerInterComAddr: 172.100.20.10:50910 PeerInterComAddr: 172.100.20.10:50910
Sync: true Sync: true
# quantum module of type emulated at the given address Type: danet
QuantumModule: # quantum module of type emulated at the given address
Type: emulated QuantumModule:
Address: 172.100.20.19 Type: emulated
# peer to ekms04 Address: 172.100.20.19
- PeerId: '968fd594-b0e7-41f0-ba4b-de259047a933' # peer to ekms04
PeerInterComAddr: 172.100.20.13:50910 - PeerId: "968fd594-b0e7-41f0-ba4b-de259047a933"
Sync: true PeerInterComAddr: 172.100.20.13:50910
# quantum module of type emulated at the given address Sync: true
QuantumModule: Type: danet
Type: emulated # quantum module of type emulated at the given address
Address: 172.100.20.20 QuantumModule:
Type: emulated
Address: 172.100.20.20
Id: '968fd594-b0e7-41f0-ba4b-de259047a933' Id: "968fd594-b0e7-41f0-ba4b-de259047a933"
Name: ekms04 Name: ekms04
InterComAddr: 172.100.20.13:50910 InterComAddr: 172.100.20.13:50910
GRPCAddr: 172.100.20.13:50900 GRPCAddr: 172.100.20.13:50900
AkmsURL: "http://172.100.20.23:4444/api/v1/keys/push_ksa_key" AkmsURL: "http://172.100.20.23:4444/api/v1/keys/push_ksa_key"
AkmsCkmsServerPort: "9696" AkmsCkmsServerPort: "9696"
Peers: Peers:
# peer to ekms02 # peer to ekms02
- PeerId: '5e41c291-6121-4335-84f6-41e04b8bdaa2' - PeerId: "5e41c291-6121-4335-84f6-41e04b8bdaa2"
PeerInterComAddr: 172.100.20.11:50910 PeerInterComAddr: 172.100.20.11:50910
Sync: false Sync: false
# quantum module of type emulated at the given address Type: danet
QuantumModule: # quantum module of type emulated at the given address
Type: emulated QuantumModule:
Address: 172.100.20.17 Type: emulated
# peer to ekms03 Address: 172.100.20.17
- PeerId: 'f80db2c0-2480-46b9-b7d1-b63f954e8227' # peer to ekms03
PeerInterComAddr: 172.100.20.12:50910 - PeerId: "f80db2c0-2480-46b9-b7d1-b63f954e8227"
Sync: false PeerInterComAddr: 172.100.20.12:50910
# quantum module of type emulated at the given address Sync: false
QuantumModule: Type: danet
Type: emulated # quantum module of type emulated at the given address
Address: 172.100.20.21 QuantumModule:
Type: emulated
Address: 172.100.20.21
...@@ -6,19 +6,15 @@ import ( ...@@ -6,19 +6,15 @@ import (
"github.com/sirupsen/logrus" "github.com/sirupsen/logrus"
log "github.com/sirupsen/logrus" log "github.com/sirupsen/logrus"
"google.golang.org/grpc"
"google.golang.org/grpc/credentials/insecure"
"code.fbi.h-da.de/danet/quant/ekms/internal/akmsCkmsServer" "code.fbi.h-da.de/danet/quant/ekms/internal/akmsCkmsServer"
pbIC "code.fbi.h-da.de/danet/quant/ekms/internal/api/gen/proto/go/kmsintercom"
"code.fbi.h-da.de/danet/quant/ekms/internal/kms" "code.fbi.h-da.de/danet/quant/ekms/internal/kms"
"github.com/google/uuid" "github.com/google/uuid"
) )
type QuantumModuleType int
const (
EmulatedQuantumModule QuantumModuleType = iota
ETSIQuantumModule
)
// Example of a valid config.yaml // Example of a valid config.yaml
// //
// Name: kms02 // Name: kms02
...@@ -29,6 +25,7 @@ const ( ...@@ -29,6 +25,7 @@ const (
// Peers: // Peers:
// - PeerInterComAddr: 172.20.10.14:50910 // - PeerInterComAddr: 172.20.10.14:50910
// Sync: false // Sync: false
// Type: danet
// QuantumModule: // QuantumModule:
// UDPAddr: 172.20.10.15:50915 // UDPAddr: 172.20.10.15:50915
// PeerUDPAddr: 172.20.10.14:50915 // PeerUDPAddr: 172.20.10.14:50915
...@@ -57,6 +54,7 @@ type Config struct { ...@@ -57,6 +54,7 @@ type Config struct {
PeerId string `yaml:"PeerId"` PeerId string `yaml:"PeerId"`
PeerInterComAddr string `yaml:"PeerInterComAddr"` PeerInterComAddr string `yaml:"PeerInterComAddr"`
Sync bool `yaml:"Sync"` Sync bool `yaml:"Sync"`
Type string `yaml:"Type"`
QuantumModule QuantumModule `yaml:"QuantumModule"` QuantumModule QuantumModule `yaml:"QuantumModule"`
} `yaml:"Peers"` } `yaml:"Peers"`
} }
...@@ -139,9 +137,9 @@ func emulatedKMS(config *Config, id uuid.UUID, peerChannel chan string) *kms.EKM ...@@ -139,9 +137,9 @@ func emulatedKMS(config *Config, id uuid.UUID, peerChannel chan string) *kms.EKM
pqm := peer.QuantumModule pqm := peer.QuantumModule
switch qmt := peer.QuantumModule.QmType; qmt { switch qmt := peer.QuantumModule.QmType; qmt {
case "emulated": case "emulated":
qm = kms.NewEmulatedQuantumModule(pqm.Address) qm = kms.NewEmulatedQuantumModule(pqm.Address, config.Id)
case "etsi": case "etsi":
qm, err = kms.NewETSI014HTTPQuantumModule(pqm.Address, pqm.SlaveSAEID, pqm.MasterSAEID, pqm.MasterMode) qm, err = kms.NewETSI014HTTPQuantumModule(pqm.Address, config.Id, pqm.SlaveSAEID, pqm.MasterSAEID, pqm.MasterMode)
if err != nil { if err != nil {
log.Fatalf("Failed to create ETSI QKD module: %s", err) log.Fatalf("Failed to create ETSI QKD module: %s", err)
return nil return nil
...@@ -157,12 +155,25 @@ func emulatedKMS(config *Config, id uuid.UUID, peerChannel chan string) *kms.EKM ...@@ -157,12 +155,25 @@ func emulatedKMS(config *Config, id uuid.UUID, peerChannel chan string) *kms.EKM
return nil return nil
} }
p, err := emuKMS.AddPeer(peer.PeerId, peer.PeerInterComAddr, qm) newPeerConn, err := grpc.Dial(peer.PeerInterComAddr, grpc.WithTransportCredentials(insecure.NewCredentials()))
if err != nil {
return nil
}
client := &kms.GRPCClient{}
switch pt := peer.Type; pt {
case "danet":
client.KmsTalkerClient = pbIC.NewKmsTalkerClient(newPeerConn)
}
p, err := emuKMS.AddPeer(peer.PeerId, peer.PeerInterComAddr, qm, client)
if err != nil { if err != nil {
log.Fatalf("Failed to create a peer: %s", err) log.Fatalf("Failed to create a peer: %s", err)
return nil return nil
} }
// TODO: check again; we might want to use this based on the quantum
// module in use.
if peer.Sync { if peer.Sync {
go func() { go func() {
time.Sleep(time.Second * 32) time.Sleep(time.Second * 32)
......
...@@ -48,18 +48,19 @@ func (yh *AssignForwardingHandler) Update(c ygot.ValidatedGoStruct, jobs []*gnmi ...@@ -48,18 +48,19 @@ func (yh *AssignForwardingHandler) Update(c ygot.ValidatedGoStruct, jobs []*gnmi
forwarding := config.GetOrCreateAssignForwarding() forwarding := config.GetOrCreateAssignForwarding()
nextHop := forwarding.GetOrCreateNextHop() pathId := forwarding.GetPathId()
prevHop := forwarding.GetOrCreatePrevHop() nextHop := forwarding.GetNextHop()
prevHop := forwarding.GetPrevHop()
var nextHopString string var nextHopString string
var prevHopString string var prevHopString string
var initiatingKmsAddressString string var initiatingKmsAddressString string
if nextHop.IpAddress != nil { if nextHop != nil {
nextHopString = fmt.Sprintf("%s:%d", nextHop.GetIpAddress(), nextHop.GetPort()) nextHopString = nextHop.GetNodeId()
} }
if prevHop.IpAddress != nil { if prevHop != nil {
prevHopString = fmt.Sprintf("%s:%d", prevHop.GetIpAddress(), prevHop.GetPort()) prevHopString = prevHop.GetNodeId()
} }
// check if initiating kms address is set // check if initiating kms address is set
...@@ -67,7 +68,7 @@ func (yh *AssignForwardingHandler) Update(c ygot.ValidatedGoStruct, jobs []*gnmi ...@@ -67,7 +68,7 @@ func (yh *AssignForwardingHandler) Update(c ygot.ValidatedGoStruct, jobs []*gnmi
initiatingKmsAddressString = fmt.Sprintf("%s:%d", initiatingKmsAddress.GetInitiatingKmsIp(), initiatingKmsAddress.GetInitiatingKmsPort()) initiatingKmsAddressString = fmt.Sprintf("%s:%d", initiatingKmsAddress.GetInitiatingKmsIp(), initiatingKmsAddress.GetInitiatingKmsPort())
} }
if err := yh.ekmsClient.Ekms().AssignForwardingRoute(forwarding.GetPathId(), prevHopString, nextHopString, initiatingKmsAddressString); err != nil { if err := yh.ekmsClient.Ekms().AssignForwardingRoute(pathId, prevHopString, nextHopString, initiatingKmsAddressString); err != nil {
return err return err
} }
......
...@@ -91,10 +91,10 @@ func (yh *KeyRoutingSessionHandler) Update(c ygot.ValidatedGoStruct, jobs []*gnm ...@@ -91,10 +91,10 @@ func (yh *KeyRoutingSessionHandler) Update(c ygot.ValidatedGoStruct, jobs []*gnm
var prevHopString string var prevHopString string
var initiatingKmsAddressString string var initiatingKmsAddressString string
if nextHop != nil { if nextHop != nil {
nextHopString = fmt.Sprintf("%s:%d", nextHop.GetIpAddress(), nextHop.GetPort()) nextHopString = nextHop.GetNodeId()
} }
if prevHop != nil { if prevHop != nil {
prevHopString = fmt.Sprintf("%s:%d", prevHop.GetIpAddress(), prevHop.GetPort()) prevHopString = prevHop.GetNodeId()
} }
// check if initiating kms address is set // check if initiating kms address is set
......
// Code generated by protoc-gen-go. DO NOT EDIT. // Code generated by protoc-gen-go. DO NOT EDIT.
// versions: // versions:
// protoc-gen-go v1.32.0 // protoc-gen-go v1.33.0
// protoc (unknown) // protoc (unknown)
// source: kmsetsi/kmsetsiproto.proto // source: kmsetsi/kmsetsiproto.proto
......
// Code generated by protoc-gen-go. DO NOT EDIT. // Code generated by protoc-gen-go. DO NOT EDIT.
// versions: // versions:
// protoc-gen-go v1.32.0 // protoc-gen-go v1.33.0
// protoc (unknown) // protoc (unknown)
// source: kmsintercom/kmsintercom.proto // source: kmsintercom/kmsintercom.proto
...@@ -138,9 +138,9 @@ type SyncQkdBulkRequest struct { ...@@ -138,9 +138,9 @@ type SyncQkdBulkRequest struct {
sizeCache protoimpl.SizeCache sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields unknownFields protoimpl.UnknownFields
Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
InterComAddr string `protobuf:"bytes,2,opt,name=interComAddr,proto3" json:"interComAddr,omitempty"` KmsId string `protobuf:"bytes,2,opt,name=kmsId,proto3" json:"kmsId,omitempty"`
BulkId []int64 `protobuf:"varint,3,rep,packed,name=bulkId,proto3" json:"bulkId,omitempty"` //string bulkHash = 4; BulkId []int64 `protobuf:"varint,3,rep,packed,name=bulkId,proto3" json:"bulkId,omitempty"` //string bulkHash = 4;
} }
func (x *SyncQkdBulkRequest) Reset() { func (x *SyncQkdBulkRequest) Reset() {
...@@ -182,9 +182,9 @@ func (x *SyncQkdBulkRequest) GetTimestamp() int64 { ...@@ -182,9 +182,9 @@ func (x *SyncQkdBulkRequest) GetTimestamp() int64 {
return 0 return 0
} }
func (x *SyncQkdBulkRequest) GetInterComAddr() string { func (x *SyncQkdBulkRequest) GetKmsId() string {
if x != nil { if x != nil {
return x.InterComAddr return x.KmsId
} }
return "" return ""
} }
...@@ -201,10 +201,10 @@ type SyncKeyIdsForBulkRequest struct { ...@@ -201,10 +201,10 @@ type SyncKeyIdsForBulkRequest struct {
sizeCache protoimpl.SizeCache sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields unknownFields protoimpl.UnknownFields
Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
InterComAddr string `protobuf:"bytes,2,opt,name=interComAddr,proto3" json:"interComAddr,omitempty"` KmsId string `protobuf:"bytes,2,opt,name=kmsId,proto3" json:"kmsId,omitempty"`
BulkId int64 `protobuf:"varint,3,opt,name=bulkId,proto3" json:"bulkId,omitempty"` BulkId int64 `protobuf:"varint,3,opt,name=bulkId,proto3" json:"bulkId,omitempty"`
KeyId []string `protobuf:"bytes,4,rep,name=keyId,proto3" json:"keyId,omitempty"` KeyId []string `protobuf:"bytes,4,rep,name=keyId,proto3" json:"keyId,omitempty"`
} }
func (x *SyncKeyIdsForBulkRequest) Reset() { func (x *SyncKeyIdsForBulkRequest) Reset() {
...@@ -246,9 +246,9 @@ func (x *SyncKeyIdsForBulkRequest) GetTimestamp() int64 { ...@@ -246,9 +246,9 @@ func (x *SyncKeyIdsForBulkRequest) GetTimestamp() int64 {
return 0 return 0
} }
func (x *SyncKeyIdsForBulkRequest) GetInterComAddr() string { func (x *SyncKeyIdsForBulkRequest) GetKmsId() string {
if x != nil { if x != nil {
return x.InterComAddr return x.KmsId
} }
return "" return ""
} }
...@@ -595,9 +595,9 @@ type KeyIdNotificationRequest struct { ...@@ -595,9 +595,9 @@ type KeyIdNotificationRequest struct {
sizeCache protoimpl.SizeCache sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields unknownFields protoimpl.UnknownFields
Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
InterComAddr string `protobuf:"bytes,2,opt,name=interComAddr,proto3" json:"interComAddr,omitempty"` KmsId string `protobuf:"bytes,2,opt,name=kmsId,proto3" json:"kmsId,omitempty"`
KeyIds []string `protobuf:"bytes,3,rep,name=keyIds,proto3" json:"keyIds,omitempty"` KeyIds []string `protobuf:"bytes,3,rep,name=keyIds,proto3" json:"keyIds,omitempty"`
} }
func (x *KeyIdNotificationRequest) Reset() { func (x *KeyIdNotificationRequest) Reset() {
...@@ -639,9 +639,9 @@ func (x *KeyIdNotificationRequest) GetTimestamp() int64 { ...@@ -639,9 +639,9 @@ func (x *KeyIdNotificationRequest) GetTimestamp() int64 {
return 0 return 0
} }
func (x *KeyIdNotificationRequest) GetInterComAddr() string { func (x *KeyIdNotificationRequest) GetKmsId() string {
if x != nil { if x != nil {
return x.InterComAddr return x.KmsId
} }
return "" return ""
} }
...@@ -890,137 +890,134 @@ var file_kmsintercom_kmsintercom_proto_rawDesc = []byte{ ...@@ -890,137 +890,134 @@ var file_kmsintercom_kmsintercom_proto_rawDesc = []byte{
0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61,
0x6d, 0x70, 0x12, 0x20, 0x0a, 0x0b, 0x70, 0x65, 0x65, 0x72, 0x4b, 0x6d, 0x73, 0x4e, 0x61, 0x6d, 0x6d, 0x70, 0x12, 0x20, 0x0a, 0x0b, 0x70, 0x65, 0x65, 0x72, 0x4b, 0x6d, 0x73, 0x4e, 0x61, 0x6d,
0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x65, 0x65, 0x72, 0x4b, 0x6d, 0x73, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x65, 0x65, 0x72, 0x4b, 0x6d, 0x73,
0x4e, 0x61, 0x6d, 0x65, 0x22, 0x6e, 0x0a, 0x12, 0x53, 0x79, 0x6e, 0x63, 0x51, 0x6b, 0x64, 0x42, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x60, 0x0a, 0x12, 0x53, 0x79, 0x6e, 0x63, 0x51, 0x6b, 0x64, 0x42,
0x75, 0x6c, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x75, 0x6c, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69,
0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74,
0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x22, 0x0a, 0x0c, 0x69, 0x6e, 0x74, 0x65, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x14, 0x0a, 0x05, 0x6b, 0x6d, 0x73, 0x49,
0x72, 0x43, 0x6f, 0x6d, 0x41, 0x64, 0x64, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6b, 0x6d, 0x73, 0x49, 0x64, 0x12, 0x16,
0x69, 0x6e, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6d, 0x41, 0x64, 0x64, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x0a, 0x06, 0x62, 0x75, 0x6c, 0x6b, 0x49, 0x64, 0x18, 0x03, 0x20, 0x03, 0x28, 0x03, 0x52, 0x06,
0x62, 0x75, 0x6c, 0x6b, 0x49, 0x64, 0x18, 0x03, 0x20, 0x03, 0x28, 0x03, 0x52, 0x06, 0x62, 0x75, 0x62, 0x75, 0x6c, 0x6b, 0x49, 0x64, 0x22, 0x7c, 0x0a, 0x18, 0x53, 0x79, 0x6e, 0x63, 0x4b, 0x65,
0x6c, 0x6b, 0x49, 0x64, 0x22, 0x8a, 0x01, 0x0a, 0x18, 0x53, 0x79, 0x6e, 0x63, 0x4b, 0x65, 0x79, 0x79, 0x49, 0x64, 0x73, 0x46, 0x6f, 0x72, 0x42, 0x75, 0x6c, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65,
0x49, 0x64, 0x73, 0x46, 0x6f, 0x72, 0x42, 0x75, 0x6c, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18,
0x74, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x01, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70,
0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x12, 0x14, 0x0a, 0x05, 0x6b, 0x6d, 0x73, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
0x22, 0x0a, 0x0c, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6d, 0x41, 0x64, 0x64, 0x72, 0x18, 0x05, 0x6b, 0x6d, 0x73, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x62, 0x75, 0x6c, 0x6b, 0x49, 0x64,
0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6d, 0x41, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x62, 0x75, 0x6c, 0x6b, 0x49, 0x64, 0x12, 0x14,
0x64, 0x64, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x62, 0x75, 0x6c, 0x6b, 0x49, 0x64, 0x18, 0x03, 0x20, 0x0a, 0x05, 0x6b, 0x65, 0x79, 0x49, 0x64, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x6b,
0x01, 0x28, 0x03, 0x52, 0x06, 0x62, 0x75, 0x6c, 0x6b, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x6b, 0x65, 0x79, 0x49, 0x64, 0x22, 0x39, 0x0a, 0x19, 0x53, 0x79, 0x6e, 0x63, 0x4b, 0x65, 0x79, 0x49,
0x65, 0x79, 0x49, 0x64, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x6b, 0x65, 0x79, 0x49, 0x64, 0x73, 0x46, 0x6f, 0x72, 0x42, 0x75, 0x6c, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
0x64, 0x22, 0x39, 0x0a, 0x19, 0x53, 0x79, 0x6e, 0x63, 0x4b, 0x65, 0x79, 0x49, 0x64, 0x73, 0x46, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x01,
0x6f, 0x72, 0x42, 0x75, 0x6c, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1c, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22,
0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x4b, 0x0a, 0x13, 0x53, 0x79, 0x6e, 0x63, 0x51, 0x6b, 0x64, 0x42, 0x75, 0x6c, 0x6b, 0x52, 0x65,
0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, 0x4b, 0x0a, 0x13, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74,
0x53, 0x79, 0x6e, 0x63, 0x51, 0x6b, 0x64, 0x42, 0x75, 0x6c, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x61, 0x6d, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73,
0x6e, 0x73, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x62, 0x75, 0x6c, 0x6b, 0x49, 0x64, 0x18, 0x02,
0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x62, 0x75, 0x6c, 0x6b, 0x49, 0x64, 0x22, 0x7a, 0x0a, 0x26,
0x70, 0x12, 0x16, 0x0a, 0x06, 0x62, 0x75, 0x6c, 0x6b, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6d, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72,
0x03, 0x52, 0x06, 0x62, 0x75, 0x6c, 0x6b, 0x49, 0x64, 0x22, 0x7a, 0x0a, 0x26, 0x49, 0x6e, 0x74, 0x74, 0x4b, 0x65, 0x79, 0x4e, 0x65, 0x67, 0x6f, 0x74, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52,
0x65, 0x72, 0x43, 0x6f, 0x6d, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x4b, 0x65,
0x79, 0x4e, 0x65, 0x67, 0x6f, 0x74, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75,
0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70,
0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d,
0x70, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x61, 0x74, 0x68, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28,
0x09, 0x52, 0x06, 0x70, 0x61, 0x74, 0x68, 0x49, 0x44, 0x12, 0x1a, 0x0a, 0x08, 0x6b, 0x65, 0x79,
0x54, 0x6f, 0x55, 0x73, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6b, 0x65, 0x79,
0x54, 0x6f, 0x55, 0x73, 0x65, 0x22, 0x47, 0x0a, 0x27, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x43, 0x6f,
0x6d, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x4b, 0x65, 0x79, 0x4e, 0x65, 0x67,
0x6f, 0x74, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x01, 0x20,
0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, 0x66,
0x0a, 0x14, 0x4b, 0x65, 0x79, 0x46, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x52,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74,
0x61, 0x6d, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x61, 0x6d, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73,
0x74, 0x61, 0x6d, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x61, 0x74, 0x68, 0x49, 0x64, 0x18, 0x02, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x61, 0x74, 0x68, 0x49, 0x44, 0x18, 0x02,
0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x61, 0x74, 0x68, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x61, 0x74, 0x68, 0x49, 0x44, 0x12, 0x1a, 0x0a, 0x08,
0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x6b, 0x65, 0x79, 0x54, 0x6f, 0x55, 0x73, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08,
0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x22, 0x35, 0x0a, 0x15, 0x4b, 0x65, 0x79, 0x46, 0x6f, 0x72, 0x6b, 0x65, 0x79, 0x54, 0x6f, 0x55, 0x73, 0x65, 0x22, 0x47, 0x0a, 0x27, 0x49, 0x6e, 0x74, 0x65,
0x77, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x72, 0x43, 0x6f, 0x6d, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x4b, 0x65, 0x79,
0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x01, 0x20, 0x01, 0x4e, 0x65, 0x67, 0x6f, 0x74, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f,
0x28, 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, 0x74, 0x0a, 0x6e, 0x73, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70,
0x18, 0x4b, 0x65, 0x79, 0x49, 0x64, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d,
0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x70, 0x22, 0x66, 0x0a, 0x14, 0x4b, 0x65, 0x79, 0x46, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x69,
0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d,
0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x69,
0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x22, 0x0a, 0x0c, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x61, 0x74, 0x68, 0x49,
0x43, 0x6f, 0x6d, 0x41, 0x64, 0x64, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x61, 0x74, 0x68, 0x49, 0x64, 0x12,
0x6e, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6d, 0x41, 0x64, 0x64, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x6b, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09,
0x65, 0x79, 0x49, 0x64, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x6b, 0x65, 0x79, 0x52, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x22, 0x35, 0x0a, 0x15, 0x4b, 0x65, 0x79,
0x49, 0x64, 0x73, 0x22, 0x39, 0x0a, 0x19, 0x4b, 0x65, 0x79, 0x49, 0x64, 0x4e, 0x6f, 0x74, 0x69, 0x46, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18,
0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x01, 0x20, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70,
0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, 0x8c, 0x22, 0x66, 0x0a, 0x18, 0x4b, 0x65, 0x79, 0x49, 0x64, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63,
0x01, 0x0a, 0x12, 0x4b, 0x65, 0x79, 0x44, 0x65, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09,
0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52,
0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x14, 0x0a, 0x05, 0x6b, 0x6d,
0x73, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6b, 0x6d, 0x73, 0x49, 0x64,
0x12, 0x16, 0x0a, 0x06, 0x6b, 0x65, 0x79, 0x49, 0x64, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09,
0x52, 0x06, 0x6b, 0x65, 0x79, 0x49, 0x64, 0x73, 0x22, 0x39, 0x0a, 0x19, 0x4b, 0x65, 0x79, 0x49,
0x64, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73,
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61,
0x6d, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x6d, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74,
0x61, 0x6d, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x61, 0x74, 0x68, 0x49, 0x64, 0x18, 0x02, 0x20, 0x61, 0x6d, 0x70, 0x22, 0x8c, 0x01, 0x0a, 0x12, 0x4b, 0x65, 0x79, 0x44, 0x65, 0x6c, 0x69, 0x76,
0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x61, 0x74, 0x68, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74,
0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, 0x12, 0x22, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x61, 0x74, 0x68,
0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x6b, 0x6d, 0x73, 0x69, 0x6e, 0x74, 0x65, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x61, 0x74, 0x68, 0x49, 0x64,
0x72, 0x63, 0x6f, 0x6d, 0x2e, 0x4b, 0x65, 0x79, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x22, 0x33, 0x0a, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, 0x18, 0x03, 0x20,
0x13, 0x4b, 0x65, 0x79, 0x44, 0x65, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, 0x12, 0x22,
0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x6b, 0x6d,
0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x73, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x63, 0x6f, 0x6d, 0x2e, 0x4b, 0x65, 0x79, 0x52, 0x03, 0x6b,
0x6d, 0x70, 0x22, 0x27, 0x0a, 0x03, 0x4b, 0x65, 0x79, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x65, 0x79, 0x22, 0x33, 0x0a, 0x13, 0x4b, 0x65, 0x79, 0x44, 0x65, 0x6c, 0x69, 0x76, 0x65, 0x72,
0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d,
0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x32, 0xd6, 0x05, 0x0a, 0x09, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x69,
0x4b, 0x6d, 0x73, 0x54, 0x61, 0x6c, 0x6b, 0x65, 0x72, 0x12, 0x6a, 0x0a, 0x14, 0x49, 0x6e, 0x74, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, 0x27, 0x0a, 0x03, 0x4b, 0x65, 0x79, 0x12, 0x0e,
0x65, 0x72, 0x43, 0x6f, 0x6d, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x10,
0x73, 0x12, 0x28, 0x2e, 0x6b, 0x6d, 0x73, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x63, 0x6f, 0x6d, 0x2e, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79,
0x49, 0x6e, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6d, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x32, 0xd6, 0x05, 0x0a, 0x09, 0x4b, 0x6d, 0x73, 0x54, 0x61, 0x6c, 0x6b, 0x65, 0x72, 0x12, 0x6a,
0x74, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x6b, 0x6d, 0x0a, 0x14, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6d, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69,
0x73, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x63, 0x6f, 0x6d, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x43, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x12, 0x28, 0x2e, 0x6b, 0x6d, 0x73, 0x69, 0x6e, 0x74, 0x65,
0x6f, 0x6d, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x52, 0x65, 0x72, 0x63, 0x6f, 0x6d, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6d, 0x43, 0x61, 0x70,
0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x52, 0x0a, 0x0b, 0x53, 0x79, 0x6e, 0x63, 0x51, 0x6b, 0x64, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
0x42, 0x75, 0x6c, 0x6b, 0x12, 0x1f, 0x2e, 0x6b, 0x6d, 0x73, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x63, 0x1a, 0x26, 0x2e, 0x6b, 0x6d, 0x73, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x63, 0x6f, 0x6d, 0x2e, 0x49,
0x6f, 0x6d, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x51, 0x6b, 0x64, 0x42, 0x75, 0x6c, 0x6b, 0x52, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6d, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74,
0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x6b, 0x6d, 0x73, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x52, 0x0a, 0x0b, 0x53, 0x79,
0x63, 0x6f, 0x6d, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x51, 0x6b, 0x64, 0x42, 0x75, 0x6c, 0x6b, 0x52, 0x6e, 0x63, 0x51, 0x6b, 0x64, 0x42, 0x75, 0x6c, 0x6b, 0x12, 0x1f, 0x2e, 0x6b, 0x6d, 0x73, 0x69,
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x64, 0x0a, 0x11, 0x53, 0x79, 0x6e, 0x6e, 0x74, 0x65, 0x72, 0x63, 0x6f, 0x6d, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x51, 0x6b, 0x64, 0x42,
0x63, 0x4b, 0x65, 0x79, 0x49, 0x64, 0x73, 0x46, 0x6f, 0x72, 0x42, 0x75, 0x6c, 0x6b, 0x12, 0x25, 0x75, 0x6c, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x6b, 0x6d, 0x73,
0x2e, 0x6b, 0x6d, 0x73, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x63, 0x6f, 0x6d, 0x2e, 0x53, 0x79, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x63, 0x6f, 0x6d, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x51, 0x6b, 0x64,
0x63, 0x4b, 0x65, 0x79, 0x49, 0x64, 0x73, 0x46, 0x6f, 0x72, 0x42, 0x75, 0x6c, 0x6b, 0x52, 0x65, 0x42, 0x75, 0x6c, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x64,
0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x6b, 0x6d, 0x73, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x0a, 0x11, 0x53, 0x79, 0x6e, 0x63, 0x4b, 0x65, 0x79, 0x49, 0x64, 0x73, 0x46, 0x6f, 0x72, 0x42,
0x63, 0x6f, 0x6d, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x4b, 0x65, 0x79, 0x49, 0x64, 0x73, 0x46, 0x6f, 0x75, 0x6c, 0x6b, 0x12, 0x25, 0x2e, 0x6b, 0x6d, 0x73, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x63, 0x6f,
0x72, 0x42, 0x75, 0x6c, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x6d, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x4b, 0x65, 0x79, 0x49, 0x64, 0x73, 0x46, 0x6f, 0x72, 0x42,
0x8e, 0x01, 0x0a, 0x1f, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6d, 0x54, 0x72, 0x61, 0x6e, 0x75, 0x6c, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x6b, 0x6d, 0x73,
0x73, 0x70, 0x6f, 0x72, 0x74, 0x4b, 0x65, 0x79, 0x4e, 0x65, 0x67, 0x6f, 0x74, 0x69, 0x61, 0x74, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x63, 0x6f, 0x6d, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x4b, 0x65, 0x79,
0x69, 0x6f, 0x6e, 0x12, 0x33, 0x2e, 0x6b, 0x6d, 0x73, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x63, 0x6f, 0x49, 0x64, 0x73, 0x46, 0x6f, 0x72, 0x42, 0x75, 0x6c, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
0x6d, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6d, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x73, 0x65, 0x22, 0x00, 0x12, 0x8e, 0x01, 0x0a, 0x1f, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x43, 0x6f,
0x6f, 0x72, 0x74, 0x4b, 0x65, 0x79, 0x4e, 0x65, 0x67, 0x6f, 0x74, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6d, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x4b, 0x65, 0x79, 0x4e, 0x65, 0x67,
0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x34, 0x2e, 0x6b, 0x6d, 0x73, 0x69, 0x6e, 0x6f, 0x74, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x33, 0x2e, 0x6b, 0x6d, 0x73, 0x69, 0x6e,
0x74, 0x65, 0x72, 0x63, 0x6f, 0x6d, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6d, 0x54, 0x74, 0x65, 0x72, 0x63, 0x6f, 0x6d, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6d, 0x54,
0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x4b, 0x65, 0x79, 0x4e, 0x65, 0x67, 0x6f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x4b, 0x65, 0x79, 0x4e, 0x65, 0x67, 0x6f, 0x74,
0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x34, 0x2e,
0x12, 0x58, 0x0a, 0x0d, 0x4b, 0x65, 0x79, 0x46, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x6b, 0x6d, 0x73, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x63, 0x6f, 0x6d, 0x2e, 0x49, 0x6e, 0x74, 0x65,
0x67, 0x12, 0x21, 0x2e, 0x6b, 0x6d, 0x73, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x63, 0x6f, 0x6d, 0x2e, 0x72, 0x43, 0x6f, 0x6d, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x4b, 0x65, 0x79,
0x4b, 0x65, 0x79, 0x46, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x4e, 0x65, 0x67, 0x6f, 0x74, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f,
0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x6b, 0x6d, 0x73, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x63, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x58, 0x0a, 0x0d, 0x4b, 0x65, 0x79, 0x46, 0x6f, 0x72, 0x77,
0x6f, 0x6d, 0x2e, 0x4b, 0x65, 0x79, 0x46, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x21, 0x2e, 0x6b, 0x6d, 0x73, 0x69, 0x6e, 0x74, 0x65,
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x64, 0x0a, 0x11, 0x4b, 0x65, 0x72, 0x63, 0x6f, 0x6d, 0x2e, 0x4b, 0x65, 0x79, 0x46, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x69,
0x79, 0x49, 0x64, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x6b, 0x6d, 0x73, 0x69,
0x25, 0x2e, 0x6b, 0x6d, 0x73, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x63, 0x6f, 0x6d, 0x2e, 0x4b, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x63, 0x6f, 0x6d, 0x2e, 0x4b, 0x65, 0x79, 0x46, 0x6f, 0x72, 0x77, 0x61,
0x79, 0x49, 0x64, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x6b, 0x6d, 0x73, 0x69, 0x6e, 0x74, 0x65, 0x64, 0x0a, 0x11, 0x4b, 0x65, 0x79, 0x49, 0x64, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61,
0x72, 0x63, 0x6f, 0x6d, 0x2e, 0x4b, 0x65, 0x79, 0x49, 0x64, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x25, 0x2e, 0x6b, 0x6d, 0x73, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x63,
0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x6f, 0x6d, 0x2e, 0x4b, 0x65, 0x79, 0x49, 0x64, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61,
0x12, 0x52, 0x0a, 0x0b, 0x4b, 0x65, 0x79, 0x44, 0x65, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x79, 0x12, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x6b, 0x6d,
0x1f, 0x2e, 0x6b, 0x6d, 0x73, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x63, 0x6f, 0x6d, 0x2e, 0x4b, 0x65, 0x73, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x63, 0x6f, 0x6d, 0x2e, 0x4b, 0x65, 0x79, 0x49, 0x64, 0x4e,
0x79, 0x44, 0x65, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f,
0x1a, 0x20, 0x2e, 0x6b, 0x6d, 0x73, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x63, 0x6f, 0x6d, 0x2e, 0x4b, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x52, 0x0a, 0x0b, 0x4b, 0x65, 0x79, 0x44, 0x65, 0x6c, 0x69,
0x65, 0x79, 0x44, 0x65, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x79, 0x12, 0x1f, 0x2e, 0x6b, 0x6d, 0x73, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x63,
0x73, 0x65, 0x22, 0x00, 0x42, 0xb7, 0x01, 0x0a, 0x0f, 0x63, 0x6f, 0x6d, 0x2e, 0x6b, 0x6d, 0x73, 0x6f, 0x6d, 0x2e, 0x4b, 0x65, 0x79, 0x44, 0x65, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65,
0x69, 0x6e, 0x74, 0x65, 0x72, 0x63, 0x6f, 0x6d, 0x42, 0x10, 0x4b, 0x6d, 0x73, 0x69, 0x6e, 0x74, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x6b, 0x6d, 0x73, 0x69, 0x6e, 0x74, 0x65, 0x72,
0x65, 0x72, 0x63, 0x6f, 0x6d, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x46, 0x63, 0x6f, 0x63, 0x6f, 0x6d, 0x2e, 0x4b, 0x65, 0x79, 0x44, 0x65, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x79, 0x52,
0x64, 0x65, 0x2e, 0x66, 0x62, 0x69, 0x2e, 0x68, 0x2d, 0x64, 0x61, 0x2e, 0x64, 0x65, 0x2f, 0x64, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0xb7, 0x01, 0x0a, 0x0f, 0x63, 0x6f,
0x65, 0x6d, 0x6f, 0x71, 0x75, 0x61, 0x6e, 0x64, 0x74, 0x2f, 0x65, 0x6b, 0x6d, 0x73, 0x2f, 0x69, 0x6d, 0x2e, 0x6b, 0x6d, 0x73, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x63, 0x6f, 0x6d, 0x42, 0x10, 0x4b,
0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x6b, 0x6d, 0x73, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x6d, 0x73, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x63, 0x6f, 0x6d, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x2f, 0x6b, 0x6d, 0x73, 0x69, 0x6e, 0x74, 0x65, 0x01, 0x5a, 0x46, 0x63, 0x6f, 0x64, 0x65, 0x2e, 0x66, 0x62, 0x69, 0x2e, 0x68, 0x2d, 0x64, 0x61,
0x72, 0x63, 0x6f, 0x6d, 0xa2, 0x02, 0x03, 0x4b, 0x58, 0x58, 0xaa, 0x02, 0x0b, 0x4b, 0x6d, 0x73, 0x2e, 0x64, 0x65, 0x2f, 0x64, 0x65, 0x6d, 0x6f, 0x71, 0x75, 0x61, 0x6e, 0x64, 0x74, 0x2f, 0x65,
0x69, 0x6e, 0x74, 0x65, 0x72, 0x63, 0x6f, 0x6d, 0xca, 0x02, 0x0b, 0x4b, 0x6d, 0x73, 0x69, 0x6e, 0x6b, 0x6d, 0x73, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x6b, 0x6d, 0x73,
0x74, 0x65, 0x72, 0x63, 0x6f, 0x6d, 0xe2, 0x02, 0x17, 0x4b, 0x6d, 0x73, 0x69, 0x6e, 0x74, 0x65, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x2f, 0x6b, 0x6d,
0x72, 0x63, 0x6f, 0x6d, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x73, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x63, 0x6f, 0x6d, 0xa2, 0x02, 0x03, 0x4b, 0x58, 0x58, 0xaa,
0xea, 0x02, 0x0b, 0x4b, 0x6d, 0x73, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x63, 0x6f, 0x6d, 0x62, 0x06, 0x02, 0x0b, 0x4b, 0x6d, 0x73, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x63, 0x6f, 0x6d, 0xca, 0x02, 0x0b,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x4b, 0x6d, 0x73, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x63, 0x6f, 0x6d, 0xe2, 0x02, 0x17, 0x4b, 0x6d,
0x73, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x63, 0x6f, 0x6d, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74,
0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0b, 0x4b, 0x6d, 0x73, 0x69, 0x6e, 0x74, 0x65, 0x72,
0x63, 0x6f, 0x6d, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
} }
var ( var (
......
...@@ -29,14 +29,14 @@ message InterComCapabilitiesReply { ...@@ -29,14 +29,14 @@ message InterComCapabilitiesReply {
message SyncQkdBulkRequest { message SyncQkdBulkRequest {
int64 timestamp = 1; int64 timestamp = 1;
string interComAddr = 2; string kmsId = 2;
repeated int64 bulkId = 3; repeated int64 bulkId = 3;
//string bulkHash = 4; //string bulkHash = 4;
} }
message SyncKeyIdsForBulkRequest { message SyncKeyIdsForBulkRequest {
int64 timestamp = 1; int64 timestamp = 1;
string interComAddr = 2; string kmsId = 2;
int64 bulkId = 3; int64 bulkId = 3;
repeated string keyId = 4; repeated string keyId = 4;
} }
...@@ -73,7 +73,7 @@ message KeyForwardingResponse { ...@@ -73,7 +73,7 @@ message KeyForwardingResponse {
message KeyIdNotificationRequest { message KeyIdNotificationRequest {
int64 timestamp = 1; int64 timestamp = 1;
string interComAddr = 2; string kmsId = 2;
repeated string keyIds = 3; repeated string keyIds = 3;
} }
......
...@@ -157,20 +157,20 @@ func (kms *EKMS) AddQuantumElement(qm QuantumModule) error { ...@@ -157,20 +157,20 @@ func (kms *EKMS) AddQuantumElement(qm QuantumModule) error {
return nil return nil
} }
func (kms *EKMS) AddPeer(peerKmsId string, kmsPeerSocket string, servingQLE QuantumModule) (*kmsPeer, error) { func (kms *EKMS) AddPeer(peerKmsId string, kmsPeerSocket string, servingQLE QuantumModule, client *GRPCClient) (*kmsPeer, error) {
// check if peer exists // check if peer exists
if _, there := kms.KmsPeers[kmsPeerSocket]; there { if _, there := kms.KmsPeers[peerKmsId]; there {
log.Errorf("Trying to add existing peer %s", kmsPeerSocket) log.Errorf("Trying to add existing peer %s, with KMS ID %s", kmsPeerSocket, peerKmsId)
return nil, fmt.Errorf("Trying to add existing peer %s", kmsPeerSocket) return nil, fmt.Errorf("Trying to add existing peer %s, with KMS ID %s", kmsPeerSocket, peerKmsId)
} }
peer, err := NewKmsPeer(peerKmsId, servingQLE, kmsPeerSocket, kms.interComAddr, kms.eventBus) peer, err := NewKmsPeer(peerKmsId, servingQLE, kmsPeerSocket, kms.interComAddr, client, kms.eventBus)
if err != nil { if err != nil {
return nil, err return nil, err
} }
peer.tcpSocketStr = kmsPeerSocket peer.tcpSocketStr = kmsPeerSocket
kms.kmsPeersMutex.Lock() kms.kmsPeersMutex.Lock()
kms.KmsPeers[kmsPeerSocket] = peer kms.KmsPeers[peerKmsId] = peer
kms.kmsPeersMutex.Unlock() kms.kmsPeersMutex.Unlock()
// go peer.PeerHandler(kms.kmsName) // go peer.PeerHandler(kms.kmsName)
......
...@@ -63,7 +63,7 @@ func (es *etsiServer) ETSIAddKMSPeer(ctx context.Context, in *pb.ETSIKMSPeerRequ ...@@ -63,7 +63,7 @@ func (es *etsiServer) ETSIAddKMSPeer(ctx context.Context, in *pb.ETSIKMSPeerRequ
} }
// TODO: remove hardcoded id // TODO: remove hardcoded id
_, err := es.handlingEkms.AddPeer("default", in.GetKmsPeerSocket(), servingQLE) _, err := es.handlingEkms.AddPeer("default", in.GetKmsPeerSocket(), servingQLE, nil)
if err != nil { if err != nil {
return nil, err return nil, err
} }
......
...@@ -4,7 +4,7 @@ import ( ...@@ -4,7 +4,7 @@ import (
"context" "context"
"encoding/base64" "encoding/base64"
"fmt" "fmt"
"io/ioutil" "io"
"net" "net"
"time" "time"
...@@ -43,7 +43,7 @@ func (s *kmsTalkerServer) InterComCapabilities(ctx context.Context, in *pb.Inter ...@@ -43,7 +43,7 @@ func (s *kmsTalkerServer) InterComCapabilities(ctx context.Context, in *pb.Inter
func (s *kmsTalkerServer) KeyIdNotification(ctx context.Context, in *pb.KeyIdNotificationRequest) (*pb.KeyIdNotificationResponse, error) { func (s *kmsTalkerServer) KeyIdNotification(ctx context.Context, in *pb.KeyIdNotificationRequest) (*pb.KeyIdNotificationResponse, error) {
// check if a peer exists // check if a peer exists
peer, ok := s.eKMS.KmsPeers[in.GetInterComAddr()] peer, ok := s.eKMS.KmsPeers[in.GetKmsId()]
if !ok { if !ok {
// TODO: proper error message // TODO: proper error message
return nil, status.Error(codes.Internal, "peer does not exist") return nil, status.Error(codes.Internal, "peer does not exist")
...@@ -74,7 +74,7 @@ func (s *kmsTalkerServer) KeyIdNotification(ctx context.Context, in *pb.KeyIdNot ...@@ -74,7 +74,7 @@ func (s *kmsTalkerServer) KeyIdNotification(ctx context.Context, in *pb.KeyIdNot
// TODO: add proper status code handling // TODO: add proper status code handling
if resp.StatusCode != 200 { if resp.StatusCode != 200 {
body, err := ioutil.ReadAll(resp.Body) body, err := io.ReadAll(resp.Body)
if err != nil { if err != nil {
return nil, err return nil, err
} }
...@@ -97,7 +97,7 @@ func (s *kmsTalkerServer) SyncQkdBulk(ctx context.Context, in *pb.SyncQkdBulkReq ...@@ -97,7 +97,7 @@ func (s *kmsTalkerServer) SyncQkdBulk(ctx context.Context, in *pb.SyncQkdBulkReq
// NOTE: with "google.golang.org/grpc/peer" it would be possible to get the client ip directly // NOTE: with "google.golang.org/grpc/peer" it would be possible to get the client ip directly
// check if a peer exists // check if a peer exists
peer, ok := s.eKMS.KmsPeers[in.GetInterComAddr()] peer, ok := s.eKMS.KmsPeers[in.GetKmsId()]
if !ok { if !ok {
// TODO: proper error message // TODO: proper error message
return nil, status.Errorf(codes.Internal, "peer does not exist") return nil, status.Errorf(codes.Internal, "peer does not exist")
...@@ -121,9 +121,9 @@ func (s *kmsTalkerServer) SyncQkdBulk(ctx context.Context, in *pb.SyncQkdBulkReq ...@@ -121,9 +121,9 @@ func (s *kmsTalkerServer) SyncQkdBulk(ctx context.Context, in *pb.SyncQkdBulkReq
} }
func (s *kmsTalkerServer) SyncKeyIdsForBulk(ctx context.Context, in *pb.SyncKeyIdsForBulkRequest) (*pb.SyncKeyIdsForBulkResponse, error) { func (s *kmsTalkerServer) SyncKeyIdsForBulk(ctx context.Context, in *pb.SyncKeyIdsForBulkRequest) (*pb.SyncKeyIdsForBulkResponse, error) {
peer, ok := s.eKMS.KmsPeers[in.GetInterComAddr()] peer, ok := s.eKMS.KmsPeers[in.GetKmsId()]
if !ok { if !ok {
return nil, status.Errorf(codes.Internal, "For address: %s, no peer exists", in.GetInterComAddr()) return nil, status.Errorf(codes.Internal, "For KMS id: %s, no peer exists", in.GetKmsId())
} }
eqm, ok := peer.servingQuantumModul.(*EmulatedQuantumModule) eqm, ok := peer.servingQuantumModul.(*EmulatedQuantumModule)
......
...@@ -12,8 +12,6 @@ import ( ...@@ -12,8 +12,6 @@ import (
"code.fbi.h-da.de/danet/quant/ekms/internal/kms/event" "code.fbi.h-da.de/danet/quant/ekms/internal/kms/event"
"github.com/google/uuid" "github.com/google/uuid"
log "github.com/sirupsen/logrus" log "github.com/sirupsen/logrus"
"google.golang.org/grpc"
"google.golang.org/grpc/credentials/insecure"
) )
type KmsPeerStatus int16 type KmsPeerStatus int16
...@@ -33,8 +31,12 @@ const ( ...@@ -33,8 +31,12 @@ const (
// KmsPeerKeyInit() // KmsPeerKeyInit()
// } // }
type GRPCClient struct {
pbIC.KmsTalkerClient
}
type kmsPeer struct { type kmsPeer struct {
peerClient pbIC.KmsTalkerClient peerClient *GRPCClient
peerStatus KmsPeerStatus peerStatus KmsPeerStatus
peerKmsId uuid.UUID // NOTE: might be changed in the future peerKmsId uuid.UUID // NOTE: might be changed in the future
interComAddr string interComAddr string
...@@ -49,7 +51,8 @@ type kmsPeer struct { ...@@ -49,7 +51,8 @@ type kmsPeer struct {
eventBus *event.EventBus eventBus *event.EventBus
} }
func NewKmsPeer(peerKmsId string, servQM QuantumModule, tcpSocketStr string, interComAddr string, eventBus *event.EventBus) (*kmsPeer, error) { // TODO: check intercomaddr -> remove?
func NewKmsPeer(peerKmsId string, servQM QuantumModule, tcpSocketStr string, interComAddr string, client *GRPCClient, eventBus *event.EventBus) (*kmsPeer, error) {
if servQM.Peer() != nil { if servQM.Peer() != nil {
return nil, fmt.Errorf("QuantumModule with ID: %s, already has a peer", servQM.ID()) return nil, fmt.Errorf("QuantumModule with ID: %s, already has a peer", servQM.ID())
} }
...@@ -58,12 +61,6 @@ func NewKmsPeer(peerKmsId string, servQM QuantumModule, tcpSocketStr string, int ...@@ -58,12 +61,6 @@ func NewKmsPeer(peerKmsId string, servQM QuantumModule, tcpSocketStr string, int
if err != nil { if err != nil {
return nil, err return nil, err
} }
newPeerConn, err := grpc.Dial(tcpSocketStr, grpc.WithTransportCredentials(insecure.NewCredentials()))
if err != nil {
return nil, err
}
peerClient := pbIC.NewKmsTalkerClient(newPeerConn)
tcpSocket, err := net.ResolveTCPAddr("tcp", tcpSocketStr) tcpSocket, err := net.ResolveTCPAddr("tcp", tcpSocketStr)
if err != nil { if err != nil {
...@@ -74,7 +71,7 @@ func NewKmsPeer(peerKmsId string, servQM QuantumModule, tcpSocketStr string, int ...@@ -74,7 +71,7 @@ func NewKmsPeer(peerKmsId string, servQM QuantumModule, tcpSocketStr string, int
// NOTE It could be a good idea to turn client and status into its own // NOTE It could be a good idea to turn client and status into its own
// struct (and additional information) e.g. a link // struct (and additional information) e.g. a link
// We need multiple peer clients! // We need multiple peer clients!
peerClient: peerClient, peerClient: client,
// TODO: change this, only for demo purposes // TODO: change this, only for demo purposes
peerStatus: KmsPeerUp, peerStatus: KmsPeerUp,
peerKmsId: peerKmsIdUUID, peerKmsId: peerKmsIdUUID,
......
...@@ -32,7 +32,8 @@ type QuantumModule interface { ...@@ -32,7 +32,8 @@ type QuantumModule interface {
} }
type EmulatedQuantumModule struct { type EmulatedQuantumModule struct {
QlID uuid.UUID QlID uuid.UUID
kmsId string
// QuantumElementLink *quantumlayer.QuantumlayerEmuPRNG // contains information about the quantum links // QuantumElementLink *quantumlayer.QuantumlayerEmuPRNG // contains information about the quantum links
// key stores of unchopped bulk keys go here // key stores of unchopped bulk keys go here
addr string addr string
...@@ -42,10 +43,11 @@ type EmulatedQuantumModule struct { ...@@ -42,10 +43,11 @@ type EmulatedQuantumModule struct {
peer *kmsPeer peer *kmsPeer
} }
func NewEmulatedQuantumModule(kmsUDPAddr string) *EmulatedQuantumModule { func NewEmulatedQuantumModule(kmsUDPAddr string, kmsId string) *EmulatedQuantumModule {
return &EmulatedQuantumModule{ return &EmulatedQuantumModule{
QlID: uuid.New(), QlID: uuid.New(),
// QuantumElementLink: ql, // QuantumElementLink: ql,
kmsId: kmsId,
addr: kmsUDPAddr, addr: kmsUDPAddr,
rawBulkKeys: make(map[int64]*quantumlayer.QuantumLayerBulkKey), rawBulkKeys: make(map[int64]*quantumlayer.QuantumLayerBulkKey),
keyStore: NewKmsKeyStore(256), keyStore: NewKmsKeyStore(256),
...@@ -74,9 +76,9 @@ func (eqe *EmulatedQuantumModule) Sync() error { ...@@ -74,9 +76,9 @@ func (eqe *EmulatedQuantumModule) Sync() error {
ctx, cancel := context.WithTimeout(context.Background(), time.Second) ctx, cancel := context.WithTimeout(context.Background(), time.Second)
defer cancel() defer cancel()
initialPeerSetupResponse, err := eqe.peer.peerClient.SyncQkdBulk(ctx, &pbIC.SyncQkdBulkRequest{ initialPeerSetupResponse, err := eqe.peer.peerClient.SyncQkdBulk(ctx, &pbIC.SyncQkdBulkRequest{
Timestamp: time.Now().Unix(), Timestamp: time.Now().Unix(),
InterComAddr: eqe.peer.interComAddr, KmsId: eqe.kmsId,
BulkId: rawBulkKeyIds, BulkId: rawBulkKeyIds,
}) })
if err != nil { if err != nil {
return err return err
...@@ -98,10 +100,10 @@ func (eqe *EmulatedQuantumModule) Sync() error { ...@@ -98,10 +100,10 @@ func (eqe *EmulatedQuantumModule) Sync() error {
} }
_, err = eqe.peer.peerClient.SyncKeyIdsForBulk(ctx, &pbIC.SyncKeyIdsForBulkRequest{ _, err = eqe.peer.peerClient.SyncKeyIdsForBulk(ctx, &pbIC.SyncKeyIdsForBulkRequest{
Timestamp: time.Now().Unix(), Timestamp: time.Now().Unix(),
InterComAddr: eqe.peer.interComAddr, KmsId: eqe.kmsId,
BulkId: initialPeerSetupResponse.BulkId, BulkId: initialPeerSetupResponse.BulkId,
KeyId: keyIds, KeyId: keyIds,
}) })
if err != nil { if err != nil {
return err return err
...@@ -205,6 +207,7 @@ func (eqe *EmulatedQuantumModule) KeyChopper(bulkKey *quantumlayer.QuantumLayerB ...@@ -205,6 +207,7 @@ func (eqe *EmulatedQuantumModule) KeyChopper(bulkKey *quantumlayer.QuantumLayerB
type ETSI014HTTPQuantumModule struct { type ETSI014HTTPQuantumModule struct {
id uuid.UUID id uuid.UUID
kmsId string
addr string addr string
keyStore *kmsKeyStore keyStore *kmsKeyStore
peer *kmsPeer peer *kmsPeer
...@@ -214,7 +217,7 @@ type ETSI014HTTPQuantumModule struct { ...@@ -214,7 +217,7 @@ type ETSI014HTTPQuantumModule struct {
master bool master bool
} }
func NewETSI014HTTPQuantumModule(addr, slaveSAEID, masterSAEID string, master bool) (*ETSI014HTTPQuantumModule, error) { func NewETSI014HTTPQuantumModule(addr, kmsId, slaveSAEID, masterSAEID string, master bool) (*ETSI014HTTPQuantumModule, error) {
parsedUrl, err := url.Parse("http://" + addr) parsedUrl, err := url.Parse("http://" + addr)
if err != nil { if err != nil {
return nil, err return nil, err
...@@ -244,6 +247,7 @@ func NewETSI014HTTPQuantumModule(addr, slaveSAEID, masterSAEID string, master bo ...@@ -244,6 +247,7 @@ func NewETSI014HTTPQuantumModule(addr, slaveSAEID, masterSAEID string, master bo
return &ETSI014HTTPQuantumModule{ return &ETSI014HTTPQuantumModule{
id: uuid.New(), id: uuid.New(),
kmsId: kmsId,
addr: addr, addr: addr,
keyStore: NewKmsKeyStore(256), keyStore: NewKmsKeyStore(256),
peer: nil, peer: nil,
...@@ -282,9 +286,9 @@ func (eqe *ETSI014HTTPQuantumModule) Initialize() error { ...@@ -282,9 +286,9 @@ func (eqe *ETSI014HTTPQuantumModule) Initialize() error {
_, err = eqe.peer.peerClient.KeyIdNotification(context.Background(), _, err = eqe.peer.peerClient.KeyIdNotification(context.Background(),
&pbIC.KeyIdNotificationRequest{ &pbIC.KeyIdNotificationRequest{
Timestamp: time.Now().Unix(), Timestamp: time.Now().Unix(),
InterComAddr: eqe.peer.interComAddr, KmsId: eqe.kmsId,
KeyIds: keyIds, KeyIds: keyIds,
}) })
if err != nil { if err != nil {
log.Error(err) log.Error(err)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment