diff --git a/coordinator/coordinator_test.go b/coordinator/coordinator_test.go index 3886cc0a4..9c934c93b 100644 --- a/coordinator/coordinator_test.go +++ b/coordinator/coordinator_test.go @@ -115,9 +115,17 @@ func TestConcurrent(t *testing.T) { _ = activateCoordinator(require, dialer, coordinatorIP, bindPort, nodeIPs) } - actNode := func(papi *pubapi.API) { + actNode := func(target string) { defer wg.Done() - _, err := papi.ActivateAsNode(context.Background(), &pubproto.ActivateAsNodeRequest{}) + conn, _ := dialGRPC(context.Background(), dialer, target) + defer conn.Close() + client := pubproto.NewAPIClient(conn) + stream, err := client.ActivateAsNode(context.Background()) + assert.NoError(err) + assert.NoError(stream.Send(&pubproto.ActivateAsNodeRequest{ + Request: &pubproto.ActivateAsNodeRequest_InitialRequest{}, + })) + _, err = stream.Recv() assert.Error(err) } @@ -165,12 +173,12 @@ func TestConcurrent(t *testing.T) { wg.Add(26) go actCoord() go actCoord() - go actNode(coordPAPI) - go actNode(coordPAPI) - go actNode(nodePAPI1) - go actNode(nodePAPI1) - go actNode(nodePAPI2) - go actNode(nodePAPI2) + go actNode(net.JoinHostPort(coordinatorIP, bindPort)) + go actNode(net.JoinHostPort(coordinatorIP, bindPort)) + go actNode(net.JoinHostPort(nodeIPs[0], bindPort)) + go actNode(net.JoinHostPort(nodeIPs[0], bindPort)) + go actNode(net.JoinHostPort(nodeIPs[1], bindPort)) + go actNode(net.JoinHostPort(nodeIPs[1], bindPort)) go updNode(coordPAPI, false) go updNode(coordPAPI, false) go updNode(nodePAPI1, true) diff --git a/coordinator/core/legacy_test.go b/coordinator/core/legacy_test.go index 40b5fac97..0d5789fc2 100644 --- a/coordinator/core/legacy_test.go +++ b/coordinator/core/legacy_test.go @@ -97,20 +97,6 @@ func TestLegacyActivateCoordinator(t *testing.T) { // Coordinator cannot be activated a second time assert.Error(coordinatorAPI.ActivateAsCoordinator(activationReq, testActivationSvr)) - // Node cannot be activated a second time - nodeResp, err := nodeAPI3.ActivateAsNode(context.TODO(), &pubproto.ActivateAsNodeRequest{ - NodeVpnIp: "192.0.2.1:9004", - Peers: []*pubproto.Peer{{ - VpnPubKey: coordinatorKey, - PublicIp: coordinatorIP, - VpnIp: "10.118.0.1", - }}, - OwnerId: []byte("ownerID"), - ClusterId: []byte("clusterID"), - }) - assert.Error(err) - assert.Nil(nodeResp) - // Assert Coordinator peers := coordinatorCore.vpn.(*stubVPN).peers assert.Less(3, len(peers)) diff --git a/coordinator/pubapi/coord.go b/coordinator/pubapi/coord.go index 15f0c6d00..78e9dd1e1 100644 --- a/coordinator/pubapi/coord.go +++ b/coordinator/pubapi/coord.go @@ -117,6 +117,18 @@ func (a *API) ActivateAsCoordinator(in *pubproto.ActivateAsCoordinatorRequest, s if err := a.core.PersistNodeState(role.Coordinator, ownerID, clusterID); err != nil { return status.Errorf(codes.Internal, "persist node state: %v", err) } + diskUUID, err := a.core.GetDiskUUID() + if err != nil { + return status.Errorf(codes.Internal, "getting disk uuid: %v", err) + } + diskKey, err := a.core.GetDataKey(ctx, diskUUID, 32) + if err != nil { + return status.Errorf(codes.Internal, "getting disk key: %v", err) + } + if err := a.core.UpdateDiskPassphrase(string(diskKey)); err != nil { + return status.Errorf(codes.Internal, "updating disk key: %v", err) + } + adminVPNIP, err := a.core.GetNextNodeIP() if err != nil { return status.Errorf(codes.Internal, "requesting node IP address: %v", err) @@ -273,18 +285,78 @@ func (a *API) activateNode(nodePublicIP string, nodeVPNIP string, initialPeers [ client := pubproto.NewAPIClient(conn) - resp, err := client.ActivateAsNode(ctx, &pubproto.ActivateAsNodeRequest{ - NodeVpnIp: nodeVPNIP, - Peers: initialPeers, - OwnerId: ownerID, - ClusterId: clusterID, - }) + stream, err := client.ActivateAsNode(ctx) if err != nil { - a.logger.Error("node activation failed", zap.Error(err)) + a.logger.Error("connecting to node for activation failed", zap.Error(err)) return nil, err } - return resp.NodeVpnPubKey, nil + /* + coordinator -> initial request -> node + */ + if err := stream.Send(&pubproto.ActivateAsNodeRequest{ + Request: &pubproto.ActivateAsNodeRequest_InitialRequest{ + InitialRequest: &pubproto.ActivateAsNodeInitialRequest{ + NodeVpnIp: nodeVPNIP, + Peers: initialPeers, + OwnerId: ownerID, + ClusterId: clusterID, + }, + }, + }); err != nil { + a.logger.Error("sending initial message to node for activation failed", zap.Error(err)) + return nil, err + } + + /* + coordinator <- state disk uuid <- node + */ + // wait for message containing the nodes disk UUID to send back the permanent encryption key + message, err := stream.Recv() + if err != nil { + a.logger.Error("expected disk UUID message but no message received", zap.Error(err)) + return nil, err + } + diskUUID, ok := message.GetResponse().(*pubproto.ActivateAsNodeResponse_StateDiskUuid) + if !ok { + a.logger.Error("expected disk UUID message but got different message") + return nil, errors.New("expected state disk UUID but got different message type") + } + diskKey, err := a.core.GetDataKey(ctx, diskUUID.StateDiskUuid, 32) + if err != nil { + a.logger.Error("failed to derive node's disk key") + return nil, err + } + + /* + coordinator -> state disk key -> node + */ + // send back state disk encryption key + if err := stream.Send(&pubproto.ActivateAsNodeRequest{ + Request: &pubproto.ActivateAsNodeRequest_StateDiskKey{ + StateDiskKey: diskKey, + }, + }); err != nil { + a.logger.Error("sending state disk key to node on activation failed", zap.Error(err)) + return nil, err + } + + /* + coordinator <- VPN public key <- node + */ + // wait for message containing the node VPN pubkey + message, err = stream.Recv() + if err != nil { + a.logger.Error("expected node VPN pubkey but no message received", zap.Error(err)) + return nil, err + } + vpnPubKey, ok := message.GetResponse().(*pubproto.ActivateAsNodeResponse_NodeVpnPubKey) + if !ok { + a.logger.Error("expected node VPN pubkey but got different message") + return nil, errors.New("expected node VPN pub key but got different message type") + } + + return vpnPubKey.NodeVpnPubKey, nil } // assemblePeerStruct combines all information of this peer into a peer struct. diff --git a/coordinator/pubapi/coord_test.go b/coordinator/pubapi/coord_test.go index e9869bcaa..ab67b710b 100644 --- a/coordinator/pubapi/coord_test.go +++ b/coordinator/pubapi/coord_test.go @@ -3,6 +3,7 @@ package pubapi import ( "context" "errors" + "io" "net" "sync" "testing" @@ -25,9 +26,9 @@ import ( func TestActivateAsCoordinator(t *testing.T) { someErr := errors.New("failed") coordinatorPubKey := []byte{6, 7, 8} - testNode1 := &stubPeer{peer: peer.Peer{PublicIP: "192.0.2.11", VPNPubKey: []byte{1, 2, 3}}} - testNode2 := &stubPeer{peer: peer.Peer{PublicIP: "192.0.2.12", VPNPubKey: []byte{2, 3, 4}}} - testNode3 := &stubPeer{peer: peer.Peer{PublicIP: "192.0.2.13", VPNPubKey: []byte{3, 4, 5}}} + testNode1 := newStubPeer("192.0.2.11", []byte{1, 2, 3}) + testNode2 := newStubPeer("192.0.2.12", []byte{2, 3, 4}) + testNode3 := newStubPeer("192.0.2.13", []byte{3, 4, 5}) expectedNode1 := peer.Peer{PublicIP: "192.0.2.11", VPNIP: "10.118.0.11", VPNPubKey: []byte{1, 2, 3}, Role: role.Node} expectedNode2 := peer.Peer{PublicIP: "192.0.2.12", VPNIP: "10.118.0.12", VPNPubKey: []byte{2, 3, 4}, Role: role.Node} expectedNode3 := peer.Peer{PublicIP: "192.0.2.13", VPNIP: "10.118.0.13", VPNPubKey: []byte{3, 4, 5}, Role: role.Node} @@ -192,9 +193,9 @@ func TestActivateAsCoordinator(t *testing.T) { func TestActivateAdditionalNodes(t *testing.T) { someErr := errors.New("failed") - testNode1 := &stubPeer{peer: peer.Peer{PublicIP: "192.0.2.11", VPNPubKey: []byte{1, 2, 3}}} - testNode2 := &stubPeer{peer: peer.Peer{PublicIP: "192.0.2.12", VPNPubKey: []byte{2, 3, 4}}} - testNode3 := &stubPeer{peer: peer.Peer{PublicIP: "192.0.2.13", VPNPubKey: []byte{3, 4, 5}}} + testNode1 := newStubPeer("192.0.2.11", []byte{1, 2, 3}) + testNode2 := newStubPeer("192.0.2.12", []byte{2, 3, 4}) + testNode3 := newStubPeer("192.0.2.13", []byte{3, 4, 5}) expectedNode1 := peer.Peer{PublicIP: "192.0.2.11", VPNIP: "10.118.0.11", VPNPubKey: []byte{1, 2, 3}, Role: role.Node} expectedNode2 := peer.Peer{PublicIP: "192.0.2.12", VPNIP: "10.118.0.12", VPNPubKey: []byte{2, 3, 4}, Role: role.Node} expectedNode3 := peer.Peer{PublicIP: "192.0.2.13", VPNIP: "10.118.0.13", VPNPubKey: []byte{3, 4, 5}, Role: role.Node} @@ -323,14 +324,43 @@ func TestAssemblePeerStruct(t *testing.T) { } type stubPeer struct { - peer peer.Peer - activateErr error - joinErr error + peer peer.Peer + activateAsNodeMessages []*pubproto.ActivateAsNodeResponse + activateAsNodeReceive int + activateErr error + joinErr error pubproto.UnimplementedAPIServer } -func (n *stubPeer) ActivateAsNode(ctx context.Context, in *pubproto.ActivateAsNodeRequest) (*pubproto.ActivateAsNodeResponse, error) { - return &pubproto.ActivateAsNodeResponse{NodeVpnPubKey: n.peer.VPNPubKey}, n.activateErr +func newStubPeer(publicIP string, vpnPubKey []byte) *stubPeer { + return &stubPeer{ + peer: peer.Peer{PublicIP: publicIP, VPNPubKey: vpnPubKey}, + activateAsNodeMessages: []*pubproto.ActivateAsNodeResponse{ + {Response: &pubproto.ActivateAsNodeResponse_StateDiskUuid{StateDiskUuid: "state-disk-uuid"}}, + {Response: &pubproto.ActivateAsNodeResponse_NodeVpnPubKey{NodeVpnPubKey: vpnPubKey}}, + }, + activateAsNodeReceive: 2, + } +} + +func (n *stubPeer) ActivateAsNode(stream pubproto.API_ActivateAsNodeServer) error { + for _, message := range n.activateAsNodeMessages { + err := stream.Send(message) + if err != nil { + return err + } + } + for i := 0; i < n.activateAsNodeReceive; i++ { + _, err := stream.Recv() + if err != nil { + return err + } + } + if _, err := stream.Recv(); err != io.EOF { + return err + } + + return n.activateErr } func (n *stubPeer) ActivateAsAdditionalCoordinator(ctx context.Context, in *pubproto.ActivateAsAdditionalCoordinatorRequest) (*pubproto.ActivateAsAdditionalCoordinatorResponse, error) { diff --git a/coordinator/pubapi/multicoord.go b/coordinator/pubapi/multicoord.go index d4ce1ada6..d2761be3e 100644 --- a/coordinator/pubapi/multicoord.go +++ b/coordinator/pubapi/multicoord.go @@ -74,6 +74,25 @@ func (a *API) ActivateAsAdditionalCoordinator(ctx context.Context, in *pubproto. return nil, status.Errorf(codes.Internal, "%v", err) } + // persist node state on disk + if err := a.core.PersistNodeState(role.Coordinator, in.OwnerId, in.ClusterId); err != nil { + return nil, status.Errorf(codes.Internal, "persist node state: %v", err) + } + diskUUID, err := a.core.GetDiskUUID() + if err != nil { + return nil, status.Errorf(codes.Internal, "getting disk uuid: %v", err) + } + diskKey, err := a.core.GetDataKey(ctx, diskUUID, 32) + if err != nil { + return nil, status.Errorf(codes.Internal, "getting disk key: %v", err) + } + if err := a.core.UpdateDiskPassphrase(string(diskKey)); err != nil { + return nil, status.Errorf(codes.Internal, "updating disk key: %v", err) + } + + // regularly get (peer) updates from etcd + // start update before manual peer add to omit race conditions when multiple coordinator are activating nodes + thisPeer, err := a.assemblePeerStruct(in.AssignedVpnIp, role.Coordinator) if err != nil { return nil, status.Errorf(codes.Internal, "assembling coordinator peer struct: %v", err) diff --git a/coordinator/pubapi/node.go b/coordinator/pubapi/node.go index fcb2f98af..bac5a6431 100644 --- a/coordinator/pubapi/node.go +++ b/coordinator/pubapi/node.go @@ -16,18 +16,64 @@ import ( kubeadm "k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm/v1beta3" ) +/* + +-------------+ +-------+ + | coordinator | | node | + +-------------+ +-------+ + | | + | initial request | + |-------------------->| + | | -------------------------------------------\ + | |-| update state "NodeWaitingForClusterJoin" | + | | |------------------------------------------| + | | ------------\ + | |-| setup VPN | + | | |-----------| + | | ---------------------\ + | |-| persist node state | + | | |--------------------| + | | + | state disk uuid | + |<--------------------| +------------------------\ | | +| derive state disk key |-| | +|-----------------------| | | + | | + | state disk key | + |-------------------->| + | | -------------------------------\ + | |-| update state disk passphrase | + | | |------------------------------| + | | + | VPN public key | + |<--------------------| + | | +*/ + // ActivateAsNode is the RPC call to activate a Node. -func (a *API) ActivateAsNode(ctx context.Context, in *pubproto.ActivateAsNodeRequest) (resp *pubproto.ActivateAsNodeResponse, reterr error) { +func (a *API) ActivateAsNode(stream pubproto.API_ActivateAsNodeServer) (reterr error) { a.mut.Lock() defer a.mut.Unlock() if err := a.core.RequireState(state.AcceptingInit); err != nil { - return nil, status.Errorf(codes.FailedPrecondition, "node is not in required state for activation: %v", err) + return status.Errorf(codes.FailedPrecondition, "node is not in required state for activation: %v", err) } + /* + coordinator -> initial request -> node + */ + message, err := stream.Recv() + if err != nil { + return status.Errorf(codes.Internal, "could not receive initial request from coordinator: %v", err) + } + initialRequest, ok := message.GetRequest().(*pubproto.ActivateAsNodeRequest_InitialRequest) + if !ok { + return status.Error(codes.Internal, "expected initial request but got different message type") + } + in := initialRequest.InitialRequest if len(in.OwnerId) == 0 || len(in.ClusterId) == 0 { a.logger.Error("missing data to taint worker node as initialized") - return nil, status.Error(codes.InvalidArgument, "missing data to taint worker node as initialized") + return status.Error(codes.InvalidArgument, "missing data to taint worker node as initialized") } // If any of the following actions fail, we cannot revert. @@ -42,33 +88,75 @@ func (a *API) ActivateAsNode(ctx context.Context, in *pubproto.ActivateAsNodeReq // This ensures the node is marked as initialzed before the node is in a state that allows code execution // Any new additions to ActivateAsNode MUST come after if err := a.core.AdvanceState(state.NodeWaitingForClusterJoin, in.OwnerId, in.ClusterId); err != nil { - return nil, status.Errorf(codes.Internal, "advance node state: %v", err) + return status.Errorf(codes.Internal, "advance node state: %v", err) } vpnPubKey, err := a.core.GetVPNPubKey() if err != nil { - return nil, status.Errorf(codes.Internal, "get vpn publicKey: %v", err) + return status.Errorf(codes.Internal, "get vpn publicKey: %v", err) } if err := a.core.SetVPNIP(in.NodeVpnIp); err != nil { - return nil, status.Errorf(codes.Internal, "setting node vpn IP address: %v", err) + return status.Errorf(codes.Internal, "setting node vpn IP address: %v", err) } // add initial peers if err := a.core.UpdatePeers(peer.FromPubProto(in.Peers)); err != nil { - return nil, status.Errorf(codes.Internal, "synchronizing peers with vpn state: %v", err) + return status.Errorf(codes.Internal, "synchronizing peers with vpn state: %v", err) } // persist node state on disk if err := a.core.PersistNodeState(role.Node, in.OwnerId, in.ClusterId); err != nil { - return nil, status.Errorf(codes.Internal, "persist node state: %v", err) + return status.Errorf(codes.Internal, "persist node state: %v", err) + } + + /* + coordinator <- state disk uuid <- node + */ + diskUUID, err := a.core.GetDiskUUID() + if err != nil { + return status.Errorf(codes.Internal, "get disk uuid: %v", err) + } + if err := stream.Send(&pubproto.ActivateAsNodeResponse{ + Response: &pubproto.ActivateAsNodeResponse_StateDiskUuid{StateDiskUuid: diskUUID}, + }); err != nil { + return status.Errorf(codes.Internal, "%v", err) + } + + /* + coordinator -> state disk key -> node + */ + message, err = stream.Recv() + if err != nil { + return status.Errorf(codes.Internal, "could not receive state disk key from coordinator: %v", err) + } + diskKey, ok := message.GetRequest().(*pubproto.ActivateAsNodeRequest_StateDiskKey) + if !ok { + return status.Error(codes.Internal, "expected state disk key but got different message type") + } + if diskKey.StateDiskKey == nil { + return status.Error(codes.Internal, "empty state disk key message from coordinator") + } + if err := a.core.UpdateDiskPassphrase(string(diskKey.StateDiskKey)); err != nil { + return status.Errorf(codes.Internal, "%v", err) } // regularly get (peer) updates from Coordinator a.wgClose.Add(1) go a.updateLoop() - return &pubproto.ActivateAsNodeResponse{NodeVpnPubKey: vpnPubKey}, nil + /* + coordinator <- VPN public key <- node + */ + if err := stream.Send(&pubproto.ActivateAsNodeResponse{ + Response: &pubproto.ActivateAsNodeResponse_NodeVpnPubKey{ + NodeVpnPubKey: vpnPubKey, + }, + }); err != nil { + return status.Errorf(codes.Internal, "%v", err) + } + + return nil } // JoinCluster is the RPC call to request this node to join the cluster. diff --git a/coordinator/pubapi/node_test.go b/coordinator/pubapi/node_test.go index b39c61f1f..fae999303 100644 --- a/coordinator/pubapi/node_test.go +++ b/coordinator/pubapi/node_test.go @@ -3,9 +3,12 @@ package pubapi import ( "context" "errors" + "io" "net" "testing" + "github.com/edgelesssys/constellation/coordinator/atls" + "github.com/edgelesssys/constellation/coordinator/core" "github.com/edgelesssys/constellation/coordinator/peer" "github.com/edgelesssys/constellation/coordinator/pubapi/pubproto" "github.com/edgelesssys/constellation/coordinator/role" @@ -16,6 +19,7 @@ import ( "github.com/stretchr/testify/require" "go.uber.org/zap/zaptest" "google.golang.org/grpc" + "google.golang.org/grpc/credentials" kubeadm "k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm/v1beta3" ) @@ -25,13 +29,14 @@ func TestActivateAsNode(t *testing.T) { peer2 := peer.Peer{PublicIP: "192.0.2.12:2000", VPNIP: "192.0.2.22", VPNPubKey: []byte{2, 3, 4}} testCases := map[string]struct { - initialPeers []peer.Peer - updatedPeers []peer.Peer - state state.State - getUpdateErr error - setVPNIPErr error - expectErr bool - expectedState state.State + initialPeers []peer.Peer + updatedPeers []peer.Peer + state state.State + getUpdateErr error + setVPNIPErr error + messageSequenceOverride []string + expectErr bool + expectedState state.State }{ "basic": { initialPeers: []peer.Peer{peer1}, @@ -68,6 +73,38 @@ func TestActivateAsNode(t *testing.T) { expectErr: true, expectedState: state.Failed, }, + "no messages sent to node": { + initialPeers: []peer.Peer{peer1}, + updatedPeers: []peer.Peer{peer2}, + state: state.AcceptingInit, + messageSequenceOverride: []string{}, + expectErr: true, + expectedState: state.AcceptingInit, + }, + "only initial message sent to node": { + initialPeers: []peer.Peer{peer1}, + updatedPeers: []peer.Peer{peer2}, + state: state.AcceptingInit, + messageSequenceOverride: []string{"initialRequest"}, + expectErr: true, + expectedState: state.Failed, + }, + "wrong initial message sent to node": { + initialPeers: []peer.Peer{peer1}, + updatedPeers: []peer.Peer{peer2}, + state: state.AcceptingInit, + messageSequenceOverride: []string{"stateDiskKey"}, + expectErr: true, + expectedState: state.AcceptingInit, + }, + "initial message sent twice to node": { + initialPeers: []peer.Peer{peer1}, + updatedPeers: []peer.Peer{peer2}, + state: state.AcceptingInit, + messageSequenceOverride: []string{"initialRequest", "initialRequest"}, + expectErr: true, + expectedState: state.Failed, + }, } for name, tc := range testCases { @@ -75,16 +112,24 @@ func TestActivateAsNode(t *testing.T) { assert := assert.New(t) require := require.New(t) - const nodeVPNIP = "192.0.2.2" + const ( + nodeIP = "192.0.2.2" + nodeVPNIP = "10.118.0.2" + ) vpnPubKey := []byte{7, 8, 9} ownerID := []byte("ownerID") clusterID := []byte("clusterID") + stateDiskKey := []byte("stateDiskKey") + messageSequence := []string{"initialRequest", "stateDiskKey"} + if tc.messageSequenceOverride != nil { + messageSequence = tc.messageSequenceOverride + } logger := zaptest.NewLogger(t) - core := &fakeCore{state: tc.state, vpnPubKey: vpnPubKey, setVPNIPErr: tc.setVPNIPErr} + cor := &fakeCore{state: tc.state, vpnPubKey: vpnPubKey, setVPNIPErr: tc.setVPNIPErr} dialer := testdialer.NewBufconnDialer() - api := New(logger, core, dialer, nil, nil, nil) + api := New(logger, cor, dialer, nil, nil, nil) defer api.Close() vserver := grpc.NewServer() @@ -93,14 +138,15 @@ func TestActivateAsNode(t *testing.T) { go vserver.Serve(dialer.GetListener(net.JoinHostPort("10.118.0.1", vpnAPIPort))) defer vserver.GracefulStop() - resp, err := api.ActivateAsNode(context.Background(), &pubproto.ActivateAsNodeRequest{ - NodeVpnIp: nodeVPNIP, - Peers: peer.ToPubProto(tc.initialPeers), - OwnerId: ownerID, - ClusterId: clusterID, - }) + tlsConfig, err := atls.CreateAttestationServerTLSConfig(&core.MockIssuer{}) + require.NoError(err) + pubserver := grpc.NewServer(grpc.Creds(credentials.NewTLS(tlsConfig))) + pubproto.RegisterAPIServer(pubserver, api) + go pubserver.Serve(dialer.GetListener(net.JoinHostPort(nodeIP, endpointAVPNPort))) + defer pubserver.GracefulStop() - assert.Equal(tc.expectedState, core.state) + _, nodeVPNPubKey, err := activateNode(require, dialer, messageSequence, nodeIP, "9000", nodeVPNIP, peer.ToPubProto(tc.initialPeers), ownerID, clusterID, stateDiskKey) + assert.Equal(tc.expectedState, cor.state) if tc.expectErr { assert.Error(err) @@ -108,21 +154,21 @@ func TestActivateAsNode(t *testing.T) { } require.NoError(err) - assert.Equal(vpnPubKey, resp.NodeVpnPubKey) - assert.Equal(nodeVPNIP, core.vpnIP) - assert.Equal(ownerID, core.ownerID) - assert.Equal(clusterID, core.clusterID) + assert.Equal(vpnPubKey, nodeVPNPubKey) + assert.Equal(nodeVPNIP, cor.vpnIP) + assert.Equal(ownerID, cor.ownerID) + assert.Equal(clusterID, cor.clusterID) api.Close() // blocks until update loop finished if tc.getUpdateErr == nil { - require.Len(core.updatedPeers, 2) - assert.Equal(tc.updatedPeers, core.updatedPeers[1]) + require.Len(cor.updatedPeers, 2) + assert.Equal(tc.updatedPeers, cor.updatedPeers[1]) } else { - require.Len(core.updatedPeers, 1) + require.Len(cor.updatedPeers, 1) } - assert.Equal(tc.initialPeers, core.updatedPeers[0]) - assert.Equal([]role.Role{role.Node}, core.persistNodeStateRoles) + assert.Equal(tc.initialPeers, cor.updatedPeers[0]) + assert.Equal([]role.Role{role.Node}, cor.persistNodeStateRoles) }) } } @@ -276,6 +322,83 @@ func TestJoinCluster(t *testing.T) { } } +func activateNode(require *require.Assertions, dialer Dialer, messageSequence []string, nodeIP, bindPort, nodeVPNIP string, peers []*pubproto.Peer, ownerID, clusterID, stateDiskKey []byte) (string, []byte, error) { + ctx := context.Background() + conn, err := dialGRPC(ctx, dialer, net.JoinHostPort(nodeIP, bindPort)) + require.NoError(err) + defer conn.Close() + + client := pubproto.NewAPIClient(conn) + stream, err := client.ActivateAsNode(ctx) + if err != nil { + return "", nil, err + } + + for _, message := range messageSequence { + switch message { + case "initialRequest": + err = stream.Send(&pubproto.ActivateAsNodeRequest{ + Request: &pubproto.ActivateAsNodeRequest_InitialRequest{ + InitialRequest: &pubproto.ActivateAsNodeInitialRequest{ + NodeVpnIp: nodeVPNIP, + Peers: peers, + OwnerId: ownerID, + ClusterId: clusterID, + }, + }, + }) + if err != nil { + return "", nil, err + } + case "stateDiskKey": + err = stream.Send(&pubproto.ActivateAsNodeRequest{ + Request: &pubproto.ActivateAsNodeRequest_StateDiskKey{ + StateDiskKey: stateDiskKey, + }, + }) + if err != nil { + return "", nil, err + } + default: + panic("unknown message in activation") + } + } + require.NoError(stream.CloseSend()) + + diskUUIDReq, err := stream.Recv() + if err != nil { + return "", nil, err + } + diskUUID := diskUUIDReq.GetStateDiskUuid() + + vpnPubKeyReq, err := stream.Recv() + if err != nil { + return "", nil, err + } + nodeVPNPubKey := vpnPubKeyReq.GetNodeVpnPubKey() + + _, err = stream.Recv() + if err != io.EOF { + return "", nil, err + } + + return diskUUID, nodeVPNPubKey, nil +} + +func dialGRPC(ctx context.Context, dialer Dialer, target string) (*grpc.ClientConn, error) { + tlsConfig, err := atls.CreateAttestationClientTLSConfig([]atls.Validator{&core.MockValidator{}}) + if err != nil { + return nil, err + } + + return grpc.DialContext(ctx, target, + grpc.WithContextDialer(func(ctx context.Context, addr string) (net.Conn, error) { + return dialer.DialContext(ctx, "tcp", addr) + }), + grpc.WithTransportCredentials(credentials.NewTLS(tlsConfig)), + ) +} + type stubVPNAPI struct { peers []peer.Peer getUpdateErr error diff --git a/coordinator/pubapi/pubproto/pubapi.pb.go b/coordinator/pubapi/pubproto/pubapi.pb.go index 4adbefa41..d186c3e55 100644 --- a/coordinator/pubapi/pubproto/pubapi.pb.go +++ b/coordinator/pubapi/pubproto/pubapi.pb.go @@ -301,10 +301,10 @@ type ActivateAsNodeRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - NodeVpnIp string `protobuf:"bytes,1,opt,name=node_vpn_ip,json=nodeVpnIp,proto3" json:"node_vpn_ip,omitempty"` - Peers []*Peer `protobuf:"bytes,2,rep,name=peers,proto3" json:"peers,omitempty"` - OwnerId []byte `protobuf:"bytes,3,opt,name=owner_id,json=ownerId,proto3" json:"owner_id,omitempty"` - ClusterId []byte `protobuf:"bytes,4,opt,name=cluster_id,json=clusterId,proto3" json:"cluster_id,omitempty"` + // Types that are assignable to Request: + // *ActivateAsNodeRequest_InitialRequest + // *ActivateAsNodeRequest_StateDiskKey + Request isActivateAsNodeRequest_Request `protobuf_oneof:"request"` } func (x *ActivateAsNodeRequest) Reset() { @@ -339,28 +339,108 @@ func (*ActivateAsNodeRequest) Descriptor() ([]byte, []int) { return file_pubapi_proto_rawDescGZIP(), []int{4} } -func (x *ActivateAsNodeRequest) GetNodeVpnIp() string { +func (m *ActivateAsNodeRequest) GetRequest() isActivateAsNodeRequest_Request { + if m != nil { + return m.Request + } + return nil +} + +func (x *ActivateAsNodeRequest) GetInitialRequest() *ActivateAsNodeInitialRequest { + if x, ok := x.GetRequest().(*ActivateAsNodeRequest_InitialRequest); ok { + return x.InitialRequest + } + return nil +} + +func (x *ActivateAsNodeRequest) GetStateDiskKey() []byte { + if x, ok := x.GetRequest().(*ActivateAsNodeRequest_StateDiskKey); ok { + return x.StateDiskKey + } + return nil +} + +type isActivateAsNodeRequest_Request interface { + isActivateAsNodeRequest_Request() +} + +type ActivateAsNodeRequest_InitialRequest struct { + InitialRequest *ActivateAsNodeInitialRequest `protobuf:"bytes,1,opt,name=initial_request,json=initialRequest,proto3,oneof"` +} + +type ActivateAsNodeRequest_StateDiskKey struct { + StateDiskKey []byte `protobuf:"bytes,2,opt,name=state_disk_key,json=stateDiskKey,proto3,oneof"` +} + +func (*ActivateAsNodeRequest_InitialRequest) isActivateAsNodeRequest_Request() {} + +func (*ActivateAsNodeRequest_StateDiskKey) isActivateAsNodeRequest_Request() {} + +type ActivateAsNodeInitialRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + NodeVpnIp string `protobuf:"bytes,1,opt,name=node_vpn_ip,json=nodeVpnIp,proto3" json:"node_vpn_ip,omitempty"` + Peers []*Peer `protobuf:"bytes,2,rep,name=peers,proto3" json:"peers,omitempty"` + OwnerId []byte `protobuf:"bytes,3,opt,name=owner_id,json=ownerId,proto3" json:"owner_id,omitempty"` + ClusterId []byte `protobuf:"bytes,4,opt,name=cluster_id,json=clusterId,proto3" json:"cluster_id,omitempty"` +} + +func (x *ActivateAsNodeInitialRequest) Reset() { + *x = ActivateAsNodeInitialRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_pubapi_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ActivateAsNodeInitialRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ActivateAsNodeInitialRequest) ProtoMessage() {} + +func (x *ActivateAsNodeInitialRequest) ProtoReflect() protoreflect.Message { + mi := &file_pubapi_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ActivateAsNodeInitialRequest.ProtoReflect.Descriptor instead. +func (*ActivateAsNodeInitialRequest) Descriptor() ([]byte, []int) { + return file_pubapi_proto_rawDescGZIP(), []int{5} +} + +func (x *ActivateAsNodeInitialRequest) GetNodeVpnIp() string { if x != nil { return x.NodeVpnIp } return "" } -func (x *ActivateAsNodeRequest) GetPeers() []*Peer { +func (x *ActivateAsNodeInitialRequest) GetPeers() []*Peer { if x != nil { return x.Peers } return nil } -func (x *ActivateAsNodeRequest) GetOwnerId() []byte { +func (x *ActivateAsNodeInitialRequest) GetOwnerId() []byte { if x != nil { return x.OwnerId } return nil } -func (x *ActivateAsNodeRequest) GetClusterId() []byte { +func (x *ActivateAsNodeInitialRequest) GetClusterId() []byte { if x != nil { return x.ClusterId } @@ -372,13 +452,16 @@ type ActivateAsNodeResponse struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - NodeVpnPubKey []byte `protobuf:"bytes,1,opt,name=node_vpn_pub_key,json=nodeVpnPubKey,proto3" json:"node_vpn_pub_key,omitempty"` + // Types that are assignable to Response: + // *ActivateAsNodeResponse_NodeVpnPubKey + // *ActivateAsNodeResponse_StateDiskUuid + Response isActivateAsNodeResponse_Response `protobuf_oneof:"response"` } func (x *ActivateAsNodeResponse) Reset() { *x = ActivateAsNodeResponse{} if protoimpl.UnsafeEnabled { - mi := &file_pubapi_proto_msgTypes[5] + mi := &file_pubapi_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -391,7 +474,7 @@ func (x *ActivateAsNodeResponse) String() string { func (*ActivateAsNodeResponse) ProtoMessage() {} func (x *ActivateAsNodeResponse) ProtoReflect() protoreflect.Message { - mi := &file_pubapi_proto_msgTypes[5] + mi := &file_pubapi_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -404,16 +487,46 @@ func (x *ActivateAsNodeResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ActivateAsNodeResponse.ProtoReflect.Descriptor instead. func (*ActivateAsNodeResponse) Descriptor() ([]byte, []int) { - return file_pubapi_proto_rawDescGZIP(), []int{5} + return file_pubapi_proto_rawDescGZIP(), []int{6} +} + +func (m *ActivateAsNodeResponse) GetResponse() isActivateAsNodeResponse_Response { + if m != nil { + return m.Response + } + return nil } func (x *ActivateAsNodeResponse) GetNodeVpnPubKey() []byte { - if x != nil { + if x, ok := x.GetResponse().(*ActivateAsNodeResponse_NodeVpnPubKey); ok { return x.NodeVpnPubKey } return nil } +func (x *ActivateAsNodeResponse) GetStateDiskUuid() string { + if x, ok := x.GetResponse().(*ActivateAsNodeResponse_StateDiskUuid); ok { + return x.StateDiskUuid + } + return "" +} + +type isActivateAsNodeResponse_Response interface { + isActivateAsNodeResponse_Response() +} + +type ActivateAsNodeResponse_NodeVpnPubKey struct { + NodeVpnPubKey []byte `protobuf:"bytes,1,opt,name=node_vpn_pub_key,json=nodeVpnPubKey,proto3,oneof"` +} + +type ActivateAsNodeResponse_StateDiskUuid struct { + StateDiskUuid string `protobuf:"bytes,2,opt,name=state_disk_uuid,json=stateDiskUuid,proto3,oneof"` +} + +func (*ActivateAsNodeResponse_NodeVpnPubKey) isActivateAsNodeResponse_Response() {} + +func (*ActivateAsNodeResponse_StateDiskUuid) isActivateAsNodeResponse_Response() {} + type ActivateAdditionalNodesRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -425,7 +538,7 @@ type ActivateAdditionalNodesRequest struct { func (x *ActivateAdditionalNodesRequest) Reset() { *x = ActivateAdditionalNodesRequest{} if protoimpl.UnsafeEnabled { - mi := &file_pubapi_proto_msgTypes[6] + mi := &file_pubapi_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -438,7 +551,7 @@ func (x *ActivateAdditionalNodesRequest) String() string { func (*ActivateAdditionalNodesRequest) ProtoMessage() {} func (x *ActivateAdditionalNodesRequest) ProtoReflect() protoreflect.Message { - mi := &file_pubapi_proto_msgTypes[6] + mi := &file_pubapi_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -451,7 +564,7 @@ func (x *ActivateAdditionalNodesRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ActivateAdditionalNodesRequest.ProtoReflect.Descriptor instead. func (*ActivateAdditionalNodesRequest) Descriptor() ([]byte, []int) { - return file_pubapi_proto_rawDescGZIP(), []int{6} + return file_pubapi_proto_rawDescGZIP(), []int{7} } func (x *ActivateAdditionalNodesRequest) GetNodePublicIps() []string { @@ -472,7 +585,7 @@ type ActivateAdditionalNodesResponse struct { func (x *ActivateAdditionalNodesResponse) Reset() { *x = ActivateAdditionalNodesResponse{} if protoimpl.UnsafeEnabled { - mi := &file_pubapi_proto_msgTypes[7] + mi := &file_pubapi_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -485,7 +598,7 @@ func (x *ActivateAdditionalNodesResponse) String() string { func (*ActivateAdditionalNodesResponse) ProtoMessage() {} func (x *ActivateAdditionalNodesResponse) ProtoReflect() protoreflect.Message { - mi := &file_pubapi_proto_msgTypes[7] + mi := &file_pubapi_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -498,7 +611,7 @@ func (x *ActivateAdditionalNodesResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ActivateAdditionalNodesResponse.ProtoReflect.Descriptor instead. func (*ActivateAdditionalNodesResponse) Descriptor() ([]byte, []int) { - return file_pubapi_proto_rawDescGZIP(), []int{7} + return file_pubapi_proto_rawDescGZIP(), []int{8} } func (x *ActivateAdditionalNodesResponse) GetLog() *Log { @@ -522,7 +635,7 @@ type ActivateAsAdditionalCoordinatorRequest struct { func (x *ActivateAsAdditionalCoordinatorRequest) Reset() { *x = ActivateAsAdditionalCoordinatorRequest{} if protoimpl.UnsafeEnabled { - mi := &file_pubapi_proto_msgTypes[8] + mi := &file_pubapi_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -535,7 +648,7 @@ func (x *ActivateAsAdditionalCoordinatorRequest) String() string { func (*ActivateAsAdditionalCoordinatorRequest) ProtoMessage() {} func (x *ActivateAsAdditionalCoordinatorRequest) ProtoReflect() protoreflect.Message { - mi := &file_pubapi_proto_msgTypes[8] + mi := &file_pubapi_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -548,7 +661,7 @@ func (x *ActivateAsAdditionalCoordinatorRequest) ProtoReflect() protoreflect.Mes // Deprecated: Use ActivateAsAdditionalCoordinatorRequest.ProtoReflect.Descriptor instead. func (*ActivateAsAdditionalCoordinatorRequest) Descriptor() ([]byte, []int) { - return file_pubapi_proto_rawDescGZIP(), []int{8} + return file_pubapi_proto_rawDescGZIP(), []int{9} } func (x *ActivateAsAdditionalCoordinatorRequest) GetAssignedVpnIp() string { @@ -588,7 +701,7 @@ type ActivateAsAdditionalCoordinatorResponse struct { func (x *ActivateAsAdditionalCoordinatorResponse) Reset() { *x = ActivateAsAdditionalCoordinatorResponse{} if protoimpl.UnsafeEnabled { - mi := &file_pubapi_proto_msgTypes[9] + mi := &file_pubapi_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -601,7 +714,7 @@ func (x *ActivateAsAdditionalCoordinatorResponse) String() string { func (*ActivateAsAdditionalCoordinatorResponse) ProtoMessage() {} func (x *ActivateAsAdditionalCoordinatorResponse) ProtoReflect() protoreflect.Message { - mi := &file_pubapi_proto_msgTypes[9] + mi := &file_pubapi_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -614,7 +727,7 @@ func (x *ActivateAsAdditionalCoordinatorResponse) ProtoReflect() protoreflect.Me // Deprecated: Use ActivateAsAdditionalCoordinatorResponse.ProtoReflect.Descriptor instead. func (*ActivateAsAdditionalCoordinatorResponse) Descriptor() ([]byte, []int) { - return file_pubapi_proto_rawDescGZIP(), []int{9} + return file_pubapi_proto_rawDescGZIP(), []int{10} } type ActivateAdditionalCoordinatorRequest struct { @@ -628,7 +741,7 @@ type ActivateAdditionalCoordinatorRequest struct { func (x *ActivateAdditionalCoordinatorRequest) Reset() { *x = ActivateAdditionalCoordinatorRequest{} if protoimpl.UnsafeEnabled { - mi := &file_pubapi_proto_msgTypes[10] + mi := &file_pubapi_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -641,7 +754,7 @@ func (x *ActivateAdditionalCoordinatorRequest) String() string { func (*ActivateAdditionalCoordinatorRequest) ProtoMessage() {} func (x *ActivateAdditionalCoordinatorRequest) ProtoReflect() protoreflect.Message { - mi := &file_pubapi_proto_msgTypes[10] + mi := &file_pubapi_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -654,7 +767,7 @@ func (x *ActivateAdditionalCoordinatorRequest) ProtoReflect() protoreflect.Messa // Deprecated: Use ActivateAdditionalCoordinatorRequest.ProtoReflect.Descriptor instead. func (*ActivateAdditionalCoordinatorRequest) Descriptor() ([]byte, []int) { - return file_pubapi_proto_rawDescGZIP(), []int{10} + return file_pubapi_proto_rawDescGZIP(), []int{11} } func (x *ActivateAdditionalCoordinatorRequest) GetCoordinatorPublicIp() string { @@ -673,7 +786,7 @@ type ActivateAdditionalCoordinatorResponse struct { func (x *ActivateAdditionalCoordinatorResponse) Reset() { *x = ActivateAdditionalCoordinatorResponse{} if protoimpl.UnsafeEnabled { - mi := &file_pubapi_proto_msgTypes[11] + mi := &file_pubapi_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -686,7 +799,7 @@ func (x *ActivateAdditionalCoordinatorResponse) String() string { func (*ActivateAdditionalCoordinatorResponse) ProtoMessage() {} func (x *ActivateAdditionalCoordinatorResponse) ProtoReflect() protoreflect.Message { - mi := &file_pubapi_proto_msgTypes[11] + mi := &file_pubapi_proto_msgTypes[12] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -699,7 +812,7 @@ func (x *ActivateAdditionalCoordinatorResponse) ProtoReflect() protoreflect.Mess // Deprecated: Use ActivateAdditionalCoordinatorResponse.ProtoReflect.Descriptor instead. func (*ActivateAdditionalCoordinatorResponse) Descriptor() ([]byte, []int) { - return file_pubapi_proto_rawDescGZIP(), []int{11} + return file_pubapi_proto_rawDescGZIP(), []int{12} } type JoinClusterRequest struct { @@ -713,7 +826,7 @@ type JoinClusterRequest struct { func (x *JoinClusterRequest) Reset() { *x = JoinClusterRequest{} if protoimpl.UnsafeEnabled { - mi := &file_pubapi_proto_msgTypes[12] + mi := &file_pubapi_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -726,7 +839,7 @@ func (x *JoinClusterRequest) String() string { func (*JoinClusterRequest) ProtoMessage() {} func (x *JoinClusterRequest) ProtoReflect() protoreflect.Message { - mi := &file_pubapi_proto_msgTypes[12] + mi := &file_pubapi_proto_msgTypes[13] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -739,7 +852,7 @@ func (x *JoinClusterRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use JoinClusterRequest.ProtoReflect.Descriptor instead. func (*JoinClusterRequest) Descriptor() ([]byte, []int) { - return file_pubapi_proto_rawDescGZIP(), []int{12} + return file_pubapi_proto_rawDescGZIP(), []int{13} } func (x *JoinClusterRequest) GetCoordinatorVpnIp() string { @@ -758,7 +871,7 @@ type JoinClusterResponse struct { func (x *JoinClusterResponse) Reset() { *x = JoinClusterResponse{} if protoimpl.UnsafeEnabled { - mi := &file_pubapi_proto_msgTypes[13] + mi := &file_pubapi_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -771,7 +884,7 @@ func (x *JoinClusterResponse) String() string { func (*JoinClusterResponse) ProtoMessage() {} func (x *JoinClusterResponse) ProtoReflect() protoreflect.Message { - mi := &file_pubapi_proto_msgTypes[13] + mi := &file_pubapi_proto_msgTypes[14] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -784,7 +897,7 @@ func (x *JoinClusterResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use JoinClusterResponse.ProtoReflect.Descriptor instead. func (*JoinClusterResponse) Descriptor() ([]byte, []int) { - return file_pubapi_proto_rawDescGZIP(), []int{13} + return file_pubapi_proto_rawDescGZIP(), []int{14} } type TriggerNodeUpdateRequest struct { @@ -796,7 +909,7 @@ type TriggerNodeUpdateRequest struct { func (x *TriggerNodeUpdateRequest) Reset() { *x = TriggerNodeUpdateRequest{} if protoimpl.UnsafeEnabled { - mi := &file_pubapi_proto_msgTypes[14] + mi := &file_pubapi_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -809,7 +922,7 @@ func (x *TriggerNodeUpdateRequest) String() string { func (*TriggerNodeUpdateRequest) ProtoMessage() {} func (x *TriggerNodeUpdateRequest) ProtoReflect() protoreflect.Message { - mi := &file_pubapi_proto_msgTypes[14] + mi := &file_pubapi_proto_msgTypes[15] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -822,7 +935,7 @@ func (x *TriggerNodeUpdateRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use TriggerNodeUpdateRequest.ProtoReflect.Descriptor instead. func (*TriggerNodeUpdateRequest) Descriptor() ([]byte, []int) { - return file_pubapi_proto_rawDescGZIP(), []int{14} + return file_pubapi_proto_rawDescGZIP(), []int{15} } type TriggerNodeUpdateResponse struct { @@ -834,7 +947,7 @@ type TriggerNodeUpdateResponse struct { func (x *TriggerNodeUpdateResponse) Reset() { *x = TriggerNodeUpdateResponse{} if protoimpl.UnsafeEnabled { - mi := &file_pubapi_proto_msgTypes[15] + mi := &file_pubapi_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -847,7 +960,7 @@ func (x *TriggerNodeUpdateResponse) String() string { func (*TriggerNodeUpdateResponse) ProtoMessage() {} func (x *TriggerNodeUpdateResponse) ProtoReflect() protoreflect.Message { - mi := &file_pubapi_proto_msgTypes[15] + mi := &file_pubapi_proto_msgTypes[16] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -860,7 +973,7 @@ func (x *TriggerNodeUpdateResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use TriggerNodeUpdateResponse.ProtoReflect.Descriptor instead. func (*TriggerNodeUpdateResponse) Descriptor() ([]byte, []int) { - return file_pubapi_proto_rawDescGZIP(), []int{15} + return file_pubapi_proto_rawDescGZIP(), []int{16} } type TriggerCoordinatorUpdateRequest struct { @@ -872,7 +985,7 @@ type TriggerCoordinatorUpdateRequest struct { func (x *TriggerCoordinatorUpdateRequest) Reset() { *x = TriggerCoordinatorUpdateRequest{} if protoimpl.UnsafeEnabled { - mi := &file_pubapi_proto_msgTypes[16] + mi := &file_pubapi_proto_msgTypes[17] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -885,7 +998,7 @@ func (x *TriggerCoordinatorUpdateRequest) String() string { func (*TriggerCoordinatorUpdateRequest) ProtoMessage() {} func (x *TriggerCoordinatorUpdateRequest) ProtoReflect() protoreflect.Message { - mi := &file_pubapi_proto_msgTypes[16] + mi := &file_pubapi_proto_msgTypes[17] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -898,7 +1011,7 @@ func (x *TriggerCoordinatorUpdateRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use TriggerCoordinatorUpdateRequest.ProtoReflect.Descriptor instead. func (*TriggerCoordinatorUpdateRequest) Descriptor() ([]byte, []int) { - return file_pubapi_proto_rawDescGZIP(), []int{16} + return file_pubapi_proto_rawDescGZIP(), []int{17} } type TriggerCoordinatorUpdateResponse struct { @@ -910,7 +1023,7 @@ type TriggerCoordinatorUpdateResponse struct { func (x *TriggerCoordinatorUpdateResponse) Reset() { *x = TriggerCoordinatorUpdateResponse{} if protoimpl.UnsafeEnabled { - mi := &file_pubapi_proto_msgTypes[17] + mi := &file_pubapi_proto_msgTypes[18] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -923,7 +1036,7 @@ func (x *TriggerCoordinatorUpdateResponse) String() string { func (*TriggerCoordinatorUpdateResponse) ProtoMessage() {} func (x *TriggerCoordinatorUpdateResponse) ProtoReflect() protoreflect.Message { - mi := &file_pubapi_proto_msgTypes[17] + mi := &file_pubapi_proto_msgTypes[18] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -936,7 +1049,7 @@ func (x *TriggerCoordinatorUpdateResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use TriggerCoordinatorUpdateResponse.ProtoReflect.Descriptor instead. func (*TriggerCoordinatorUpdateResponse) Descriptor() ([]byte, []int) { - return file_pubapi_proto_rawDescGZIP(), []int{17} + return file_pubapi_proto_rawDescGZIP(), []int{18} } type RequestStateDiskKeyRequest struct { @@ -950,7 +1063,7 @@ type RequestStateDiskKeyRequest struct { func (x *RequestStateDiskKeyRequest) Reset() { *x = RequestStateDiskKeyRequest{} if protoimpl.UnsafeEnabled { - mi := &file_pubapi_proto_msgTypes[18] + mi := &file_pubapi_proto_msgTypes[19] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -963,7 +1076,7 @@ func (x *RequestStateDiskKeyRequest) String() string { func (*RequestStateDiskKeyRequest) ProtoMessage() {} func (x *RequestStateDiskKeyRequest) ProtoReflect() protoreflect.Message { - mi := &file_pubapi_proto_msgTypes[18] + mi := &file_pubapi_proto_msgTypes[19] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -976,7 +1089,7 @@ func (x *RequestStateDiskKeyRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use RequestStateDiskKeyRequest.ProtoReflect.Descriptor instead. func (*RequestStateDiskKeyRequest) Descriptor() ([]byte, []int) { - return file_pubapi_proto_rawDescGZIP(), []int{18} + return file_pubapi_proto_rawDescGZIP(), []int{19} } func (x *RequestStateDiskKeyRequest) GetDiskUuid() string { @@ -995,7 +1108,7 @@ type RequestStateDiskKeyResponse struct { func (x *RequestStateDiskKeyResponse) Reset() { *x = RequestStateDiskKeyResponse{} if protoimpl.UnsafeEnabled { - mi := &file_pubapi_proto_msgTypes[19] + mi := &file_pubapi_proto_msgTypes[20] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1008,7 +1121,7 @@ func (x *RequestStateDiskKeyResponse) String() string { func (*RequestStateDiskKeyResponse) ProtoMessage() {} func (x *RequestStateDiskKeyResponse) ProtoReflect() protoreflect.Message { - mi := &file_pubapi_proto_msgTypes[19] + mi := &file_pubapi_proto_msgTypes[20] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1021,7 +1134,7 @@ func (x *RequestStateDiskKeyResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use RequestStateDiskKeyResponse.ProtoReflect.Descriptor instead. func (*RequestStateDiskKeyResponse) Descriptor() ([]byte, []int) { - return file_pubapi_proto_rawDescGZIP(), []int{19} + return file_pubapi_proto_rawDescGZIP(), []int{20} } type AdminConfig struct { @@ -1039,7 +1152,7 @@ type AdminConfig struct { func (x *AdminConfig) Reset() { *x = AdminConfig{} if protoimpl.UnsafeEnabled { - mi := &file_pubapi_proto_msgTypes[20] + mi := &file_pubapi_proto_msgTypes[21] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1052,7 +1165,7 @@ func (x *AdminConfig) String() string { func (*AdminConfig) ProtoMessage() {} func (x *AdminConfig) ProtoReflect() protoreflect.Message { - mi := &file_pubapi_proto_msgTypes[20] + mi := &file_pubapi_proto_msgTypes[21] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1065,7 +1178,7 @@ func (x *AdminConfig) ProtoReflect() protoreflect.Message { // Deprecated: Use AdminConfig.ProtoReflect.Descriptor instead. func (*AdminConfig) Descriptor() ([]byte, []int) { - return file_pubapi_proto_rawDescGZIP(), []int{20} + return file_pubapi_proto_rawDescGZIP(), []int{21} } func (x *AdminConfig) GetAdminVpnIp() string { @@ -1114,7 +1227,7 @@ type Log struct { func (x *Log) Reset() { *x = Log{} if protoimpl.UnsafeEnabled { - mi := &file_pubapi_proto_msgTypes[21] + mi := &file_pubapi_proto_msgTypes[22] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1127,7 +1240,7 @@ func (x *Log) String() string { func (*Log) ProtoMessage() {} func (x *Log) ProtoReflect() protoreflect.Message { - mi := &file_pubapi_proto_msgTypes[21] + mi := &file_pubapi_proto_msgTypes[22] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1140,7 +1253,7 @@ func (x *Log) ProtoReflect() protoreflect.Message { // Deprecated: Use Log.ProtoReflect.Descriptor instead. func (*Log) Descriptor() ([]byte, []int) { - return file_pubapi_proto_rawDescGZIP(), []int{21} + return file_pubapi_proto_rawDescGZIP(), []int{22} } func (x *Log) GetMessage() string { @@ -1164,7 +1277,7 @@ type Peer struct { func (x *Peer) Reset() { *x = Peer{} if protoimpl.UnsafeEnabled { - mi := &file_pubapi_proto_msgTypes[22] + mi := &file_pubapi_proto_msgTypes[23] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1177,7 +1290,7 @@ func (x *Peer) String() string { func (*Peer) ProtoMessage() {} func (x *Peer) ProtoReflect() protoreflect.Message { - mi := &file_pubapi_proto_msgTypes[22] + mi := &file_pubapi_proto_msgTypes[23] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1190,7 +1303,7 @@ func (x *Peer) ProtoReflect() protoreflect.Message { // Deprecated: Use Peer.ProtoReflect.Descriptor instead. func (*Peer) Descriptor() ([]byte, []int) { - return file_pubapi_proto_rawDescGZIP(), []int{22} + return file_pubapi_proto_rawDescGZIP(), []int{23} } func (x *Peer) GetPublicIp() string { @@ -1263,162 +1376,176 @@ var file_pubapi_proto_rawDesc = []byte{ 0x66, 0x69, 0x67, 0x48, 0x00, 0x52, 0x0b, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x1f, 0x0a, 0x03, 0x6c, 0x6f, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x70, 0x75, 0x62, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x6f, 0x67, 0x48, 0x00, 0x52, 0x03, - 0x6c, 0x6f, 0x67, 0x42, 0x09, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x22, 0x95, + 0x6c, 0x6f, 0x67, 0x42, 0x09, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x22, 0x9b, 0x01, 0x0a, 0x15, 0x41, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x41, 0x73, 0x4e, 0x6f, 0x64, - 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1e, 0x0a, 0x0b, 0x6e, 0x6f, 0x64, 0x65, - 0x5f, 0x76, 0x70, 0x6e, 0x5f, 0x69, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, - 0x6f, 0x64, 0x65, 0x56, 0x70, 0x6e, 0x49, 0x70, 0x12, 0x22, 0x0a, 0x05, 0x70, 0x65, 0x65, 0x72, - 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x70, 0x75, 0x62, 0x61, 0x70, 0x69, - 0x2e, 0x50, 0x65, 0x65, 0x72, 0x52, 0x05, 0x70, 0x65, 0x65, 0x72, 0x73, 0x12, 0x19, 0x0a, 0x08, - 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, - 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x6c, 0x75, 0x73, 0x74, - 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x63, 0x6c, 0x75, - 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x22, 0x41, 0x0a, 0x16, 0x41, 0x63, 0x74, 0x69, 0x76, 0x61, - 0x74, 0x65, 0x41, 0x73, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x27, 0x0a, 0x10, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x76, 0x70, 0x6e, 0x5f, 0x70, 0x75, 0x62, - 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0d, 0x6e, 0x6f, 0x64, 0x65, - 0x56, 0x70, 0x6e, 0x50, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x22, 0x48, 0x0a, 0x1e, 0x41, 0x63, 0x74, - 0x69, 0x76, 0x61, 0x74, 0x65, 0x41, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x4e, - 0x6f, 0x64, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x26, 0x0a, 0x0f, 0x6e, - 0x6f, 0x64, 0x65, 0x5f, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x69, 0x70, 0x73, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x6f, 0x64, 0x65, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, - 0x49, 0x70, 0x73, 0x22, 0x40, 0x0a, 0x1f, 0x41, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x41, - 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1d, 0x0a, 0x03, 0x6c, 0x6f, 0x67, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x70, 0x75, 0x62, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x6f, 0x67, - 0x52, 0x03, 0x6c, 0x6f, 0x67, 0x22, 0xd8, 0x01, 0x0a, 0x26, 0x41, 0x63, 0x74, 0x69, 0x76, 0x61, - 0x74, 0x65, 0x41, 0x73, 0x41, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x43, 0x6f, + 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x4f, 0x0a, 0x0f, 0x69, 0x6e, 0x69, 0x74, + 0x69, 0x61, 0x6c, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x24, 0x2e, 0x70, 0x75, 0x62, 0x61, 0x70, 0x69, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x76, + 0x61, 0x74, 0x65, 0x41, 0x73, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x00, 0x52, 0x0e, 0x69, 0x6e, 0x69, 0x74, 0x69, + 0x61, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x26, 0x0a, 0x0e, 0x73, 0x74, 0x61, + 0x74, 0x65, 0x5f, 0x64, 0x69, 0x73, 0x6b, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0c, 0x48, 0x00, 0x52, 0x0c, 0x73, 0x74, 0x61, 0x74, 0x65, 0x44, 0x69, 0x73, 0x6b, 0x4b, 0x65, + 0x79, 0x42, 0x09, 0x0a, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x9c, 0x01, 0x0a, + 0x1c, 0x41, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x41, 0x73, 0x4e, 0x6f, 0x64, 0x65, 0x49, + 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1e, 0x0a, + 0x0b, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x76, 0x70, 0x6e, 0x5f, 0x69, 0x70, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x09, 0x6e, 0x6f, 0x64, 0x65, 0x56, 0x70, 0x6e, 0x49, 0x70, 0x12, 0x22, 0x0a, + 0x05, 0x70, 0x65, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x70, + 0x75, 0x62, 0x61, 0x70, 0x69, 0x2e, 0x50, 0x65, 0x65, 0x72, 0x52, 0x05, 0x70, 0x65, 0x65, 0x72, + 0x73, 0x12, 0x19, 0x0a, 0x08, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0c, 0x52, 0x07, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, + 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, + 0x52, 0x09, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x22, 0x79, 0x0a, 0x16, 0x41, + 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x41, 0x73, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x29, 0x0a, 0x10, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x76, 0x70, + 0x6e, 0x5f, 0x70, 0x75, 0x62, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x48, + 0x00, 0x52, 0x0d, 0x6e, 0x6f, 0x64, 0x65, 0x56, 0x70, 0x6e, 0x50, 0x75, 0x62, 0x4b, 0x65, 0x79, + 0x12, 0x28, 0x0a, 0x0f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x64, 0x69, 0x73, 0x6b, 0x5f, 0x75, + 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0d, 0x73, 0x74, 0x61, + 0x74, 0x65, 0x44, 0x69, 0x73, 0x6b, 0x55, 0x75, 0x69, 0x64, 0x42, 0x0a, 0x0a, 0x08, 0x72, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x48, 0x0a, 0x1e, 0x41, 0x63, 0x74, 0x69, 0x76, 0x61, + 0x74, 0x65, 0x41, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x4e, 0x6f, 0x64, 0x65, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x6f, 0x64, 0x65, + 0x5f, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x69, 0x70, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x09, 0x52, 0x0d, 0x6e, 0x6f, 0x64, 0x65, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x49, 0x70, 0x73, + 0x22, 0x40, 0x0a, 0x1f, 0x41, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x41, 0x64, 0x64, 0x69, + 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x1d, 0x0a, 0x03, 0x6c, 0x6f, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x0b, 0x2e, 0x70, 0x75, 0x62, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x6f, 0x67, 0x52, 0x03, 0x6c, + 0x6f, 0x67, 0x22, 0xd8, 0x01, 0x0a, 0x26, 0x41, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x41, + 0x73, 0x41, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x43, 0x6f, 0x6f, 0x72, 0x64, + 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x26, 0x0a, + 0x0f, 0x61, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x5f, 0x76, 0x70, 0x6e, 0x5f, 0x69, 0x70, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x61, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, + 0x56, 0x70, 0x6e, 0x49, 0x70, 0x12, 0x4c, 0x0a, 0x1b, 0x61, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, + 0x69, 0x6e, 0x67, 0x5f, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x5f, + 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x70, 0x75, 0x62, + 0x61, 0x70, 0x69, 0x2e, 0x50, 0x65, 0x65, 0x72, 0x52, 0x19, 0x61, 0x63, 0x74, 0x69, 0x76, 0x61, + 0x74, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x44, + 0x61, 0x74, 0x61, 0x12, 0x19, 0x0a, 0x08, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1d, + 0x0a, 0x0a, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x0c, 0x52, 0x09, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x22, 0x29, 0x0a, + 0x27, 0x41, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x41, 0x73, 0x41, 0x64, 0x64, 0x69, 0x74, + 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x43, 0x6f, 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x5a, 0x0a, 0x24, 0x41, 0x63, 0x74, 0x69, + 0x76, 0x61, 0x74, 0x65, 0x41, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x43, 0x6f, 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x26, 0x0a, 0x0f, 0x61, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x5f, 0x76, 0x70, 0x6e, - 0x5f, 0x69, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x61, 0x73, 0x73, 0x69, 0x67, - 0x6e, 0x65, 0x64, 0x56, 0x70, 0x6e, 0x49, 0x70, 0x12, 0x4c, 0x0a, 0x1b, 0x61, 0x63, 0x74, 0x69, - 0x76, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x61, 0x74, - 0x6f, 0x72, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, - 0x70, 0x75, 0x62, 0x61, 0x70, 0x69, 0x2e, 0x50, 0x65, 0x65, 0x72, 0x52, 0x19, 0x61, 0x63, 0x74, - 0x69, 0x76, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x61, 0x74, - 0x6f, 0x72, 0x44, 0x61, 0x74, 0x61, 0x12, 0x19, 0x0a, 0x08, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, - 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x49, - 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, - 0x22, 0x29, 0x0a, 0x27, 0x41, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x41, 0x73, 0x41, 0x64, - 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x43, 0x6f, 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x61, - 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x5a, 0x0a, 0x24, 0x41, - 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x41, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, - 0x6c, 0x43, 0x6f, 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x32, 0x0a, 0x15, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x61, 0x74, - 0x6f, 0x72, 0x5f, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x69, 0x70, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x13, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x50, - 0x75, 0x62, 0x6c, 0x69, 0x63, 0x49, 0x70, 0x22, 0x27, 0x0a, 0x25, 0x41, 0x63, 0x74, 0x69, 0x76, - 0x61, 0x74, 0x65, 0x41, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x43, 0x6f, 0x6f, - 0x72, 0x64, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x42, 0x0a, 0x12, 0x4a, 0x6f, 0x69, 0x6e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2c, 0x0a, 0x12, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x69, - 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x76, 0x70, 0x6e, 0x5f, 0x69, 0x70, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x10, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x56, - 0x70, 0x6e, 0x49, 0x70, 0x22, 0x15, 0x0a, 0x13, 0x4a, 0x6f, 0x69, 0x6e, 0x43, 0x6c, 0x75, 0x73, - 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1a, 0x0a, 0x18, 0x54, - 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x4e, 0x6f, 0x64, 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x1b, 0x0a, 0x19, 0x54, 0x72, 0x69, 0x67, 0x67, - 0x65, 0x72, 0x4e, 0x6f, 0x64, 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x21, 0x0a, 0x1f, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x43, + 0x12, 0x32, 0x0a, 0x15, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x5f, + 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x69, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x13, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x50, 0x75, 0x62, 0x6c, + 0x69, 0x63, 0x49, 0x70, 0x22, 0x27, 0x0a, 0x25, 0x41, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, + 0x41, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x43, 0x6f, 0x6f, 0x72, 0x64, 0x69, + 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x42, 0x0a, + 0x12, 0x4a, 0x6f, 0x69, 0x6e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x2c, 0x0a, 0x12, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x61, 0x74, + 0x6f, 0x72, 0x5f, 0x76, 0x70, 0x6e, 0x5f, 0x69, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x10, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x56, 0x70, 0x6e, 0x49, + 0x70, 0x22, 0x15, 0x0a, 0x13, 0x4a, 0x6f, 0x69, 0x6e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1a, 0x0a, 0x18, 0x54, 0x72, 0x69, 0x67, + 0x67, 0x65, 0x72, 0x4e, 0x6f, 0x64, 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x22, 0x1b, 0x0a, 0x19, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x4e, + 0x6f, 0x64, 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x21, 0x0a, 0x1f, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x43, 0x6f, 0x6f, 0x72, + 0x64, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x22, 0x22, 0x0a, 0x20, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x43, 0x6f, 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x22, 0x0a, 0x20, 0x54, 0x72, 0x69, 0x67, 0x67, - 0x65, 0x72, 0x43, 0x6f, 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x55, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x39, 0x0a, 0x1a, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x44, 0x69, 0x73, 0x6b, 0x4b, - 0x65, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x64, 0x69, 0x73, - 0x6b, 0x5f, 0x75, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x64, 0x69, - 0x73, 0x6b, 0x55, 0x75, 0x69, 0x64, 0x22, 0x1d, 0x0a, 0x1b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x44, 0x69, 0x73, 0x6b, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xc0, 0x01, 0x0a, 0x0b, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x43, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x20, 0x0a, 0x0c, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x5f, 0x76, - 0x70, 0x6e, 0x5f, 0x69, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x61, 0x64, 0x6d, - 0x69, 0x6e, 0x56, 0x70, 0x6e, 0x49, 0x70, 0x12, 0x35, 0x0a, 0x17, 0x63, 0x6f, 0x6f, 0x72, 0x64, - 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x76, 0x70, 0x6e, 0x5f, 0x70, 0x75, 0x62, 0x5f, 0x6b, - 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x14, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x69, - 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x56, 0x70, 0x6e, 0x50, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x12, 0x1e, - 0x0a, 0x0a, 0x6b, 0x75, 0x62, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0c, 0x52, 0x0a, 0x6b, 0x75, 0x62, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x19, - 0x0a, 0x08, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, - 0x52, 0x07, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x6c, 0x75, - 0x73, 0x74, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x63, - 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x22, 0x1f, 0x0a, 0x03, 0x4c, 0x6f, 0x67, 0x12, - 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x6e, 0x0a, 0x04, 0x50, 0x65, 0x65, - 0x72, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x69, 0x70, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x49, 0x70, 0x12, 0x15, - 0x0a, 0x06, 0x76, 0x70, 0x6e, 0x5f, 0x69, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, - 0x76, 0x70, 0x6e, 0x49, 0x70, 0x12, 0x1e, 0x0a, 0x0b, 0x76, 0x70, 0x6e, 0x5f, 0x70, 0x75, 0x62, - 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x76, 0x70, 0x6e, 0x50, - 0x75, 0x62, 0x4b, 0x65, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x0d, 0x52, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x32, 0xdf, 0x07, 0x0a, 0x03, 0x41, 0x50, - 0x49, 0x12, 0x3d, 0x0a, 0x08, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x17, 0x2e, - 0x70, 0x75, 0x62, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x70, 0x75, 0x62, 0x61, 0x70, 0x69, 0x2e, - 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x66, 0x0a, 0x15, 0x41, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x41, 0x73, 0x43, 0x6f, - 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x24, 0x2e, 0x70, 0x75, 0x62, 0x61, - 0x70, 0x69, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x41, 0x73, 0x43, 0x6f, 0x6f, - 0x72, 0x64, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x25, 0x2e, 0x70, 0x75, 0x62, 0x61, 0x70, 0x69, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, - 0x65, 0x41, 0x73, 0x43, 0x6f, 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x30, 0x01, 0x12, 0x4f, 0x0a, 0x0e, 0x41, 0x63, 0x74, 0x69, - 0x76, 0x61, 0x74, 0x65, 0x41, 0x73, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x1d, 0x2e, 0x70, 0x75, 0x62, - 0x61, 0x70, 0x69, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x41, 0x73, 0x4e, 0x6f, - 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x70, 0x75, 0x62, 0x61, - 0x70, 0x69, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x41, 0x73, 0x4e, 0x6f, 0x64, - 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6c, 0x0a, 0x17, 0x41, 0x63, 0x74, - 0x69, 0x76, 0x61, 0x74, 0x65, 0x41, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x4e, - 0x6f, 0x64, 0x65, 0x73, 0x12, 0x26, 0x2e, 0x70, 0x75, 0x62, 0x61, 0x70, 0x69, 0x2e, 0x41, 0x63, - 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x41, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, - 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x70, - 0x75, 0x62, 0x61, 0x70, 0x69, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x41, 0x64, - 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x30, 0x01, 0x12, 0x82, 0x01, 0x0a, 0x1f, 0x41, 0x63, 0x74, 0x69, - 0x76, 0x61, 0x74, 0x65, 0x41, 0x73, 0x41, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, - 0x43, 0x6f, 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x2e, 0x2e, 0x70, 0x75, - 0x62, 0x61, 0x70, 0x69, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x41, 0x73, 0x41, - 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x43, 0x6f, 0x6f, 0x72, 0x64, 0x69, 0x6e, - 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x70, 0x75, - 0x62, 0x61, 0x70, 0x69, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x41, 0x73, 0x41, - 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x43, 0x6f, 0x6f, 0x72, 0x64, 0x69, 0x6e, - 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x7c, 0x0a, 0x1d, - 0x41, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x41, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, - 0x61, 0x6c, 0x43, 0x6f, 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x2c, 0x2e, - 0x70, 0x75, 0x62, 0x61, 0x70, 0x69, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x41, - 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x43, 0x6f, 0x6f, 0x72, 0x64, 0x69, 0x6e, - 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x70, 0x75, - 0x62, 0x61, 0x70, 0x69, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x41, 0x64, 0x64, - 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x43, 0x6f, 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x61, 0x74, - 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x46, 0x0a, 0x0b, 0x4a, 0x6f, - 0x69, 0x6e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x1a, 0x2e, 0x70, 0x75, 0x62, 0x61, - 0x70, 0x69, 0x2e, 0x4a, 0x6f, 0x69, 0x6e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x70, 0x75, 0x62, 0x61, 0x70, 0x69, 0x2e, 0x4a, - 0x6f, 0x69, 0x6e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x58, 0x0a, 0x11, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x4e, 0x6f, 0x64, - 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x20, 0x2e, 0x70, 0x75, 0x62, 0x61, 0x70, 0x69, - 0x2e, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x4e, 0x6f, 0x64, 0x65, 0x55, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x70, 0x75, 0x62, 0x61, - 0x70, 0x69, 0x2e, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x4e, 0x6f, 0x64, 0x65, 0x55, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6d, 0x0a, 0x18, - 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x43, 0x6f, 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x61, 0x74, - 0x6f, 0x72, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x27, 0x2e, 0x70, 0x75, 0x62, 0x61, 0x70, - 0x69, 0x2e, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x43, 0x6f, 0x6f, 0x72, 0x64, 0x69, 0x6e, - 0x61, 0x74, 0x6f, 0x72, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x28, 0x2e, 0x70, 0x75, 0x62, 0x61, 0x70, 0x69, 0x2e, 0x54, 0x72, 0x69, 0x67, 0x67, - 0x65, 0x72, 0x43, 0x6f, 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x55, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5e, 0x0a, 0x13, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x44, 0x69, 0x73, 0x6b, 0x4b, - 0x65, 0x79, 0x12, 0x22, 0x2e, 0x70, 0x75, 0x62, 0x61, 0x70, 0x69, 0x2e, 0x52, 0x65, 0x71, 0x75, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x39, 0x0a, 0x1a, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x44, 0x69, 0x73, 0x6b, 0x4b, 0x65, 0x79, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x70, 0x75, 0x62, 0x61, 0x70, 0x69, 0x2e, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x64, 0x69, 0x73, 0x6b, 0x5f, 0x75, + 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x64, 0x69, 0x73, 0x6b, 0x55, + 0x75, 0x69, 0x64, 0x22, 0x1d, 0x0a, 0x1b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x53, 0x74, + 0x61, 0x74, 0x65, 0x44, 0x69, 0x73, 0x6b, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0xc0, 0x01, 0x0a, 0x0b, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x12, 0x20, 0x0a, 0x0c, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x5f, 0x76, 0x70, 0x6e, 0x5f, + 0x69, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x56, + 0x70, 0x6e, 0x49, 0x70, 0x12, 0x35, 0x0a, 0x17, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x61, + 0x74, 0x6f, 0x72, 0x5f, 0x76, 0x70, 0x6e, 0x5f, 0x70, 0x75, 0x62, 0x5f, 0x6b, 0x65, 0x79, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x14, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x61, 0x74, + 0x6f, 0x72, 0x56, 0x70, 0x6e, 0x50, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x12, 0x1e, 0x0a, 0x0a, 0x6b, + 0x75, 0x62, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, + 0x0a, 0x6b, 0x75, 0x62, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x19, 0x0a, 0x08, 0x6f, + 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x6f, + 0x77, 0x6e, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, + 0x72, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x63, 0x6c, 0x75, 0x73, + 0x74, 0x65, 0x72, 0x49, 0x64, 0x22, 0x1f, 0x0a, 0x03, 0x4c, 0x6f, 0x67, 0x12, 0x18, 0x0a, 0x07, + 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x6e, 0x0a, 0x04, 0x50, 0x65, 0x65, 0x72, 0x12, 0x1b, + 0x0a, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x69, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x08, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x49, 0x70, 0x12, 0x15, 0x0a, 0x06, 0x76, + 0x70, 0x6e, 0x5f, 0x69, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x70, 0x6e, + 0x49, 0x70, 0x12, 0x1e, 0x0a, 0x0b, 0x76, 0x70, 0x6e, 0x5f, 0x70, 0x75, 0x62, 0x5f, 0x6b, 0x65, + 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x76, 0x70, 0x6e, 0x50, 0x75, 0x62, 0x4b, + 0x65, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, + 0x52, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x32, 0xe3, 0x07, 0x0a, 0x03, 0x41, 0x50, 0x49, 0x12, 0x3d, + 0x0a, 0x08, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x17, 0x2e, 0x70, 0x75, 0x62, + 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x70, 0x75, 0x62, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, + 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x66, 0x0a, + 0x15, 0x41, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x41, 0x73, 0x43, 0x6f, 0x6f, 0x72, 0x64, + 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x24, 0x2e, 0x70, 0x75, 0x62, 0x61, 0x70, 0x69, 0x2e, + 0x41, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x41, 0x73, 0x43, 0x6f, 0x6f, 0x72, 0x64, 0x69, + 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x70, + 0x75, 0x62, 0x61, 0x70, 0x69, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x41, 0x73, + 0x43, 0x6f, 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x30, 0x01, 0x12, 0x53, 0x0a, 0x0e, 0x41, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, + 0x65, 0x41, 0x73, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x1d, 0x2e, 0x70, 0x75, 0x62, 0x61, 0x70, 0x69, + 0x2e, 0x41, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x41, 0x73, 0x4e, 0x6f, 0x64, 0x65, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x70, 0x75, 0x62, 0x61, 0x70, 0x69, 0x2e, + 0x41, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x41, 0x73, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x28, 0x01, 0x30, 0x01, 0x12, 0x6c, 0x0a, 0x17, 0x41, 0x63, + 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x41, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, + 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x12, 0x26, 0x2e, 0x70, 0x75, 0x62, 0x61, 0x70, 0x69, 0x2e, 0x41, + 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x41, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, + 0x6c, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, + 0x70, 0x75, 0x62, 0x61, 0x70, 0x69, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x41, + 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x30, 0x01, 0x12, 0x82, 0x01, 0x0a, 0x1f, 0x41, 0x63, 0x74, + 0x69, 0x76, 0x61, 0x74, 0x65, 0x41, 0x73, 0x41, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, + 0x6c, 0x43, 0x6f, 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x2e, 0x2e, 0x70, + 0x75, 0x62, 0x61, 0x70, 0x69, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x41, 0x73, + 0x41, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x43, 0x6f, 0x6f, 0x72, 0x64, 0x69, + 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x70, + 0x75, 0x62, 0x61, 0x70, 0x69, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x41, 0x73, + 0x41, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x43, 0x6f, 0x6f, 0x72, 0x64, 0x69, + 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x7c, 0x0a, + 0x1d, 0x41, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x41, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, + 0x6e, 0x61, 0x6c, 0x43, 0x6f, 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x2c, + 0x2e, 0x70, 0x75, 0x62, 0x61, 0x70, 0x69, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, + 0x41, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x43, 0x6f, 0x6f, 0x72, 0x64, 0x69, + 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x70, + 0x75, 0x62, 0x61, 0x70, 0x69, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x41, 0x64, + 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x43, 0x6f, 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x61, + 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x46, 0x0a, 0x0b, 0x4a, + 0x6f, 0x69, 0x6e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x1a, 0x2e, 0x70, 0x75, 0x62, + 0x61, 0x70, 0x69, 0x2e, 0x4a, 0x6f, 0x69, 0x6e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x70, 0x75, 0x62, 0x61, 0x70, 0x69, 0x2e, + 0x4a, 0x6f, 0x69, 0x6e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x58, 0x0a, 0x11, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x4e, 0x6f, + 0x64, 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x20, 0x2e, 0x70, 0x75, 0x62, 0x61, 0x70, + 0x69, 0x2e, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x4e, 0x6f, 0x64, 0x65, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x70, 0x75, 0x62, + 0x61, 0x70, 0x69, 0x2e, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x4e, 0x6f, 0x64, 0x65, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6d, 0x0a, + 0x18, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x43, 0x6f, 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x61, + 0x74, 0x6f, 0x72, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x27, 0x2e, 0x70, 0x75, 0x62, 0x61, + 0x70, 0x69, 0x2e, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x43, 0x6f, 0x6f, 0x72, 0x64, 0x69, + 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x70, 0x75, 0x62, 0x61, 0x70, 0x69, 0x2e, 0x54, 0x72, 0x69, 0x67, + 0x67, 0x65, 0x72, 0x43, 0x6f, 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5e, 0x0a, 0x13, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x44, 0x69, 0x73, 0x6b, - 0x4b, 0x65, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x42, 0x5a, 0x40, 0x67, - 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x64, 0x67, 0x65, 0x6c, 0x65, - 0x73, 0x73, 0x73, 0x79, 0x73, 0x2f, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x65, 0x6c, 0x6c, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x2f, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x2f, - 0x70, 0x75, 0x62, 0x61, 0x70, 0x69, 0x2f, 0x70, 0x75, 0x62, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x4b, 0x65, 0x79, 0x12, 0x22, 0x2e, 0x70, 0x75, 0x62, 0x61, 0x70, 0x69, 0x2e, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x44, 0x69, 0x73, 0x6b, 0x4b, 0x65, 0x79, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x70, 0x75, 0x62, 0x61, 0x70, 0x69, + 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x44, 0x69, 0x73, + 0x6b, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x42, 0x5a, 0x40, + 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x64, 0x67, 0x65, 0x6c, + 0x65, 0x73, 0x73, 0x73, 0x79, 0x73, 0x2f, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x65, 0x6c, 0x6c, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, + 0x2f, 0x70, 0x75, 0x62, 0x61, 0x70, 0x69, 0x2f, 0x70, 0x75, 0x62, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1433,63 +1560,65 @@ func file_pubapi_proto_rawDescGZIP() []byte { return file_pubapi_proto_rawDescData } -var file_pubapi_proto_msgTypes = make([]protoimpl.MessageInfo, 23) +var file_pubapi_proto_msgTypes = make([]protoimpl.MessageInfo, 24) var file_pubapi_proto_goTypes = []interface{}{ (*GetStateRequest)(nil), // 0: pubapi.GetStateRequest (*GetStateResponse)(nil), // 1: pubapi.GetStateResponse (*ActivateAsCoordinatorRequest)(nil), // 2: pubapi.ActivateAsCoordinatorRequest (*ActivateAsCoordinatorResponse)(nil), // 3: pubapi.ActivateAsCoordinatorResponse (*ActivateAsNodeRequest)(nil), // 4: pubapi.ActivateAsNodeRequest - (*ActivateAsNodeResponse)(nil), // 5: pubapi.ActivateAsNodeResponse - (*ActivateAdditionalNodesRequest)(nil), // 6: pubapi.ActivateAdditionalNodesRequest - (*ActivateAdditionalNodesResponse)(nil), // 7: pubapi.ActivateAdditionalNodesResponse - (*ActivateAsAdditionalCoordinatorRequest)(nil), // 8: pubapi.ActivateAsAdditionalCoordinatorRequest - (*ActivateAsAdditionalCoordinatorResponse)(nil), // 9: pubapi.ActivateAsAdditionalCoordinatorResponse - (*ActivateAdditionalCoordinatorRequest)(nil), // 10: pubapi.ActivateAdditionalCoordinatorRequest - (*ActivateAdditionalCoordinatorResponse)(nil), // 11: pubapi.ActivateAdditionalCoordinatorResponse - (*JoinClusterRequest)(nil), // 12: pubapi.JoinClusterRequest - (*JoinClusterResponse)(nil), // 13: pubapi.JoinClusterResponse - (*TriggerNodeUpdateRequest)(nil), // 14: pubapi.TriggerNodeUpdateRequest - (*TriggerNodeUpdateResponse)(nil), // 15: pubapi.TriggerNodeUpdateResponse - (*TriggerCoordinatorUpdateRequest)(nil), // 16: pubapi.TriggerCoordinatorUpdateRequest - (*TriggerCoordinatorUpdateResponse)(nil), // 17: pubapi.TriggerCoordinatorUpdateResponse - (*RequestStateDiskKeyRequest)(nil), // 18: pubapi.RequestStateDiskKeyRequest - (*RequestStateDiskKeyResponse)(nil), // 19: pubapi.RequestStateDiskKeyResponse - (*AdminConfig)(nil), // 20: pubapi.AdminConfig - (*Log)(nil), // 21: pubapi.Log - (*Peer)(nil), // 22: pubapi.Peer + (*ActivateAsNodeInitialRequest)(nil), // 5: pubapi.ActivateAsNodeInitialRequest + (*ActivateAsNodeResponse)(nil), // 6: pubapi.ActivateAsNodeResponse + (*ActivateAdditionalNodesRequest)(nil), // 7: pubapi.ActivateAdditionalNodesRequest + (*ActivateAdditionalNodesResponse)(nil), // 8: pubapi.ActivateAdditionalNodesResponse + (*ActivateAsAdditionalCoordinatorRequest)(nil), // 9: pubapi.ActivateAsAdditionalCoordinatorRequest + (*ActivateAsAdditionalCoordinatorResponse)(nil), // 10: pubapi.ActivateAsAdditionalCoordinatorResponse + (*ActivateAdditionalCoordinatorRequest)(nil), // 11: pubapi.ActivateAdditionalCoordinatorRequest + (*ActivateAdditionalCoordinatorResponse)(nil), // 12: pubapi.ActivateAdditionalCoordinatorResponse + (*JoinClusterRequest)(nil), // 13: pubapi.JoinClusterRequest + (*JoinClusterResponse)(nil), // 14: pubapi.JoinClusterResponse + (*TriggerNodeUpdateRequest)(nil), // 15: pubapi.TriggerNodeUpdateRequest + (*TriggerNodeUpdateResponse)(nil), // 16: pubapi.TriggerNodeUpdateResponse + (*TriggerCoordinatorUpdateRequest)(nil), // 17: pubapi.TriggerCoordinatorUpdateRequest + (*TriggerCoordinatorUpdateResponse)(nil), // 18: pubapi.TriggerCoordinatorUpdateResponse + (*RequestStateDiskKeyRequest)(nil), // 19: pubapi.RequestStateDiskKeyRequest + (*RequestStateDiskKeyResponse)(nil), // 20: pubapi.RequestStateDiskKeyResponse + (*AdminConfig)(nil), // 21: pubapi.AdminConfig + (*Log)(nil), // 22: pubapi.Log + (*Peer)(nil), // 23: pubapi.Peer } var file_pubapi_proto_depIdxs = []int32{ - 20, // 0: pubapi.ActivateAsCoordinatorResponse.admin_config:type_name -> pubapi.AdminConfig - 21, // 1: pubapi.ActivateAsCoordinatorResponse.log:type_name -> pubapi.Log - 22, // 2: pubapi.ActivateAsNodeRequest.peers:type_name -> pubapi.Peer - 21, // 3: pubapi.ActivateAdditionalNodesResponse.log:type_name -> pubapi.Log - 22, // 4: pubapi.ActivateAsAdditionalCoordinatorRequest.activating_coordinator_data:type_name -> pubapi.Peer - 0, // 5: pubapi.API.GetState:input_type -> pubapi.GetStateRequest - 2, // 6: pubapi.API.ActivateAsCoordinator:input_type -> pubapi.ActivateAsCoordinatorRequest - 4, // 7: pubapi.API.ActivateAsNode:input_type -> pubapi.ActivateAsNodeRequest - 6, // 8: pubapi.API.ActivateAdditionalNodes:input_type -> pubapi.ActivateAdditionalNodesRequest - 8, // 9: pubapi.API.ActivateAsAdditionalCoordinator:input_type -> pubapi.ActivateAsAdditionalCoordinatorRequest - 10, // 10: pubapi.API.ActivateAdditionalCoordinator:input_type -> pubapi.ActivateAdditionalCoordinatorRequest - 12, // 11: pubapi.API.JoinCluster:input_type -> pubapi.JoinClusterRequest - 14, // 12: pubapi.API.TriggerNodeUpdate:input_type -> pubapi.TriggerNodeUpdateRequest - 16, // 13: pubapi.API.TriggerCoordinatorUpdate:input_type -> pubapi.TriggerCoordinatorUpdateRequest - 18, // 14: pubapi.API.RequestStateDiskKey:input_type -> pubapi.RequestStateDiskKeyRequest - 1, // 15: pubapi.API.GetState:output_type -> pubapi.GetStateResponse - 3, // 16: pubapi.API.ActivateAsCoordinator:output_type -> pubapi.ActivateAsCoordinatorResponse - 5, // 17: pubapi.API.ActivateAsNode:output_type -> pubapi.ActivateAsNodeResponse - 7, // 18: pubapi.API.ActivateAdditionalNodes:output_type -> pubapi.ActivateAdditionalNodesResponse - 9, // 19: pubapi.API.ActivateAsAdditionalCoordinator:output_type -> pubapi.ActivateAsAdditionalCoordinatorResponse - 11, // 20: pubapi.API.ActivateAdditionalCoordinator:output_type -> pubapi.ActivateAdditionalCoordinatorResponse - 13, // 21: pubapi.API.JoinCluster:output_type -> pubapi.JoinClusterResponse - 15, // 22: pubapi.API.TriggerNodeUpdate:output_type -> pubapi.TriggerNodeUpdateResponse - 17, // 23: pubapi.API.TriggerCoordinatorUpdate:output_type -> pubapi.TriggerCoordinatorUpdateResponse - 19, // 24: pubapi.API.RequestStateDiskKey:output_type -> pubapi.RequestStateDiskKeyResponse - 15, // [15:25] is the sub-list for method output_type - 5, // [5:15] is the sub-list for method input_type - 5, // [5:5] is the sub-list for extension type_name - 5, // [5:5] is the sub-list for extension extendee - 0, // [0:5] is the sub-list for field type_name + 21, // 0: pubapi.ActivateAsCoordinatorResponse.admin_config:type_name -> pubapi.AdminConfig + 22, // 1: pubapi.ActivateAsCoordinatorResponse.log:type_name -> pubapi.Log + 5, // 2: pubapi.ActivateAsNodeRequest.initial_request:type_name -> pubapi.ActivateAsNodeInitialRequest + 23, // 3: pubapi.ActivateAsNodeInitialRequest.peers:type_name -> pubapi.Peer + 22, // 4: pubapi.ActivateAdditionalNodesResponse.log:type_name -> pubapi.Log + 23, // 5: pubapi.ActivateAsAdditionalCoordinatorRequest.activating_coordinator_data:type_name -> pubapi.Peer + 0, // 6: pubapi.API.GetState:input_type -> pubapi.GetStateRequest + 2, // 7: pubapi.API.ActivateAsCoordinator:input_type -> pubapi.ActivateAsCoordinatorRequest + 4, // 8: pubapi.API.ActivateAsNode:input_type -> pubapi.ActivateAsNodeRequest + 7, // 9: pubapi.API.ActivateAdditionalNodes:input_type -> pubapi.ActivateAdditionalNodesRequest + 9, // 10: pubapi.API.ActivateAsAdditionalCoordinator:input_type -> pubapi.ActivateAsAdditionalCoordinatorRequest + 11, // 11: pubapi.API.ActivateAdditionalCoordinator:input_type -> pubapi.ActivateAdditionalCoordinatorRequest + 13, // 12: pubapi.API.JoinCluster:input_type -> pubapi.JoinClusterRequest + 15, // 13: pubapi.API.TriggerNodeUpdate:input_type -> pubapi.TriggerNodeUpdateRequest + 17, // 14: pubapi.API.TriggerCoordinatorUpdate:input_type -> pubapi.TriggerCoordinatorUpdateRequest + 19, // 15: pubapi.API.RequestStateDiskKey:input_type -> pubapi.RequestStateDiskKeyRequest + 1, // 16: pubapi.API.GetState:output_type -> pubapi.GetStateResponse + 3, // 17: pubapi.API.ActivateAsCoordinator:output_type -> pubapi.ActivateAsCoordinatorResponse + 6, // 18: pubapi.API.ActivateAsNode:output_type -> pubapi.ActivateAsNodeResponse + 8, // 19: pubapi.API.ActivateAdditionalNodes:output_type -> pubapi.ActivateAdditionalNodesResponse + 10, // 20: pubapi.API.ActivateAsAdditionalCoordinator:output_type -> pubapi.ActivateAsAdditionalCoordinatorResponse + 12, // 21: pubapi.API.ActivateAdditionalCoordinator:output_type -> pubapi.ActivateAdditionalCoordinatorResponse + 14, // 22: pubapi.API.JoinCluster:output_type -> pubapi.JoinClusterResponse + 16, // 23: pubapi.API.TriggerNodeUpdate:output_type -> pubapi.TriggerNodeUpdateResponse + 18, // 24: pubapi.API.TriggerCoordinatorUpdate:output_type -> pubapi.TriggerCoordinatorUpdateResponse + 20, // 25: pubapi.API.RequestStateDiskKey:output_type -> pubapi.RequestStateDiskKeyResponse + 16, // [16:26] is the sub-list for method output_type + 6, // [6:16] is the sub-list for method input_type + 6, // [6:6] is the sub-list for extension type_name + 6, // [6:6] is the sub-list for extension extendee + 0, // [0:6] is the sub-list for field type_name } func init() { file_pubapi_proto_init() } @@ -1559,7 +1688,7 @@ func file_pubapi_proto_init() { } } file_pubapi_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ActivateAsNodeResponse); i { + switch v := v.(*ActivateAsNodeInitialRequest); i { case 0: return &v.state case 1: @@ -1571,7 +1700,7 @@ func file_pubapi_proto_init() { } } file_pubapi_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ActivateAdditionalNodesRequest); i { + switch v := v.(*ActivateAsNodeResponse); i { case 0: return &v.state case 1: @@ -1583,7 +1712,7 @@ func file_pubapi_proto_init() { } } file_pubapi_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ActivateAdditionalNodesResponse); i { + switch v := v.(*ActivateAdditionalNodesRequest); i { case 0: return &v.state case 1: @@ -1595,7 +1724,7 @@ func file_pubapi_proto_init() { } } file_pubapi_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ActivateAsAdditionalCoordinatorRequest); i { + switch v := v.(*ActivateAdditionalNodesResponse); i { case 0: return &v.state case 1: @@ -1607,7 +1736,7 @@ func file_pubapi_proto_init() { } } file_pubapi_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ActivateAsAdditionalCoordinatorResponse); i { + switch v := v.(*ActivateAsAdditionalCoordinatorRequest); i { case 0: return &v.state case 1: @@ -1619,7 +1748,7 @@ func file_pubapi_proto_init() { } } file_pubapi_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ActivateAdditionalCoordinatorRequest); i { + switch v := v.(*ActivateAsAdditionalCoordinatorResponse); i { case 0: return &v.state case 1: @@ -1631,7 +1760,7 @@ func file_pubapi_proto_init() { } } file_pubapi_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ActivateAdditionalCoordinatorResponse); i { + switch v := v.(*ActivateAdditionalCoordinatorRequest); i { case 0: return &v.state case 1: @@ -1643,7 +1772,7 @@ func file_pubapi_proto_init() { } } file_pubapi_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*JoinClusterRequest); i { + switch v := v.(*ActivateAdditionalCoordinatorResponse); i { case 0: return &v.state case 1: @@ -1655,7 +1784,7 @@ func file_pubapi_proto_init() { } } file_pubapi_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*JoinClusterResponse); i { + switch v := v.(*JoinClusterRequest); i { case 0: return &v.state case 1: @@ -1667,7 +1796,7 @@ func file_pubapi_proto_init() { } } file_pubapi_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TriggerNodeUpdateRequest); i { + switch v := v.(*JoinClusterResponse); i { case 0: return &v.state case 1: @@ -1679,7 +1808,7 @@ func file_pubapi_proto_init() { } } file_pubapi_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TriggerNodeUpdateResponse); i { + switch v := v.(*TriggerNodeUpdateRequest); i { case 0: return &v.state case 1: @@ -1691,7 +1820,7 @@ func file_pubapi_proto_init() { } } file_pubapi_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TriggerCoordinatorUpdateRequest); i { + switch v := v.(*TriggerNodeUpdateResponse); i { case 0: return &v.state case 1: @@ -1703,7 +1832,7 @@ func file_pubapi_proto_init() { } } file_pubapi_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TriggerCoordinatorUpdateResponse); i { + switch v := v.(*TriggerCoordinatorUpdateRequest); i { case 0: return &v.state case 1: @@ -1715,7 +1844,7 @@ func file_pubapi_proto_init() { } } file_pubapi_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RequestStateDiskKeyRequest); i { + switch v := v.(*TriggerCoordinatorUpdateResponse); i { case 0: return &v.state case 1: @@ -1727,7 +1856,7 @@ func file_pubapi_proto_init() { } } file_pubapi_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RequestStateDiskKeyResponse); i { + switch v := v.(*RequestStateDiskKeyRequest); i { case 0: return &v.state case 1: @@ -1739,7 +1868,7 @@ func file_pubapi_proto_init() { } } file_pubapi_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AdminConfig); i { + switch v := v.(*RequestStateDiskKeyResponse); i { case 0: return &v.state case 1: @@ -1751,7 +1880,7 @@ func file_pubapi_proto_init() { } } file_pubapi_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Log); i { + switch v := v.(*AdminConfig); i { case 0: return &v.state case 1: @@ -1763,6 +1892,18 @@ func file_pubapi_proto_init() { } } file_pubapi_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Log); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pubapi_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Peer); i { case 0: return &v.state @@ -1779,13 +1920,21 @@ func file_pubapi_proto_init() { (*ActivateAsCoordinatorResponse_AdminConfig)(nil), (*ActivateAsCoordinatorResponse_Log)(nil), } + file_pubapi_proto_msgTypes[4].OneofWrappers = []interface{}{ + (*ActivateAsNodeRequest_InitialRequest)(nil), + (*ActivateAsNodeRequest_StateDiskKey)(nil), + } + file_pubapi_proto_msgTypes[6].OneofWrappers = []interface{}{ + (*ActivateAsNodeResponse_NodeVpnPubKey)(nil), + (*ActivateAsNodeResponse_StateDiskUuid)(nil), + } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_pubapi_proto_rawDesc, NumEnums: 0, - NumMessages: 23, + NumMessages: 24, NumExtensions: 0, NumServices: 1, }, diff --git a/coordinator/pubapi/pubproto/pubapi.proto b/coordinator/pubapi/pubproto/pubapi.proto index 1fc67a199..91822ed27 100644 --- a/coordinator/pubapi/pubproto/pubapi.proto +++ b/coordinator/pubapi/pubproto/pubapi.proto @@ -7,7 +7,7 @@ option go_package = "github.com/edgelesssys/constellation/coordinator/pubapi/pub service API { rpc GetState(GetStateRequest) returns (GetStateResponse); rpc ActivateAsCoordinator(ActivateAsCoordinatorRequest) returns (stream ActivateAsCoordinatorResponse); - rpc ActivateAsNode(ActivateAsNodeRequest) returns (ActivateAsNodeResponse); + rpc ActivateAsNode(stream ActivateAsNodeRequest) returns (stream ActivateAsNodeResponse); rpc ActivateAdditionalNodes(ActivateAdditionalNodesRequest) returns (stream ActivateAdditionalNodesResponse); rpc ActivateAsAdditionalCoordinator(ActivateAsAdditionalCoordinatorRequest) returns (ActivateAsAdditionalCoordinatorResponse); rpc ActivateAdditionalCoordinator(ActivateAdditionalCoordinatorRequest) returns (ActivateAdditionalCoordinatorResponse); @@ -44,6 +44,13 @@ message ActivateAsCoordinatorResponse { } message ActivateAsNodeRequest { + oneof request { + ActivateAsNodeInitialRequest initial_request = 1; + bytes state_disk_key = 2; + } +} + +message ActivateAsNodeInitialRequest { string node_vpn_ip = 1; repeated Peer peers = 2; bytes owner_id = 3; @@ -51,7 +58,10 @@ message ActivateAsNodeRequest { } message ActivateAsNodeResponse { - bytes node_vpn_pub_key = 1; + oneof response { + bytes node_vpn_pub_key = 1; + string state_disk_uuid = 2; + } } message ActivateAdditionalNodesRequest { diff --git a/coordinator/pubapi/pubproto/pubapi_grpc.pb.go b/coordinator/pubapi/pubproto/pubapi_grpc.pb.go index b4676593c..754db7a94 100644 --- a/coordinator/pubapi/pubproto/pubapi_grpc.pb.go +++ b/coordinator/pubapi/pubproto/pubapi_grpc.pb.go @@ -20,7 +20,7 @@ const _ = grpc.SupportPackageIsVersion7 type APIClient interface { GetState(ctx context.Context, in *GetStateRequest, opts ...grpc.CallOption) (*GetStateResponse, error) ActivateAsCoordinator(ctx context.Context, in *ActivateAsCoordinatorRequest, opts ...grpc.CallOption) (API_ActivateAsCoordinatorClient, error) - ActivateAsNode(ctx context.Context, in *ActivateAsNodeRequest, opts ...grpc.CallOption) (*ActivateAsNodeResponse, error) + ActivateAsNode(ctx context.Context, opts ...grpc.CallOption) (API_ActivateAsNodeClient, error) ActivateAdditionalNodes(ctx context.Context, in *ActivateAdditionalNodesRequest, opts ...grpc.CallOption) (API_ActivateAdditionalNodesClient, error) ActivateAsAdditionalCoordinator(ctx context.Context, in *ActivateAsAdditionalCoordinatorRequest, opts ...grpc.CallOption) (*ActivateAsAdditionalCoordinatorResponse, error) ActivateAdditionalCoordinator(ctx context.Context, in *ActivateAdditionalCoordinatorRequest, opts ...grpc.CallOption) (*ActivateAdditionalCoordinatorResponse, error) @@ -79,17 +79,39 @@ func (x *aPIActivateAsCoordinatorClient) Recv() (*ActivateAsCoordinatorResponse, return m, nil } -func (c *aPIClient) ActivateAsNode(ctx context.Context, in *ActivateAsNodeRequest, opts ...grpc.CallOption) (*ActivateAsNodeResponse, error) { - out := new(ActivateAsNodeResponse) - err := c.cc.Invoke(ctx, "/pubapi.API/ActivateAsNode", in, out, opts...) +func (c *aPIClient) ActivateAsNode(ctx context.Context, opts ...grpc.CallOption) (API_ActivateAsNodeClient, error) { + stream, err := c.cc.NewStream(ctx, &API_ServiceDesc.Streams[1], "/pubapi.API/ActivateAsNode", opts...) if err != nil { return nil, err } - return out, nil + x := &aPIActivateAsNodeClient{stream} + return x, nil +} + +type API_ActivateAsNodeClient interface { + Send(*ActivateAsNodeRequest) error + Recv() (*ActivateAsNodeResponse, error) + grpc.ClientStream +} + +type aPIActivateAsNodeClient struct { + grpc.ClientStream +} + +func (x *aPIActivateAsNodeClient) Send(m *ActivateAsNodeRequest) error { + return x.ClientStream.SendMsg(m) +} + +func (x *aPIActivateAsNodeClient) Recv() (*ActivateAsNodeResponse, error) { + m := new(ActivateAsNodeResponse) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil } func (c *aPIClient) ActivateAdditionalNodes(ctx context.Context, in *ActivateAdditionalNodesRequest, opts ...grpc.CallOption) (API_ActivateAdditionalNodesClient, error) { - stream, err := c.cc.NewStream(ctx, &API_ServiceDesc.Streams[1], "/pubapi.API/ActivateAdditionalNodes", opts...) + stream, err := c.cc.NewStream(ctx, &API_ServiceDesc.Streams[2], "/pubapi.API/ActivateAdditionalNodes", opts...) if err != nil { return nil, err } @@ -180,7 +202,7 @@ func (c *aPIClient) RequestStateDiskKey(ctx context.Context, in *RequestStateDis type APIServer interface { GetState(context.Context, *GetStateRequest) (*GetStateResponse, error) ActivateAsCoordinator(*ActivateAsCoordinatorRequest, API_ActivateAsCoordinatorServer) error - ActivateAsNode(context.Context, *ActivateAsNodeRequest) (*ActivateAsNodeResponse, error) + ActivateAsNode(API_ActivateAsNodeServer) error ActivateAdditionalNodes(*ActivateAdditionalNodesRequest, API_ActivateAdditionalNodesServer) error ActivateAsAdditionalCoordinator(context.Context, *ActivateAsAdditionalCoordinatorRequest) (*ActivateAsAdditionalCoordinatorResponse, error) ActivateAdditionalCoordinator(context.Context, *ActivateAdditionalCoordinatorRequest) (*ActivateAdditionalCoordinatorResponse, error) @@ -201,8 +223,8 @@ func (UnimplementedAPIServer) GetState(context.Context, *GetStateRequest) (*GetS func (UnimplementedAPIServer) ActivateAsCoordinator(*ActivateAsCoordinatorRequest, API_ActivateAsCoordinatorServer) error { return status.Errorf(codes.Unimplemented, "method ActivateAsCoordinator not implemented") } -func (UnimplementedAPIServer) ActivateAsNode(context.Context, *ActivateAsNodeRequest) (*ActivateAsNodeResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ActivateAsNode not implemented") +func (UnimplementedAPIServer) ActivateAsNode(API_ActivateAsNodeServer) error { + return status.Errorf(codes.Unimplemented, "method ActivateAsNode not implemented") } func (UnimplementedAPIServer) ActivateAdditionalNodes(*ActivateAdditionalNodesRequest, API_ActivateAdditionalNodesServer) error { return status.Errorf(codes.Unimplemented, "method ActivateAdditionalNodes not implemented") @@ -277,22 +299,30 @@ func (x *aPIActivateAsCoordinatorServer) Send(m *ActivateAsCoordinatorResponse) return x.ServerStream.SendMsg(m) } -func _API_ActivateAsNode_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ActivateAsNodeRequest) - if err := dec(in); err != nil { +func _API_ActivateAsNode_Handler(srv interface{}, stream grpc.ServerStream) error { + return srv.(APIServer).ActivateAsNode(&aPIActivateAsNodeServer{stream}) +} + +type API_ActivateAsNodeServer interface { + Send(*ActivateAsNodeResponse) error + Recv() (*ActivateAsNodeRequest, error) + grpc.ServerStream +} + +type aPIActivateAsNodeServer struct { + grpc.ServerStream +} + +func (x *aPIActivateAsNodeServer) Send(m *ActivateAsNodeResponse) error { + return x.ServerStream.SendMsg(m) +} + +func (x *aPIActivateAsNodeServer) Recv() (*ActivateAsNodeRequest, error) { + m := new(ActivateAsNodeRequest) + if err := x.ServerStream.RecvMsg(m); err != nil { return nil, err } - if interceptor == nil { - return srv.(APIServer).ActivateAsNode(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/pubapi.API/ActivateAsNode", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(APIServer).ActivateAsNode(ctx, req.(*ActivateAsNodeRequest)) - } - return interceptor(ctx, in, info, handler) + return m, nil } func _API_ActivateAdditionalNodes_Handler(srv interface{}, stream grpc.ServerStream) error { @@ -435,10 +465,6 @@ var API_ServiceDesc = grpc.ServiceDesc{ MethodName: "GetState", Handler: _API_GetState_Handler, }, - { - MethodName: "ActivateAsNode", - Handler: _API_ActivateAsNode_Handler, - }, { MethodName: "ActivateAsAdditionalCoordinator", Handler: _API_ActivateAsAdditionalCoordinator_Handler, @@ -470,6 +496,12 @@ var API_ServiceDesc = grpc.ServiceDesc{ Handler: _API_ActivateAsCoordinator_Handler, ServerStreams: true, }, + { + StreamName: "ActivateAsNode", + Handler: _API_ActivateAsNode_Handler, + ServerStreams: true, + ClientStreams: true, + }, { StreamName: "ActivateAdditionalNodes", Handler: _API_ActivateAdditionalNodes_Handler, diff --git a/state/keyservice/keyservice_test.go b/state/keyservice/keyservice_test.go index 068cc9c2f..6b901262b 100644 --- a/state/keyservice/keyservice_test.go +++ b/state/keyservice/keyservice_test.go @@ -129,8 +129,8 @@ func (s *stubAPIServer) ActivateAsCoordinator(in *pubproto.ActivateAsCoordinator return nil } -func (s *stubAPIServer) ActivateAsNode(ctx context.Context, in *pubproto.ActivateAsNodeRequest) (*pubproto.ActivateAsNodeResponse, error) { - return nil, nil +func (s *stubAPIServer) ActivateAsNode(pubproto.API_ActivateAsNodeServer) error { + return nil } func (s *stubAPIServer) ActivateAdditionalNodes(in *pubproto.ActivateAdditionalNodesRequest, srv pubproto.API_ActivateAdditionalNodesServer) error {