mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-05-10 02:05:09 -04:00
Add debugd ssh key distribution
This commit is contained in:
parent
cf9662641c
commit
d770957975
16 changed files with 541 additions and 262 deletions
|
@ -11,7 +11,6 @@ import (
|
||||||
|
|
||||||
"github.com/edgelesssys/constellation/debugd/bootstrapper"
|
"github.com/edgelesssys/constellation/debugd/bootstrapper"
|
||||||
"github.com/edgelesssys/constellation/debugd/cdbg/config"
|
"github.com/edgelesssys/constellation/debugd/cdbg/config"
|
||||||
"github.com/edgelesssys/constellation/debugd/cdbg/state"
|
|
||||||
"github.com/edgelesssys/constellation/debugd/debugd"
|
"github.com/edgelesssys/constellation/debugd/debugd"
|
||||||
depl "github.com/edgelesssys/constellation/debugd/debugd/deploy"
|
depl "github.com/edgelesssys/constellation/debugd/debugd/deploy"
|
||||||
pb "github.com/edgelesssys/constellation/debugd/service"
|
pb "github.com/edgelesssys/constellation/debugd/service"
|
||||||
|
|
|
@ -11,6 +11,7 @@ import (
|
||||||
"github.com/edgelesssys/constellation/debugd/debugd"
|
"github.com/edgelesssys/constellation/debugd/debugd"
|
||||||
pb "github.com/edgelesssys/constellation/debugd/service"
|
pb "github.com/edgelesssys/constellation/debugd/service"
|
||||||
"github.com/edgelesssys/constellation/internal/constants"
|
"github.com/edgelesssys/constellation/internal/constants"
|
||||||
|
"github.com/edgelesssys/constellation/internal/deploy/ssh"
|
||||||
"github.com/edgelesssys/constellation/internal/logger"
|
"github.com/edgelesssys/constellation/internal/logger"
|
||||||
"go.uber.org/zap"
|
"go.uber.org/zap"
|
||||||
"google.golang.org/grpc"
|
"google.golang.org/grpc"
|
||||||
|
@ -37,33 +38,45 @@ func New(log *logger.Logger, dialer NetDialer, serviceManager serviceManager, wr
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// DownloadBootstrapper will open a new grpc connection to another instance, attempting to download a bootstrapper from that instance.
|
// DownloadDeployment will open a new grpc connection to another instance, attempting to download a bootstrapper from that instance.
|
||||||
func (d *Download) DownloadBootstrapper(ctx context.Context, ip string) error {
|
func (d *Download) DownloadDeployment(ctx context.Context, ip string) ([]ssh.UserKey, error) {
|
||||||
log := d.log.With(zap.String("ip", ip))
|
log := d.log.With(zap.String("ip", ip))
|
||||||
serverAddr := net.JoinHostPort(ip, strconv.Itoa(constants.DebugdPort))
|
serverAddr := net.JoinHostPort(ip, strconv.Itoa(constants.DebugdPort))
|
||||||
|
|
||||||
// only retry download from same endpoint after backoff
|
// only retry download from same endpoint after backoff
|
||||||
if lastAttempt, ok := d.attemptedDownloads[serverAddr]; ok && time.Since(lastAttempt) < debugd.BootstrapperDownloadRetryBackoff {
|
if lastAttempt, ok := d.attemptedDownloads[serverAddr]; ok && time.Since(lastAttempt) < debugd.BootstrapperDownloadRetryBackoff {
|
||||||
return fmt.Errorf("download failed too recently: %v / %v", time.Since(lastAttempt), debugd.BootstrapperDownloadRetryBackoff)
|
return nil, fmt.Errorf("download failed too recently: %v / %v", time.Since(lastAttempt), debugd.BootstrapperDownloadRetryBackoff)
|
||||||
}
|
}
|
||||||
log.Infof("Trying to download bootstrapper")
|
|
||||||
|
log.Infof("Connecting to server")
|
||||||
d.attemptedDownloads[serverAddr] = time.Now()
|
d.attemptedDownloads[serverAddr] = time.Now()
|
||||||
conn, err := d.dial(ctx, serverAddr)
|
conn, err := d.dial(ctx, serverAddr)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("connecting to other instance via gRPC: %w", err)
|
return nil, fmt.Errorf("connecting to other instance via gRPC: %w", err)
|
||||||
}
|
}
|
||||||
defer conn.Close()
|
defer conn.Close()
|
||||||
client := pb.NewDebugdClient(conn)
|
client := pb.NewDebugdClient(conn)
|
||||||
|
|
||||||
|
log.Infof("Trying to download bootstrapper")
|
||||||
stream, err := client.DownloadBootstrapper(ctx, &pb.DownloadBootstrapperRequest{})
|
stream, err := client.DownloadBootstrapper(ctx, &pb.DownloadBootstrapperRequest{})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("starting bootstrapper download from other instance: %w", err)
|
return nil, fmt.Errorf("starting bootstrapper download from other instance: %w", err)
|
||||||
}
|
}
|
||||||
if err := d.writer.WriteStream(debugd.BootstrapperDeployFilename, stream, true); err != nil {
|
if err := d.writer.WriteStream(debugd.BootstrapperDeployFilename, stream, true); err != nil {
|
||||||
return fmt.Errorf("streaming bootstrapper from other instance: %w", err)
|
return nil, fmt.Errorf("streaming bootstrapper from other instance: %w", err)
|
||||||
|
}
|
||||||
|
log.Infof("Successfully downloaded bootstrapper")
|
||||||
|
|
||||||
|
log.Infof("Trying to download ssh keys")
|
||||||
|
resp, err := client.DownloadAuthorizedKeys(ctx, &pb.DownloadAuthorizedKeysRequest{})
|
||||||
|
if err != nil {
|
||||||
|
return nil, fmt.Errorf("downloading authorized keys: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
log.Infof("Successfully downloaded bootstrapper")
|
var keys []ssh.UserKey
|
||||||
|
for _, key := range resp.Keys {
|
||||||
|
keys = append(keys, ssh.UserKey{Username: key.Username, PublicKey: key.KeyValue})
|
||||||
|
}
|
||||||
|
|
||||||
// after the upload succeeds, try to restart the bootstrapper
|
// after the upload succeeds, try to restart the bootstrapper
|
||||||
restartAction := ServiceManagerRequest{
|
restartAction := ServiceManagerRequest{
|
||||||
|
@ -71,10 +84,10 @@ func (d *Download) DownloadBootstrapper(ctx context.Context, ip string) error {
|
||||||
Action: Restart,
|
Action: Restart,
|
||||||
}
|
}
|
||||||
if err := d.serviceManager.SystemdAction(ctx, restartAction); err != nil {
|
if err := d.serviceManager.SystemdAction(ctx, restartAction); err != nil {
|
||||||
return fmt.Errorf("restarting bootstrapper: %w", err)
|
return nil, fmt.Errorf("restarting bootstrapper: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
return nil
|
return keys, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (d *Download) dial(ctx context.Context, target string) (*grpc.ClientConn, error) {
|
func (d *Download) dial(ctx context.Context, target string) (*grpc.ClientConn, error) {
|
||||||
|
|
|
@ -14,12 +14,12 @@ import (
|
||||||
"github.com/edgelesssys/constellation/debugd/debugd"
|
"github.com/edgelesssys/constellation/debugd/debugd"
|
||||||
pb "github.com/edgelesssys/constellation/debugd/service"
|
pb "github.com/edgelesssys/constellation/debugd/service"
|
||||||
"github.com/edgelesssys/constellation/internal/constants"
|
"github.com/edgelesssys/constellation/internal/constants"
|
||||||
|
"github.com/edgelesssys/constellation/internal/deploy/ssh"
|
||||||
"github.com/edgelesssys/constellation/internal/grpc/testdialer"
|
"github.com/edgelesssys/constellation/internal/grpc/testdialer"
|
||||||
"github.com/edgelesssys/constellation/internal/logger"
|
"github.com/edgelesssys/constellation/internal/logger"
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
"go.uber.org/goleak"
|
"go.uber.org/goleak"
|
||||||
"google.golang.org/grpc"
|
"google.golang.org/grpc"
|
||||||
"google.golang.org/protobuf/proto"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestMain(m *testing.M) {
|
func TestMain(m *testing.M) {
|
||||||
|
@ -31,10 +31,10 @@ func TestMain(m *testing.M) {
|
||||||
|
|
||||||
func TestDownloadBootstrapper(t *testing.T) {
|
func TestDownloadBootstrapper(t *testing.T) {
|
||||||
filename := "/opt/bootstrapper"
|
filename := "/opt/bootstrapper"
|
||||||
|
someErr := errors.New("failed")
|
||||||
|
|
||||||
testCases := map[string]struct {
|
testCases := map[string]struct {
|
||||||
server fakeOnlyDownloadServer
|
server fakeDownloadServer
|
||||||
downloadClient stubDownloadClient
|
|
||||||
serviceManager stubServiceManager
|
serviceManager stubServiceManager
|
||||||
attemptedDownloads map[string]time.Time
|
attemptedDownloads map[string]time.Time
|
||||||
wantChunks [][]byte
|
wantChunks [][]byte
|
||||||
|
@ -42,51 +42,48 @@ func TestDownloadBootstrapper(t *testing.T) {
|
||||||
wantFile bool
|
wantFile bool
|
||||||
wantSystemdAction bool
|
wantSystemdAction bool
|
||||||
wantDeployed bool
|
wantDeployed bool
|
||||||
|
wantKeys []ssh.UserKey
|
||||||
}{
|
}{
|
||||||
"download works": {
|
"download works": {
|
||||||
server: fakeOnlyDownloadServer{
|
server: fakeDownloadServer{
|
||||||
chunks: [][]byte{[]byte("test")},
|
chunks: [][]byte{[]byte("test")},
|
||||||
|
keys: []*pb.AuthorizedKey{{Username: "name", KeyValue: "key"}},
|
||||||
},
|
},
|
||||||
attemptedDownloads: map[string]time.Time{},
|
attemptedDownloads: map[string]time.Time{},
|
||||||
wantChunks: [][]byte{
|
wantChunks: [][]byte{[]byte("test")},
|
||||||
[]byte("test"),
|
wantDownloadErr: false,
|
||||||
},
|
wantFile: true,
|
||||||
wantDownloadErr: false,
|
wantSystemdAction: true,
|
||||||
wantFile: true,
|
wantDeployed: true,
|
||||||
wantSystemdAction: true,
|
wantKeys: []ssh.UserKey{{Username: "name", PublicKey: "key"}},
|
||||||
wantDeployed: true,
|
|
||||||
},
|
},
|
||||||
"second download is not attempted twice": {
|
"second download is not attempted twice": {
|
||||||
server: fakeOnlyDownloadServer{
|
server: fakeDownloadServer{chunks: [][]byte{[]byte("test")}},
|
||||||
chunks: [][]byte{[]byte("test")},
|
attemptedDownloads: map[string]time.Time{"192.0.2.0:" + strconv.Itoa(constants.DebugdPort): time.Now()},
|
||||||
},
|
wantDownloadErr: true,
|
||||||
attemptedDownloads: map[string]time.Time{
|
|
||||||
"192.0.2.0:" + strconv.Itoa(constants.DebugdPort): time.Now(),
|
|
||||||
},
|
|
||||||
wantDownloadErr: true,
|
|
||||||
},
|
},
|
||||||
"download rpc call error is detected": {
|
"download rpc call error is detected": {
|
||||||
server: fakeOnlyDownloadServer{
|
server: fakeDownloadServer{downladErr: someErr},
|
||||||
downladErr: errors.New("download rpc error"),
|
attemptedDownloads: map[string]time.Time{},
|
||||||
|
wantDownloadErr: true,
|
||||||
|
},
|
||||||
|
"download key error": {
|
||||||
|
server: fakeDownloadServer{
|
||||||
|
chunks: [][]byte{[]byte("test")},
|
||||||
|
downloadAuthorizedKeysErr: someErr,
|
||||||
},
|
},
|
||||||
attemptedDownloads: map[string]time.Time{},
|
attemptedDownloads: map[string]time.Time{},
|
||||||
wantDownloadErr: true,
|
wantDownloadErr: true,
|
||||||
},
|
},
|
||||||
"service restart error is detected": {
|
"service restart error is detected": {
|
||||||
server: fakeOnlyDownloadServer{
|
server: fakeDownloadServer{chunks: [][]byte{[]byte("test")}},
|
||||||
chunks: [][]byte{[]byte("test")},
|
serviceManager: stubServiceManager{systemdActionErr: someErr},
|
||||||
},
|
|
||||||
serviceManager: stubServiceManager{
|
|
||||||
systemdActionErr: errors.New("systemd error"),
|
|
||||||
},
|
|
||||||
attemptedDownloads: map[string]time.Time{},
|
attemptedDownloads: map[string]time.Time{},
|
||||||
wantChunks: [][]byte{
|
wantChunks: [][]byte{[]byte("test")},
|
||||||
[]byte("test"),
|
wantDownloadErr: true,
|
||||||
},
|
wantFile: true,
|
||||||
wantDownloadErr: true,
|
wantDeployed: true,
|
||||||
wantFile: true,
|
wantSystemdAction: false,
|
||||||
wantDeployed: true,
|
|
||||||
wantSystemdAction: false,
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -102,6 +99,7 @@ func TestDownloadBootstrapper(t *testing.T) {
|
||||||
pb.RegisterDebugdServer(grpcServ, &tc.server)
|
pb.RegisterDebugdServer(grpcServ, &tc.server)
|
||||||
lis := dialer.GetListener(net.JoinHostPort(ip, strconv.Itoa(constants.DebugdPort)))
|
lis := dialer.GetListener(net.JoinHostPort(ip, strconv.Itoa(constants.DebugdPort)))
|
||||||
go grpcServ.Serve(lis)
|
go grpcServ.Serve(lis)
|
||||||
|
defer grpcServ.GracefulStop()
|
||||||
|
|
||||||
download := &Download{
|
download := &Download{
|
||||||
log: logger.NewTest(t),
|
log: logger.NewTest(t),
|
||||||
|
@ -110,8 +108,8 @@ func TestDownloadBootstrapper(t *testing.T) {
|
||||||
serviceManager: &tc.serviceManager,
|
serviceManager: &tc.serviceManager,
|
||||||
attemptedDownloads: tc.attemptedDownloads,
|
attemptedDownloads: tc.attemptedDownloads,
|
||||||
}
|
}
|
||||||
err := download.DownloadBootstrapper(context.Background(), ip)
|
|
||||||
grpcServ.GracefulStop()
|
keys, err := download.DownloadDeployment(context.Background(), ip)
|
||||||
|
|
||||||
if tc.wantDownloadErr {
|
if tc.wantDownloadErr {
|
||||||
assert.Error(err)
|
assert.Error(err)
|
||||||
|
@ -131,21 +129,11 @@ func TestDownloadBootstrapper(t *testing.T) {
|
||||||
tc.serviceManager.requests,
|
tc.serviceManager.requests,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
assert.Equal(tc.wantKeys, keys)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
type stubDownloadClient struct {
|
|
||||||
requests []*pb.DownloadBootstrapperRequest
|
|
||||||
stream bootstrapper.ReadChunkStream
|
|
||||||
downloadErr error
|
|
||||||
}
|
|
||||||
|
|
||||||
func (s *stubDownloadClient) DownloadBootstrapper(ctx context.Context, in *pb.DownloadBootstrapperRequest, opts ...grpc.CallOption) (bootstrapper.ReadChunkStream, error) {
|
|
||||||
s.requests = append(s.requests, proto.Clone(in).(*pb.DownloadBootstrapperRequest))
|
|
||||||
return s.stream, s.downloadErr
|
|
||||||
}
|
|
||||||
|
|
||||||
type stubServiceManager struct {
|
type stubServiceManager struct {
|
||||||
requests []ServiceManagerRequest
|
requests []ServiceManagerRequest
|
||||||
systemdActionErr error
|
systemdActionErr error
|
||||||
|
@ -175,14 +163,17 @@ func (f *fakeStreamToFileWriter) WriteStream(filename string, stream bootstrappe
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// fakeOnlyDownloadServer implements DebugdServer; only fakes DownloadBootstrapper, panics on every other rpc.
|
// fakeDownloadServer implements DebugdServer; only fakes DownloadBootstrapper, panics on every other rpc.
|
||||||
type fakeOnlyDownloadServer struct {
|
type fakeDownloadServer struct {
|
||||||
chunks [][]byte
|
chunks [][]byte
|
||||||
downladErr error
|
downladErr error
|
||||||
|
keys []*pb.AuthorizedKey
|
||||||
|
downloadAuthorizedKeysErr error
|
||||||
|
|
||||||
pb.UnimplementedDebugdServer
|
pb.UnimplementedDebugdServer
|
||||||
}
|
}
|
||||||
|
|
||||||
func (f *fakeOnlyDownloadServer) DownloadBootstrapper(request *pb.DownloadBootstrapperRequest, stream pb.Debugd_DownloadBootstrapperServer) error {
|
func (f *fakeDownloadServer) DownloadBootstrapper(request *pb.DownloadBootstrapperRequest, stream pb.Debugd_DownloadBootstrapperServer) error {
|
||||||
for _, chunk := range f.chunks {
|
for _, chunk := range f.chunks {
|
||||||
if err := stream.Send(&pb.Chunk{Content: chunk}); err != nil {
|
if err := stream.Send(&pb.Chunk{Content: chunk}); err != nil {
|
||||||
return fmt.Errorf("sending chunk: %w", err)
|
return fmt.Errorf("sending chunk: %w", err)
|
||||||
|
@ -190,3 +181,7 @@ func (f *fakeOnlyDownloadServer) DownloadBootstrapper(request *pb.DownloadBootst
|
||||||
}
|
}
|
||||||
return f.downladErr
|
return f.downladErr
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (s *fakeDownloadServer) DownloadAuthorizedKeys(context.Context, *pb.DownloadAuthorizedKeysRequest) (*pb.DownloadAuthorizedKeysResponse, error) {
|
||||||
|
return &pb.DownloadAuthorizedKeysResponse{Keys: s.keys}, s.downloadAuthorizedKeysErr
|
||||||
|
}
|
||||||
|
|
|
@ -55,7 +55,7 @@ func (s *Scheduler) discoveryLoop(ctx context.Context, wg *sync.WaitGroup) {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
s.log.With(zap.Error(err)).Errorf("Discovering debugd IPs failed")
|
s.log.With(zap.Error(err)).Errorf("Discovering debugd IPs failed")
|
||||||
} else {
|
} else {
|
||||||
if s.downloadBootstrapper(ctx, ips) {
|
if s.downloadDeployment(ctx, ips) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -72,7 +72,7 @@ func (s *Scheduler) discoveryLoop(ctx context.Context, wg *sync.WaitGroup) {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
s.log.With(zap.Strings("ips", ips)).Infof("Discovered instances")
|
s.log.With(zap.Strings("ips", ips)).Infof("Discovered instances")
|
||||||
if s.downloadBootstrapper(ctx, ips) {
|
if s.downloadDeployment(ctx, ips) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
case <-ctx.Done():
|
case <-ctx.Done():
|
||||||
|
@ -103,19 +103,20 @@ func (s *Scheduler) sshLoop(ctx context.Context, wg *sync.WaitGroup) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// downloadBootstrapper tries to download bootstrapper from a list of ips and logs errors encountered.
|
// downloadDeployment tries to download deployment from a list of ips and logs errors encountered.
|
||||||
func (s *Scheduler) downloadBootstrapper(ctx context.Context, ips []string) (success bool) {
|
func (s *Scheduler) downloadDeployment(ctx context.Context, ips []string) (success bool) {
|
||||||
for _, ip := range ips {
|
for _, ip := range ips {
|
||||||
err := s.downloader.DownloadBootstrapper(ctx, ip)
|
keys, err := s.downloader.DownloadDeployment(ctx, ip)
|
||||||
if err == nil {
|
if err == nil {
|
||||||
// early exit with success since bootstrapper should only be downloaded once
|
s.deploySSHKeys(ctx, keys)
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
if errors.Is(err, fs.ErrExist) {
|
if errors.Is(err, fs.ErrExist) {
|
||||||
// bootstrapper was already uploaded
|
// bootstrapper was already uploaded
|
||||||
|
s.log.Infof("Bootstrapper was already uploaded.")
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
s.log.With(zap.Error(err), zap.String("peer", ip)).Errorf("Downloading bootstrapper from peer failed")
|
s.log.With(zap.Error(err), zap.String("peer", ip)).Errorf("Downloading deployment from peer failed")
|
||||||
}
|
}
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
@ -132,7 +133,7 @@ func (s *Scheduler) deploySSHKeys(ctx context.Context, keys []ssh.UserKey) {
|
||||||
}
|
}
|
||||||
|
|
||||||
type downloader interface {
|
type downloader interface {
|
||||||
DownloadBootstrapper(ctx context.Context, ip string) error
|
DownloadDeployment(ctx context.Context, ip string) ([]ssh.UserKey, error)
|
||||||
}
|
}
|
||||||
|
|
||||||
type sshDeployer interface {
|
type sshDeployer interface {
|
||||||
|
|
|
@ -18,6 +18,8 @@ func TestMain(m *testing.M) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestSchedulerStart(t *testing.T) {
|
func TestSchedulerStart(t *testing.T) {
|
||||||
|
someErr := errors.New("failed")
|
||||||
|
|
||||||
testCases := map[string]struct {
|
testCases := map[string]struct {
|
||||||
fetcher stubFetcher
|
fetcher stubFetcher
|
||||||
ssh stubSSHDeployer
|
ssh stubSSHDeployer
|
||||||
|
@ -29,46 +31,28 @@ func TestSchedulerStart(t *testing.T) {
|
||||||
"scheduler works and calls fetcher functions at least once": {},
|
"scheduler works and calls fetcher functions at least once": {},
|
||||||
"ssh keys are fetched": {
|
"ssh keys are fetched": {
|
||||||
fetcher: stubFetcher{
|
fetcher: stubFetcher{
|
||||||
keys: []ssh.UserKey{
|
keys: []ssh.UserKey{{Username: "test", PublicKey: "testkey"}},
|
||||||
{
|
|
||||||
Username: "test",
|
|
||||||
PublicKey: "testkey",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
wantSSHKeys: []ssh.UserKey{
|
|
||||||
{
|
|
||||||
Username: "test",
|
|
||||||
PublicKey: "testkey",
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
|
wantSSHKeys: []ssh.UserKey{{Username: "test", PublicKey: "testkey"}},
|
||||||
},
|
},
|
||||||
"download for discovered debugd ips is started": {
|
"download for discovered debugd ips is started": {
|
||||||
fetcher: stubFetcher{
|
fetcher: stubFetcher{
|
||||||
ips: []string{"192.0.2.1", "192.0.2.2"},
|
ips: []string{"192.0.2.1", "192.0.2.2"},
|
||||||
},
|
},
|
||||||
downloader: stubDownloader{
|
downloader: stubDownloader{downloadErr: someErr},
|
||||||
err: errors.New("download fails"),
|
|
||||||
},
|
|
||||||
|
|
||||||
wantDebugdDownloads: []string{"192.0.2.1", "192.0.2.2"},
|
wantDebugdDownloads: []string{"192.0.2.1", "192.0.2.2"},
|
||||||
},
|
},
|
||||||
"if download is successful, second download is not attempted": {
|
"if download is successful, second download is not attempted": {
|
||||||
fetcher: stubFetcher{
|
fetcher: stubFetcher{
|
||||||
ips: []string{"192.0.2.1", "192.0.2.2"},
|
ips: []string{"192.0.2.1", "192.0.2.2"},
|
||||||
},
|
},
|
||||||
|
|
||||||
wantDebugdDownloads: []string{"192.0.2.1"},
|
wantDebugdDownloads: []string{"192.0.2.1"},
|
||||||
},
|
},
|
||||||
"endpoint discovery can fail": {
|
"endpoint discovery can fail": {
|
||||||
fetcher: stubFetcher{
|
fetcher: stubFetcher{discoverErr: someErr},
|
||||||
discoverErr: errors.New("discovery error"),
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
"ssh key fetch can fail": {
|
"ssh key fetch can fail": {
|
||||||
fetcher: stubFetcher{
|
fetcher: stubFetcher{fetchSSHKeysErr: someErr},
|
||||||
fetchSSHKeysErr: errors.New("fetch error"),
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -134,11 +118,12 @@ func (s *stubSSHDeployer) DeployAuthorizedKey(ctx context.Context, sshKey ssh.Us
|
||||||
}
|
}
|
||||||
|
|
||||||
type stubDownloader struct {
|
type stubDownloader struct {
|
||||||
ips []string
|
ips []string
|
||||||
err error
|
downloadErr error
|
||||||
|
keys []ssh.UserKey
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *stubDownloader) DownloadBootstrapper(ctx context.Context, ip string) error {
|
func (s *stubDownloader) DownloadDeployment(ctx context.Context, ip string) ([]ssh.UserKey, error) {
|
||||||
s.ips = append(s.ips, ip)
|
s.ips = append(s.ips, ip)
|
||||||
return s.err
|
return s.keys, s.downloadErr
|
||||||
}
|
}
|
||||||
|
|
|
@ -98,6 +98,21 @@ func (s *debugdServer) DownloadBootstrapper(request *pb.DownloadBootstrapperRequ
|
||||||
return s.streamer.ReadStream(debugd.BootstrapperDeployFilename, stream, debugd.Chunksize, true)
|
return s.streamer.ReadStream(debugd.BootstrapperDeployFilename, stream, debugd.Chunksize, true)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// DownloadAuthorizedKeys streams the local authorized keys to other instances.
|
||||||
|
func (s *debugdServer) DownloadAuthorizedKeys(_ context.Context, req *pb.DownloadAuthorizedKeysRequest) (*pb.DownloadAuthorizedKeysResponse, error) {
|
||||||
|
s.log.Infof("Sending authorized keys to other instance")
|
||||||
|
|
||||||
|
var authKeys []*pb.AuthorizedKey
|
||||||
|
for _, key := range s.ssh.GetAuthorizedKeys() {
|
||||||
|
authKeys = append(authKeys, &pb.AuthorizedKey{
|
||||||
|
Username: key.Username,
|
||||||
|
KeyValue: key.PublicKey,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
return &pb.DownloadAuthorizedKeysResponse{Keys: authKeys}, nil
|
||||||
|
}
|
||||||
|
|
||||||
// UploadSystemServiceUnits receives systemd service units, writes them to a service file and schedules a daemon-reload.
|
// UploadSystemServiceUnits receives systemd service units, writes them to a service file and schedules a daemon-reload.
|
||||||
func (s *debugdServer) UploadSystemServiceUnits(ctx context.Context, in *pb.UploadSystemdServiceUnitsRequest) (*pb.UploadSystemdServiceUnitsResponse, error) {
|
func (s *debugdServer) UploadSystemServiceUnits(ctx context.Context, in *pb.UploadSystemdServiceUnitsRequest) (*pb.UploadSystemdServiceUnitsResponse, error) {
|
||||||
s.log.Infof("Uploading systemd service units")
|
s.log.Infof("Uploading systemd service units")
|
||||||
|
@ -133,6 +148,7 @@ func Start(log *logger.Logger, wg *sync.WaitGroup, serv pb.DebugdServer) {
|
||||||
|
|
||||||
type sshDeployer interface {
|
type sshDeployer interface {
|
||||||
DeployAuthorizedKey(ctx context.Context, sshKey ssh.UserKey) error
|
DeployAuthorizedKey(ctx context.Context, sshKey ssh.UserKey) error
|
||||||
|
GetAuthorizedKeys() []ssh.UserKey
|
||||||
}
|
}
|
||||||
|
|
||||||
type serviceManager interface {
|
type serviceManager interface {
|
||||||
|
|
|
@ -255,6 +255,39 @@ func TestDownloadBootstrapper(t *testing.T) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func TestDownloadAuthorizedKeys(t *testing.T) {
|
||||||
|
assert := assert.New(t)
|
||||||
|
require := require.New(t)
|
||||||
|
|
||||||
|
endpoint := "192.0.2.1:" + strconv.Itoa(constants.DebugdPort)
|
||||||
|
deployer := &stubSSHDeployer{
|
||||||
|
sshKeys: []ssh.UserKey{
|
||||||
|
{Username: "test1", PublicKey: "foo"},
|
||||||
|
{Username: "test2", PublicKey: "bar"},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
serv := debugdServer{
|
||||||
|
log: logger.NewTest(t),
|
||||||
|
ssh: deployer,
|
||||||
|
}
|
||||||
|
|
||||||
|
grpcServ, conn, err := setupServerWithConn(endpoint, &serv)
|
||||||
|
require.NoError(err)
|
||||||
|
defer conn.Close()
|
||||||
|
defer grpcServ.GracefulStop()
|
||||||
|
client := pb.NewDebugdClient(conn)
|
||||||
|
|
||||||
|
resp, err := client.DownloadAuthorizedKeys(context.Background(), &pb.DownloadAuthorizedKeysRequest{})
|
||||||
|
|
||||||
|
assert.NoError(err)
|
||||||
|
wantKeys := []*pb.AuthorizedKey{
|
||||||
|
{Username: "test1", KeyValue: "foo"},
|
||||||
|
{Username: "test2", KeyValue: "bar"},
|
||||||
|
}
|
||||||
|
assert.ElementsMatch(wantKeys, resp.Keys)
|
||||||
|
}
|
||||||
|
|
||||||
func TestUploadSystemServiceUnits(t *testing.T) {
|
func TestUploadSystemServiceUnits(t *testing.T) {
|
||||||
endpoint := "192.0.2.1:" + strconv.Itoa(constants.DebugdPort)
|
endpoint := "192.0.2.1:" + strconv.Itoa(constants.DebugdPort)
|
||||||
|
|
||||||
|
@ -348,6 +381,10 @@ func (s *stubSSHDeployer) DeployAuthorizedKey(ctx context.Context, sshKey ssh.Us
|
||||||
return s.deployErr
|
return s.deployErr
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (s *stubSSHDeployer) GetAuthorizedKeys() []ssh.UserKey {
|
||||||
|
return s.sshKeys
|
||||||
|
}
|
||||||
|
|
||||||
type stubServiceManager struct {
|
type stubServiceManager struct {
|
||||||
requests []deploy.ServiceManagerRequest
|
requests []deploy.ServiceManagerRequest
|
||||||
unitFiles []deploy.SystemdUnit
|
unitFiles []deploy.SystemdUnit
|
||||||
|
|
|
@ -202,6 +202,91 @@ func (*DownloadBootstrapperRequest) Descriptor() ([]byte, []int) {
|
||||||
return file_debugd_proto_rawDescGZIP(), []int{0}
|
return file_debugd_proto_rawDescGZIP(), []int{0}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type DownloadAuthorizedKeysRequest struct {
|
||||||
|
state protoimpl.MessageState
|
||||||
|
sizeCache protoimpl.SizeCache
|
||||||
|
unknownFields protoimpl.UnknownFields
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *DownloadAuthorizedKeysRequest) Reset() {
|
||||||
|
*x = DownloadAuthorizedKeysRequest{}
|
||||||
|
if protoimpl.UnsafeEnabled {
|
||||||
|
mi := &file_debugd_proto_msgTypes[1]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *DownloadAuthorizedKeysRequest) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*DownloadAuthorizedKeysRequest) ProtoMessage() {}
|
||||||
|
|
||||||
|
func (x *DownloadAuthorizedKeysRequest) ProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_debugd_proto_msgTypes[1]
|
||||||
|
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 DownloadAuthorizedKeysRequest.ProtoReflect.Descriptor instead.
|
||||||
|
func (*DownloadAuthorizedKeysRequest) Descriptor() ([]byte, []int) {
|
||||||
|
return file_debugd_proto_rawDescGZIP(), []int{1}
|
||||||
|
}
|
||||||
|
|
||||||
|
type DownloadAuthorizedKeysResponse struct {
|
||||||
|
state protoimpl.MessageState
|
||||||
|
sizeCache protoimpl.SizeCache
|
||||||
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
|
Keys []*AuthorizedKey `protobuf:"bytes,1,rep,name=keys,proto3" json:"keys,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *DownloadAuthorizedKeysResponse) Reset() {
|
||||||
|
*x = DownloadAuthorizedKeysResponse{}
|
||||||
|
if protoimpl.UnsafeEnabled {
|
||||||
|
mi := &file_debugd_proto_msgTypes[2]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *DownloadAuthorizedKeysResponse) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*DownloadAuthorizedKeysResponse) ProtoMessage() {}
|
||||||
|
|
||||||
|
func (x *DownloadAuthorizedKeysResponse) ProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_debugd_proto_msgTypes[2]
|
||||||
|
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 DownloadAuthorizedKeysResponse.ProtoReflect.Descriptor instead.
|
||||||
|
func (*DownloadAuthorizedKeysResponse) Descriptor() ([]byte, []int) {
|
||||||
|
return file_debugd_proto_rawDescGZIP(), []int{2}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *DownloadAuthorizedKeysResponse) GetKeys() []*AuthorizedKey {
|
||||||
|
if x != nil {
|
||||||
|
return x.Keys
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
type AuthorizedKey struct {
|
type AuthorizedKey struct {
|
||||||
state protoimpl.MessageState
|
state protoimpl.MessageState
|
||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
|
@ -214,7 +299,7 @@ type AuthorizedKey struct {
|
||||||
func (x *AuthorizedKey) Reset() {
|
func (x *AuthorizedKey) Reset() {
|
||||||
*x = AuthorizedKey{}
|
*x = AuthorizedKey{}
|
||||||
if protoimpl.UnsafeEnabled {
|
if protoimpl.UnsafeEnabled {
|
||||||
mi := &file_debugd_proto_msgTypes[1]
|
mi := &file_debugd_proto_msgTypes[3]
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
}
|
}
|
||||||
|
@ -227,7 +312,7 @@ func (x *AuthorizedKey) String() string {
|
||||||
func (*AuthorizedKey) ProtoMessage() {}
|
func (*AuthorizedKey) ProtoMessage() {}
|
||||||
|
|
||||||
func (x *AuthorizedKey) ProtoReflect() protoreflect.Message {
|
func (x *AuthorizedKey) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_debugd_proto_msgTypes[1]
|
mi := &file_debugd_proto_msgTypes[3]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if protoimpl.UnsafeEnabled && x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
|
@ -240,7 +325,7 @@ func (x *AuthorizedKey) ProtoReflect() protoreflect.Message {
|
||||||
|
|
||||||
// Deprecated: Use AuthorizedKey.ProtoReflect.Descriptor instead.
|
// Deprecated: Use AuthorizedKey.ProtoReflect.Descriptor instead.
|
||||||
func (*AuthorizedKey) Descriptor() ([]byte, []int) {
|
func (*AuthorizedKey) Descriptor() ([]byte, []int) {
|
||||||
return file_debugd_proto_rawDescGZIP(), []int{1}
|
return file_debugd_proto_rawDescGZIP(), []int{3}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *AuthorizedKey) GetUsername() string {
|
func (x *AuthorizedKey) GetUsername() string {
|
||||||
|
@ -268,7 +353,7 @@ type UploadAuthorizedKeysRequest struct {
|
||||||
func (x *UploadAuthorizedKeysRequest) Reset() {
|
func (x *UploadAuthorizedKeysRequest) Reset() {
|
||||||
*x = UploadAuthorizedKeysRequest{}
|
*x = UploadAuthorizedKeysRequest{}
|
||||||
if protoimpl.UnsafeEnabled {
|
if protoimpl.UnsafeEnabled {
|
||||||
mi := &file_debugd_proto_msgTypes[2]
|
mi := &file_debugd_proto_msgTypes[4]
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
}
|
}
|
||||||
|
@ -281,7 +366,7 @@ func (x *UploadAuthorizedKeysRequest) String() string {
|
||||||
func (*UploadAuthorizedKeysRequest) ProtoMessage() {}
|
func (*UploadAuthorizedKeysRequest) ProtoMessage() {}
|
||||||
|
|
||||||
func (x *UploadAuthorizedKeysRequest) ProtoReflect() protoreflect.Message {
|
func (x *UploadAuthorizedKeysRequest) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_debugd_proto_msgTypes[2]
|
mi := &file_debugd_proto_msgTypes[4]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if protoimpl.UnsafeEnabled && x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
|
@ -294,7 +379,7 @@ func (x *UploadAuthorizedKeysRequest) ProtoReflect() protoreflect.Message {
|
||||||
|
|
||||||
// Deprecated: Use UploadAuthorizedKeysRequest.ProtoReflect.Descriptor instead.
|
// Deprecated: Use UploadAuthorizedKeysRequest.ProtoReflect.Descriptor instead.
|
||||||
func (*UploadAuthorizedKeysRequest) Descriptor() ([]byte, []int) {
|
func (*UploadAuthorizedKeysRequest) Descriptor() ([]byte, []int) {
|
||||||
return file_debugd_proto_rawDescGZIP(), []int{2}
|
return file_debugd_proto_rawDescGZIP(), []int{4}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *UploadAuthorizedKeysRequest) GetKeys() []*AuthorizedKey {
|
func (x *UploadAuthorizedKeysRequest) GetKeys() []*AuthorizedKey {
|
||||||
|
@ -315,7 +400,7 @@ type UploadAuthorizedKeysResponse struct {
|
||||||
func (x *UploadAuthorizedKeysResponse) Reset() {
|
func (x *UploadAuthorizedKeysResponse) Reset() {
|
||||||
*x = UploadAuthorizedKeysResponse{}
|
*x = UploadAuthorizedKeysResponse{}
|
||||||
if protoimpl.UnsafeEnabled {
|
if protoimpl.UnsafeEnabled {
|
||||||
mi := &file_debugd_proto_msgTypes[3]
|
mi := &file_debugd_proto_msgTypes[5]
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
}
|
}
|
||||||
|
@ -328,7 +413,7 @@ func (x *UploadAuthorizedKeysResponse) String() string {
|
||||||
func (*UploadAuthorizedKeysResponse) ProtoMessage() {}
|
func (*UploadAuthorizedKeysResponse) ProtoMessage() {}
|
||||||
|
|
||||||
func (x *UploadAuthorizedKeysResponse) ProtoReflect() protoreflect.Message {
|
func (x *UploadAuthorizedKeysResponse) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_debugd_proto_msgTypes[3]
|
mi := &file_debugd_proto_msgTypes[5]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if protoimpl.UnsafeEnabled && x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
|
@ -341,7 +426,7 @@ func (x *UploadAuthorizedKeysResponse) ProtoReflect() protoreflect.Message {
|
||||||
|
|
||||||
// Deprecated: Use UploadAuthorizedKeysResponse.ProtoReflect.Descriptor instead.
|
// Deprecated: Use UploadAuthorizedKeysResponse.ProtoReflect.Descriptor instead.
|
||||||
func (*UploadAuthorizedKeysResponse) Descriptor() ([]byte, []int) {
|
func (*UploadAuthorizedKeysResponse) Descriptor() ([]byte, []int) {
|
||||||
return file_debugd_proto_rawDescGZIP(), []int{3}
|
return file_debugd_proto_rawDescGZIP(), []int{5}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *UploadAuthorizedKeysResponse) GetStatus() UploadAuthorizedKeysStatus {
|
func (x *UploadAuthorizedKeysResponse) GetStatus() UploadAuthorizedKeysStatus {
|
||||||
|
@ -362,7 +447,7 @@ type Chunk struct {
|
||||||
func (x *Chunk) Reset() {
|
func (x *Chunk) Reset() {
|
||||||
*x = Chunk{}
|
*x = Chunk{}
|
||||||
if protoimpl.UnsafeEnabled {
|
if protoimpl.UnsafeEnabled {
|
||||||
mi := &file_debugd_proto_msgTypes[4]
|
mi := &file_debugd_proto_msgTypes[6]
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
}
|
}
|
||||||
|
@ -375,7 +460,7 @@ func (x *Chunk) String() string {
|
||||||
func (*Chunk) ProtoMessage() {}
|
func (*Chunk) ProtoMessage() {}
|
||||||
|
|
||||||
func (x *Chunk) ProtoReflect() protoreflect.Message {
|
func (x *Chunk) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_debugd_proto_msgTypes[4]
|
mi := &file_debugd_proto_msgTypes[6]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if protoimpl.UnsafeEnabled && x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
|
@ -388,7 +473,7 @@ func (x *Chunk) ProtoReflect() protoreflect.Message {
|
||||||
|
|
||||||
// Deprecated: Use Chunk.ProtoReflect.Descriptor instead.
|
// Deprecated: Use Chunk.ProtoReflect.Descriptor instead.
|
||||||
func (*Chunk) Descriptor() ([]byte, []int) {
|
func (*Chunk) Descriptor() ([]byte, []int) {
|
||||||
return file_debugd_proto_rawDescGZIP(), []int{4}
|
return file_debugd_proto_rawDescGZIP(), []int{6}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *Chunk) GetContent() []byte {
|
func (x *Chunk) GetContent() []byte {
|
||||||
|
@ -409,7 +494,7 @@ type UploadBootstrapperResponse struct {
|
||||||
func (x *UploadBootstrapperResponse) Reset() {
|
func (x *UploadBootstrapperResponse) Reset() {
|
||||||
*x = UploadBootstrapperResponse{}
|
*x = UploadBootstrapperResponse{}
|
||||||
if protoimpl.UnsafeEnabled {
|
if protoimpl.UnsafeEnabled {
|
||||||
mi := &file_debugd_proto_msgTypes[5]
|
mi := &file_debugd_proto_msgTypes[7]
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
}
|
}
|
||||||
|
@ -422,7 +507,7 @@ func (x *UploadBootstrapperResponse) String() string {
|
||||||
func (*UploadBootstrapperResponse) ProtoMessage() {}
|
func (*UploadBootstrapperResponse) ProtoMessage() {}
|
||||||
|
|
||||||
func (x *UploadBootstrapperResponse) ProtoReflect() protoreflect.Message {
|
func (x *UploadBootstrapperResponse) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_debugd_proto_msgTypes[5]
|
mi := &file_debugd_proto_msgTypes[7]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if protoimpl.UnsafeEnabled && x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
|
@ -435,7 +520,7 @@ func (x *UploadBootstrapperResponse) ProtoReflect() protoreflect.Message {
|
||||||
|
|
||||||
// Deprecated: Use UploadBootstrapperResponse.ProtoReflect.Descriptor instead.
|
// Deprecated: Use UploadBootstrapperResponse.ProtoReflect.Descriptor instead.
|
||||||
func (*UploadBootstrapperResponse) Descriptor() ([]byte, []int) {
|
func (*UploadBootstrapperResponse) Descriptor() ([]byte, []int) {
|
||||||
return file_debugd_proto_rawDescGZIP(), []int{5}
|
return file_debugd_proto_rawDescGZIP(), []int{7}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *UploadBootstrapperResponse) GetStatus() UploadBootstrapperStatus {
|
func (x *UploadBootstrapperResponse) GetStatus() UploadBootstrapperStatus {
|
||||||
|
@ -457,7 +542,7 @@ type ServiceUnit struct {
|
||||||
func (x *ServiceUnit) Reset() {
|
func (x *ServiceUnit) Reset() {
|
||||||
*x = ServiceUnit{}
|
*x = ServiceUnit{}
|
||||||
if protoimpl.UnsafeEnabled {
|
if protoimpl.UnsafeEnabled {
|
||||||
mi := &file_debugd_proto_msgTypes[6]
|
mi := &file_debugd_proto_msgTypes[8]
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
}
|
}
|
||||||
|
@ -470,7 +555,7 @@ func (x *ServiceUnit) String() string {
|
||||||
func (*ServiceUnit) ProtoMessage() {}
|
func (*ServiceUnit) ProtoMessage() {}
|
||||||
|
|
||||||
func (x *ServiceUnit) ProtoReflect() protoreflect.Message {
|
func (x *ServiceUnit) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_debugd_proto_msgTypes[6]
|
mi := &file_debugd_proto_msgTypes[8]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if protoimpl.UnsafeEnabled && x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
|
@ -483,7 +568,7 @@ func (x *ServiceUnit) ProtoReflect() protoreflect.Message {
|
||||||
|
|
||||||
// Deprecated: Use ServiceUnit.ProtoReflect.Descriptor instead.
|
// Deprecated: Use ServiceUnit.ProtoReflect.Descriptor instead.
|
||||||
func (*ServiceUnit) Descriptor() ([]byte, []int) {
|
func (*ServiceUnit) Descriptor() ([]byte, []int) {
|
||||||
return file_debugd_proto_rawDescGZIP(), []int{6}
|
return file_debugd_proto_rawDescGZIP(), []int{8}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *ServiceUnit) GetName() string {
|
func (x *ServiceUnit) GetName() string {
|
||||||
|
@ -511,7 +596,7 @@ type UploadSystemdServiceUnitsRequest struct {
|
||||||
func (x *UploadSystemdServiceUnitsRequest) Reset() {
|
func (x *UploadSystemdServiceUnitsRequest) Reset() {
|
||||||
*x = UploadSystemdServiceUnitsRequest{}
|
*x = UploadSystemdServiceUnitsRequest{}
|
||||||
if protoimpl.UnsafeEnabled {
|
if protoimpl.UnsafeEnabled {
|
||||||
mi := &file_debugd_proto_msgTypes[7]
|
mi := &file_debugd_proto_msgTypes[9]
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
}
|
}
|
||||||
|
@ -524,7 +609,7 @@ func (x *UploadSystemdServiceUnitsRequest) String() string {
|
||||||
func (*UploadSystemdServiceUnitsRequest) ProtoMessage() {}
|
func (*UploadSystemdServiceUnitsRequest) ProtoMessage() {}
|
||||||
|
|
||||||
func (x *UploadSystemdServiceUnitsRequest) ProtoReflect() protoreflect.Message {
|
func (x *UploadSystemdServiceUnitsRequest) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_debugd_proto_msgTypes[7]
|
mi := &file_debugd_proto_msgTypes[9]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if protoimpl.UnsafeEnabled && x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
|
@ -537,7 +622,7 @@ func (x *UploadSystemdServiceUnitsRequest) ProtoReflect() protoreflect.Message {
|
||||||
|
|
||||||
// Deprecated: Use UploadSystemdServiceUnitsRequest.ProtoReflect.Descriptor instead.
|
// Deprecated: Use UploadSystemdServiceUnitsRequest.ProtoReflect.Descriptor instead.
|
||||||
func (*UploadSystemdServiceUnitsRequest) Descriptor() ([]byte, []int) {
|
func (*UploadSystemdServiceUnitsRequest) Descriptor() ([]byte, []int) {
|
||||||
return file_debugd_proto_rawDescGZIP(), []int{7}
|
return file_debugd_proto_rawDescGZIP(), []int{9}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *UploadSystemdServiceUnitsRequest) GetUnits() []*ServiceUnit {
|
func (x *UploadSystemdServiceUnitsRequest) GetUnits() []*ServiceUnit {
|
||||||
|
@ -558,7 +643,7 @@ type UploadSystemdServiceUnitsResponse struct {
|
||||||
func (x *UploadSystemdServiceUnitsResponse) Reset() {
|
func (x *UploadSystemdServiceUnitsResponse) Reset() {
|
||||||
*x = UploadSystemdServiceUnitsResponse{}
|
*x = UploadSystemdServiceUnitsResponse{}
|
||||||
if protoimpl.UnsafeEnabled {
|
if protoimpl.UnsafeEnabled {
|
||||||
mi := &file_debugd_proto_msgTypes[8]
|
mi := &file_debugd_proto_msgTypes[10]
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
}
|
}
|
||||||
|
@ -571,7 +656,7 @@ func (x *UploadSystemdServiceUnitsResponse) String() string {
|
||||||
func (*UploadSystemdServiceUnitsResponse) ProtoMessage() {}
|
func (*UploadSystemdServiceUnitsResponse) ProtoMessage() {}
|
||||||
|
|
||||||
func (x *UploadSystemdServiceUnitsResponse) ProtoReflect() protoreflect.Message {
|
func (x *UploadSystemdServiceUnitsResponse) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_debugd_proto_msgTypes[8]
|
mi := &file_debugd_proto_msgTypes[10]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if protoimpl.UnsafeEnabled && x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
|
@ -584,7 +669,7 @@ func (x *UploadSystemdServiceUnitsResponse) ProtoReflect() protoreflect.Message
|
||||||
|
|
||||||
// Deprecated: Use UploadSystemdServiceUnitsResponse.ProtoReflect.Descriptor instead.
|
// Deprecated: Use UploadSystemdServiceUnitsResponse.ProtoReflect.Descriptor instead.
|
||||||
func (*UploadSystemdServiceUnitsResponse) Descriptor() ([]byte, []int) {
|
func (*UploadSystemdServiceUnitsResponse) Descriptor() ([]byte, []int) {
|
||||||
return file_debugd_proto_rawDescGZIP(), []int{8}
|
return file_debugd_proto_rawDescGZIP(), []int{10}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *UploadSystemdServiceUnitsResponse) GetStatus() UploadSystemdServiceUnitsStatus {
|
func (x *UploadSystemdServiceUnitsResponse) GetStatus() UploadSystemdServiceUnitsStatus {
|
||||||
|
@ -600,97 +685,111 @@ var file_debugd_proto_rawDesc = []byte{
|
||||||
0x0a, 0x0c, 0x64, 0x65, 0x62, 0x75, 0x67, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x06,
|
0x0a, 0x0c, 0x64, 0x65, 0x62, 0x75, 0x67, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x06,
|
||||||
0x64, 0x65, 0x62, 0x75, 0x67, 0x64, 0x22, 0x1d, 0x0a, 0x1b, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f,
|
0x64, 0x65, 0x62, 0x75, 0x67, 0x64, 0x22, 0x1d, 0x0a, 0x1b, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f,
|
||||||
0x61, 0x64, 0x42, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x52, 0x65,
|
0x61, 0x64, 0x42, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x52, 0x65,
|
||||||
0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x48, 0x0a, 0x0d, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69,
|
0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x1f, 0x0a, 0x1d, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61,
|
||||||
0x7a, 0x65, 0x64, 0x4b, 0x65, 0x79, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61,
|
0x64, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x64, 0x4b, 0x65, 0x79, 0x73, 0x52,
|
||||||
0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61,
|
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x4b, 0x0a, 0x1e, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f,
|
||||||
0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x6b, 0x65, 0x79, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18,
|
0x61, 0x64, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x64, 0x4b, 0x65, 0x79, 0x73,
|
||||||
0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x22,
|
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x29, 0x0a, 0x04, 0x6b, 0x65, 0x79, 0x73,
|
||||||
0x48, 0x0a, 0x1b, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69,
|
0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x64, 0x65, 0x62, 0x75, 0x67, 0x64, 0x2e,
|
||||||
0x7a, 0x65, 0x64, 0x4b, 0x65, 0x79, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x29,
|
0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x64, 0x4b, 0x65, 0x79, 0x52, 0x04, 0x6b,
|
||||||
0x0a, 0x04, 0x6b, 0x65, 0x79, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x64,
|
0x65, 0x79, 0x73, 0x22, 0x48, 0x0a, 0x0d, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65,
|
||||||
0x65, 0x62, 0x75, 0x67, 0x64, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x64,
|
0x64, 0x4b, 0x65, 0x79, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65,
|
||||||
0x4b, 0x65, 0x79, 0x52, 0x04, 0x6b, 0x65, 0x79, 0x73, 0x22, 0x5a, 0x0a, 0x1c, 0x55, 0x70, 0x6c,
|
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65,
|
||||||
0x6f, 0x61, 0x64, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x64, 0x4b, 0x65, 0x79,
|
0x12, 0x1b, 0x0a, 0x09, 0x6b, 0x65, 0x79, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20,
|
||||||
0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3a, 0x0a, 0x06, 0x73, 0x74, 0x61,
|
0x01, 0x28, 0x09, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x48, 0x0a,
|
||||||
0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x22, 0x2e, 0x64, 0x65, 0x62, 0x75,
|
0x1b, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65,
|
||||||
0x67, 0x64, 0x2e, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69,
|
0x64, 0x4b, 0x65, 0x79, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x29, 0x0a, 0x04,
|
||||||
0x7a, 0x65, 0x64, 0x4b, 0x65, 0x79, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73,
|
0x6b, 0x65, 0x79, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x64, 0x65, 0x62,
|
||||||
0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x21, 0x0a, 0x05, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x12, 0x18,
|
0x75, 0x67, 0x64, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x64, 0x4b, 0x65,
|
||||||
0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52,
|
0x79, 0x52, 0x04, 0x6b, 0x65, 0x79, 0x73, 0x22, 0x5a, 0x0a, 0x1c, 0x55, 0x70, 0x6c, 0x6f, 0x61,
|
||||||
0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x22, 0x56, 0x0a, 0x1a, 0x55, 0x70, 0x6c, 0x6f,
|
0x64, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x64, 0x4b, 0x65, 0x79, 0x73, 0x52,
|
||||||
0x61, 0x64, 0x42, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x52, 0x65,
|
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3a, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75,
|
||||||
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x38, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73,
|
0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x22, 0x2e, 0x64, 0x65, 0x62, 0x75, 0x67, 0x64,
|
||||||
0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x20, 0x2e, 0x64, 0x65, 0x62, 0x75, 0x67, 0x64, 0x2e,
|
0x2e, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65,
|
||||||
0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x42, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x70,
|
0x64, 0x4b, 0x65, 0x79, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61,
|
||||||
0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73,
|
0x74, 0x75, 0x73, 0x22, 0x21, 0x0a, 0x05, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x12, 0x18, 0x0a, 0x07,
|
||||||
0x22, 0x3d, 0x0a, 0x0b, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x55, 0x6e, 0x69, 0x74, 0x12,
|
0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x63,
|
||||||
0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e,
|
0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x22, 0x56, 0x0a, 0x1a, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64,
|
||||||
0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x18,
|
0x42, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70,
|
||||||
0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x22,
|
0x6f, 0x6e, 0x73, 0x65, 0x12, 0x38, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01,
|
||||||
0x4d, 0x0a, 0x20, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x64,
|
0x20, 0x01, 0x28, 0x0e, 0x32, 0x20, 0x2e, 0x64, 0x65, 0x62, 0x75, 0x67, 0x64, 0x2e, 0x55, 0x70,
|
||||||
0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x55, 0x6e, 0x69, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75,
|
0x6c, 0x6f, 0x61, 0x64, 0x42, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72,
|
||||||
0x65, 0x73, 0x74, 0x12, 0x29, 0x0a, 0x05, 0x75, 0x6e, 0x69, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03,
|
0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x3d,
|
||||||
0x28, 0x0b, 0x32, 0x13, 0x2e, 0x64, 0x65, 0x62, 0x75, 0x67, 0x64, 0x2e, 0x53, 0x65, 0x72, 0x76,
|
0x0a, 0x0b, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x55, 0x6e, 0x69, 0x74, 0x12, 0x12, 0x0a,
|
||||||
0x69, 0x63, 0x65, 0x55, 0x6e, 0x69, 0x74, 0x52, 0x05, 0x75, 0x6e, 0x69, 0x74, 0x73, 0x22, 0x64,
|
0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d,
|
||||||
0x0a, 0x21, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x64, 0x53,
|
0x65, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x02, 0x20,
|
||||||
0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x55, 0x6e, 0x69, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f,
|
0x01, 0x28, 0x09, 0x52, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x22, 0x4d, 0x0a,
|
||||||
0x6e, 0x73, 0x65, 0x12, 0x3f, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20,
|
0x20, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x64, 0x53, 0x65,
|
||||||
0x01, 0x28, 0x0e, 0x32, 0x27, 0x2e, 0x64, 0x65, 0x62, 0x75, 0x67, 0x64, 0x2e, 0x55, 0x70, 0x6c,
|
0x72, 0x76, 0x69, 0x63, 0x65, 0x55, 0x6e, 0x69, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
|
||||||
0x6f, 0x61, 0x64, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63,
|
0x74, 0x12, 0x29, 0x0a, 0x05, 0x75, 0x6e, 0x69, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b,
|
||||||
0x65, 0x55, 0x6e, 0x69, 0x74, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74,
|
0x32, 0x13, 0x2e, 0x64, 0x65, 0x62, 0x75, 0x67, 0x64, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63,
|
||||||
0x61, 0x74, 0x75, 0x73, 0x2a, 0x64, 0x0a, 0x1a, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x41, 0x75,
|
0x65, 0x55, 0x6e, 0x69, 0x74, 0x52, 0x05, 0x75, 0x6e, 0x69, 0x74, 0x73, 0x22, 0x64, 0x0a, 0x21,
|
||||||
0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x64, 0x4b, 0x65, 0x79, 0x73, 0x53, 0x74, 0x61, 0x74,
|
0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x64, 0x53, 0x65, 0x72,
|
||||||
0x75, 0x73, 0x12, 0x22, 0x0a, 0x1e, 0x55, 0x50, 0x4c, 0x4f, 0x41, 0x44, 0x5f, 0x41, 0x55, 0x54,
|
0x76, 0x69, 0x63, 0x65, 0x55, 0x6e, 0x69, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
|
||||||
0x48, 0x4f, 0x52, 0x49, 0x5a, 0x45, 0x44, 0x5f, 0x4b, 0x45, 0x59, 0x53, 0x5f, 0x53, 0x55, 0x43,
|
0x65, 0x12, 0x3f, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||||
0x43, 0x45, 0x53, 0x53, 0x10, 0x00, 0x12, 0x22, 0x0a, 0x1e, 0x55, 0x50, 0x4c, 0x4f, 0x41, 0x44,
|
0x0e, 0x32, 0x27, 0x2e, 0x64, 0x65, 0x62, 0x75, 0x67, 0x64, 0x2e, 0x55, 0x70, 0x6c, 0x6f, 0x61,
|
||||||
0x5f, 0x41, 0x55, 0x54, 0x48, 0x4f, 0x52, 0x49, 0x5a, 0x45, 0x44, 0x5f, 0x4b, 0x45, 0x59, 0x53,
|
0x64, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x55,
|
||||||
0x5f, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x10, 0x01, 0x2a, 0xad, 0x01, 0x0a, 0x18, 0x55,
|
0x6e, 0x69, 0x74, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74,
|
||||||
0x70, 0x6c, 0x6f, 0x61, 0x64, 0x42, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x70, 0x65,
|
0x75, 0x73, 0x2a, 0x64, 0x0a, 0x1a, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x41, 0x75, 0x74, 0x68,
|
||||||
0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1f, 0x0a, 0x1b, 0x55, 0x50, 0x4c, 0x4f, 0x41,
|
0x6f, 0x72, 0x69, 0x7a, 0x65, 0x64, 0x4b, 0x65, 0x79, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73,
|
||||||
0x44, 0x5f, 0x42, 0x4f, 0x4f, 0x54, 0x53, 0x54, 0x52, 0x41, 0x50, 0x50, 0x45, 0x52, 0x5f, 0x53,
|
0x12, 0x22, 0x0a, 0x1e, 0x55, 0x50, 0x4c, 0x4f, 0x41, 0x44, 0x5f, 0x41, 0x55, 0x54, 0x48, 0x4f,
|
||||||
0x55, 0x43, 0x43, 0x45, 0x53, 0x53, 0x10, 0x00, 0x12, 0x25, 0x0a, 0x21, 0x55, 0x50, 0x4c, 0x4f,
|
0x52, 0x49, 0x5a, 0x45, 0x44, 0x5f, 0x4b, 0x45, 0x59, 0x53, 0x5f, 0x53, 0x55, 0x43, 0x43, 0x45,
|
||||||
0x41, 0x44, 0x5f, 0x42, 0x4f, 0x4f, 0x54, 0x53, 0x54, 0x52, 0x41, 0x50, 0x50, 0x45, 0x52, 0x5f,
|
0x53, 0x53, 0x10, 0x00, 0x12, 0x22, 0x0a, 0x1e, 0x55, 0x50, 0x4c, 0x4f, 0x41, 0x44, 0x5f, 0x41,
|
||||||
0x55, 0x50, 0x4c, 0x4f, 0x41, 0x44, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0x01, 0x12,
|
0x55, 0x54, 0x48, 0x4f, 0x52, 0x49, 0x5a, 0x45, 0x44, 0x5f, 0x4b, 0x45, 0x59, 0x53, 0x5f, 0x46,
|
||||||
0x24, 0x0a, 0x20, 0x55, 0x50, 0x4c, 0x4f, 0x41, 0x44, 0x5f, 0x42, 0x4f, 0x4f, 0x54, 0x53, 0x54,
|
0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x10, 0x01, 0x2a, 0xad, 0x01, 0x0a, 0x18, 0x55, 0x70, 0x6c,
|
||||||
0x52, 0x41, 0x50, 0x50, 0x45, 0x52, 0x5f, 0x53, 0x54, 0x41, 0x52, 0x54, 0x5f, 0x46, 0x41, 0x49,
|
0x6f, 0x61, 0x64, 0x42, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x53,
|
||||||
0x4c, 0x45, 0x44, 0x10, 0x02, 0x12, 0x23, 0x0a, 0x1f, 0x55, 0x50, 0x4c, 0x4f, 0x41, 0x44, 0x5f,
|
0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1f, 0x0a, 0x1b, 0x55, 0x50, 0x4c, 0x4f, 0x41, 0x44, 0x5f,
|
||||||
0x42, 0x4f, 0x4f, 0x54, 0x53, 0x54, 0x52, 0x41, 0x50, 0x50, 0x45, 0x52, 0x5f, 0x46, 0x49, 0x4c,
|
0x42, 0x4f, 0x4f, 0x54, 0x53, 0x54, 0x52, 0x41, 0x50, 0x50, 0x45, 0x52, 0x5f, 0x53, 0x55, 0x43,
|
||||||
0x45, 0x5f, 0x45, 0x58, 0x49, 0x53, 0x54, 0x53, 0x10, 0x03, 0x2a, 0x75, 0x0a, 0x1f, 0x55, 0x70,
|
0x43, 0x45, 0x53, 0x53, 0x10, 0x00, 0x12, 0x25, 0x0a, 0x21, 0x55, 0x50, 0x4c, 0x4f, 0x41, 0x44,
|
||||||
0x6c, 0x6f, 0x61, 0x64, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69,
|
0x5f, 0x42, 0x4f, 0x4f, 0x54, 0x53, 0x54, 0x52, 0x41, 0x50, 0x50, 0x45, 0x52, 0x5f, 0x55, 0x50,
|
||||||
0x63, 0x65, 0x55, 0x6e, 0x69, 0x74, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x28, 0x0a,
|
0x4c, 0x4f, 0x41, 0x44, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0x01, 0x12, 0x24, 0x0a,
|
||||||
0x24, 0x55, 0x50, 0x4c, 0x4f, 0x41, 0x44, 0x5f, 0x53, 0x59, 0x53, 0x54, 0x45, 0x4d, 0x44, 0x5f,
|
0x20, 0x55, 0x50, 0x4c, 0x4f, 0x41, 0x44, 0x5f, 0x42, 0x4f, 0x4f, 0x54, 0x53, 0x54, 0x52, 0x41,
|
||||||
0x53, 0x45, 0x52, 0x56, 0x49, 0x43, 0x45, 0x5f, 0x55, 0x4e, 0x49, 0x54, 0x53, 0x5f, 0x53, 0x55,
|
0x50, 0x50, 0x45, 0x52, 0x5f, 0x53, 0x54, 0x41, 0x52, 0x54, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x45,
|
||||||
0x43, 0x43, 0x45, 0x53, 0x53, 0x10, 0x00, 0x12, 0x28, 0x0a, 0x24, 0x55, 0x50, 0x4c, 0x4f, 0x41,
|
0x44, 0x10, 0x02, 0x12, 0x23, 0x0a, 0x1f, 0x55, 0x50, 0x4c, 0x4f, 0x41, 0x44, 0x5f, 0x42, 0x4f,
|
||||||
0x44, 0x5f, 0x53, 0x59, 0x53, 0x54, 0x45, 0x4d, 0x44, 0x5f, 0x53, 0x45, 0x52, 0x56, 0x49, 0x43,
|
0x4f, 0x54, 0x53, 0x54, 0x52, 0x41, 0x50, 0x50, 0x45, 0x52, 0x5f, 0x46, 0x49, 0x4c, 0x45, 0x5f,
|
||||||
0x45, 0x5f, 0x55, 0x4e, 0x49, 0x54, 0x53, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x10,
|
0x45, 0x58, 0x49, 0x53, 0x54, 0x53, 0x10, 0x03, 0x2a, 0x75, 0x0a, 0x1f, 0x55, 0x70, 0x6c, 0x6f,
|
||||||
0x01, 0x32, 0xfd, 0x02, 0x0a, 0x06, 0x44, 0x65, 0x62, 0x75, 0x67, 0x64, 0x12, 0x63, 0x0a, 0x14,
|
0x61, 0x64, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
|
||||||
0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x64,
|
0x55, 0x6e, 0x69, 0x74, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x28, 0x0a, 0x24, 0x55,
|
||||||
0x4b, 0x65, 0x79, 0x73, 0x12, 0x23, 0x2e, 0x64, 0x65, 0x62, 0x75, 0x67, 0x64, 0x2e, 0x55, 0x70,
|
0x50, 0x4c, 0x4f, 0x41, 0x44, 0x5f, 0x53, 0x59, 0x53, 0x54, 0x45, 0x4d, 0x44, 0x5f, 0x53, 0x45,
|
||||||
|
0x52, 0x56, 0x49, 0x43, 0x45, 0x5f, 0x55, 0x4e, 0x49, 0x54, 0x53, 0x5f, 0x53, 0x55, 0x43, 0x43,
|
||||||
|
0x45, 0x53, 0x53, 0x10, 0x00, 0x12, 0x28, 0x0a, 0x24, 0x55, 0x50, 0x4c, 0x4f, 0x41, 0x44, 0x5f,
|
||||||
|
0x53, 0x59, 0x53, 0x54, 0x45, 0x4d, 0x44, 0x5f, 0x53, 0x45, 0x52, 0x56, 0x49, 0x43, 0x45, 0x5f,
|
||||||
|
0x55, 0x4e, 0x49, 0x54, 0x53, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x10, 0x01, 0x32,
|
||||||
|
0xe8, 0x03, 0x0a, 0x06, 0x44, 0x65, 0x62, 0x75, 0x67, 0x64, 0x12, 0x63, 0x0a, 0x14, 0x55, 0x70,
|
||||||
0x6c, 0x6f, 0x61, 0x64, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x64, 0x4b, 0x65,
|
0x6c, 0x6f, 0x61, 0x64, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x64, 0x4b, 0x65,
|
||||||
0x79, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x64, 0x65, 0x62, 0x75,
|
0x79, 0x73, 0x12, 0x23, 0x2e, 0x64, 0x65, 0x62, 0x75, 0x67, 0x64, 0x2e, 0x55, 0x70, 0x6c, 0x6f,
|
||||||
0x67, 0x64, 0x2e, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69,
|
0x61, 0x64, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x64, 0x4b, 0x65, 0x79, 0x73,
|
||||||
0x7a, 0x65, 0x64, 0x4b, 0x65, 0x79, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22,
|
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x64, 0x65, 0x62, 0x75, 0x67, 0x64,
|
||||||
0x00, 0x12, 0x4b, 0x0a, 0x12, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x42, 0x6f, 0x6f, 0x74, 0x73,
|
0x2e, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65,
|
||||||
0x74, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x12, 0x0d, 0x2e, 0x64, 0x65, 0x62, 0x75, 0x67, 0x64,
|
0x64, 0x4b, 0x65, 0x79, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12,
|
||||||
0x2e, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x1a, 0x22, 0x2e, 0x64, 0x65, 0x62, 0x75, 0x67, 0x64, 0x2e,
|
0x4b, 0x0a, 0x12, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x42, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72,
|
||||||
0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x42, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x70,
|
0x61, 0x70, 0x70, 0x65, 0x72, 0x12, 0x0d, 0x2e, 0x64, 0x65, 0x62, 0x75, 0x67, 0x64, 0x2e, 0x43,
|
||||||
0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x28, 0x01, 0x12, 0x4e,
|
0x68, 0x75, 0x6e, 0x6b, 0x1a, 0x22, 0x2e, 0x64, 0x65, 0x62, 0x75, 0x67, 0x64, 0x2e, 0x55, 0x70,
|
||||||
0x0a, 0x14, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x42, 0x6f, 0x6f, 0x74, 0x73, 0x74,
|
0x6c, 0x6f, 0x61, 0x64, 0x42, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72,
|
||||||
0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x12, 0x23, 0x2e, 0x64, 0x65, 0x62, 0x75, 0x67, 0x64, 0x2e,
|
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x28, 0x01, 0x12, 0x4e, 0x0a, 0x14,
|
||||||
0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x42, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61,
|
0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x42, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61,
|
||||||
0x70, 0x70, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0d, 0x2e, 0x64, 0x65,
|
0x70, 0x70, 0x65, 0x72, 0x12, 0x23, 0x2e, 0x64, 0x65, 0x62, 0x75, 0x67, 0x64, 0x2e, 0x44, 0x6f,
|
||||||
0x62, 0x75, 0x67, 0x64, 0x2e, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x22, 0x00, 0x30, 0x01, 0x12, 0x71,
|
0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x42, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x70,
|
||||||
0x0a, 0x18, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x53, 0x65,
|
0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0d, 0x2e, 0x64, 0x65, 0x62, 0x75,
|
||||||
0x72, 0x76, 0x69, 0x63, 0x65, 0x55, 0x6e, 0x69, 0x74, 0x73, 0x12, 0x28, 0x2e, 0x64, 0x65, 0x62,
|
0x67, 0x64, 0x2e, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x22, 0x00, 0x30, 0x01, 0x12, 0x69, 0x0a, 0x16,
|
||||||
0x75, 0x67, 0x64, 0x2e, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d,
|
0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a,
|
||||||
0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x55, 0x6e, 0x69, 0x74, 0x73, 0x52, 0x65, 0x71,
|
0x65, 0x64, 0x4b, 0x65, 0x79, 0x73, 0x12, 0x25, 0x2e, 0x64, 0x65, 0x62, 0x75, 0x67, 0x64, 0x2e,
|
||||||
0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x64, 0x65, 0x62, 0x75, 0x67, 0x64, 0x2e, 0x55, 0x70,
|
0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a,
|
||||||
0x6c, 0x6f, 0x61, 0x64, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69,
|
0x65, 0x64, 0x4b, 0x65, 0x79, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e,
|
||||||
0x63, 0x65, 0x55, 0x6e, 0x69, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22,
|
0x64, 0x65, 0x62, 0x75, 0x67, 0x64, 0x2e, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x41,
|
||||||
0x00, 0x42, 0x35, 0x5a, 0x33, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f,
|
0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x64, 0x4b, 0x65, 0x79, 0x73, 0x52, 0x65, 0x73,
|
||||||
0x65, 0x64, 0x67, 0x65, 0x6c, 0x65, 0x73, 0x73, 0x73, 0x79, 0x73, 0x2f, 0x63, 0x6f, 0x6e, 0x73,
|
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x71, 0x0a, 0x18, 0x55, 0x70, 0x6c, 0x6f, 0x61,
|
||||||
0x74, 0x65, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x64, 0x65, 0x62, 0x75, 0x67, 0x64,
|
0x64, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x55, 0x6e,
|
||||||
0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
0x69, 0x74, 0x73, 0x12, 0x28, 0x2e, 0x64, 0x65, 0x62, 0x75, 0x67, 0x64, 0x2e, 0x55, 0x70, 0x6c,
|
||||||
|
0x6f, 0x61, 0x64, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63,
|
||||||
|
0x65, 0x55, 0x6e, 0x69, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e,
|
||||||
|
0x64, 0x65, 0x62, 0x75, 0x67, 0x64, 0x2e, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x79, 0x73,
|
||||||
|
0x74, 0x65, 0x6d, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x55, 0x6e, 0x69, 0x74, 0x73,
|
||||||
|
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x35, 0x5a, 0x33, 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, 0x64, 0x65, 0x62, 0x75, 0x67, 0x64, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63,
|
||||||
|
0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
@ -706,40 +805,45 @@ func file_debugd_proto_rawDescGZIP() []byte {
|
||||||
}
|
}
|
||||||
|
|
||||||
var file_debugd_proto_enumTypes = make([]protoimpl.EnumInfo, 3)
|
var file_debugd_proto_enumTypes = make([]protoimpl.EnumInfo, 3)
|
||||||
var file_debugd_proto_msgTypes = make([]protoimpl.MessageInfo, 9)
|
var file_debugd_proto_msgTypes = make([]protoimpl.MessageInfo, 11)
|
||||||
var file_debugd_proto_goTypes = []interface{}{
|
var file_debugd_proto_goTypes = []interface{}{
|
||||||
(UploadAuthorizedKeysStatus)(0), // 0: debugd.UploadAuthorizedKeysStatus
|
(UploadAuthorizedKeysStatus)(0), // 0: debugd.UploadAuthorizedKeysStatus
|
||||||
(UploadBootstrapperStatus)(0), // 1: debugd.UploadBootstrapperStatus
|
(UploadBootstrapperStatus)(0), // 1: debugd.UploadBootstrapperStatus
|
||||||
(UploadSystemdServiceUnitsStatus)(0), // 2: debugd.UploadSystemdServiceUnitsStatus
|
(UploadSystemdServiceUnitsStatus)(0), // 2: debugd.UploadSystemdServiceUnitsStatus
|
||||||
(*DownloadBootstrapperRequest)(nil), // 3: debugd.DownloadBootstrapperRequest
|
(*DownloadBootstrapperRequest)(nil), // 3: debugd.DownloadBootstrapperRequest
|
||||||
(*AuthorizedKey)(nil), // 4: debugd.AuthorizedKey
|
(*DownloadAuthorizedKeysRequest)(nil), // 4: debugd.DownloadAuthorizedKeysRequest
|
||||||
(*UploadAuthorizedKeysRequest)(nil), // 5: debugd.UploadAuthorizedKeysRequest
|
(*DownloadAuthorizedKeysResponse)(nil), // 5: debugd.DownloadAuthorizedKeysResponse
|
||||||
(*UploadAuthorizedKeysResponse)(nil), // 6: debugd.UploadAuthorizedKeysResponse
|
(*AuthorizedKey)(nil), // 6: debugd.AuthorizedKey
|
||||||
(*Chunk)(nil), // 7: debugd.Chunk
|
(*UploadAuthorizedKeysRequest)(nil), // 7: debugd.UploadAuthorizedKeysRequest
|
||||||
(*UploadBootstrapperResponse)(nil), // 8: debugd.UploadBootstrapperResponse
|
(*UploadAuthorizedKeysResponse)(nil), // 8: debugd.UploadAuthorizedKeysResponse
|
||||||
(*ServiceUnit)(nil), // 9: debugd.ServiceUnit
|
(*Chunk)(nil), // 9: debugd.Chunk
|
||||||
(*UploadSystemdServiceUnitsRequest)(nil), // 10: debugd.UploadSystemdServiceUnitsRequest
|
(*UploadBootstrapperResponse)(nil), // 10: debugd.UploadBootstrapperResponse
|
||||||
(*UploadSystemdServiceUnitsResponse)(nil), // 11: debugd.UploadSystemdServiceUnitsResponse
|
(*ServiceUnit)(nil), // 11: debugd.ServiceUnit
|
||||||
|
(*UploadSystemdServiceUnitsRequest)(nil), // 12: debugd.UploadSystemdServiceUnitsRequest
|
||||||
|
(*UploadSystemdServiceUnitsResponse)(nil), // 13: debugd.UploadSystemdServiceUnitsResponse
|
||||||
}
|
}
|
||||||
var file_debugd_proto_depIdxs = []int32{
|
var file_debugd_proto_depIdxs = []int32{
|
||||||
4, // 0: debugd.UploadAuthorizedKeysRequest.keys:type_name -> debugd.AuthorizedKey
|
6, // 0: debugd.DownloadAuthorizedKeysResponse.keys:type_name -> debugd.AuthorizedKey
|
||||||
0, // 1: debugd.UploadAuthorizedKeysResponse.status:type_name -> debugd.UploadAuthorizedKeysStatus
|
6, // 1: debugd.UploadAuthorizedKeysRequest.keys:type_name -> debugd.AuthorizedKey
|
||||||
1, // 2: debugd.UploadBootstrapperResponse.status:type_name -> debugd.UploadBootstrapperStatus
|
0, // 2: debugd.UploadAuthorizedKeysResponse.status:type_name -> debugd.UploadAuthorizedKeysStatus
|
||||||
9, // 3: debugd.UploadSystemdServiceUnitsRequest.units:type_name -> debugd.ServiceUnit
|
1, // 3: debugd.UploadBootstrapperResponse.status:type_name -> debugd.UploadBootstrapperStatus
|
||||||
2, // 4: debugd.UploadSystemdServiceUnitsResponse.status:type_name -> debugd.UploadSystemdServiceUnitsStatus
|
11, // 4: debugd.UploadSystemdServiceUnitsRequest.units:type_name -> debugd.ServiceUnit
|
||||||
5, // 5: debugd.Debugd.UploadAuthorizedKeys:input_type -> debugd.UploadAuthorizedKeysRequest
|
2, // 5: debugd.UploadSystemdServiceUnitsResponse.status:type_name -> debugd.UploadSystemdServiceUnitsStatus
|
||||||
7, // 6: debugd.Debugd.UploadBootstrapper:input_type -> debugd.Chunk
|
7, // 6: debugd.Debugd.UploadAuthorizedKeys:input_type -> debugd.UploadAuthorizedKeysRequest
|
||||||
3, // 7: debugd.Debugd.DownloadBootstrapper:input_type -> debugd.DownloadBootstrapperRequest
|
9, // 7: debugd.Debugd.UploadBootstrapper:input_type -> debugd.Chunk
|
||||||
10, // 8: debugd.Debugd.UploadSystemServiceUnits:input_type -> debugd.UploadSystemdServiceUnitsRequest
|
3, // 8: debugd.Debugd.DownloadBootstrapper:input_type -> debugd.DownloadBootstrapperRequest
|
||||||
6, // 9: debugd.Debugd.UploadAuthorizedKeys:output_type -> debugd.UploadAuthorizedKeysResponse
|
4, // 9: debugd.Debugd.DownloadAuthorizedKeys:input_type -> debugd.DownloadAuthorizedKeysRequest
|
||||||
8, // 10: debugd.Debugd.UploadBootstrapper:output_type -> debugd.UploadBootstrapperResponse
|
12, // 10: debugd.Debugd.UploadSystemServiceUnits:input_type -> debugd.UploadSystemdServiceUnitsRequest
|
||||||
7, // 11: debugd.Debugd.DownloadBootstrapper:output_type -> debugd.Chunk
|
8, // 11: debugd.Debugd.UploadAuthorizedKeys:output_type -> debugd.UploadAuthorizedKeysResponse
|
||||||
11, // 12: debugd.Debugd.UploadSystemServiceUnits:output_type -> debugd.UploadSystemdServiceUnitsResponse
|
10, // 12: debugd.Debugd.UploadBootstrapper:output_type -> debugd.UploadBootstrapperResponse
|
||||||
9, // [9:13] is the sub-list for method output_type
|
9, // 13: debugd.Debugd.DownloadBootstrapper:output_type -> debugd.Chunk
|
||||||
5, // [5:9] is the sub-list for method input_type
|
5, // 14: debugd.Debugd.DownloadAuthorizedKeys:output_type -> debugd.DownloadAuthorizedKeysResponse
|
||||||
5, // [5:5] is the sub-list for extension type_name
|
13, // 15: debugd.Debugd.UploadSystemServiceUnits:output_type -> debugd.UploadSystemdServiceUnitsResponse
|
||||||
5, // [5:5] is the sub-list for extension extendee
|
11, // [11:16] is the sub-list for method output_type
|
||||||
0, // [0:5] is the sub-list for field type_name
|
6, // [6:11] 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_debugd_proto_init() }
|
func init() { file_debugd_proto_init() }
|
||||||
|
@ -761,7 +865,7 @@ func file_debugd_proto_init() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
file_debugd_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
file_debugd_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||||
switch v := v.(*AuthorizedKey); i {
|
switch v := v.(*DownloadAuthorizedKeysRequest); i {
|
||||||
case 0:
|
case 0:
|
||||||
return &v.state
|
return &v.state
|
||||||
case 1:
|
case 1:
|
||||||
|
@ -773,7 +877,7 @@ func file_debugd_proto_init() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
file_debugd_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
|
file_debugd_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
|
||||||
switch v := v.(*UploadAuthorizedKeysRequest); i {
|
switch v := v.(*DownloadAuthorizedKeysResponse); i {
|
||||||
case 0:
|
case 0:
|
||||||
return &v.state
|
return &v.state
|
||||||
case 1:
|
case 1:
|
||||||
|
@ -785,7 +889,7 @@ func file_debugd_proto_init() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
file_debugd_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
|
file_debugd_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
|
||||||
switch v := v.(*UploadAuthorizedKeysResponse); i {
|
switch v := v.(*AuthorizedKey); i {
|
||||||
case 0:
|
case 0:
|
||||||
return &v.state
|
return &v.state
|
||||||
case 1:
|
case 1:
|
||||||
|
@ -797,7 +901,7 @@ func file_debugd_proto_init() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
file_debugd_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
|
file_debugd_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
|
||||||
switch v := v.(*Chunk); i {
|
switch v := v.(*UploadAuthorizedKeysRequest); i {
|
||||||
case 0:
|
case 0:
|
||||||
return &v.state
|
return &v.state
|
||||||
case 1:
|
case 1:
|
||||||
|
@ -809,7 +913,7 @@ func file_debugd_proto_init() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
file_debugd_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
|
file_debugd_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
|
||||||
switch v := v.(*UploadBootstrapperResponse); i {
|
switch v := v.(*UploadAuthorizedKeysResponse); i {
|
||||||
case 0:
|
case 0:
|
||||||
return &v.state
|
return &v.state
|
||||||
case 1:
|
case 1:
|
||||||
|
@ -821,7 +925,7 @@ func file_debugd_proto_init() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
file_debugd_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
|
file_debugd_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
|
||||||
switch v := v.(*ServiceUnit); i {
|
switch v := v.(*Chunk); i {
|
||||||
case 0:
|
case 0:
|
||||||
return &v.state
|
return &v.state
|
||||||
case 1:
|
case 1:
|
||||||
|
@ -833,7 +937,7 @@ func file_debugd_proto_init() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
file_debugd_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
|
file_debugd_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
|
||||||
switch v := v.(*UploadSystemdServiceUnitsRequest); i {
|
switch v := v.(*UploadBootstrapperResponse); i {
|
||||||
case 0:
|
case 0:
|
||||||
return &v.state
|
return &v.state
|
||||||
case 1:
|
case 1:
|
||||||
|
@ -845,6 +949,30 @@ func file_debugd_proto_init() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
file_debugd_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
|
file_debugd_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
|
||||||
|
switch v := v.(*ServiceUnit); i {
|
||||||
|
case 0:
|
||||||
|
return &v.state
|
||||||
|
case 1:
|
||||||
|
return &v.sizeCache
|
||||||
|
case 2:
|
||||||
|
return &v.unknownFields
|
||||||
|
default:
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
file_debugd_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
|
||||||
|
switch v := v.(*UploadSystemdServiceUnitsRequest); i {
|
||||||
|
case 0:
|
||||||
|
return &v.state
|
||||||
|
case 1:
|
||||||
|
return &v.sizeCache
|
||||||
|
case 2:
|
||||||
|
return &v.unknownFields
|
||||||
|
default:
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
file_debugd_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {
|
||||||
switch v := v.(*UploadSystemdServiceUnitsResponse); i {
|
switch v := v.(*UploadSystemdServiceUnitsResponse); i {
|
||||||
case 0:
|
case 0:
|
||||||
return &v.state
|
return &v.state
|
||||||
|
@ -863,7 +991,7 @@ func file_debugd_proto_init() {
|
||||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||||
RawDescriptor: file_debugd_proto_rawDesc,
|
RawDescriptor: file_debugd_proto_rawDesc,
|
||||||
NumEnums: 3,
|
NumEnums: 3,
|
||||||
NumMessages: 9,
|
NumMessages: 11,
|
||||||
NumExtensions: 0,
|
NumExtensions: 0,
|
||||||
NumServices: 1,
|
NumServices: 1,
|
||||||
},
|
},
|
||||||
|
|
|
@ -8,11 +8,18 @@ service Debugd {
|
||||||
rpc UploadAuthorizedKeys(UploadAuthorizedKeysRequest) returns (UploadAuthorizedKeysResponse) {}
|
rpc UploadAuthorizedKeys(UploadAuthorizedKeysRequest) returns (UploadAuthorizedKeysResponse) {}
|
||||||
rpc UploadBootstrapper(stream Chunk) returns (UploadBootstrapperResponse) {}
|
rpc UploadBootstrapper(stream Chunk) returns (UploadBootstrapperResponse) {}
|
||||||
rpc DownloadBootstrapper(DownloadBootstrapperRequest) returns (stream Chunk) {}
|
rpc DownloadBootstrapper(DownloadBootstrapperRequest) returns (stream Chunk) {}
|
||||||
|
rpc DownloadAuthorizedKeys(DownloadAuthorizedKeysRequest) returns (DownloadAuthorizedKeysResponse) {}
|
||||||
rpc UploadSystemServiceUnits(UploadSystemdServiceUnitsRequest) returns (UploadSystemdServiceUnitsResponse) {}
|
rpc UploadSystemServiceUnits(UploadSystemdServiceUnitsRequest) returns (UploadSystemdServiceUnitsResponse) {}
|
||||||
}
|
}
|
||||||
|
|
||||||
message DownloadBootstrapperRequest {}
|
message DownloadBootstrapperRequest {}
|
||||||
|
|
||||||
|
message DownloadAuthorizedKeysRequest {}
|
||||||
|
|
||||||
|
message DownloadAuthorizedKeysResponse {
|
||||||
|
repeated AuthorizedKey keys = 1;
|
||||||
|
}
|
||||||
|
|
||||||
message AuthorizedKey {
|
message AuthorizedKey {
|
||||||
string username = 1;
|
string username = 1;
|
||||||
string key_value = 2;
|
string key_value = 2;
|
||||||
|
|
|
@ -25,6 +25,7 @@ type DebugdClient interface {
|
||||||
UploadAuthorizedKeys(ctx context.Context, in *UploadAuthorizedKeysRequest, opts ...grpc.CallOption) (*UploadAuthorizedKeysResponse, error)
|
UploadAuthorizedKeys(ctx context.Context, in *UploadAuthorizedKeysRequest, opts ...grpc.CallOption) (*UploadAuthorizedKeysResponse, error)
|
||||||
UploadBootstrapper(ctx context.Context, opts ...grpc.CallOption) (Debugd_UploadBootstrapperClient, error)
|
UploadBootstrapper(ctx context.Context, opts ...grpc.CallOption) (Debugd_UploadBootstrapperClient, error)
|
||||||
DownloadBootstrapper(ctx context.Context, in *DownloadBootstrapperRequest, opts ...grpc.CallOption) (Debugd_DownloadBootstrapperClient, error)
|
DownloadBootstrapper(ctx context.Context, in *DownloadBootstrapperRequest, opts ...grpc.CallOption) (Debugd_DownloadBootstrapperClient, error)
|
||||||
|
DownloadAuthorizedKeys(ctx context.Context, in *DownloadAuthorizedKeysRequest, opts ...grpc.CallOption) (*DownloadAuthorizedKeysResponse, error)
|
||||||
UploadSystemServiceUnits(ctx context.Context, in *UploadSystemdServiceUnitsRequest, opts ...grpc.CallOption) (*UploadSystemdServiceUnitsResponse, error)
|
UploadSystemServiceUnits(ctx context.Context, in *UploadSystemdServiceUnitsRequest, opts ...grpc.CallOption) (*UploadSystemdServiceUnitsResponse, error)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -111,6 +112,15 @@ func (x *debugdDownloadBootstrapperClient) Recv() (*Chunk, error) {
|
||||||
return m, nil
|
return m, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (c *debugdClient) DownloadAuthorizedKeys(ctx context.Context, in *DownloadAuthorizedKeysRequest, opts ...grpc.CallOption) (*DownloadAuthorizedKeysResponse, error) {
|
||||||
|
out := new(DownloadAuthorizedKeysResponse)
|
||||||
|
err := c.cc.Invoke(ctx, "/debugd.Debugd/DownloadAuthorizedKeys", in, out, opts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return out, nil
|
||||||
|
}
|
||||||
|
|
||||||
func (c *debugdClient) UploadSystemServiceUnits(ctx context.Context, in *UploadSystemdServiceUnitsRequest, opts ...grpc.CallOption) (*UploadSystemdServiceUnitsResponse, error) {
|
func (c *debugdClient) UploadSystemServiceUnits(ctx context.Context, in *UploadSystemdServiceUnitsRequest, opts ...grpc.CallOption) (*UploadSystemdServiceUnitsResponse, error) {
|
||||||
out := new(UploadSystemdServiceUnitsResponse)
|
out := new(UploadSystemdServiceUnitsResponse)
|
||||||
err := c.cc.Invoke(ctx, "/debugd.Debugd/UploadSystemServiceUnits", in, out, opts...)
|
err := c.cc.Invoke(ctx, "/debugd.Debugd/UploadSystemServiceUnits", in, out, opts...)
|
||||||
|
@ -127,6 +137,7 @@ type DebugdServer interface {
|
||||||
UploadAuthorizedKeys(context.Context, *UploadAuthorizedKeysRequest) (*UploadAuthorizedKeysResponse, error)
|
UploadAuthorizedKeys(context.Context, *UploadAuthorizedKeysRequest) (*UploadAuthorizedKeysResponse, error)
|
||||||
UploadBootstrapper(Debugd_UploadBootstrapperServer) error
|
UploadBootstrapper(Debugd_UploadBootstrapperServer) error
|
||||||
DownloadBootstrapper(*DownloadBootstrapperRequest, Debugd_DownloadBootstrapperServer) error
|
DownloadBootstrapper(*DownloadBootstrapperRequest, Debugd_DownloadBootstrapperServer) error
|
||||||
|
DownloadAuthorizedKeys(context.Context, *DownloadAuthorizedKeysRequest) (*DownloadAuthorizedKeysResponse, error)
|
||||||
UploadSystemServiceUnits(context.Context, *UploadSystemdServiceUnitsRequest) (*UploadSystemdServiceUnitsResponse, error)
|
UploadSystemServiceUnits(context.Context, *UploadSystemdServiceUnitsRequest) (*UploadSystemdServiceUnitsResponse, error)
|
||||||
mustEmbedUnimplementedDebugdServer()
|
mustEmbedUnimplementedDebugdServer()
|
||||||
}
|
}
|
||||||
|
@ -144,6 +155,9 @@ func (UnimplementedDebugdServer) UploadBootstrapper(Debugd_UploadBootstrapperSer
|
||||||
func (UnimplementedDebugdServer) DownloadBootstrapper(*DownloadBootstrapperRequest, Debugd_DownloadBootstrapperServer) error {
|
func (UnimplementedDebugdServer) DownloadBootstrapper(*DownloadBootstrapperRequest, Debugd_DownloadBootstrapperServer) error {
|
||||||
return status.Errorf(codes.Unimplemented, "method DownloadBootstrapper not implemented")
|
return status.Errorf(codes.Unimplemented, "method DownloadBootstrapper not implemented")
|
||||||
}
|
}
|
||||||
|
func (UnimplementedDebugdServer) DownloadAuthorizedKeys(context.Context, *DownloadAuthorizedKeysRequest) (*DownloadAuthorizedKeysResponse, error) {
|
||||||
|
return nil, status.Errorf(codes.Unimplemented, "method DownloadAuthorizedKeys not implemented")
|
||||||
|
}
|
||||||
func (UnimplementedDebugdServer) UploadSystemServiceUnits(context.Context, *UploadSystemdServiceUnitsRequest) (*UploadSystemdServiceUnitsResponse, error) {
|
func (UnimplementedDebugdServer) UploadSystemServiceUnits(context.Context, *UploadSystemdServiceUnitsRequest) (*UploadSystemdServiceUnitsResponse, error) {
|
||||||
return nil, status.Errorf(codes.Unimplemented, "method UploadSystemServiceUnits not implemented")
|
return nil, status.Errorf(codes.Unimplemented, "method UploadSystemServiceUnits not implemented")
|
||||||
}
|
}
|
||||||
|
@ -225,6 +239,24 @@ func (x *debugdDownloadBootstrapperServer) Send(m *Chunk) error {
|
||||||
return x.ServerStream.SendMsg(m)
|
return x.ServerStream.SendMsg(m)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func _Debugd_DownloadAuthorizedKeys_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(DownloadAuthorizedKeysRequest)
|
||||||
|
if err := dec(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if interceptor == nil {
|
||||||
|
return srv.(DebugdServer).DownloadAuthorizedKeys(ctx, in)
|
||||||
|
}
|
||||||
|
info := &grpc.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: "/debugd.Debugd/DownloadAuthorizedKeys",
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
return srv.(DebugdServer).DownloadAuthorizedKeys(ctx, req.(*DownloadAuthorizedKeysRequest))
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
func _Debugd_UploadSystemServiceUnits_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
func _Debugd_UploadSystemServiceUnits_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
in := new(UploadSystemdServiceUnitsRequest)
|
in := new(UploadSystemdServiceUnitsRequest)
|
||||||
if err := dec(in); err != nil {
|
if err := dec(in); err != nil {
|
||||||
|
@ -254,6 +286,10 @@ var Debugd_ServiceDesc = grpc.ServiceDesc{
|
||||||
MethodName: "UploadAuthorizedKeys",
|
MethodName: "UploadAuthorizedKeys",
|
||||||
Handler: _Debugd_UploadAuthorizedKeys_Handler,
|
Handler: _Debugd_UploadAuthorizedKeys_Handler,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
MethodName: "DownloadAuthorizedKeys",
|
||||||
|
Handler: _Debugd_DownloadAuthorizedKeys_Handler,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
MethodName: "UploadSystemServiceUnits",
|
MethodName: "UploadSystemServiceUnits",
|
||||||
Handler: _Debugd_UploadSystemServiceUnits_Handler,
|
Handler: _Debugd_UploadSystemServiceUnits_Handler,
|
||||||
|
|
|
@ -42,7 +42,7 @@ require (
|
||||||
go.uber.org/goleak v1.1.12
|
go.uber.org/goleak v1.1.12
|
||||||
go.uber.org/zap v1.21.0
|
go.uber.org/zap v1.21.0
|
||||||
golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3
|
golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3
|
||||||
google.golang.org/grpc v1.47.0
|
google.golang.org/grpc v1.48.0
|
||||||
gopkg.in/yaml.v3 v3.0.1
|
gopkg.in/yaml.v3 v3.0.1
|
||||||
libvirt.org/go/libvirt v1.8004.0
|
libvirt.org/go/libvirt v1.8004.0
|
||||||
)
|
)
|
||||||
|
|
|
@ -1698,8 +1698,10 @@ google.golang.org/grpc v1.44.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ5
|
||||||
google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ=
|
google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ=
|
||||||
google.golang.org/grpc v1.46.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk=
|
google.golang.org/grpc v1.46.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk=
|
||||||
google.golang.org/grpc v1.46.2/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk=
|
google.golang.org/grpc v1.46.2/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk=
|
||||||
google.golang.org/grpc v1.47.0 h1:9n77onPX5F3qfFCqjy9dhn8PbNQsIKeVU04J9G7umt8=
|
google.golang.org/grpc v1.46.2/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk=
|
||||||
google.golang.org/grpc v1.47.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk=
|
google.golang.org/grpc v1.47.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk=
|
||||||
|
google.golang.org/grpc v1.48.0 h1:rQOsyJ/8+ufEDJd/Gdsz7HG220Mh9HAhFHRGnIjda0w=
|
||||||
|
google.golang.org/grpc v1.48.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk=
|
||||||
google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw=
|
google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw=
|
||||||
google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
|
google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
|
||||||
google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
|
google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
|
||||||
|
|
|
@ -42,7 +42,7 @@ func transformState(tfOut terraformOutput) state.ConstellationState {
|
||||||
Name: "qemu",
|
Name: "qemu",
|
||||||
UID: "debug",
|
UID: "debug",
|
||||||
CloudProvider: cloudprovider.QEMU.String(),
|
CloudProvider: cloudprovider.QEMU.String(),
|
||||||
BootstrapperHost: tfOut.ControlPlaneIPs.Value[0],
|
LoadBalancerIP: tfOut.ControlPlaneIPs.Value[0],
|
||||||
QEMUWorkerInstances: cloudtypes.Instances{},
|
QEMUWorkerInstances: cloudtypes.Instances{},
|
||||||
QEMUControlPlaneInstances: cloudtypes.Instances{},
|
QEMUControlPlaneInstances: cloudtypes.Instances{},
|
||||||
}
|
}
|
||||||
|
|
|
@ -54,6 +54,24 @@ AZURE_IMAGE_NAME = my-custom-image
|
||||||
|
|
||||||
## Build an image
|
## Build an image
|
||||||
|
|
||||||
|
Ensure you have the modified cosa container image installed:
|
||||||
|
|
||||||
|
```shell-session
|
||||||
|
docker image ls | grep localhost/coreos-assembler
|
||||||
|
```
|
||||||
|
|
||||||
|
or
|
||||||
|
|
||||||
|
```shell-session
|
||||||
|
podman image ls | grep localhost/coreos-assembler
|
||||||
|
```
|
||||||
|
|
||||||
|
If not present, install with
|
||||||
|
|
||||||
|
```shell-session
|
||||||
|
make cosa-image
|
||||||
|
```
|
||||||
|
|
||||||
> It is always advisable to create an image from a clean `build` dir.
|
> It is always advisable to create an image from a clean `build` dir.
|
||||||
|
|
||||||
Clean up the `build` dir and remove old images (⚠ this will undo any local changes to the CoreOS configuration!):
|
Clean up the `build` dir and remove old images (⚠ this will undo any local changes to the CoreOS configuration!):
|
||||||
|
@ -62,12 +80,6 @@ Clean up the `build` dir and remove old images (⚠ this will undo any local cha
|
||||||
sudo make clean
|
sudo make clean
|
||||||
```
|
```
|
||||||
|
|
||||||
Ensure you have the modified cosa container image installed:
|
|
||||||
|
|
||||||
```shell-session
|
|
||||||
make cosa-image
|
|
||||||
```
|
|
||||||
|
|
||||||
- Build QEMU image (for local testing only)
|
- Build QEMU image (for local testing only)
|
||||||
|
|
||||||
```shell-session
|
```shell-session
|
||||||
|
|
|
@ -21,7 +21,7 @@ type UserKey struct {
|
||||||
type Access struct {
|
type Access struct {
|
||||||
log *logger.Logger
|
log *logger.Logger
|
||||||
userManager user.LinuxUserManager
|
userManager user.LinuxUserManager
|
||||||
authorized map[string]bool
|
authorized map[UserKey]bool
|
||||||
mux sync.Mutex
|
mux sync.Mutex
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -30,20 +30,32 @@ func NewAccess(log *logger.Logger, userManager user.LinuxUserManager) *Access {
|
||||||
return &Access{
|
return &Access{
|
||||||
log: log,
|
log: log,
|
||||||
userManager: userManager,
|
userManager: userManager,
|
||||||
mux: sync.Mutex{},
|
authorized: map[UserKey]bool{},
|
||||||
authorized: map[string]bool{},
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// alreadyAuthorized checks if key was written to authorized keys before.
|
// alreadyAuthorized checks if key was written to authorized keys before.
|
||||||
func (s *Access) alreadyAuthorized(sshKey UserKey) bool {
|
func (s *Access) alreadyAuthorized(sshKey UserKey) bool {
|
||||||
_, ok := s.authorized[fmt.Sprintf("%s:%s", sshKey.Username, sshKey.PublicKey)]
|
_, ok := s.authorized[sshKey]
|
||||||
return ok
|
return ok
|
||||||
}
|
}
|
||||||
|
|
||||||
// rememberAuthorized marks this key as already written to authorized keys..
|
// rememberAuthorized marks this key as already written to authorized keys..
|
||||||
func (s *Access) rememberAuthorized(sshKey UserKey) {
|
func (s *Access) rememberAuthorized(sshKey UserKey) {
|
||||||
s.authorized[fmt.Sprintf("%s:%s", sshKey.Username, sshKey.PublicKey)] = true
|
s.authorized[sshKey] = true
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetAuthorizedKeys returns a list of authorized keys for the specified user.
|
||||||
|
func (s *Access) GetAuthorizedKeys() []UserKey {
|
||||||
|
s.mux.Lock()
|
||||||
|
defer s.mux.Unlock()
|
||||||
|
|
||||||
|
var authorizedKeys []UserKey
|
||||||
|
for key := range s.authorized {
|
||||||
|
authorizedKeys = append(authorizedKeys, key)
|
||||||
|
}
|
||||||
|
|
||||||
|
return authorizedKeys
|
||||||
}
|
}
|
||||||
|
|
||||||
// DeployAuthorizedKey takes an user & public key pair, creates the user if required and deploy a SSH key for them.
|
// DeployAuthorizedKey takes an user & public key pair, creates the user if required and deploy a SSH key for them.
|
||||||
|
|
|
@ -17,7 +17,40 @@ func TestMain(m *testing.M) {
|
||||||
goleak.VerifyTestMain(m)
|
goleak.VerifyTestMain(m)
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestDeploySSHAuthorizedKey(t *testing.T) {
|
func TestGetAuthorizedKeys(t *testing.T) {
|
||||||
|
testCases := map[string]struct {
|
||||||
|
authorized map[UserKey]bool
|
||||||
|
want []UserKey
|
||||||
|
}{
|
||||||
|
"success": {
|
||||||
|
authorized: map[UserKey]bool{
|
||||||
|
{Username: "user1", PublicKey: "ssh-rsa test1=="}: true,
|
||||||
|
{Username: "user2", PublicKey: "ssh-rsa test2=="}: true,
|
||||||
|
},
|
||||||
|
want: []UserKey{
|
||||||
|
{Username: "user1", PublicKey: "ssh-rsa test1=="},
|
||||||
|
{Username: "user2", PublicKey: "ssh-rsa test2=="},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
"empty": {
|
||||||
|
authorized: map[UserKey]bool{},
|
||||||
|
want: []UserKey(nil),
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
for name, tc := range testCases {
|
||||||
|
t.Run(name, func(t *testing.T) {
|
||||||
|
assert := assert.New(t)
|
||||||
|
|
||||||
|
sshAccess := Access{authorized: tc.authorized}
|
||||||
|
|
||||||
|
keys := sshAccess.GetAuthorizedKeys()
|
||||||
|
assert.ElementsMatch(tc.want, keys)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func TestDeployAuthorizedKey(t *testing.T) {
|
||||||
authorizedKey := UserKey{
|
authorizedKey := UserKey{
|
||||||
Username: "user",
|
Username: "user",
|
||||||
PublicKey: "ssh-rsa testkey",
|
PublicKey: "ssh-rsa testkey",
|
||||||
|
@ -67,9 +100,12 @@ func TestDeploySSHAuthorizedKey(t *testing.T) {
|
||||||
if tc.readonly {
|
if tc.readonly {
|
||||||
userManager.Fs = afero.NewReadOnlyFs(userManager.Fs)
|
userManager.Fs = afero.NewReadOnlyFs(userManager.Fs)
|
||||||
}
|
}
|
||||||
authorized := map[string]bool{}
|
authorized := map[UserKey]bool{}
|
||||||
if tc.alreadyDeployed {
|
if tc.alreadyDeployed {
|
||||||
authorized["user:ssh-rsa testkey"] = true
|
authorized[UserKey{
|
||||||
|
Username: "user",
|
||||||
|
PublicKey: "ssh-rsa testkey",
|
||||||
|
}] = true
|
||||||
}
|
}
|
||||||
sshAccess := Access{
|
sshAccess := Access{
|
||||||
log: logger.NewTest(t),
|
log: logger.NewTest(t),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue