diff --git a/api/client/autoupdate/autoupdate.go b/api/client/autoupdate/autoupdate.go new file mode 100644 index 0000000000000..553c0ace23bf6 --- /dev/null +++ b/api/client/autoupdate/autoupdate.go @@ -0,0 +1,96 @@ +// Copyright 2024 Gravitational, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package autoupdate + +import ( + "context" + + "github.com/gravitational/trace" + + "github.com/gravitational/teleport/api/gen/proto/go/teleport/autoupdate/v1" +) + +// Client is an AutoupdateService client that conforms to the following lib/services interfaces: +// - services.AutoupdateService +type Client struct { + grpcClient autoupdate.AutoupdateServiceClient +} + +// NewClient creates a new AutoupdateService client. +func NewClient(grpcClient autoupdate.AutoupdateServiceClient) *Client { + return &Client{ + grpcClient: grpcClient, + } +} + +// GetAutoupdateConfig returns the specified AutoupdateConfig resource. +func (c *Client) GetAutoupdateConfig(ctx context.Context) (*autoupdate.AutoupdateConfig, error) { + resp, err := c.grpcClient.GetAutoupdateConfig(ctx, &autoupdate.GetAutoupdateConfigRequest{}) + return resp, trace.Wrap(err) +} + +// CreateAutoupdateConfig creates a AutoupdateConfig. +func (c *Client) CreateAutoupdateConfig(ctx context.Context, config *autoupdate.AutoupdateConfig) (*autoupdate.AutoupdateConfig, error) { + resp, err := c.grpcClient.CreateAutoupdateConfig(ctx, &autoupdate.CreateAutoupdateConfigRequest{Config: config}) + return resp, trace.Wrap(err) +} + +// UpdateAutoupdateConfig updates a AutoupdateConfig. +func (c *Client) UpdateAutoupdateConfig(ctx context.Context, config *autoupdate.AutoupdateConfig) (*autoupdate.AutoupdateConfig, error) { + resp, err := c.grpcClient.UpdateAutoupdateConfig(ctx, &autoupdate.UpdateAutoupdateConfigRequest{Config: config}) + return resp, trace.Wrap(err) +} + +// UpsertAutoupdateConfig creates or updates a AutoupdateConfig. +func (c *Client) UpsertAutoupdateConfig(ctx context.Context, config *autoupdate.AutoupdateConfig) (*autoupdate.AutoupdateConfig, error) { + resp, err := c.grpcClient.UpsertAutoupdateConfig(ctx, &autoupdate.UpsertAutoupdateConfigRequest{Config: config}) + return resp, trace.Wrap(err) +} + +// DeleteAutoupdateConfig removes the specified AutoupdateConfig resource. +func (c *Client) DeleteAutoupdateConfig(ctx context.Context) error { + _, err := c.grpcClient.DeleteAutoupdateConfig(ctx, &autoupdate.DeleteAutoupdateConfigRequest{}) + return trace.Wrap(err) +} + +// GetAutoupdateVersion returns the specified AutoupdateVersion resource. +func (c *Client) GetAutoupdateVersion(ctx context.Context) (*autoupdate.AutoupdateVersion, error) { + resp, err := c.grpcClient.GetAutoupdateVersion(ctx, &autoupdate.GetAutoupdateVersionRequest{}) + return resp, trace.Wrap(err) +} + +// CreateAutoupdateVersion creates a AutoupdateVersion. +func (c *Client) CreateAutoupdateVersion(ctx context.Context, config *autoupdate.AutoupdateVersion) (*autoupdate.AutoupdateVersion, error) { + resp, err := c.grpcClient.CreateAutoupdateVersion(ctx, &autoupdate.CreateAutoupdateVersionRequest{Version: config}) + return resp, trace.Wrap(err) +} + +// UpdateAutoupdateVersion updates a AutoupdateVersion. +func (c *Client) UpdateAutoupdateVersion(ctx context.Context, config *autoupdate.AutoupdateVersion) (*autoupdate.AutoupdateVersion, error) { + resp, err := c.grpcClient.UpdateAutoupdateVersion(ctx, &autoupdate.UpdateAutoupdateVersionRequest{Version: config}) + return resp, trace.Wrap(err) +} + +// UpsertAutoupdateVersion creates or updates a AutoupdateVersion. +func (c *Client) UpsertAutoupdateVersion(ctx context.Context, version *autoupdate.AutoupdateVersion) (*autoupdate.AutoupdateVersion, error) { + resp, err := c.grpcClient.UpsertAutoupdateVersion(ctx, &autoupdate.UpsertAutoupdateVersionRequest{Version: version}) + return resp, trace.Wrap(err) +} + +// DeleteAutoupdateVersion removes the specified AutoupdateVersion resource. +func (c *Client) DeleteAutoupdateVersion(ctx context.Context) error { + _, err := c.grpcClient.DeleteAutoupdateVersion(ctx, &autoupdate.DeleteAutoupdateVersionRequest{}) + return trace.Wrap(err) +} diff --git a/api/client/client.go b/api/client/client.go index 518b82de27ede..83300bc225118 100644 --- a/api/client/client.go +++ b/api/client/client.go @@ -51,6 +51,7 @@ import ( "github.com/gravitational/teleport/api/breaker" "github.com/gravitational/teleport/api/client/accesslist" "github.com/gravitational/teleport/api/client/accessmonitoringrules" + "github.com/gravitational/teleport/api/client/autoupdate" crownjewelapi "github.com/gravitational/teleport/api/client/crownjewel" "github.com/gravitational/teleport/api/client/discoveryconfig" "github.com/gravitational/teleport/api/client/externalauditstorage" @@ -66,6 +67,7 @@ import ( accesslistv1 "github.com/gravitational/teleport/api/gen/proto/go/teleport/accesslist/v1" accessmonitoringrulev1 "github.com/gravitational/teleport/api/gen/proto/go/teleport/accessmonitoringrules/v1" auditlogpb "github.com/gravitational/teleport/api/gen/proto/go/teleport/auditlog/v1" + autoupdatepb "github.com/gravitational/teleport/api/gen/proto/go/teleport/autoupdate/v1" clusterconfigpb "github.com/gravitational/teleport/api/gen/proto/go/teleport/clusterconfig/v1" crownjewelv1 "github.com/gravitational/teleport/api/gen/proto/go/teleport/crownjewel/v1" dbobjectv1 "github.com/gravitational/teleport/api/gen/proto/go/teleport/dbobject/v1" @@ -890,6 +892,11 @@ func (c *Client) GetVnetConfig(ctx context.Context) (*vnet.VnetConfig, error) { return c.VnetConfigServiceClient().GetVnetConfig(ctx, &vnet.GetVnetConfigRequest{}) } +// AutoupdateServiceClient returns an unadorned client for the Autoupdate service. +func (c *Client) AutoupdateServiceClient() *autoupdate.Client { + return autoupdate.NewClient(autoupdatepb.NewAutoupdateServiceClient(c.conn)) +} + // Ping gets basic info about the auth server. func (c *Client) Ping(ctx context.Context) (proto.PingResponse, error) { rsp, err := c.grpc.Ping(ctx, &proto.PingRequest{}) @@ -2863,6 +2870,24 @@ func (c *Client) GetClusterAuditConfig(ctx context.Context) (types.ClusterAuditC return resp, nil } +// GetAutoupdateConfig gets autoupdate configuration. +func (c *Client) GetAutoupdateConfig(ctx context.Context) (*autoupdatepb.AutoupdateConfig, error) { + resp, err := c.AutoupdateServiceClient().GetAutoupdateConfig(ctx) + if err != nil { + return nil, trace.Wrap(err) + } + return resp, nil +} + +// GetAutoupdateVersion gets autoupdate version. +func (c *Client) GetAutoupdateVersion(ctx context.Context) (*autoupdatepb.AutoupdateVersion, error) { + resp, err := c.AutoupdateServiceClient().GetAutoupdateVersion(ctx) + if err != nil { + return nil, trace.Wrap(err) + } + return resp, nil +} + // GetClusterAccessGraphConfig retrieves the Cluster Access Graph configuration from Auth server. func (c *Client) GetClusterAccessGraphConfig(ctx context.Context) (*clusterconfigpb.AccessGraphConfig, error) { rsp, err := c.ClusterConfigClient().GetClusterAccessGraphConfig(ctx, &clusterconfigpb.GetClusterAccessGraphConfigRequest{}) diff --git a/api/client/events.go b/api/client/events.go index 70b4eb77be0eb..a972868069bb5 100644 --- a/api/client/events.go +++ b/api/client/events.go @@ -19,6 +19,7 @@ import ( "github.com/gravitational/teleport/api/client/proto" accessmonitoringrulesv1 "github.com/gravitational/teleport/api/gen/proto/go/teleport/accessmonitoringrules/v1" + "github.com/gravitational/teleport/api/gen/proto/go/teleport/autoupdate/v1" clusterconfigpb "github.com/gravitational/teleport/api/gen/proto/go/teleport/clusterconfig/v1" crownjewelv1 "github.com/gravitational/teleport/api/gen/proto/go/teleport/crownjewel/v1" dbobjectv1 "github.com/gravitational/teleport/api/gen/proto/go/teleport/dbobject/v1" @@ -99,6 +100,14 @@ func EventToGRPC(in types.Event) (*proto.Event, error) { out.Resource = &proto.Event_StaticHostUser{ StaticHostUser: r, } + case *autoupdate.AutoupdateConfig: + out.Resource = &proto.Event_AutoupdateConfig{ + AutoupdateConfig: r, + } + case *autoupdate.AutoupdateVersion: + out.Resource = &proto.Event_AutoupdateVersion{ + AutoupdateVersion: r, + } default: return nil, trace.BadParameter("resource type %T is not supported", r) } @@ -542,6 +551,12 @@ func EventFromGRPC(in *proto.Event) (*types.Event, error) { } else if r := in.GetStaticHostUser(); r != nil { out.Resource = types.Resource153ToLegacy(r) return &out, nil + } else if r := in.GetAutoupdateConfig(); r != nil { + out.Resource = types.Resource153ToLegacy(r) + return &out, nil + } else if r := in.GetAutoupdateVersion(); r != nil { + out.Resource = types.Resource153ToLegacy(r) + return &out, nil } else { return nil, trace.BadParameter("received unsupported resource %T", in.Resource) } diff --git a/api/client/proto/event.pb.go b/api/client/proto/event.pb.go index bb626d8da876f..e7dd3aa294b68 100644 --- a/api/client/proto/event.pb.go +++ b/api/client/proto/event.pb.go @@ -23,6 +23,7 @@ package proto import ( v1 "github.com/gravitational/teleport/api/gen/proto/go/teleport/accesslist/v1" v14 "github.com/gravitational/teleport/api/gen/proto/go/teleport/accessmonitoringrules/v1" + v112 "github.com/gravitational/teleport/api/gen/proto/go/teleport/autoupdate/v1" v110 "github.com/gravitational/teleport/api/gen/proto/go/teleport/clusterconfig/v1" v17 "github.com/gravitational/teleport/api/gen/proto/go/teleport/crownjewel/v1" v18 "github.com/gravitational/teleport/api/gen/proto/go/teleport/dbobject/v1" @@ -173,6 +174,8 @@ type Event struct { // *Event_AccessGraphSettings // *Event_SPIFFEFederation // *Event_StaticHostUser + // *Event_AutoupdateConfig + // *Event_AutoupdateVersion Resource isEvent_Resource `protobuf_oneof:"Resource"` } @@ -642,6 +645,20 @@ func (x *Event) GetStaticHostUser() *v111.StaticHostUser { return nil } +func (x *Event) GetAutoupdateConfig() *v112.AutoupdateConfig { + if x, ok := x.GetResource().(*Event_AutoupdateConfig); ok { + return x.AutoupdateConfig + } + return nil +} + +func (x *Event) GetAutoupdateVersion() *v112.AutoupdateVersion { + if x, ok := x.GetResource().(*Event_AutoupdateVersion); ok { + return x.AutoupdateVersion + } + return nil +} + type isEvent_Resource interface { isEvent_Resource() } @@ -949,6 +966,16 @@ type Event_StaticHostUser struct { StaticHostUser *v111.StaticHostUser `protobuf:"bytes,63,opt,name=StaticHostUser,proto3,oneof"` } +type Event_AutoupdateConfig struct { + // AutoupdateConfig is a resource for autoupdate config. + AutoupdateConfig *v112.AutoupdateConfig `protobuf:"bytes,64,opt,name=AutoupdateConfig,proto3,oneof"` +} + +type Event_AutoupdateVersion struct { + // AutoupdateVersion is a resource for autoupdate version. + AutoupdateVersion *v112.AutoupdateVersion `protobuf:"bytes,65,opt,name=AutoupdateVersion,proto3,oneof"` +} + func (*Event_ResourceHeader) isEvent_Resource() {} func (*Event_CertAuthority) isEvent_Resource() {} @@ -1069,6 +1096,10 @@ func (*Event_SPIFFEFederation) isEvent_Resource() {} func (*Event_StaticHostUser) isEvent_Resource() {} +func (*Event_AutoupdateConfig) isEvent_Resource() {} + +func (*Event_AutoupdateVersion) isEvent_Resource() {} + var File_teleport_legacy_client_proto_event_proto protoreflect.FileDescriptor var file_teleport_legacy_client_proto_event_proto_rawDesc = []byte{ @@ -1081,314 +1112,328 @@ var file_teleport_legacy_client_proto_event_proto_rawDesc = []byte{ 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x5f, - 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x35, 0x74, 0x65, 0x6c, - 0x65, 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x67, 0x72, - 0x61, 0x70, 0x68, 0x5f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x27, 0x74, 0x65, 0x6c, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x63, 0x72, 0x6f, - 0x77, 0x6e, 0x6a, 0x65, 0x77, 0x65, 0x6c, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x72, 0x6f, 0x77, 0x6e, - 0x6a, 0x65, 0x77, 0x65, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x23, 0x74, 0x65, 0x6c, - 0x65, 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x64, 0x62, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2f, 0x76, - 0x31, 0x2f, 0x64, 0x62, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x31, 0x74, 0x65, 0x6c, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x64, 0x69, 0x73, 0x63, 0x6f, - 0x76, 0x65, 0x72, 0x79, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x76, 0x31, 0x2f, 0x64, 0x69, - 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x3b, 0x74, 0x65, 0x6c, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x6b, 0x75, - 0x62, 0x65, 0x77, 0x61, 0x69, 0x74, 0x69, 0x6e, 0x67, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, - 0x65, 0x72, 0x2f, 0x76, 0x31, 0x2f, 0x6b, 0x75, 0x62, 0x65, 0x77, 0x61, 0x69, 0x74, 0x69, 0x6e, - 0x67, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x21, 0x74, 0x65, 0x6c, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x6c, 0x65, 0x67, 0x61, 0x63, - 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x28, 0x74, 0x65, 0x6c, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x6d, 0x61, - 0x63, 0x68, 0x69, 0x6e, 0x65, 0x69, 0x64, 0x2f, 0x76, 0x31, 0x2f, 0x62, 0x6f, 0x74, 0x5f, 0x69, - 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x26, 0x74, - 0x65, 0x6c, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x69, - 0x64, 0x2f, 0x76, 0x31, 0x2f, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2d, 0x74, 0x65, 0x6c, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x2f, - 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x31, - 0x2f, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x27, 0x74, 0x65, 0x6c, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x73, - 0x65, 0x63, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x65, 0x63, - 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2f, 0x74, - 0x65, 0x6c, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x6c, 0x6f, 0x67, 0x69, - 0x6e, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x6c, 0x6f, - 0x67, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x31, - 0x74, 0x65, 0x6c, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x70, 0x72, 0x6f, - 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x74, 0x61, - 0x74, 0x69, 0x63, 0x68, 0x6f, 0x73, 0x74, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x22, 0xa1, 0x21, 0x0a, 0x05, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x24, 0x0a, 0x04, 0x54, - 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x10, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x04, 0x54, 0x79, 0x70, - 0x65, 0x12, 0x3f, 0x0a, 0x0e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x48, 0x65, 0x61, - 0x64, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x79, 0x70, 0x65, - 0x73, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, - 0x48, 0x00, 0x52, 0x0e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x48, 0x65, 0x61, 0x64, - 0x65, 0x72, 0x12, 0x3e, 0x0a, 0x0d, 0x43, 0x65, 0x72, 0x74, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, - 0x69, 0x74, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x74, 0x79, 0x70, 0x65, - 0x73, 0x2e, 0x43, 0x65, 0x72, 0x74, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x56, - 0x32, 0x48, 0x00, 0x52, 0x0d, 0x43, 0x65, 0x72, 0x74, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, - 0x74, 0x79, 0x12, 0x3b, 0x0a, 0x0c, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x54, 0x6f, 0x6b, 0x65, - 0x6e, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, - 0x2e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x56, 0x32, 0x48, - 0x00, 0x52, 0x0c, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x12, - 0x41, 0x0a, 0x0e, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x54, 0x6f, 0x6b, 0x65, - 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, - 0x50, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x56, 0x32, - 0x48, 0x00, 0x52, 0x0e, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x54, 0x6f, 0x6b, - 0x65, 0x6e, 0x12, 0x38, 0x0a, 0x0b, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x61, 0x6d, - 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, - 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x56, 0x32, 0x48, 0x00, 0x52, - 0x0b, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x23, 0x0a, 0x04, - 0x55, 0x73, 0x65, 0x72, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x74, 0x79, 0x70, - 0x65, 0x73, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x56, 0x32, 0x48, 0x00, 0x52, 0x04, 0x55, 0x73, 0x65, - 0x72, 0x12, 0x23, 0x0a, 0x04, 0x52, 0x6f, 0x6c, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x0d, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x52, 0x6f, 0x6c, 0x65, 0x56, 0x36, 0x48, 0x00, - 0x52, 0x04, 0x52, 0x6f, 0x6c, 0x65, 0x12, 0x30, 0x0a, 0x09, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, - 0x61, 0x63, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x74, 0x79, 0x70, 0x65, - 0x73, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x48, 0x00, 0x52, 0x09, 0x4e, - 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x29, 0x0a, 0x06, 0x53, 0x65, 0x72, 0x76, - 0x65, 0x72, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, - 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x56, 0x32, 0x48, 0x00, 0x52, 0x06, 0x53, 0x65, 0x72, - 0x76, 0x65, 0x72, 0x12, 0x3e, 0x0a, 0x0d, 0x52, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x54, 0x75, - 0x6e, 0x6e, 0x65, 0x6c, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x74, 0x79, 0x70, - 0x65, 0x73, 0x2e, 0x52, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, - 0x56, 0x32, 0x48, 0x00, 0x52, 0x0d, 0x52, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x54, 0x75, 0x6e, - 0x6e, 0x65, 0x6c, 0x12, 0x47, 0x0a, 0x10, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x43, 0x6f, 0x6e, - 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, - 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x43, 0x6f, 0x6e, 0x6e, - 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x32, 0x48, 0x00, 0x52, 0x10, 0x54, 0x75, 0x6e, 0x6e, - 0x65, 0x6c, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3e, 0x0a, 0x0d, - 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x0e, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x41, 0x63, 0x63, 0x65, - 0x73, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x56, 0x33, 0x48, 0x00, 0x52, 0x0d, 0x41, - 0x63, 0x63, 0x65, 0x73, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x35, 0x0a, 0x0a, - 0x41, 0x70, 0x70, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x13, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x57, 0x65, 0x62, 0x53, 0x65, 0x73, 0x73, - 0x69, 0x6f, 0x6e, 0x56, 0x32, 0x48, 0x00, 0x52, 0x0a, 0x41, 0x70, 0x70, 0x53, 0x65, 0x73, 0x73, - 0x69, 0x6f, 0x6e, 0x12, 0x3e, 0x0a, 0x0d, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x43, 0x6c, 0x75, - 0x73, 0x74, 0x65, 0x72, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x74, 0x79, 0x70, - 0x65, 0x73, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, - 0x56, 0x33, 0x48, 0x00, 0x52, 0x0d, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x43, 0x6c, 0x75, 0x73, - 0x74, 0x65, 0x72, 0x12, 0x41, 0x0a, 0x0e, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x53, - 0x65, 0x72, 0x76, 0x65, 0x72, 0x18, 0x11, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x74, 0x79, - 0x70, 0x65, 0x73, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x53, 0x65, 0x72, 0x76, - 0x65, 0x72, 0x56, 0x33, 0x48, 0x00, 0x52, 0x0e, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, - 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x12, 0x35, 0x0a, 0x0a, 0x57, 0x65, 0x62, 0x53, 0x65, 0x73, - 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x12, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x74, 0x79, 0x70, - 0x65, 0x73, 0x2e, 0x57, 0x65, 0x62, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x56, 0x32, 0x48, - 0x00, 0x52, 0x0a, 0x57, 0x65, 0x62, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x2f, 0x0a, - 0x08, 0x57, 0x65, 0x62, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x13, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x11, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x57, 0x65, 0x62, 0x54, 0x6f, 0x6b, 0x65, 0x6e, - 0x56, 0x33, 0x48, 0x00, 0x52, 0x08, 0x57, 0x65, 0x62, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x5c, - 0x0a, 0x17, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, - 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x14, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x20, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4e, - 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x56, - 0x32, 0x48, 0x00, 0x52, 0x17, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x65, 0x74, 0x77, - 0x6f, 0x72, 0x6b, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x59, 0x0a, 0x16, - 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x67, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x15, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x74, - 0x79, 0x70, 0x65, 0x73, 0x2e, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x63, 0x6f, - 0x72, 0x64, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x56, 0x32, 0x48, 0x00, 0x52, - 0x16, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x69, 0x6e, - 0x67, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x41, 0x0a, 0x0e, 0x41, 0x75, 0x74, 0x68, 0x50, - 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x16, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x17, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x50, 0x72, 0x65, 0x66, - 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x56, 0x32, 0x48, 0x00, 0x52, 0x0e, 0x41, 0x75, 0x74, 0x68, - 0x50, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x4d, 0x0a, 0x12, 0x43, 0x6c, - 0x75, 0x73, 0x74, 0x65, 0x72, 0x41, 0x75, 0x64, 0x69, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x18, 0x17, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, - 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x41, 0x75, 0x64, 0x69, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x56, 0x32, 0x48, 0x00, 0x52, 0x12, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x41, 0x75, - 0x64, 0x69, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x23, 0x0a, 0x04, 0x4c, 0x6f, 0x63, - 0x6b, 0x18, 0x18, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, - 0x4c, 0x6f, 0x63, 0x6b, 0x56, 0x32, 0x48, 0x00, 0x52, 0x04, 0x4c, 0x6f, 0x63, 0x6b, 0x12, 0x50, - 0x0a, 0x13, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x52, 0x65, 0x73, 0x74, 0x72, 0x69, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x19, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x74, 0x79, - 0x70, 0x65, 0x73, 0x2e, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x52, 0x65, 0x73, 0x74, 0x72, - 0x69, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x56, 0x34, 0x48, 0x00, 0x52, 0x13, 0x4e, 0x65, 0x74, + 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x27, 0x74, 0x65, 0x6c, + 0x65, 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x61, 0x75, 0x74, 0x6f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x75, 0x74, 0x6f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x35, 0x74, 0x65, 0x6c, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x63, + 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x76, 0x31, 0x2f, + 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x67, 0x72, 0x61, 0x70, 0x68, 0x5f, 0x73, 0x65, 0x74, + 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x27, 0x74, 0x65, 0x6c, + 0x65, 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x63, 0x72, 0x6f, 0x77, 0x6e, 0x6a, 0x65, 0x77, 0x65, 0x6c, + 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x72, 0x6f, 0x77, 0x6e, 0x6a, 0x65, 0x77, 0x65, 0x6c, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x23, 0x74, 0x65, 0x6c, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x64, + 0x62, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2f, 0x76, 0x31, 0x2f, 0x64, 0x62, 0x6f, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x31, 0x74, 0x65, 0x6c, 0x65, 0x70, + 0x6f, 0x72, 0x74, 0x2f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x63, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x2f, 0x76, 0x31, 0x2f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x3b, 0x74, 0x65, + 0x6c, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x6b, 0x75, 0x62, 0x65, 0x77, 0x61, 0x69, 0x74, 0x69, + 0x6e, 0x67, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x2f, 0x76, 0x31, 0x2f, 0x6b, + 0x75, 0x62, 0x65, 0x77, 0x61, 0x69, 0x74, 0x69, 0x6e, 0x67, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, + 0x6e, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x74, 0x65, 0x6c, 0x65, 0x70, + 0x6f, 0x72, 0x74, 0x2f, 0x6c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, + 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x28, 0x74, 0x65, + 0x6c, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x69, 0x64, + 0x2f, 0x76, 0x31, 0x2f, 0x62, 0x6f, 0x74, 0x5f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x26, 0x74, 0x65, 0x6c, 0x65, 0x70, 0x6f, 0x72, 0x74, + 0x2f, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x69, 0x64, 0x2f, 0x76, 0x31, 0x2f, 0x66, 0x65, + 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2d, + 0x74, 0x65, 0x6c, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x69, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x27, 0x74, + 0x65, 0x6c, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x73, 0x65, 0x63, 0x72, 0x65, 0x70, 0x6f, 0x72, + 0x74, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x65, 0x63, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x73, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2f, 0x74, 0x65, 0x6c, 0x65, 0x70, 0x6f, 0x72, 0x74, + 0x2f, 0x75, 0x73, 0x65, 0x72, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2f, + 0x76, 0x31, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x74, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x31, 0x74, 0x65, 0x6c, 0x65, 0x70, 0x6f, 0x72, + 0x74, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x69, + 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x69, 0x63, 0x68, 0x6f, 0x73, 0x74, + 0x75, 0x73, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xd4, 0x22, 0x0a, 0x05, 0x45, + 0x76, 0x65, 0x6e, 0x74, 0x12, 0x24, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x10, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x3f, 0x0a, 0x0e, 0x52, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x48, 0x00, 0x52, 0x0e, 0x52, 0x65, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x3e, 0x0a, 0x0d, 0x43, + 0x65, 0x72, 0x74, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x65, 0x72, 0x74, 0x41, + 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x56, 0x32, 0x48, 0x00, 0x52, 0x0d, 0x43, 0x65, + 0x72, 0x74, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x3b, 0x0a, 0x0c, 0x53, + 0x74, 0x61, 0x74, 0x69, 0x63, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, + 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x56, 0x32, 0x48, 0x00, 0x52, 0x0c, 0x53, 0x74, 0x61, 0x74, + 0x69, 0x63, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x12, 0x41, 0x0a, 0x0e, 0x50, 0x72, 0x6f, 0x76, + 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x17, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, + 0x6f, 0x6e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x56, 0x32, 0x48, 0x00, 0x52, 0x0e, 0x50, 0x72, 0x6f, + 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x38, 0x0a, 0x0b, 0x43, + 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x14, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, + 0x4e, 0x61, 0x6d, 0x65, 0x56, 0x32, 0x48, 0x00, 0x52, 0x0b, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, + 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x23, 0x0a, 0x04, 0x55, 0x73, 0x65, 0x72, 0x18, 0x08, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x55, 0x73, 0x65, 0x72, + 0x56, 0x32, 0x48, 0x00, 0x52, 0x04, 0x55, 0x73, 0x65, 0x72, 0x12, 0x23, 0x0a, 0x04, 0x52, 0x6f, + 0x6c, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, + 0x2e, 0x52, 0x6f, 0x6c, 0x65, 0x56, 0x36, 0x48, 0x00, 0x52, 0x04, 0x52, 0x6f, 0x6c, 0x65, 0x12, + 0x30, 0x0a, 0x09, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x0a, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x73, + 0x70, 0x61, 0x63, 0x65, 0x48, 0x00, 0x52, 0x09, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x12, 0x29, 0x0a, 0x06, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x18, 0x0b, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x0f, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, + 0x56, 0x32, 0x48, 0x00, 0x52, 0x06, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x12, 0x3e, 0x0a, 0x0d, + 0x52, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x18, 0x0c, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x52, 0x65, 0x76, 0x65, + 0x72, 0x73, 0x65, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x56, 0x32, 0x48, 0x00, 0x52, 0x0d, 0x52, + 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x47, 0x0a, 0x10, + 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x54, + 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x56, + 0x32, 0x48, 0x00, 0x52, 0x10, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x43, 0x6f, 0x6e, 0x6e, 0x65, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3e, 0x0a, 0x0d, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x74, + 0x79, 0x70, 0x65, 0x73, 0x2e, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x56, 0x33, 0x48, 0x00, 0x52, 0x0d, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x35, 0x0a, 0x0a, 0x41, 0x70, 0x70, 0x53, 0x65, 0x73, 0x73, + 0x69, 0x6f, 0x6e, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x74, 0x79, 0x70, 0x65, + 0x73, 0x2e, 0x57, 0x65, 0x62, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x56, 0x32, 0x48, 0x00, + 0x52, 0x0a, 0x41, 0x70, 0x70, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x3e, 0x0a, 0x0d, + 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x18, 0x10, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x52, 0x65, 0x6d, 0x6f, + 0x74, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x56, 0x33, 0x48, 0x00, 0x52, 0x0d, 0x52, + 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x41, 0x0a, 0x0e, + 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x18, 0x11, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x44, 0x61, 0x74, + 0x61, 0x62, 0x61, 0x73, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x56, 0x33, 0x48, 0x00, 0x52, + 0x0e, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x12, + 0x35, 0x0a, 0x0a, 0x57, 0x65, 0x62, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x12, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x57, 0x65, 0x62, 0x53, + 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x56, 0x32, 0x48, 0x00, 0x52, 0x0a, 0x57, 0x65, 0x62, 0x53, + 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x2f, 0x0a, 0x08, 0x57, 0x65, 0x62, 0x54, 0x6f, 0x6b, + 0x65, 0x6e, 0x18, 0x13, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, + 0x2e, 0x57, 0x65, 0x62, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x56, 0x33, 0x48, 0x00, 0x52, 0x08, 0x57, + 0x65, 0x62, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x5c, 0x0a, 0x17, 0x43, 0x6c, 0x75, 0x73, 0x74, + 0x65, 0x72, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x18, 0x14, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, + 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x69, + 0x6e, 0x67, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x56, 0x32, 0x48, 0x00, 0x52, 0x17, 0x43, 0x6c, + 0x75, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x69, 0x6e, 0x67, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x59, 0x0a, 0x16, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, + 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, + 0x15, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x53, 0x65, + 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x43, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x56, 0x32, 0x48, 0x00, 0x52, 0x16, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, + 0x6e, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x12, 0x41, 0x0a, 0x0e, 0x41, 0x75, 0x74, 0x68, 0x50, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, + 0x63, 0x65, 0x18, 0x16, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, + 0x2e, 0x41, 0x75, 0x74, 0x68, 0x50, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x56, + 0x32, 0x48, 0x00, 0x52, 0x0e, 0x41, 0x75, 0x74, 0x68, 0x50, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, + 0x6e, 0x63, 0x65, 0x12, 0x4d, 0x0a, 0x12, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x41, 0x75, + 0x64, 0x69, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x17, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1b, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x41, + 0x75, 0x64, 0x69, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x56, 0x32, 0x48, 0x00, 0x52, 0x12, + 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x41, 0x75, 0x64, 0x69, 0x74, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x12, 0x23, 0x0a, 0x04, 0x4c, 0x6f, 0x63, 0x6b, 0x18, 0x18, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x0d, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x4c, 0x6f, 0x63, 0x6b, 0x56, 0x32, 0x48, + 0x00, 0x52, 0x04, 0x4c, 0x6f, 0x63, 0x6b, 0x12, 0x50, 0x0a, 0x13, 0x4e, 0x65, 0x74, 0x77, 0x6f, + 0x72, 0x6b, 0x52, 0x65, 0x73, 0x74, 0x72, 0x69, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x19, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x52, 0x65, 0x73, 0x74, 0x72, 0x69, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x12, 0x56, 0x0a, 0x15, 0x57, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x73, 0x44, 0x65, 0x73, 0x6b, 0x74, - 0x6f, 0x70, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x1a, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1e, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x57, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x73, 0x44, - 0x65, 0x73, 0x6b, 0x74, 0x6f, 0x70, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x56, 0x33, 0x48, - 0x00, 0x52, 0x15, 0x57, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x73, 0x44, 0x65, 0x73, 0x6b, 0x74, 0x6f, - 0x70, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x41, 0x0a, 0x0e, 0x57, 0x69, 0x6e, 0x64, - 0x6f, 0x77, 0x73, 0x44, 0x65, 0x73, 0x6b, 0x74, 0x6f, 0x70, 0x18, 0x1b, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x17, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x57, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x73, - 0x44, 0x65, 0x73, 0x6b, 0x74, 0x6f, 0x70, 0x56, 0x33, 0x48, 0x00, 0x52, 0x0e, 0x57, 0x69, 0x6e, - 0x64, 0x6f, 0x77, 0x73, 0x44, 0x65, 0x73, 0x6b, 0x74, 0x6f, 0x70, 0x12, 0x2f, 0x0a, 0x08, 0x44, - 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x18, 0x1c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, - 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x56, 0x33, - 0x48, 0x00, 0x52, 0x08, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x12, 0x32, 0x0a, 0x09, - 0x41, 0x70, 0x70, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x18, 0x1d, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x12, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x41, 0x70, 0x70, 0x53, 0x65, 0x72, 0x76, 0x65, - 0x72, 0x56, 0x33, 0x48, 0x00, 0x52, 0x09, 0x41, 0x70, 0x70, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, - 0x12, 0x20, 0x0a, 0x03, 0x41, 0x70, 0x70, 0x18, 0x1e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, - 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x41, 0x70, 0x70, 0x56, 0x33, 0x48, 0x00, 0x52, 0x03, 0x41, - 0x70, 0x70, 0x12, 0x41, 0x0a, 0x10, 0x53, 0x6e, 0x6f, 0x77, 0x66, 0x6c, 0x61, 0x6b, 0x65, 0x53, - 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x1f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x74, - 0x79, 0x70, 0x65, 0x73, 0x2e, 0x57, 0x65, 0x62, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x56, - 0x32, 0x48, 0x00, 0x52, 0x10, 0x53, 0x6e, 0x6f, 0x77, 0x66, 0x6c, 0x61, 0x6b, 0x65, 0x53, 0x65, - 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x47, 0x0a, 0x10, 0x4b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, - 0x74, 0x65, 0x73, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x18, 0x20, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x19, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x4b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, - 0x65, 0x73, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x56, 0x33, 0x48, 0x00, 0x52, 0x10, 0x4b, 0x75, - 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x12, 0x4a, - 0x0a, 0x11, 0x4b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x43, 0x6c, 0x75, 0x73, - 0x74, 0x65, 0x72, 0x18, 0x21, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x74, 0x79, 0x70, 0x65, - 0x73, 0x2e, 0x4b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x43, 0x6c, 0x75, 0x73, - 0x74, 0x65, 0x72, 0x56, 0x33, 0x48, 0x00, 0x52, 0x11, 0x4b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, - 0x74, 0x65, 0x73, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x32, 0x0a, 0x09, 0x49, 0x6e, - 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x18, 0x22, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, - 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x56, - 0x31, 0x48, 0x00, 0x52, 0x09, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x12, 0x44, - 0x0a, 0x0f, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x18, 0x23, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, - 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x56, - 0x31, 0x48, 0x00, 0x52, 0x0f, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x53, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x12, 0x59, 0x0a, 0x16, 0x53, 0x41, 0x4d, 0x4c, 0x49, 0x64, 0x50, 0x53, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x18, 0x24, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x53, 0x41, 0x4d, - 0x4c, 0x49, 0x64, 0x50, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x76, 0x69, - 0x64, 0x65, 0x72, 0x56, 0x31, 0x48, 0x00, 0x52, 0x16, 0x53, 0x41, 0x4d, 0x4c, 0x49, 0x64, 0x50, - 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, - 0x3d, 0x0a, 0x0e, 0x53, 0x41, 0x4d, 0x4c, 0x49, 0x64, 0x50, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, - 0x6e, 0x18, 0x25, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, - 0x57, 0x65, 0x62, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x56, 0x32, 0x48, 0x00, 0x52, 0x0e, - 0x53, 0x41, 0x4d, 0x4c, 0x49, 0x64, 0x50, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x32, - 0x0a, 0x09, 0x55, 0x73, 0x65, 0x72, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x18, 0x26, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x12, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x47, 0x72, - 0x6f, 0x75, 0x70, 0x56, 0x31, 0x48, 0x00, 0x52, 0x09, 0x55, 0x73, 0x65, 0x72, 0x47, 0x72, 0x6f, - 0x75, 0x70, 0x12, 0x2f, 0x0a, 0x08, 0x55, 0x49, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x27, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x55, 0x49, 0x43, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x56, 0x31, 0x48, 0x00, 0x52, 0x08, 0x55, 0x49, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x12, 0x41, 0x0a, 0x0e, 0x4f, 0x6b, 0x74, 0x61, 0x49, 0x6d, 0x70, 0x6f, 0x72, - 0x74, 0x52, 0x75, 0x6c, 0x65, 0x18, 0x28, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x74, 0x79, - 0x70, 0x65, 0x73, 0x2e, 0x4f, 0x6b, 0x74, 0x61, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x75, - 0x6c, 0x65, 0x56, 0x31, 0x48, 0x00, 0x52, 0x0e, 0x4f, 0x6b, 0x74, 0x61, 0x49, 0x6d, 0x70, 0x6f, - 0x72, 0x74, 0x52, 0x75, 0x6c, 0x65, 0x12, 0x41, 0x0a, 0x0e, 0x4f, 0x6b, 0x74, 0x61, 0x41, 0x73, - 0x73, 0x69, 0x67, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x29, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, - 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x4f, 0x6b, 0x74, 0x61, 0x41, 0x73, 0x73, 0x69, 0x67, - 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x56, 0x31, 0x48, 0x00, 0x52, 0x0e, 0x4f, 0x6b, 0x74, 0x61, 0x41, - 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x38, 0x0a, 0x0b, 0x49, 0x6e, 0x74, - 0x65, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x2a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, - 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x56, 0x31, 0x48, 0x00, 0x52, 0x0b, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x12, 0x38, 0x0a, 0x0b, 0x57, 0x61, 0x74, 0x63, 0x68, 0x53, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x18, 0x2b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, - 0x2e, 0x57, 0x61, 0x74, 0x63, 0x68, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x56, 0x31, 0x48, 0x00, - 0x52, 0x0b, 0x57, 0x61, 0x74, 0x63, 0x68, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x57, 0x0a, - 0x16, 0x48, 0x65, 0x61, 0x64, 0x6c, 0x65, 0x73, 0x73, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, - 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x2c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, - 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x6c, 0x65, 0x73, 0x73, 0x41, 0x75, - 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x16, - 0x48, 0x65, 0x61, 0x64, 0x6c, 0x65, 0x73, 0x73, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, - 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x44, 0x0a, 0x0a, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, - 0x4c, 0x69, 0x73, 0x74, 0x18, 0x2d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x74, 0x65, 0x6c, - 0x65, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x69, 0x73, 0x74, - 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x48, 0x00, - 0x52, 0x0a, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x54, 0x0a, 0x0e, - 0x55, 0x73, 0x65, 0x72, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x18, 0x2e, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x74, 0x65, 0x6c, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x2e, - 0x75, 0x73, 0x65, 0x72, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x76, - 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, - 0x48, 0x00, 0x52, 0x0e, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x53, 0x74, 0x61, - 0x74, 0x65, 0x12, 0x4c, 0x0a, 0x10, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x69, 0x73, 0x74, - 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x2f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x74, - 0x65, 0x6c, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x69, - 0x73, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x48, 0x00, 0x52, 0x10, - 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, - 0x12, 0x58, 0x0a, 0x0f, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x18, 0x30, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x74, 0x65, 0x6c, 0x65, - 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, - 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x48, 0x00, 0x52, 0x0f, 0x44, 0x69, 0x73, 0x63, 0x6f, - 0x76, 0x65, 0x72, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x44, 0x0a, 0x0a, 0x41, 0x75, - 0x64, 0x69, 0x74, 0x51, 0x75, 0x65, 0x72, 0x79, 0x18, 0x32, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, - 0x2e, 0x74, 0x65, 0x6c, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x73, 0x65, 0x63, 0x72, 0x65, 0x70, - 0x6f, 0x72, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x75, 0x64, 0x69, 0x74, 0x51, 0x75, 0x65, - 0x72, 0x79, 0x48, 0x00, 0x52, 0x0a, 0x41, 0x75, 0x64, 0x69, 0x74, 0x51, 0x75, 0x65, 0x72, 0x79, - 0x12, 0x38, 0x0a, 0x06, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x33, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1e, 0x2e, 0x74, 0x65, 0x6c, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x73, 0x65, 0x63, 0x72, - 0x65, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, - 0x48, 0x00, 0x52, 0x06, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x47, 0x0a, 0x0b, 0x52, 0x65, - 0x70, 0x6f, 0x72, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x18, 0x34, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x23, 0x2e, 0x74, 0x65, 0x6c, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x73, 0x65, 0x63, 0x72, 0x65, - 0x70, 0x6f, 0x72, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x53, - 0x74, 0x61, 0x74, 0x65, 0x48, 0x00, 0x52, 0x0b, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x53, 0x74, - 0x61, 0x74, 0x65, 0x12, 0x4c, 0x0a, 0x10, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x69, 0x73, - 0x74, 0x52, 0x65, 0x76, 0x69, 0x65, 0x77, 0x18, 0x35, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, - 0x74, 0x65, 0x6c, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, - 0x69, 0x73, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x76, 0x69, 0x65, 0x77, 0x48, 0x00, 0x52, - 0x10, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x76, 0x69, 0x65, - 0x77, 0x12, 0x6d, 0x0a, 0x14, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4d, 0x6f, 0x6e, 0x69, 0x74, - 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6c, 0x65, 0x18, 0x36, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x37, 0x2e, 0x74, 0x65, 0x6c, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, - 0x73, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x72, 0x75, 0x6c, 0x65, 0x73, - 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, - 0x72, 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6c, 0x65, 0x48, 0x00, 0x52, 0x14, 0x41, 0x63, 0x63, 0x65, - 0x73, 0x73, 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6c, 0x65, - 0x12, 0x7e, 0x0a, 0x1a, 0x4b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x57, 0x61, - 0x69, 0x74, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x18, 0x37, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3c, 0x2e, 0x74, 0x65, 0x6c, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x2e, - 0x6b, 0x75, 0x62, 0x65, 0x77, 0x61, 0x69, 0x74, 0x69, 0x6e, 0x67, 0x63, 0x6f, 0x6e, 0x74, 0x61, - 0x69, 0x6e, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, - 0x65, 0x73, 0x57, 0x61, 0x69, 0x74, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, - 0x65, 0x72, 0x48, 0x00, 0x52, 0x1a, 0x4b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, - 0x57, 0x61, 0x69, 0x74, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, - 0x12, 0x55, 0x0a, 0x10, 0x55, 0x73, 0x65, 0x72, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x38, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x74, 0x65, 0x6c, - 0x65, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x10, 0x55, 0x73, 0x65, 0x72, 0x4e, 0x6f, 0x74, 0x69, 0x66, - 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x5f, 0x0a, 0x12, 0x47, 0x6c, 0x6f, 0x62, 0x61, - 0x6c, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x39, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x74, 0x65, 0x6c, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x6e, + 0x56, 0x34, 0x48, 0x00, 0x52, 0x13, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x52, 0x65, 0x73, + 0x74, 0x72, 0x69, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x56, 0x0a, 0x15, 0x57, 0x69, 0x6e, + 0x64, 0x6f, 0x77, 0x73, 0x44, 0x65, 0x73, 0x6b, 0x74, 0x6f, 0x70, 0x53, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x18, 0x1a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, + 0x2e, 0x57, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x73, 0x44, 0x65, 0x73, 0x6b, 0x74, 0x6f, 0x70, 0x53, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x56, 0x33, 0x48, 0x00, 0x52, 0x15, 0x57, 0x69, 0x6e, 0x64, + 0x6f, 0x77, 0x73, 0x44, 0x65, 0x73, 0x6b, 0x74, 0x6f, 0x70, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x12, 0x41, 0x0a, 0x0e, 0x57, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x73, 0x44, 0x65, 0x73, 0x6b, + 0x74, 0x6f, 0x70, 0x18, 0x1b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x74, 0x79, 0x70, 0x65, + 0x73, 0x2e, 0x57, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x73, 0x44, 0x65, 0x73, 0x6b, 0x74, 0x6f, 0x70, + 0x56, 0x33, 0x48, 0x00, 0x52, 0x0e, 0x57, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x73, 0x44, 0x65, 0x73, + 0x6b, 0x74, 0x6f, 0x70, 0x12, 0x2f, 0x0a, 0x08, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, + 0x18, 0x1c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x44, + 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x56, 0x33, 0x48, 0x00, 0x52, 0x08, 0x44, 0x61, 0x74, + 0x61, 0x62, 0x61, 0x73, 0x65, 0x12, 0x32, 0x0a, 0x09, 0x41, 0x70, 0x70, 0x53, 0x65, 0x72, 0x76, + 0x65, 0x72, 0x18, 0x1d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, + 0x2e, 0x41, 0x70, 0x70, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x56, 0x33, 0x48, 0x00, 0x52, 0x09, + 0x41, 0x70, 0x70, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x12, 0x20, 0x0a, 0x03, 0x41, 0x70, 0x70, + 0x18, 0x1e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x41, + 0x70, 0x70, 0x56, 0x33, 0x48, 0x00, 0x52, 0x03, 0x41, 0x70, 0x70, 0x12, 0x41, 0x0a, 0x10, 0x53, + 0x6e, 0x6f, 0x77, 0x66, 0x6c, 0x61, 0x6b, 0x65, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, + 0x1f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x57, 0x65, + 0x62, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x56, 0x32, 0x48, 0x00, 0x52, 0x10, 0x53, 0x6e, + 0x6f, 0x77, 0x66, 0x6c, 0x61, 0x6b, 0x65, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x47, + 0x0a, 0x10, 0x4b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x53, 0x65, 0x72, 0x76, + 0x65, 0x72, 0x18, 0x20, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, + 0x2e, 0x4b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x53, 0x65, 0x72, 0x76, 0x65, + 0x72, 0x56, 0x33, 0x48, 0x00, 0x52, 0x10, 0x4b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, + 0x73, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x12, 0x4a, 0x0a, 0x11, 0x4b, 0x75, 0x62, 0x65, 0x72, + 0x6e, 0x65, 0x74, 0x65, 0x73, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x18, 0x21, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x4b, 0x75, 0x62, 0x65, 0x72, + 0x6e, 0x65, 0x74, 0x65, 0x73, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x56, 0x33, 0x48, 0x00, + 0x52, 0x11, 0x4b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x43, 0x6c, 0x75, 0x73, + 0x74, 0x65, 0x72, 0x12, 0x32, 0x0a, 0x09, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x65, 0x72, + 0x18, 0x22, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x49, + 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x56, 0x31, 0x48, 0x00, 0x52, 0x09, 0x49, 0x6e, + 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x12, 0x44, 0x0a, 0x0f, 0x44, 0x61, 0x74, 0x61, 0x62, + 0x61, 0x73, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x23, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x18, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, + 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x56, 0x31, 0x48, 0x00, 0x52, 0x0f, 0x44, 0x61, + 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x59, 0x0a, + 0x16, 0x53, 0x41, 0x4d, 0x4c, 0x49, 0x64, 0x50, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, + 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x18, 0x24, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, + 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x53, 0x41, 0x4d, 0x4c, 0x49, 0x64, 0x50, 0x53, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x56, 0x31, 0x48, 0x00, + 0x52, 0x16, 0x53, 0x41, 0x4d, 0x4c, 0x49, 0x64, 0x50, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x3d, 0x0a, 0x0e, 0x53, 0x41, 0x4d, 0x4c, + 0x49, 0x64, 0x50, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x25, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x13, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x57, 0x65, 0x62, 0x53, 0x65, 0x73, 0x73, + 0x69, 0x6f, 0x6e, 0x56, 0x32, 0x48, 0x00, 0x52, 0x0e, 0x53, 0x41, 0x4d, 0x4c, 0x49, 0x64, 0x50, + 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x32, 0x0a, 0x09, 0x55, 0x73, 0x65, 0x72, 0x47, + 0x72, 0x6f, 0x75, 0x70, 0x18, 0x26, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x74, 0x79, 0x70, + 0x65, 0x73, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x56, 0x31, 0x48, 0x00, + 0x52, 0x09, 0x55, 0x73, 0x65, 0x72, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x2f, 0x0a, 0x08, 0x55, + 0x49, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x27, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, + 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x55, 0x49, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x56, 0x31, + 0x48, 0x00, 0x52, 0x08, 0x55, 0x49, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x41, 0x0a, 0x0e, + 0x4f, 0x6b, 0x74, 0x61, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x75, 0x6c, 0x65, 0x18, 0x28, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x4f, 0x6b, 0x74, + 0x61, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x75, 0x6c, 0x65, 0x56, 0x31, 0x48, 0x00, 0x52, + 0x0e, 0x4f, 0x6b, 0x74, 0x61, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x75, 0x6c, 0x65, 0x12, + 0x41, 0x0a, 0x0e, 0x4f, 0x6b, 0x74, 0x61, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, 0x65, 0x6e, + 0x74, 0x18, 0x29, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, + 0x4f, 0x6b, 0x74, 0x61, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x56, 0x31, + 0x48, 0x00, 0x52, 0x0e, 0x4f, 0x6b, 0x74, 0x61, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, 0x65, + 0x6e, 0x74, 0x12, 0x38, 0x0a, 0x0b, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x18, 0x2a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, + 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x31, 0x48, 0x00, 0x52, + 0x0b, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x38, 0x0a, 0x0b, + 0x57, 0x61, 0x74, 0x63, 0x68, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x2b, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x14, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x57, 0x61, 0x74, 0x63, 0x68, 0x53, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x56, 0x31, 0x48, 0x00, 0x52, 0x0b, 0x57, 0x61, 0x74, 0x63, 0x68, + 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x57, 0x0a, 0x16, 0x48, 0x65, 0x61, 0x64, 0x6c, 0x65, + 0x73, 0x73, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x18, 0x2c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x48, + 0x65, 0x61, 0x64, 0x6c, 0x65, 0x73, 0x73, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x16, 0x48, 0x65, 0x61, 0x64, 0x6c, 0x65, 0x73, + 0x73, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x44, 0x0a, 0x0a, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x2d, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x74, 0x65, 0x6c, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x61, + 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x69, 0x73, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x63, 0x63, + 0x65, 0x73, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x48, 0x00, 0x52, 0x0a, 0x41, 0x63, 0x63, 0x65, 0x73, + 0x73, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x54, 0x0a, 0x0e, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x6f, 0x67, + 0x69, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x18, 0x2e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, + 0x74, 0x65, 0x6c, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x6c, 0x6f, 0x67, + 0x69, 0x6e, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x4c, + 0x6f, 0x67, 0x69, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x48, 0x00, 0x52, 0x0e, 0x55, 0x73, 0x65, + 0x72, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x4c, 0x0a, 0x10, 0x41, + 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x18, + 0x2f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x74, 0x65, 0x6c, 0x65, 0x70, 0x6f, 0x72, 0x74, + 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x69, 0x73, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, + 0x65, 0x6d, 0x62, 0x65, 0x72, 0x48, 0x00, 0x52, 0x10, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, + 0x69, 0x73, 0x74, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x58, 0x0a, 0x0f, 0x44, 0x69, 0x73, + 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x30, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x74, 0x65, 0x6c, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x64, 0x69, + 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x76, 0x31, + 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x48, 0x00, 0x52, 0x0f, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x12, 0x44, 0x0a, 0x0a, 0x41, 0x75, 0x64, 0x69, 0x74, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x18, 0x32, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x74, 0x65, 0x6c, 0x65, 0x70, 0x6f, + 0x72, 0x74, 0x2e, 0x73, 0x65, 0x63, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x2e, 0x76, 0x31, + 0x2e, 0x41, 0x75, 0x64, 0x69, 0x74, 0x51, 0x75, 0x65, 0x72, 0x79, 0x48, 0x00, 0x52, 0x0a, 0x41, + 0x75, 0x64, 0x69, 0x74, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x38, 0x0a, 0x06, 0x52, 0x65, 0x70, + 0x6f, 0x72, 0x74, 0x18, 0x33, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x74, 0x65, 0x6c, 0x65, + 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x73, 0x65, 0x63, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x2e, + 0x76, 0x31, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x48, 0x00, 0x52, 0x06, 0x52, 0x65, 0x70, + 0x6f, 0x72, 0x74, 0x12, 0x47, 0x0a, 0x0b, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x53, 0x74, 0x61, + 0x74, 0x65, 0x18, 0x34, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x74, 0x65, 0x6c, 0x65, 0x70, + 0x6f, 0x72, 0x74, 0x2e, 0x73, 0x65, 0x63, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x2e, 0x76, + 0x31, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x48, 0x00, 0x52, + 0x0b, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x4c, 0x0a, 0x10, + 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x76, 0x69, 0x65, 0x77, + 0x18, 0x35, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x74, 0x65, 0x6c, 0x65, 0x70, 0x6f, 0x72, + 0x74, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x69, 0x73, 0x74, 0x2e, 0x76, 0x31, 0x2e, + 0x52, 0x65, 0x76, 0x69, 0x65, 0x77, 0x48, 0x00, 0x52, 0x10, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, + 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x76, 0x69, 0x65, 0x77, 0x12, 0x6d, 0x0a, 0x14, 0x41, 0x63, + 0x63, 0x65, 0x73, 0x73, 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x75, + 0x6c, 0x65, 0x18, 0x36, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x37, 0x2e, 0x74, 0x65, 0x6c, 0x65, 0x70, + 0x6f, 0x72, 0x74, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, + 0x72, 0x69, 0x6e, 0x67, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x63, 0x63, + 0x65, 0x73, 0x73, 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6c, + 0x65, 0x48, 0x00, 0x52, 0x14, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4d, 0x6f, 0x6e, 0x69, 0x74, + 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6c, 0x65, 0x12, 0x7e, 0x0a, 0x1a, 0x4b, 0x75, 0x62, + 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x57, 0x61, 0x69, 0x74, 0x69, 0x6e, 0x67, 0x43, 0x6f, + 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x18, 0x37, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3c, 0x2e, + 0x74, 0x65, 0x6c, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x6b, 0x75, 0x62, 0x65, 0x77, 0x61, 0x69, + 0x74, 0x69, 0x6e, 0x67, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x2e, 0x76, 0x31, + 0x2e, 0x4b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x57, 0x61, 0x69, 0x74, 0x69, + 0x6e, 0x67, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x48, 0x00, 0x52, 0x1a, 0x4b, + 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x57, 0x61, 0x69, 0x74, 0x69, 0x6e, 0x67, + 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x12, 0x55, 0x0a, 0x10, 0x55, 0x73, 0x65, + 0x72, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x38, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x74, 0x65, 0x6c, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x31, 0x2e, - 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x12, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x4e, 0x6f, 0x74, 0x69, - 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x44, 0x0a, 0x0a, 0x43, 0x72, 0x6f, 0x77, - 0x6e, 0x4a, 0x65, 0x77, 0x65, 0x6c, 0x18, 0x3a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x74, - 0x65, 0x6c, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x63, 0x72, 0x6f, 0x77, 0x6e, 0x6a, 0x65, 0x77, - 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x6f, 0x77, 0x6e, 0x4a, 0x65, 0x77, 0x65, 0x6c, - 0x48, 0x00, 0x52, 0x0a, 0x43, 0x72, 0x6f, 0x77, 0x6e, 0x4a, 0x65, 0x77, 0x65, 0x6c, 0x12, 0x4e, - 0x0a, 0x0e, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, - 0x18, 0x3b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x74, 0x65, 0x6c, 0x65, 0x70, 0x6f, 0x72, - 0x74, 0x2e, 0x64, 0x62, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x61, - 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x48, 0x00, 0x52, 0x0e, - 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x46, - 0x0a, 0x0b, 0x42, 0x6f, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x3c, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x74, 0x65, 0x6c, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x6d, - 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x6f, 0x74, 0x49, - 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x48, 0x00, 0x52, 0x0b, 0x42, 0x6f, 0x74, 0x49, 0x6e, - 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x62, 0x0a, 0x13, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, - 0x47, 0x72, 0x61, 0x70, 0x68, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x3d, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x74, 0x65, 0x6c, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x63, - 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x76, 0x31, 0x2e, + 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x10, + 0x55, 0x73, 0x65, 0x72, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x5f, 0x0a, 0x12, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x39, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x74, + 0x65, 0x6c, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x4e, + 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x12, 0x47, + 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x12, 0x44, 0x0a, 0x0a, 0x43, 0x72, 0x6f, 0x77, 0x6e, 0x4a, 0x65, 0x77, 0x65, 0x6c, 0x18, + 0x3a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x74, 0x65, 0x6c, 0x65, 0x70, 0x6f, 0x72, 0x74, + 0x2e, 0x63, 0x72, 0x6f, 0x77, 0x6e, 0x6a, 0x65, 0x77, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x43, + 0x72, 0x6f, 0x77, 0x6e, 0x4a, 0x65, 0x77, 0x65, 0x6c, 0x48, 0x00, 0x52, 0x0a, 0x43, 0x72, 0x6f, + 0x77, 0x6e, 0x4a, 0x65, 0x77, 0x65, 0x6c, 0x12, 0x4e, 0x0a, 0x0e, 0x44, 0x61, 0x74, 0x61, 0x62, + 0x61, 0x73, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x3b, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x24, 0x2e, 0x74, 0x65, 0x6c, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x64, 0x62, 0x6f, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x4f, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x48, 0x00, 0x52, 0x0e, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, + 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x46, 0x0a, 0x0b, 0x42, 0x6f, 0x74, 0x49, 0x6e, + 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x3c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x74, + 0x65, 0x6c, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x69, + 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x6f, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, + 0x48, 0x00, 0x52, 0x0b, 0x42, 0x6f, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x12, + 0x62, 0x0a, 0x13, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x47, 0x72, 0x61, 0x70, 0x68, 0x53, 0x65, + 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x3d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x74, + 0x65, 0x6c, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x47, + 0x72, 0x61, 0x70, 0x68, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x48, 0x00, 0x52, 0x13, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x47, 0x72, 0x61, 0x70, 0x68, 0x53, 0x65, 0x74, 0x74, 0x69, - 0x6e, 0x67, 0x73, 0x48, 0x00, 0x52, 0x13, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x47, 0x72, 0x61, - 0x70, 0x68, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x55, 0x0a, 0x10, 0x53, 0x50, - 0x49, 0x46, 0x46, 0x45, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x3e, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x74, 0x65, 0x6c, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x2e, - 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x50, 0x49, - 0x46, 0x46, 0x45, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, - 0x10, 0x53, 0x50, 0x49, 0x46, 0x46, 0x45, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x12, 0x56, 0x0a, 0x0e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x48, 0x6f, 0x73, 0x74, 0x55, - 0x73, 0x65, 0x72, 0x18, 0x3f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x74, 0x65, 0x6c, 0x65, - 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, - 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x48, - 0x6f, 0x73, 0x74, 0x55, 0x73, 0x65, 0x72, 0x48, 0x00, 0x52, 0x0e, 0x53, 0x74, 0x61, 0x74, 0x69, - 0x63, 0x48, 0x6f, 0x73, 0x74, 0x55, 0x73, 0x65, 0x72, 0x42, 0x0a, 0x0a, 0x08, 0x52, 0x65, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4a, 0x04, 0x08, 0x07, 0x10, 0x08, 0x4a, 0x04, 0x08, 0x31, 0x10, - 0x32, 0x52, 0x12, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x43, 0x6c, 0x6f, 0x75, 0x64, - 0x41, 0x75, 0x64, 0x69, 0x74, 0x2a, 0x2a, 0x0a, 0x09, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x12, 0x08, 0x0a, 0x04, 0x49, 0x4e, 0x49, 0x54, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, - 0x50, 0x55, 0x54, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x44, 0x45, 0x4c, 0x45, 0x54, 0x45, 0x10, - 0x02, 0x42, 0x34, 0x5a, 0x32, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, - 0x67, 0x72, 0x61, 0x76, 0x69, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x2f, 0x74, 0x65, - 0x6c, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, - 0x74, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6e, 0x67, 0x73, 0x12, 0x55, 0x0a, 0x10, 0x53, 0x50, 0x49, 0x46, 0x46, 0x45, 0x46, 0x65, 0x64, + 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x3e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, + 0x74, 0x65, 0x6c, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, + 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x50, 0x49, 0x46, 0x46, 0x45, 0x46, 0x65, 0x64, 0x65, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x10, 0x53, 0x50, 0x49, 0x46, 0x46, 0x45, + 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x56, 0x0a, 0x0e, 0x53, 0x74, + 0x61, 0x74, 0x69, 0x63, 0x48, 0x6f, 0x73, 0x74, 0x55, 0x73, 0x65, 0x72, 0x18, 0x3f, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x74, 0x65, 0x6c, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x75, 0x73, + 0x65, 0x72, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x76, + 0x31, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x48, 0x6f, 0x73, 0x74, 0x55, 0x73, 0x65, 0x72, + 0x48, 0x00, 0x52, 0x0e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x48, 0x6f, 0x73, 0x74, 0x55, 0x73, + 0x65, 0x72, 0x12, 0x56, 0x0a, 0x10, 0x41, 0x75, 0x74, 0x6f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x40, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x74, + 0x65, 0x6c, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x75, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x75, 0x74, 0x6f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x48, 0x00, 0x52, 0x10, 0x41, 0x75, 0x74, 0x6f, 0x75, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x59, 0x0a, 0x11, 0x41, 0x75, + 0x74, 0x6f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, + 0x41, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x74, 0x65, 0x6c, 0x65, 0x70, 0x6f, 0x72, 0x74, + 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x41, + 0x75, 0x74, 0x6f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, + 0x48, 0x00, 0x52, 0x11, 0x41, 0x75, 0x74, 0x6f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x56, 0x65, + 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x42, 0x0a, 0x0a, 0x08, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x4a, 0x04, 0x08, 0x07, 0x10, 0x08, 0x4a, 0x04, 0x08, 0x31, 0x10, 0x32, 0x52, 0x12, 0x45, + 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x41, 0x75, 0x64, 0x69, + 0x74, 0x2a, 0x2a, 0x0a, 0x09, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x08, + 0x0a, 0x04, 0x49, 0x4e, 0x49, 0x54, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x50, 0x55, 0x54, 0x10, + 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x44, 0x45, 0x4c, 0x45, 0x54, 0x45, 0x10, 0x02, 0x42, 0x34, 0x5a, + 0x32, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x72, 0x61, 0x76, + 0x69, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x2f, 0x74, 0x65, 0x6c, 0x65, 0x70, 0x6f, + 0x72, 0x74, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2f, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1465,6 +1510,8 @@ var file_teleport_legacy_client_proto_event_proto_goTypes = []any{ (*v110.AccessGraphSettings)(nil), // 56: teleport.clusterconfig.v1.AccessGraphSettings (*v19.SPIFFEFederation)(nil), // 57: teleport.machineid.v1.SPIFFEFederation (*v111.StaticHostUser)(nil), // 58: teleport.userprovisioning.v1.StaticHostUser + (*v112.AutoupdateConfig)(nil), // 59: teleport.autoupdate.v1.AutoupdateConfig + (*v112.AutoupdateVersion)(nil), // 60: teleport.autoupdate.v1.AutoupdateVersion } var file_teleport_legacy_client_proto_event_proto_depIdxs = []int32{ 0, // 0: proto.Event.Type:type_name -> proto.Operation @@ -1528,11 +1575,13 @@ var file_teleport_legacy_client_proto_event_proto_depIdxs = []int32{ 56, // 58: proto.Event.AccessGraphSettings:type_name -> teleport.clusterconfig.v1.AccessGraphSettings 57, // 59: proto.Event.SPIFFEFederation:type_name -> teleport.machineid.v1.SPIFFEFederation 58, // 60: proto.Event.StaticHostUser:type_name -> teleport.userprovisioning.v1.StaticHostUser - 61, // [61:61] is the sub-list for method output_type - 61, // [61:61] is the sub-list for method input_type - 61, // [61:61] is the sub-list for extension type_name - 61, // [61:61] is the sub-list for extension extendee - 0, // [0:61] is the sub-list for field type_name + 59, // 61: proto.Event.AutoupdateConfig:type_name -> teleport.autoupdate.v1.AutoupdateConfig + 60, // 62: proto.Event.AutoupdateVersion:type_name -> teleport.autoupdate.v1.AutoupdateVersion + 63, // [63:63] is the sub-list for method output_type + 63, // [63:63] is the sub-list for method input_type + 63, // [63:63] is the sub-list for extension type_name + 63, // [63:63] is the sub-list for extension extendee + 0, // [0:63] is the sub-list for field type_name } func init() { file_teleport_legacy_client_proto_event_proto_init() } @@ -1615,6 +1664,8 @@ func file_teleport_legacy_client_proto_event_proto_init() { (*Event_AccessGraphSettings)(nil), (*Event_SPIFFEFederation)(nil), (*Event_StaticHostUser)(nil), + (*Event_AutoupdateConfig)(nil), + (*Event_AutoupdateVersion)(nil), } type x struct{} out := protoimpl.TypeBuilder{ diff --git a/api/gen/proto/go/teleport/autoupdate/v1/autoupdate.pb.go b/api/gen/proto/go/teleport/autoupdate/v1/autoupdate.pb.go new file mode 100644 index 0000000000000..655109bc811a3 --- /dev/null +++ b/api/gen/proto/go/teleport/autoupdate/v1/autoupdate.pb.go @@ -0,0 +1,456 @@ +// Copyright 2024 Gravitational, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.2 +// protoc (unknown) +// source: teleport/autoupdate/v1/autoupdate.proto + +package autoupdate + +import ( + v1 "github.com/gravitational/teleport/api/gen/proto/go/teleport/header/v1" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// AutoupdateConfig is a config singleton used to configure cluster +// autoupdate settings. +type AutoupdateConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Kind string `protobuf:"bytes,1,opt,name=kind,proto3" json:"kind,omitempty"` + SubKind string `protobuf:"bytes,2,opt,name=sub_kind,json=subKind,proto3" json:"sub_kind,omitempty"` + Version string `protobuf:"bytes,3,opt,name=version,proto3" json:"version,omitempty"` + Metadata *v1.Metadata `protobuf:"bytes,4,opt,name=metadata,proto3" json:"metadata,omitempty"` + Spec *AutoupdateConfigSpec `protobuf:"bytes,5,opt,name=spec,proto3" json:"spec,omitempty"` +} + +func (x *AutoupdateConfig) Reset() { + *x = AutoupdateConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_teleport_autoupdate_v1_autoupdate_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AutoupdateConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AutoupdateConfig) ProtoMessage() {} + +func (x *AutoupdateConfig) ProtoReflect() protoreflect.Message { + mi := &file_teleport_autoupdate_v1_autoupdate_proto_msgTypes[0] + 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 AutoupdateConfig.ProtoReflect.Descriptor instead. +func (*AutoupdateConfig) Descriptor() ([]byte, []int) { + return file_teleport_autoupdate_v1_autoupdate_proto_rawDescGZIP(), []int{0} +} + +func (x *AutoupdateConfig) GetKind() string { + if x != nil { + return x.Kind + } + return "" +} + +func (x *AutoupdateConfig) GetSubKind() string { + if x != nil { + return x.SubKind + } + return "" +} + +func (x *AutoupdateConfig) GetVersion() string { + if x != nil { + return x.Version + } + return "" +} + +func (x *AutoupdateConfig) GetMetadata() *v1.Metadata { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *AutoupdateConfig) GetSpec() *AutoupdateConfigSpec { + if x != nil { + return x.Spec + } + return nil +} + +// AutoupdateConfigSpec encodes the parameters of the autoupdate config object. +type AutoupdateConfigSpec struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // ToolsAutoupdate encodes the feature flag to enable/disable tools autoupdates. + ToolsAutoupdate bool `protobuf:"varint,1,opt,name=tools_autoupdate,json=toolsAutoupdate,proto3" json:"tools_autoupdate,omitempty"` +} + +func (x *AutoupdateConfigSpec) Reset() { + *x = AutoupdateConfigSpec{} + if protoimpl.UnsafeEnabled { + mi := &file_teleport_autoupdate_v1_autoupdate_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AutoupdateConfigSpec) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AutoupdateConfigSpec) ProtoMessage() {} + +func (x *AutoupdateConfigSpec) ProtoReflect() protoreflect.Message { + mi := &file_teleport_autoupdate_v1_autoupdate_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 AutoupdateConfigSpec.ProtoReflect.Descriptor instead. +func (*AutoupdateConfigSpec) Descriptor() ([]byte, []int) { + return file_teleport_autoupdate_v1_autoupdate_proto_rawDescGZIP(), []int{1} +} + +func (x *AutoupdateConfigSpec) GetToolsAutoupdate() bool { + if x != nil { + return x.ToolsAutoupdate + } + return false +} + +// AutoupdateVersion is a resource singleton with version required for +// tools autoupdate. +type AutoupdateVersion struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Kind string `protobuf:"bytes,1,opt,name=kind,proto3" json:"kind,omitempty"` + SubKind string `protobuf:"bytes,2,opt,name=sub_kind,json=subKind,proto3" json:"sub_kind,omitempty"` + Version string `protobuf:"bytes,3,opt,name=version,proto3" json:"version,omitempty"` + Metadata *v1.Metadata `protobuf:"bytes,4,opt,name=metadata,proto3" json:"metadata,omitempty"` + Spec *AutoupdateVersionSpec `protobuf:"bytes,5,opt,name=spec,proto3" json:"spec,omitempty"` +} + +func (x *AutoupdateVersion) Reset() { + *x = AutoupdateVersion{} + if protoimpl.UnsafeEnabled { + mi := &file_teleport_autoupdate_v1_autoupdate_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AutoupdateVersion) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AutoupdateVersion) ProtoMessage() {} + +func (x *AutoupdateVersion) ProtoReflect() protoreflect.Message { + mi := &file_teleport_autoupdate_v1_autoupdate_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 AutoupdateVersion.ProtoReflect.Descriptor instead. +func (*AutoupdateVersion) Descriptor() ([]byte, []int) { + return file_teleport_autoupdate_v1_autoupdate_proto_rawDescGZIP(), []int{2} +} + +func (x *AutoupdateVersion) GetKind() string { + if x != nil { + return x.Kind + } + return "" +} + +func (x *AutoupdateVersion) GetSubKind() string { + if x != nil { + return x.SubKind + } + return "" +} + +func (x *AutoupdateVersion) GetVersion() string { + if x != nil { + return x.Version + } + return "" +} + +func (x *AutoupdateVersion) GetMetadata() *v1.Metadata { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *AutoupdateVersion) GetSpec() *AutoupdateVersionSpec { + if x != nil { + return x.Spec + } + return nil +} + +// AutoupdateVersionSpec encodes the parameters of the autoupdate versions. +type AutoupdateVersionSpec struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // ToolsVersion is the semantic version required for tools autoupdates. + ToolsVersion string `protobuf:"bytes,1,opt,name=tools_version,json=toolsVersion,proto3" json:"tools_version,omitempty"` +} + +func (x *AutoupdateVersionSpec) Reset() { + *x = AutoupdateVersionSpec{} + if protoimpl.UnsafeEnabled { + mi := &file_teleport_autoupdate_v1_autoupdate_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AutoupdateVersionSpec) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AutoupdateVersionSpec) ProtoMessage() {} + +func (x *AutoupdateVersionSpec) ProtoReflect() protoreflect.Message { + mi := &file_teleport_autoupdate_v1_autoupdate_proto_msgTypes[3] + 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 AutoupdateVersionSpec.ProtoReflect.Descriptor instead. +func (*AutoupdateVersionSpec) Descriptor() ([]byte, []int) { + return file_teleport_autoupdate_v1_autoupdate_proto_rawDescGZIP(), []int{3} +} + +func (x *AutoupdateVersionSpec) GetToolsVersion() string { + if x != nil { + return x.ToolsVersion + } + return "" +} + +var File_teleport_autoupdate_v1_autoupdate_proto protoreflect.FileDescriptor + +var file_teleport_autoupdate_v1_autoupdate_proto_rawDesc = []byte{ + 0x0a, 0x27, 0x74, 0x65, 0x6c, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x61, 0x75, 0x74, 0x6f, 0x75, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x75, 0x74, 0x6f, 0x75, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x16, 0x74, 0x65, 0x6c, 0x65, 0x70, + 0x6f, 0x72, 0x74, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x76, + 0x31, 0x1a, 0x21, 0x74, 0x65, 0x6c, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x68, 0x65, 0x61, 0x64, + 0x65, 0x72, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xd7, 0x01, 0x0a, 0x10, 0x41, 0x75, 0x74, 0x6f, 0x75, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x12, 0x0a, 0x04, 0x6b, 0x69, 0x6e, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x12, 0x19, 0x0a, + 0x08, 0x73, 0x75, 0x62, 0x5f, 0x6b, 0x69, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x07, 0x73, 0x75, 0x62, 0x4b, 0x69, 0x6e, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, + 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, + 0x6f, 0x6e, 0x12, 0x38, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x74, 0x65, 0x6c, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x2e, + 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x40, 0x0a, 0x04, + 0x73, 0x70, 0x65, 0x63, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x74, 0x65, 0x6c, + 0x65, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x75, 0x74, 0x6f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x53, 0x70, 0x65, 0x63, 0x52, 0x04, 0x73, 0x70, 0x65, 0x63, 0x22, 0x41, + 0x0a, 0x14, 0x41, 0x75, 0x74, 0x6f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x53, 0x70, 0x65, 0x63, 0x12, 0x29, 0x0a, 0x10, 0x74, 0x6f, 0x6f, 0x6c, 0x73, 0x5f, + 0x61, 0x75, 0x74, 0x6f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x0f, 0x74, 0x6f, 0x6f, 0x6c, 0x73, 0x41, 0x75, 0x74, 0x6f, 0x75, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x22, 0xd9, 0x01, 0x0a, 0x11, 0x41, 0x75, 0x74, 0x6f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x73, + 0x75, 0x62, 0x5f, 0x6b, 0x69, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, + 0x75, 0x62, 0x4b, 0x69, 0x6e, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, + 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, + 0x12, 0x38, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x74, 0x65, 0x6c, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x68, 0x65, + 0x61, 0x64, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x41, 0x0a, 0x04, 0x73, 0x70, + 0x65, 0x63, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x74, 0x65, 0x6c, 0x65, 0x70, + 0x6f, 0x72, 0x74, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x76, + 0x31, 0x2e, 0x41, 0x75, 0x74, 0x6f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x56, 0x65, 0x72, 0x73, + 0x69, 0x6f, 0x6e, 0x53, 0x70, 0x65, 0x63, 0x52, 0x04, 0x73, 0x70, 0x65, 0x63, 0x22, 0x3c, 0x0a, + 0x15, 0x41, 0x75, 0x74, 0x6f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, + 0x6f, 0x6e, 0x53, 0x70, 0x65, 0x63, 0x12, 0x23, 0x0a, 0x0d, 0x74, 0x6f, 0x6f, 0x6c, 0x73, 0x5f, + 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x74, + 0x6f, 0x6f, 0x6c, 0x73, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x42, 0x56, 0x5a, 0x54, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x72, 0x61, 0x76, 0x69, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x2f, 0x74, 0x65, 0x6c, 0x65, 0x70, 0x6f, 0x72, 0x74, + 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, + 0x6f, 0x2f, 0x74, 0x65, 0x6c, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x61, 0x75, 0x74, 0x6f, 0x75, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x31, 0x3b, 0x61, 0x75, 0x74, 0x6f, 0x75, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_teleport_autoupdate_v1_autoupdate_proto_rawDescOnce sync.Once + file_teleport_autoupdate_v1_autoupdate_proto_rawDescData = file_teleport_autoupdate_v1_autoupdate_proto_rawDesc +) + +func file_teleport_autoupdate_v1_autoupdate_proto_rawDescGZIP() []byte { + file_teleport_autoupdate_v1_autoupdate_proto_rawDescOnce.Do(func() { + file_teleport_autoupdate_v1_autoupdate_proto_rawDescData = protoimpl.X.CompressGZIP(file_teleport_autoupdate_v1_autoupdate_proto_rawDescData) + }) + return file_teleport_autoupdate_v1_autoupdate_proto_rawDescData +} + +var file_teleport_autoupdate_v1_autoupdate_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_teleport_autoupdate_v1_autoupdate_proto_goTypes = []any{ + (*AutoupdateConfig)(nil), // 0: teleport.autoupdate.v1.AutoupdateConfig + (*AutoupdateConfigSpec)(nil), // 1: teleport.autoupdate.v1.AutoupdateConfigSpec + (*AutoupdateVersion)(nil), // 2: teleport.autoupdate.v1.AutoupdateVersion + (*AutoupdateVersionSpec)(nil), // 3: teleport.autoupdate.v1.AutoupdateVersionSpec + (*v1.Metadata)(nil), // 4: teleport.header.v1.Metadata +} +var file_teleport_autoupdate_v1_autoupdate_proto_depIdxs = []int32{ + 4, // 0: teleport.autoupdate.v1.AutoupdateConfig.metadata:type_name -> teleport.header.v1.Metadata + 1, // 1: teleport.autoupdate.v1.AutoupdateConfig.spec:type_name -> teleport.autoupdate.v1.AutoupdateConfigSpec + 4, // 2: teleport.autoupdate.v1.AutoupdateVersion.metadata:type_name -> teleport.header.v1.Metadata + 3, // 3: teleport.autoupdate.v1.AutoupdateVersion.spec:type_name -> teleport.autoupdate.v1.AutoupdateVersionSpec + 4, // [4:4] is the sub-list for method output_type + 4, // [4:4] is the sub-list for method input_type + 4, // [4:4] is the sub-list for extension type_name + 4, // [4:4] is the sub-list for extension extendee + 0, // [0:4] is the sub-list for field type_name +} + +func init() { file_teleport_autoupdate_v1_autoupdate_proto_init() } +func file_teleport_autoupdate_v1_autoupdate_proto_init() { + if File_teleport_autoupdate_v1_autoupdate_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_teleport_autoupdate_v1_autoupdate_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*AutoupdateConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_teleport_autoupdate_v1_autoupdate_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*AutoupdateConfigSpec); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_teleport_autoupdate_v1_autoupdate_proto_msgTypes[2].Exporter = func(v any, i int) any { + switch v := v.(*AutoupdateVersion); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_teleport_autoupdate_v1_autoupdate_proto_msgTypes[3].Exporter = func(v any, i int) any { + switch v := v.(*AutoupdateVersionSpec); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_teleport_autoupdate_v1_autoupdate_proto_rawDesc, + NumEnums: 0, + NumMessages: 4, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_teleport_autoupdate_v1_autoupdate_proto_goTypes, + DependencyIndexes: file_teleport_autoupdate_v1_autoupdate_proto_depIdxs, + MessageInfos: file_teleport_autoupdate_v1_autoupdate_proto_msgTypes, + }.Build() + File_teleport_autoupdate_v1_autoupdate_proto = out.File + file_teleport_autoupdate_v1_autoupdate_proto_rawDesc = nil + file_teleport_autoupdate_v1_autoupdate_proto_goTypes = nil + file_teleport_autoupdate_v1_autoupdate_proto_depIdxs = nil +} diff --git a/api/gen/proto/go/teleport/autoupdate/v1/autoupdate_service.pb.go b/api/gen/proto/go/teleport/autoupdate/v1/autoupdate_service.pb.go new file mode 100644 index 0000000000000..d252b2fde86f7 --- /dev/null +++ b/api/gen/proto/go/teleport/autoupdate/v1/autoupdate_service.pb.go @@ -0,0 +1,832 @@ +// Copyright 2024 Gravitational, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.2 +// protoc (unknown) +// source: teleport/autoupdate/v1/autoupdate_service.proto + +package autoupdate + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + emptypb "google.golang.org/protobuf/types/known/emptypb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Request for GetAutoupdateConfig. +type GetAutoupdateConfigRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *GetAutoupdateConfigRequest) Reset() { + *x = GetAutoupdateConfigRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_teleport_autoupdate_v1_autoupdate_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetAutoupdateConfigRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetAutoupdateConfigRequest) ProtoMessage() {} + +func (x *GetAutoupdateConfigRequest) ProtoReflect() protoreflect.Message { + mi := &file_teleport_autoupdate_v1_autoupdate_service_proto_msgTypes[0] + 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 GetAutoupdateConfigRequest.ProtoReflect.Descriptor instead. +func (*GetAutoupdateConfigRequest) Descriptor() ([]byte, []int) { + return file_teleport_autoupdate_v1_autoupdate_service_proto_rawDescGZIP(), []int{0} +} + +// Request for CreateAutoupdateConfig. +type CreateAutoupdateConfigRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Config *AutoupdateConfig `protobuf:"bytes,1,opt,name=config,proto3" json:"config,omitempty"` +} + +func (x *CreateAutoupdateConfigRequest) Reset() { + *x = CreateAutoupdateConfigRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_teleport_autoupdate_v1_autoupdate_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateAutoupdateConfigRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateAutoupdateConfigRequest) ProtoMessage() {} + +func (x *CreateAutoupdateConfigRequest) ProtoReflect() protoreflect.Message { + mi := &file_teleport_autoupdate_v1_autoupdate_service_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 CreateAutoupdateConfigRequest.ProtoReflect.Descriptor instead. +func (*CreateAutoupdateConfigRequest) Descriptor() ([]byte, []int) { + return file_teleport_autoupdate_v1_autoupdate_service_proto_rawDescGZIP(), []int{1} +} + +func (x *CreateAutoupdateConfigRequest) GetConfig() *AutoupdateConfig { + if x != nil { + return x.Config + } + return nil +} + +// Request for UpdateAutoupdateConfig. +type UpdateAutoupdateConfigRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Config *AutoupdateConfig `protobuf:"bytes,1,opt,name=config,proto3" json:"config,omitempty"` +} + +func (x *UpdateAutoupdateConfigRequest) Reset() { + *x = UpdateAutoupdateConfigRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_teleport_autoupdate_v1_autoupdate_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateAutoupdateConfigRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateAutoupdateConfigRequest) ProtoMessage() {} + +func (x *UpdateAutoupdateConfigRequest) ProtoReflect() protoreflect.Message { + mi := &file_teleport_autoupdate_v1_autoupdate_service_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 UpdateAutoupdateConfigRequest.ProtoReflect.Descriptor instead. +func (*UpdateAutoupdateConfigRequest) Descriptor() ([]byte, []int) { + return file_teleport_autoupdate_v1_autoupdate_service_proto_rawDescGZIP(), []int{2} +} + +func (x *UpdateAutoupdateConfigRequest) GetConfig() *AutoupdateConfig { + if x != nil { + return x.Config + } + return nil +} + +// Request for UpsertAutoupdateConfig. +type UpsertAutoupdateConfigRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Config *AutoupdateConfig `protobuf:"bytes,1,opt,name=config,proto3" json:"config,omitempty"` +} + +func (x *UpsertAutoupdateConfigRequest) Reset() { + *x = UpsertAutoupdateConfigRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_teleport_autoupdate_v1_autoupdate_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpsertAutoupdateConfigRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpsertAutoupdateConfigRequest) ProtoMessage() {} + +func (x *UpsertAutoupdateConfigRequest) ProtoReflect() protoreflect.Message { + mi := &file_teleport_autoupdate_v1_autoupdate_service_proto_msgTypes[3] + 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 UpsertAutoupdateConfigRequest.ProtoReflect.Descriptor instead. +func (*UpsertAutoupdateConfigRequest) Descriptor() ([]byte, []int) { + return file_teleport_autoupdate_v1_autoupdate_service_proto_rawDescGZIP(), []int{3} +} + +func (x *UpsertAutoupdateConfigRequest) GetConfig() *AutoupdateConfig { + if x != nil { + return x.Config + } + return nil +} + +// Request for DeleteAutoupdateConfig. +type DeleteAutoupdateConfigRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *DeleteAutoupdateConfigRequest) Reset() { + *x = DeleteAutoupdateConfigRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_teleport_autoupdate_v1_autoupdate_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteAutoupdateConfigRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteAutoupdateConfigRequest) ProtoMessage() {} + +func (x *DeleteAutoupdateConfigRequest) ProtoReflect() protoreflect.Message { + mi := &file_teleport_autoupdate_v1_autoupdate_service_proto_msgTypes[4] + 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 DeleteAutoupdateConfigRequest.ProtoReflect.Descriptor instead. +func (*DeleteAutoupdateConfigRequest) Descriptor() ([]byte, []int) { + return file_teleport_autoupdate_v1_autoupdate_service_proto_rawDescGZIP(), []int{4} +} + +// Request for GetAutoupdateVersion. +type GetAutoupdateVersionRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *GetAutoupdateVersionRequest) Reset() { + *x = GetAutoupdateVersionRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_teleport_autoupdate_v1_autoupdate_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetAutoupdateVersionRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetAutoupdateVersionRequest) ProtoMessage() {} + +func (x *GetAutoupdateVersionRequest) ProtoReflect() protoreflect.Message { + mi := &file_teleport_autoupdate_v1_autoupdate_service_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetAutoupdateVersionRequest.ProtoReflect.Descriptor instead. +func (*GetAutoupdateVersionRequest) Descriptor() ([]byte, []int) { + return file_teleport_autoupdate_v1_autoupdate_service_proto_rawDescGZIP(), []int{5} +} + +// Request for CreateAutoupdateVersion. +type CreateAutoupdateVersionRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Version *AutoupdateVersion `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"` +} + +func (x *CreateAutoupdateVersionRequest) Reset() { + *x = CreateAutoupdateVersionRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_teleport_autoupdate_v1_autoupdate_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateAutoupdateVersionRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateAutoupdateVersionRequest) ProtoMessage() {} + +func (x *CreateAutoupdateVersionRequest) ProtoReflect() protoreflect.Message { + mi := &file_teleport_autoupdate_v1_autoupdate_service_proto_msgTypes[6] + 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 CreateAutoupdateVersionRequest.ProtoReflect.Descriptor instead. +func (*CreateAutoupdateVersionRequest) Descriptor() ([]byte, []int) { + return file_teleport_autoupdate_v1_autoupdate_service_proto_rawDescGZIP(), []int{6} +} + +func (x *CreateAutoupdateVersionRequest) GetVersion() *AutoupdateVersion { + if x != nil { + return x.Version + } + return nil +} + +// Request for UpdateAutoupdateConfig. +type UpdateAutoupdateVersionRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Version *AutoupdateVersion `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"` +} + +func (x *UpdateAutoupdateVersionRequest) Reset() { + *x = UpdateAutoupdateVersionRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_teleport_autoupdate_v1_autoupdate_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateAutoupdateVersionRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateAutoupdateVersionRequest) ProtoMessage() {} + +func (x *UpdateAutoupdateVersionRequest) ProtoReflect() protoreflect.Message { + mi := &file_teleport_autoupdate_v1_autoupdate_service_proto_msgTypes[7] + 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 UpdateAutoupdateVersionRequest.ProtoReflect.Descriptor instead. +func (*UpdateAutoupdateVersionRequest) Descriptor() ([]byte, []int) { + return file_teleport_autoupdate_v1_autoupdate_service_proto_rawDescGZIP(), []int{7} +} + +func (x *UpdateAutoupdateVersionRequest) GetVersion() *AutoupdateVersion { + if x != nil { + return x.Version + } + return nil +} + +// Request for UpsertAutoupdateVersion. +type UpsertAutoupdateVersionRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Version *AutoupdateVersion `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"` +} + +func (x *UpsertAutoupdateVersionRequest) Reset() { + *x = UpsertAutoupdateVersionRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_teleport_autoupdate_v1_autoupdate_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpsertAutoupdateVersionRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpsertAutoupdateVersionRequest) ProtoMessage() {} + +func (x *UpsertAutoupdateVersionRequest) ProtoReflect() protoreflect.Message { + mi := &file_teleport_autoupdate_v1_autoupdate_service_proto_msgTypes[8] + 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 UpsertAutoupdateVersionRequest.ProtoReflect.Descriptor instead. +func (*UpsertAutoupdateVersionRequest) Descriptor() ([]byte, []int) { + return file_teleport_autoupdate_v1_autoupdate_service_proto_rawDescGZIP(), []int{8} +} + +func (x *UpsertAutoupdateVersionRequest) GetVersion() *AutoupdateVersion { + if x != nil { + return x.Version + } + return nil +} + +// Request for DeleteAutoupdateVersion. +type DeleteAutoupdateVersionRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *DeleteAutoupdateVersionRequest) Reset() { + *x = DeleteAutoupdateVersionRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_teleport_autoupdate_v1_autoupdate_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteAutoupdateVersionRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteAutoupdateVersionRequest) ProtoMessage() {} + +func (x *DeleteAutoupdateVersionRequest) ProtoReflect() protoreflect.Message { + mi := &file_teleport_autoupdate_v1_autoupdate_service_proto_msgTypes[9] + 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 DeleteAutoupdateVersionRequest.ProtoReflect.Descriptor instead. +func (*DeleteAutoupdateVersionRequest) Descriptor() ([]byte, []int) { + return file_teleport_autoupdate_v1_autoupdate_service_proto_rawDescGZIP(), []int{9} +} + +var File_teleport_autoupdate_v1_autoupdate_service_proto protoreflect.FileDescriptor + +var file_teleport_autoupdate_v1_autoupdate_service_proto_rawDesc = []byte{ + 0x0a, 0x2f, 0x74, 0x65, 0x6c, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x61, 0x75, 0x74, 0x6f, 0x75, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x75, 0x74, 0x6f, 0x75, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x12, 0x16, 0x74, 0x65, 0x6c, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x61, 0x75, 0x74, 0x6f, + 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x27, 0x74, 0x65, 0x6c, 0x65, 0x70, 0x6f, 0x72, 0x74, + 0x2f, 0x61, 0x75, 0x74, 0x6f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x61, + 0x75, 0x74, 0x6f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, + 0x1c, 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x41, 0x75, 0x74, 0x6f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x61, 0x0a, + 0x1d, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x75, 0x74, 0x6f, 0x75, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x40, + 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, + 0x2e, 0x74, 0x65, 0x6c, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x75, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x75, 0x74, 0x6f, 0x75, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x22, 0x61, 0x0a, 0x1d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x75, 0x74, 0x6f, 0x75, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x40, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x28, 0x2e, 0x74, 0x65, 0x6c, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x61, 0x75, 0x74, + 0x6f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x75, 0x74, 0x6f, 0x75, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x06, 0x63, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x22, 0x61, 0x0a, 0x1d, 0x55, 0x70, 0x73, 0x65, 0x72, 0x74, 0x41, 0x75, 0x74, + 0x6f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x40, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x74, 0x65, 0x6c, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x2e, + 0x61, 0x75, 0x74, 0x6f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x75, + 0x74, 0x6f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x06, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0x1f, 0x0a, 0x1d, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, + 0x41, 0x75, 0x74, 0x6f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x1d, 0x0a, 0x1b, 0x47, 0x65, 0x74, 0x41, 0x75, + 0x74, 0x6f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x65, 0x0a, 0x1e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x41, 0x75, 0x74, 0x6f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, + 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x43, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, + 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x74, 0x65, 0x6c, 0x65, + 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x2e, + 0x76, 0x31, 0x2e, 0x41, 0x75, 0x74, 0x6f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x56, 0x65, 0x72, + 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x65, 0x0a, + 0x1e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x75, 0x74, 0x6f, 0x75, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x43, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x29, 0x2e, 0x74, 0x65, 0x6c, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x61, 0x75, 0x74, 0x6f, + 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x75, 0x74, 0x6f, 0x75, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x76, 0x65, 0x72, + 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x65, 0x0a, 0x1e, 0x55, 0x70, 0x73, 0x65, 0x72, 0x74, 0x41, 0x75, + 0x74, 0x6f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x43, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, + 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x74, 0x65, 0x6c, 0x65, 0x70, 0x6f, + 0x72, 0x74, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x76, 0x31, + 0x2e, 0x41, 0x75, 0x74, 0x6f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, + 0x6f, 0x6e, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x20, 0x0a, 0x1e, 0x44, + 0x65, 0x6c, 0x65, 0x74, 0x65, 0x41, 0x75, 0x74, 0x6f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x56, + 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x32, 0xbf, 0x09, + 0x0a, 0x11, 0x41, 0x75, 0x74, 0x6f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x12, 0x73, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x41, 0x75, 0x74, 0x6f, 0x75, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x32, 0x2e, 0x74, 0x65, 0x6c, + 0x65, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x75, 0x74, 0x6f, 0x75, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, + 0x2e, 0x74, 0x65, 0x6c, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x75, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x75, 0x74, 0x6f, 0x75, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x79, 0x0a, 0x16, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x41, 0x75, 0x74, 0x6f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x12, 0x35, 0x2e, 0x74, 0x65, 0x6c, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x61, 0x75, + 0x74, 0x6f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x41, 0x75, 0x74, 0x6f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x74, 0x65, 0x6c, 0x65, + 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x2e, + 0x76, 0x31, 0x2e, 0x41, 0x75, 0x74, 0x6f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x12, 0x79, 0x0a, 0x16, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x75, 0x74, + 0x6f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x35, 0x2e, + 0x74, 0x65, 0x6c, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x75, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x75, 0x74, + 0x6f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x74, 0x65, 0x6c, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x2e, + 0x61, 0x75, 0x74, 0x6f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x75, + 0x74, 0x6f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x79, + 0x0a, 0x16, 0x55, 0x70, 0x73, 0x65, 0x72, 0x74, 0x41, 0x75, 0x74, 0x6f, 0x75, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x35, 0x2e, 0x74, 0x65, 0x6c, 0x65, 0x70, + 0x6f, 0x72, 0x74, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x76, + 0x31, 0x2e, 0x55, 0x70, 0x73, 0x65, 0x72, 0x74, 0x41, 0x75, 0x74, 0x6f, 0x75, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x28, 0x2e, 0x74, 0x65, 0x6c, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x75, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x75, 0x74, 0x6f, 0x75, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x67, 0x0a, 0x16, 0x44, 0x65, 0x6c, + 0x65, 0x74, 0x65, 0x41, 0x75, 0x74, 0x6f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x12, 0x35, 0x2e, 0x74, 0x65, 0x6c, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x61, + 0x75, 0x74, 0x6f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, + 0x65, 0x74, 0x65, 0x41, 0x75, 0x74, 0x6f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, + 0x74, 0x79, 0x12, 0x76, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x41, 0x75, 0x74, 0x6f, 0x75, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x33, 0x2e, 0x74, 0x65, 0x6c, + 0x65, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x75, 0x74, 0x6f, 0x75, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x29, 0x2e, 0x74, 0x65, 0x6c, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x75, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x75, 0x74, 0x6f, 0x75, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x7c, 0x0a, 0x17, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x41, 0x75, 0x74, 0x6f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x56, 0x65, + 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x36, 0x2e, 0x74, 0x65, 0x6c, 0x65, 0x70, 0x6f, 0x72, 0x74, + 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x75, 0x74, 0x6f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x56, + 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, + 0x74, 0x65, 0x6c, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x75, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x75, 0x74, 0x6f, 0x75, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x7c, 0x0a, 0x17, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x41, 0x75, 0x74, 0x6f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x56, 0x65, 0x72, 0x73, + 0x69, 0x6f, 0x6e, 0x12, 0x36, 0x2e, 0x74, 0x65, 0x6c, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x61, + 0x75, 0x74, 0x6f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x41, 0x75, 0x74, 0x6f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x56, 0x65, 0x72, + 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x74, 0x65, + 0x6c, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x75, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x75, 0x74, 0x6f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x56, + 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x7c, 0x0a, 0x17, 0x55, 0x70, 0x73, 0x65, 0x72, 0x74, + 0x41, 0x75, 0x74, 0x6f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, + 0x6e, 0x12, 0x36, 0x2e, 0x74, 0x65, 0x6c, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x61, 0x75, 0x74, + 0x6f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x73, 0x65, 0x72, + 0x74, 0x41, 0x75, 0x74, 0x6f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, + 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x74, 0x65, 0x6c, 0x65, + 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x2e, + 0x76, 0x31, 0x2e, 0x41, 0x75, 0x74, 0x6f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x56, 0x65, 0x72, + 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x69, 0x0a, 0x17, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x41, 0x75, + 0x74, 0x6f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, + 0x36, 0x2e, 0x74, 0x65, 0x6c, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x75, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x41, + 0x75, 0x74, 0x6f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x42, + 0x56, 0x5a, 0x54, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x72, + 0x61, 0x76, 0x69, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x2f, 0x74, 0x65, 0x6c, 0x65, + 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x2f, 0x74, 0x65, 0x6c, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x61, + 0x75, 0x74, 0x6f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x31, 0x3b, 0x61, 0x75, 0x74, + 0x6f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_teleport_autoupdate_v1_autoupdate_service_proto_rawDescOnce sync.Once + file_teleport_autoupdate_v1_autoupdate_service_proto_rawDescData = file_teleport_autoupdate_v1_autoupdate_service_proto_rawDesc +) + +func file_teleport_autoupdate_v1_autoupdate_service_proto_rawDescGZIP() []byte { + file_teleport_autoupdate_v1_autoupdate_service_proto_rawDescOnce.Do(func() { + file_teleport_autoupdate_v1_autoupdate_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_teleport_autoupdate_v1_autoupdate_service_proto_rawDescData) + }) + return file_teleport_autoupdate_v1_autoupdate_service_proto_rawDescData +} + +var file_teleport_autoupdate_v1_autoupdate_service_proto_msgTypes = make([]protoimpl.MessageInfo, 10) +var file_teleport_autoupdate_v1_autoupdate_service_proto_goTypes = []any{ + (*GetAutoupdateConfigRequest)(nil), // 0: teleport.autoupdate.v1.GetAutoupdateConfigRequest + (*CreateAutoupdateConfigRequest)(nil), // 1: teleport.autoupdate.v1.CreateAutoupdateConfigRequest + (*UpdateAutoupdateConfigRequest)(nil), // 2: teleport.autoupdate.v1.UpdateAutoupdateConfigRequest + (*UpsertAutoupdateConfigRequest)(nil), // 3: teleport.autoupdate.v1.UpsertAutoupdateConfigRequest + (*DeleteAutoupdateConfigRequest)(nil), // 4: teleport.autoupdate.v1.DeleteAutoupdateConfigRequest + (*GetAutoupdateVersionRequest)(nil), // 5: teleport.autoupdate.v1.GetAutoupdateVersionRequest + (*CreateAutoupdateVersionRequest)(nil), // 6: teleport.autoupdate.v1.CreateAutoupdateVersionRequest + (*UpdateAutoupdateVersionRequest)(nil), // 7: teleport.autoupdate.v1.UpdateAutoupdateVersionRequest + (*UpsertAutoupdateVersionRequest)(nil), // 8: teleport.autoupdate.v1.UpsertAutoupdateVersionRequest + (*DeleteAutoupdateVersionRequest)(nil), // 9: teleport.autoupdate.v1.DeleteAutoupdateVersionRequest + (*AutoupdateConfig)(nil), // 10: teleport.autoupdate.v1.AutoupdateConfig + (*AutoupdateVersion)(nil), // 11: teleport.autoupdate.v1.AutoupdateVersion + (*emptypb.Empty)(nil), // 12: google.protobuf.Empty +} +var file_teleport_autoupdate_v1_autoupdate_service_proto_depIdxs = []int32{ + 10, // 0: teleport.autoupdate.v1.CreateAutoupdateConfigRequest.config:type_name -> teleport.autoupdate.v1.AutoupdateConfig + 10, // 1: teleport.autoupdate.v1.UpdateAutoupdateConfigRequest.config:type_name -> teleport.autoupdate.v1.AutoupdateConfig + 10, // 2: teleport.autoupdate.v1.UpsertAutoupdateConfigRequest.config:type_name -> teleport.autoupdate.v1.AutoupdateConfig + 11, // 3: teleport.autoupdate.v1.CreateAutoupdateVersionRequest.version:type_name -> teleport.autoupdate.v1.AutoupdateVersion + 11, // 4: teleport.autoupdate.v1.UpdateAutoupdateVersionRequest.version:type_name -> teleport.autoupdate.v1.AutoupdateVersion + 11, // 5: teleport.autoupdate.v1.UpsertAutoupdateVersionRequest.version:type_name -> teleport.autoupdate.v1.AutoupdateVersion + 0, // 6: teleport.autoupdate.v1.AutoupdateService.GetAutoupdateConfig:input_type -> teleport.autoupdate.v1.GetAutoupdateConfigRequest + 1, // 7: teleport.autoupdate.v1.AutoupdateService.CreateAutoupdateConfig:input_type -> teleport.autoupdate.v1.CreateAutoupdateConfigRequest + 2, // 8: teleport.autoupdate.v1.AutoupdateService.UpdateAutoupdateConfig:input_type -> teleport.autoupdate.v1.UpdateAutoupdateConfigRequest + 3, // 9: teleport.autoupdate.v1.AutoupdateService.UpsertAutoupdateConfig:input_type -> teleport.autoupdate.v1.UpsertAutoupdateConfigRequest + 4, // 10: teleport.autoupdate.v1.AutoupdateService.DeleteAutoupdateConfig:input_type -> teleport.autoupdate.v1.DeleteAutoupdateConfigRequest + 5, // 11: teleport.autoupdate.v1.AutoupdateService.GetAutoupdateVersion:input_type -> teleport.autoupdate.v1.GetAutoupdateVersionRequest + 6, // 12: teleport.autoupdate.v1.AutoupdateService.CreateAutoupdateVersion:input_type -> teleport.autoupdate.v1.CreateAutoupdateVersionRequest + 7, // 13: teleport.autoupdate.v1.AutoupdateService.UpdateAutoupdateVersion:input_type -> teleport.autoupdate.v1.UpdateAutoupdateVersionRequest + 8, // 14: teleport.autoupdate.v1.AutoupdateService.UpsertAutoupdateVersion:input_type -> teleport.autoupdate.v1.UpsertAutoupdateVersionRequest + 9, // 15: teleport.autoupdate.v1.AutoupdateService.DeleteAutoupdateVersion:input_type -> teleport.autoupdate.v1.DeleteAutoupdateVersionRequest + 10, // 16: teleport.autoupdate.v1.AutoupdateService.GetAutoupdateConfig:output_type -> teleport.autoupdate.v1.AutoupdateConfig + 10, // 17: teleport.autoupdate.v1.AutoupdateService.CreateAutoupdateConfig:output_type -> teleport.autoupdate.v1.AutoupdateConfig + 10, // 18: teleport.autoupdate.v1.AutoupdateService.UpdateAutoupdateConfig:output_type -> teleport.autoupdate.v1.AutoupdateConfig + 10, // 19: teleport.autoupdate.v1.AutoupdateService.UpsertAutoupdateConfig:output_type -> teleport.autoupdate.v1.AutoupdateConfig + 12, // 20: teleport.autoupdate.v1.AutoupdateService.DeleteAutoupdateConfig:output_type -> google.protobuf.Empty + 11, // 21: teleport.autoupdate.v1.AutoupdateService.GetAutoupdateVersion:output_type -> teleport.autoupdate.v1.AutoupdateVersion + 11, // 22: teleport.autoupdate.v1.AutoupdateService.CreateAutoupdateVersion:output_type -> teleport.autoupdate.v1.AutoupdateVersion + 11, // 23: teleport.autoupdate.v1.AutoupdateService.UpdateAutoupdateVersion:output_type -> teleport.autoupdate.v1.AutoupdateVersion + 11, // 24: teleport.autoupdate.v1.AutoupdateService.UpsertAutoupdateVersion:output_type -> teleport.autoupdate.v1.AutoupdateVersion + 12, // 25: teleport.autoupdate.v1.AutoupdateService.DeleteAutoupdateVersion:output_type -> google.protobuf.Empty + 16, // [16:26] is the sub-list for method output_type + 6, // [6:16] is the sub-list for method input_type + 6, // [6:6] is the sub-list for extension type_name + 6, // [6:6] is the sub-list for extension extendee + 0, // [0:6] is the sub-list for field type_name +} + +func init() { file_teleport_autoupdate_v1_autoupdate_service_proto_init() } +func file_teleport_autoupdate_v1_autoupdate_service_proto_init() { + if File_teleport_autoupdate_v1_autoupdate_service_proto != nil { + return + } + file_teleport_autoupdate_v1_autoupdate_proto_init() + if !protoimpl.UnsafeEnabled { + file_teleport_autoupdate_v1_autoupdate_service_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*GetAutoupdateConfigRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_teleport_autoupdate_v1_autoupdate_service_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*CreateAutoupdateConfigRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_teleport_autoupdate_v1_autoupdate_service_proto_msgTypes[2].Exporter = func(v any, i int) any { + switch v := v.(*UpdateAutoupdateConfigRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_teleport_autoupdate_v1_autoupdate_service_proto_msgTypes[3].Exporter = func(v any, i int) any { + switch v := v.(*UpsertAutoupdateConfigRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_teleport_autoupdate_v1_autoupdate_service_proto_msgTypes[4].Exporter = func(v any, i int) any { + switch v := v.(*DeleteAutoupdateConfigRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_teleport_autoupdate_v1_autoupdate_service_proto_msgTypes[5].Exporter = func(v any, i int) any { + switch v := v.(*GetAutoupdateVersionRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_teleport_autoupdate_v1_autoupdate_service_proto_msgTypes[6].Exporter = func(v any, i int) any { + switch v := v.(*CreateAutoupdateVersionRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_teleport_autoupdate_v1_autoupdate_service_proto_msgTypes[7].Exporter = func(v any, i int) any { + switch v := v.(*UpdateAutoupdateVersionRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_teleport_autoupdate_v1_autoupdate_service_proto_msgTypes[8].Exporter = func(v any, i int) any { + switch v := v.(*UpsertAutoupdateVersionRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_teleport_autoupdate_v1_autoupdate_service_proto_msgTypes[9].Exporter = func(v any, i int) any { + switch v := v.(*DeleteAutoupdateVersionRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_teleport_autoupdate_v1_autoupdate_service_proto_rawDesc, + NumEnums: 0, + NumMessages: 10, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_teleport_autoupdate_v1_autoupdate_service_proto_goTypes, + DependencyIndexes: file_teleport_autoupdate_v1_autoupdate_service_proto_depIdxs, + MessageInfos: file_teleport_autoupdate_v1_autoupdate_service_proto_msgTypes, + }.Build() + File_teleport_autoupdate_v1_autoupdate_service_proto = out.File + file_teleport_autoupdate_v1_autoupdate_service_proto_rawDesc = nil + file_teleport_autoupdate_v1_autoupdate_service_proto_goTypes = nil + file_teleport_autoupdate_v1_autoupdate_service_proto_depIdxs = nil +} diff --git a/api/gen/proto/go/teleport/autoupdate/v1/autoupdate_service_grpc.pb.go b/api/gen/proto/go/teleport/autoupdate/v1/autoupdate_service_grpc.pb.go new file mode 100644 index 0000000000000..223f5f6c33bc7 --- /dev/null +++ b/api/gen/proto/go/teleport/autoupdate/v1/autoupdate_service_grpc.pb.go @@ -0,0 +1,502 @@ +// Copyright 2024 Gravitational, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.5.1 +// - protoc (unknown) +// source: teleport/autoupdate/v1/autoupdate_service.proto + +package autoupdate + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + emptypb "google.golang.org/protobuf/types/known/emptypb" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 + +const ( + AutoupdateService_GetAutoupdateConfig_FullMethodName = "/teleport.autoupdate.v1.AutoupdateService/GetAutoupdateConfig" + AutoupdateService_CreateAutoupdateConfig_FullMethodName = "/teleport.autoupdate.v1.AutoupdateService/CreateAutoupdateConfig" + AutoupdateService_UpdateAutoupdateConfig_FullMethodName = "/teleport.autoupdate.v1.AutoupdateService/UpdateAutoupdateConfig" + AutoupdateService_UpsertAutoupdateConfig_FullMethodName = "/teleport.autoupdate.v1.AutoupdateService/UpsertAutoupdateConfig" + AutoupdateService_DeleteAutoupdateConfig_FullMethodName = "/teleport.autoupdate.v1.AutoupdateService/DeleteAutoupdateConfig" + AutoupdateService_GetAutoupdateVersion_FullMethodName = "/teleport.autoupdate.v1.AutoupdateService/GetAutoupdateVersion" + AutoupdateService_CreateAutoupdateVersion_FullMethodName = "/teleport.autoupdate.v1.AutoupdateService/CreateAutoupdateVersion" + AutoupdateService_UpdateAutoupdateVersion_FullMethodName = "/teleport.autoupdate.v1.AutoupdateService/UpdateAutoupdateVersion" + AutoupdateService_UpsertAutoupdateVersion_FullMethodName = "/teleport.autoupdate.v1.AutoupdateService/UpsertAutoupdateVersion" + AutoupdateService_DeleteAutoupdateVersion_FullMethodName = "/teleport.autoupdate.v1.AutoupdateService/DeleteAutoupdateVersion" +) + +// AutoupdateServiceClient is the client API for AutoupdateService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +// +// AutoupdateService provides an API to manage autoupdates. +type AutoupdateServiceClient interface { + // GetAutoupdateConfig gets the current autoupdate config singleton. + GetAutoupdateConfig(ctx context.Context, in *GetAutoupdateConfigRequest, opts ...grpc.CallOption) (*AutoupdateConfig, error) + // CreateAutoupdateConfig creates a new AutoupdateConfig. + CreateAutoupdateConfig(ctx context.Context, in *CreateAutoupdateConfigRequest, opts ...grpc.CallOption) (*AutoupdateConfig, error) + // CreateAutoupdateConfig updates AutoupdateConfig singleton. + UpdateAutoupdateConfig(ctx context.Context, in *UpdateAutoupdateConfigRequest, opts ...grpc.CallOption) (*AutoupdateConfig, error) + // UpsertAutoupdateConfig creates a new AutoupdateConfig or replaces an existing AutoupdateConfig. + UpsertAutoupdateConfig(ctx context.Context, in *UpsertAutoupdateConfigRequest, opts ...grpc.CallOption) (*AutoupdateConfig, error) + // DeleteAutoupdateConfig hard deletes the specified AutoupdateConfig. + DeleteAutoupdateConfig(ctx context.Context, in *DeleteAutoupdateConfigRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) + // GetAutoupdateVersion gets the current autoupdate version singleton. + GetAutoupdateVersion(ctx context.Context, in *GetAutoupdateVersionRequest, opts ...grpc.CallOption) (*AutoupdateVersion, error) + // CreateAutoupdateVersion creates a new AutoupdateVersion. + CreateAutoupdateVersion(ctx context.Context, in *CreateAutoupdateVersionRequest, opts ...grpc.CallOption) (*AutoupdateVersion, error) + // UpdateAutoupdateVersion updates AutoupdateVersion singleton. + UpdateAutoupdateVersion(ctx context.Context, in *UpdateAutoupdateVersionRequest, opts ...grpc.CallOption) (*AutoupdateVersion, error) + // UpsertAutoupdateVersion creates a new AutoupdateVersion or replaces an existing AutoupdateVersion. + UpsertAutoupdateVersion(ctx context.Context, in *UpsertAutoupdateVersionRequest, opts ...grpc.CallOption) (*AutoupdateVersion, error) + // DeleteAutoupdateVersion hard deletes the specified AutoupdateVersionRequest. + DeleteAutoupdateVersion(ctx context.Context, in *DeleteAutoupdateVersionRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) +} + +type autoupdateServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewAutoupdateServiceClient(cc grpc.ClientConnInterface) AutoupdateServiceClient { + return &autoupdateServiceClient{cc} +} + +func (c *autoupdateServiceClient) GetAutoupdateConfig(ctx context.Context, in *GetAutoupdateConfigRequest, opts ...grpc.CallOption) (*AutoupdateConfig, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(AutoupdateConfig) + err := c.cc.Invoke(ctx, AutoupdateService_GetAutoupdateConfig_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *autoupdateServiceClient) CreateAutoupdateConfig(ctx context.Context, in *CreateAutoupdateConfigRequest, opts ...grpc.CallOption) (*AutoupdateConfig, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(AutoupdateConfig) + err := c.cc.Invoke(ctx, AutoupdateService_CreateAutoupdateConfig_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *autoupdateServiceClient) UpdateAutoupdateConfig(ctx context.Context, in *UpdateAutoupdateConfigRequest, opts ...grpc.CallOption) (*AutoupdateConfig, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(AutoupdateConfig) + err := c.cc.Invoke(ctx, AutoupdateService_UpdateAutoupdateConfig_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *autoupdateServiceClient) UpsertAutoupdateConfig(ctx context.Context, in *UpsertAutoupdateConfigRequest, opts ...grpc.CallOption) (*AutoupdateConfig, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(AutoupdateConfig) + err := c.cc.Invoke(ctx, AutoupdateService_UpsertAutoupdateConfig_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *autoupdateServiceClient) DeleteAutoupdateConfig(ctx context.Context, in *DeleteAutoupdateConfigRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, AutoupdateService_DeleteAutoupdateConfig_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *autoupdateServiceClient) GetAutoupdateVersion(ctx context.Context, in *GetAutoupdateVersionRequest, opts ...grpc.CallOption) (*AutoupdateVersion, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(AutoupdateVersion) + err := c.cc.Invoke(ctx, AutoupdateService_GetAutoupdateVersion_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *autoupdateServiceClient) CreateAutoupdateVersion(ctx context.Context, in *CreateAutoupdateVersionRequest, opts ...grpc.CallOption) (*AutoupdateVersion, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(AutoupdateVersion) + err := c.cc.Invoke(ctx, AutoupdateService_CreateAutoupdateVersion_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *autoupdateServiceClient) UpdateAutoupdateVersion(ctx context.Context, in *UpdateAutoupdateVersionRequest, opts ...grpc.CallOption) (*AutoupdateVersion, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(AutoupdateVersion) + err := c.cc.Invoke(ctx, AutoupdateService_UpdateAutoupdateVersion_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *autoupdateServiceClient) UpsertAutoupdateVersion(ctx context.Context, in *UpsertAutoupdateVersionRequest, opts ...grpc.CallOption) (*AutoupdateVersion, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(AutoupdateVersion) + err := c.cc.Invoke(ctx, AutoupdateService_UpsertAutoupdateVersion_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *autoupdateServiceClient) DeleteAutoupdateVersion(ctx context.Context, in *DeleteAutoupdateVersionRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, AutoupdateService_DeleteAutoupdateVersion_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// AutoupdateServiceServer is the server API for AutoupdateService service. +// All implementations must embed UnimplementedAutoupdateServiceServer +// for forward compatibility. +// +// AutoupdateService provides an API to manage autoupdates. +type AutoupdateServiceServer interface { + // GetAutoupdateConfig gets the current autoupdate config singleton. + GetAutoupdateConfig(context.Context, *GetAutoupdateConfigRequest) (*AutoupdateConfig, error) + // CreateAutoupdateConfig creates a new AutoupdateConfig. + CreateAutoupdateConfig(context.Context, *CreateAutoupdateConfigRequest) (*AutoupdateConfig, error) + // CreateAutoupdateConfig updates AutoupdateConfig singleton. + UpdateAutoupdateConfig(context.Context, *UpdateAutoupdateConfigRequest) (*AutoupdateConfig, error) + // UpsertAutoupdateConfig creates a new AutoupdateConfig or replaces an existing AutoupdateConfig. + UpsertAutoupdateConfig(context.Context, *UpsertAutoupdateConfigRequest) (*AutoupdateConfig, error) + // DeleteAutoupdateConfig hard deletes the specified AutoupdateConfig. + DeleteAutoupdateConfig(context.Context, *DeleteAutoupdateConfigRequest) (*emptypb.Empty, error) + // GetAutoupdateVersion gets the current autoupdate version singleton. + GetAutoupdateVersion(context.Context, *GetAutoupdateVersionRequest) (*AutoupdateVersion, error) + // CreateAutoupdateVersion creates a new AutoupdateVersion. + CreateAutoupdateVersion(context.Context, *CreateAutoupdateVersionRequest) (*AutoupdateVersion, error) + // UpdateAutoupdateVersion updates AutoupdateVersion singleton. + UpdateAutoupdateVersion(context.Context, *UpdateAutoupdateVersionRequest) (*AutoupdateVersion, error) + // UpsertAutoupdateVersion creates a new AutoupdateVersion or replaces an existing AutoupdateVersion. + UpsertAutoupdateVersion(context.Context, *UpsertAutoupdateVersionRequest) (*AutoupdateVersion, error) + // DeleteAutoupdateVersion hard deletes the specified AutoupdateVersionRequest. + DeleteAutoupdateVersion(context.Context, *DeleteAutoupdateVersionRequest) (*emptypb.Empty, error) + mustEmbedUnimplementedAutoupdateServiceServer() +} + +// UnimplementedAutoupdateServiceServer must be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedAutoupdateServiceServer struct{} + +func (UnimplementedAutoupdateServiceServer) GetAutoupdateConfig(context.Context, *GetAutoupdateConfigRequest) (*AutoupdateConfig, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetAutoupdateConfig not implemented") +} +func (UnimplementedAutoupdateServiceServer) CreateAutoupdateConfig(context.Context, *CreateAutoupdateConfigRequest) (*AutoupdateConfig, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateAutoupdateConfig not implemented") +} +func (UnimplementedAutoupdateServiceServer) UpdateAutoupdateConfig(context.Context, *UpdateAutoupdateConfigRequest) (*AutoupdateConfig, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateAutoupdateConfig not implemented") +} +func (UnimplementedAutoupdateServiceServer) UpsertAutoupdateConfig(context.Context, *UpsertAutoupdateConfigRequest) (*AutoupdateConfig, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpsertAutoupdateConfig not implemented") +} +func (UnimplementedAutoupdateServiceServer) DeleteAutoupdateConfig(context.Context, *DeleteAutoupdateConfigRequest) (*emptypb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteAutoupdateConfig not implemented") +} +func (UnimplementedAutoupdateServiceServer) GetAutoupdateVersion(context.Context, *GetAutoupdateVersionRequest) (*AutoupdateVersion, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetAutoupdateVersion not implemented") +} +func (UnimplementedAutoupdateServiceServer) CreateAutoupdateVersion(context.Context, *CreateAutoupdateVersionRequest) (*AutoupdateVersion, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateAutoupdateVersion not implemented") +} +func (UnimplementedAutoupdateServiceServer) UpdateAutoupdateVersion(context.Context, *UpdateAutoupdateVersionRequest) (*AutoupdateVersion, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateAutoupdateVersion not implemented") +} +func (UnimplementedAutoupdateServiceServer) UpsertAutoupdateVersion(context.Context, *UpsertAutoupdateVersionRequest) (*AutoupdateVersion, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpsertAutoupdateVersion not implemented") +} +func (UnimplementedAutoupdateServiceServer) DeleteAutoupdateVersion(context.Context, *DeleteAutoupdateVersionRequest) (*emptypb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteAutoupdateVersion not implemented") +} +func (UnimplementedAutoupdateServiceServer) mustEmbedUnimplementedAutoupdateServiceServer() {} +func (UnimplementedAutoupdateServiceServer) testEmbeddedByValue() {} + +// UnsafeAutoupdateServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to AutoupdateServiceServer will +// result in compilation errors. +type UnsafeAutoupdateServiceServer interface { + mustEmbedUnimplementedAutoupdateServiceServer() +} + +func RegisterAutoupdateServiceServer(s grpc.ServiceRegistrar, srv AutoupdateServiceServer) { + // If the following call pancis, it indicates UnimplementedAutoupdateServiceServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } + s.RegisterService(&AutoupdateService_ServiceDesc, srv) +} + +func _AutoupdateService_GetAutoupdateConfig_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetAutoupdateConfigRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AutoupdateServiceServer).GetAutoupdateConfig(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: AutoupdateService_GetAutoupdateConfig_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AutoupdateServiceServer).GetAutoupdateConfig(ctx, req.(*GetAutoupdateConfigRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AutoupdateService_CreateAutoupdateConfig_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateAutoupdateConfigRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AutoupdateServiceServer).CreateAutoupdateConfig(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: AutoupdateService_CreateAutoupdateConfig_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AutoupdateServiceServer).CreateAutoupdateConfig(ctx, req.(*CreateAutoupdateConfigRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AutoupdateService_UpdateAutoupdateConfig_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateAutoupdateConfigRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AutoupdateServiceServer).UpdateAutoupdateConfig(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: AutoupdateService_UpdateAutoupdateConfig_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AutoupdateServiceServer).UpdateAutoupdateConfig(ctx, req.(*UpdateAutoupdateConfigRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AutoupdateService_UpsertAutoupdateConfig_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpsertAutoupdateConfigRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AutoupdateServiceServer).UpsertAutoupdateConfig(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: AutoupdateService_UpsertAutoupdateConfig_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AutoupdateServiceServer).UpsertAutoupdateConfig(ctx, req.(*UpsertAutoupdateConfigRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AutoupdateService_DeleteAutoupdateConfig_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteAutoupdateConfigRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AutoupdateServiceServer).DeleteAutoupdateConfig(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: AutoupdateService_DeleteAutoupdateConfig_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AutoupdateServiceServer).DeleteAutoupdateConfig(ctx, req.(*DeleteAutoupdateConfigRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AutoupdateService_GetAutoupdateVersion_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetAutoupdateVersionRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AutoupdateServiceServer).GetAutoupdateVersion(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: AutoupdateService_GetAutoupdateVersion_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AutoupdateServiceServer).GetAutoupdateVersion(ctx, req.(*GetAutoupdateVersionRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AutoupdateService_CreateAutoupdateVersion_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateAutoupdateVersionRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AutoupdateServiceServer).CreateAutoupdateVersion(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: AutoupdateService_CreateAutoupdateVersion_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AutoupdateServiceServer).CreateAutoupdateVersion(ctx, req.(*CreateAutoupdateVersionRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AutoupdateService_UpdateAutoupdateVersion_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateAutoupdateVersionRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AutoupdateServiceServer).UpdateAutoupdateVersion(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: AutoupdateService_UpdateAutoupdateVersion_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AutoupdateServiceServer).UpdateAutoupdateVersion(ctx, req.(*UpdateAutoupdateVersionRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AutoupdateService_UpsertAutoupdateVersion_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpsertAutoupdateVersionRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AutoupdateServiceServer).UpsertAutoupdateVersion(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: AutoupdateService_UpsertAutoupdateVersion_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AutoupdateServiceServer).UpsertAutoupdateVersion(ctx, req.(*UpsertAutoupdateVersionRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AutoupdateService_DeleteAutoupdateVersion_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteAutoupdateVersionRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AutoupdateServiceServer).DeleteAutoupdateVersion(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: AutoupdateService_DeleteAutoupdateVersion_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AutoupdateServiceServer).DeleteAutoupdateVersion(ctx, req.(*DeleteAutoupdateVersionRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// AutoupdateService_ServiceDesc is the grpc.ServiceDesc for AutoupdateService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var AutoupdateService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "teleport.autoupdate.v1.AutoupdateService", + HandlerType: (*AutoupdateServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "GetAutoupdateConfig", + Handler: _AutoupdateService_GetAutoupdateConfig_Handler, + }, + { + MethodName: "CreateAutoupdateConfig", + Handler: _AutoupdateService_CreateAutoupdateConfig_Handler, + }, + { + MethodName: "UpdateAutoupdateConfig", + Handler: _AutoupdateService_UpdateAutoupdateConfig_Handler, + }, + { + MethodName: "UpsertAutoupdateConfig", + Handler: _AutoupdateService_UpsertAutoupdateConfig_Handler, + }, + { + MethodName: "DeleteAutoupdateConfig", + Handler: _AutoupdateService_DeleteAutoupdateConfig_Handler, + }, + { + MethodName: "GetAutoupdateVersion", + Handler: _AutoupdateService_GetAutoupdateVersion_Handler, + }, + { + MethodName: "CreateAutoupdateVersion", + Handler: _AutoupdateService_CreateAutoupdateVersion_Handler, + }, + { + MethodName: "UpdateAutoupdateVersion", + Handler: _AutoupdateService_UpdateAutoupdateVersion_Handler, + }, + { + MethodName: "UpsertAutoupdateVersion", + Handler: _AutoupdateService_UpsertAutoupdateVersion_Handler, + }, + { + MethodName: "DeleteAutoupdateVersion", + Handler: _AutoupdateService_DeleteAutoupdateVersion_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "teleport/autoupdate/v1/autoupdate_service.proto", +} diff --git a/api/proto/teleport/autoupdate/v1/autoupdate.proto b/api/proto/teleport/autoupdate/v1/autoupdate.proto new file mode 100644 index 0000000000000..82619f7b5031a --- /dev/null +++ b/api/proto/teleport/autoupdate/v1/autoupdate.proto @@ -0,0 +1,55 @@ +// Copyright 2024 Gravitational, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package teleport.autoupdate.v1; + +import "teleport/header/v1/metadata.proto"; + +option go_package = "github.com/gravitational/teleport/api/gen/proto/go/teleport/autoupdate/v1;autoupdate"; + +// AutoupdateConfig is a config singleton used to configure cluster +// autoupdate settings. +message AutoupdateConfig { + string kind = 1; + string sub_kind = 2; + string version = 3; + teleport.header.v1.Metadata metadata = 4; + + AutoupdateConfigSpec spec = 5; +} + +// AutoupdateConfigSpec encodes the parameters of the autoupdate config object. +message AutoupdateConfigSpec { + // ToolsAutoupdate encodes the feature flag to enable/disable tools autoupdates. + bool tools_autoupdate = 1; +} + +// AutoupdateVersion is a resource singleton with version required for +// tools autoupdate. +message AutoupdateVersion { + string kind = 1; + string sub_kind = 2; + string version = 3; + teleport.header.v1.Metadata metadata = 4; + + AutoupdateVersionSpec spec = 5; +} + +// AutoupdateVersionSpec encodes the parameters of the autoupdate versions. +message AutoupdateVersionSpec { + // ToolsVersion is the semantic version required for tools autoupdates. + string tools_version = 1; +} diff --git a/api/proto/teleport/autoupdate/v1/autoupdate_service.proto b/api/proto/teleport/autoupdate/v1/autoupdate_service.proto new file mode 100644 index 0000000000000..75cabbd4dc973 --- /dev/null +++ b/api/proto/teleport/autoupdate/v1/autoupdate_service.proto @@ -0,0 +1,97 @@ +// Copyright 2024 Gravitational, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package teleport.autoupdate.v1; + +import "google/protobuf/empty.proto"; +import "teleport/autoupdate/v1/autoupdate.proto"; + +option go_package = "github.com/gravitational/teleport/api/gen/proto/go/teleport/autoupdate/v1;autoupdate"; + +// AutoupdateService provides an API to manage autoupdates. +service AutoupdateService { + // GetAutoupdateConfig gets the current autoupdate config singleton. + rpc GetAutoupdateConfig(GetAutoupdateConfigRequest) returns (AutoupdateConfig); + + // CreateAutoupdateConfig creates a new AutoupdateConfig. + rpc CreateAutoupdateConfig(CreateAutoupdateConfigRequest) returns (AutoupdateConfig); + + // CreateAutoupdateConfig updates AutoupdateConfig singleton. + rpc UpdateAutoupdateConfig(UpdateAutoupdateConfigRequest) returns (AutoupdateConfig); + + // UpsertAutoupdateConfig creates a new AutoupdateConfig or replaces an existing AutoupdateConfig. + rpc UpsertAutoupdateConfig(UpsertAutoupdateConfigRequest) returns (AutoupdateConfig); + + // DeleteAutoupdateConfig hard deletes the specified AutoupdateConfig. + rpc DeleteAutoupdateConfig(DeleteAutoupdateConfigRequest) returns (google.protobuf.Empty); + + // GetAutoupdateVersion gets the current autoupdate version singleton. + rpc GetAutoupdateVersion(GetAutoupdateVersionRequest) returns (AutoupdateVersion); + + // CreateAutoupdateVersion creates a new AutoupdateVersion. + rpc CreateAutoupdateVersion(CreateAutoupdateVersionRequest) returns (AutoupdateVersion); + + // UpdateAutoupdateVersion updates AutoupdateVersion singleton. + rpc UpdateAutoupdateVersion(UpdateAutoupdateVersionRequest) returns (AutoupdateVersion); + + // UpsertAutoupdateVersion creates a new AutoupdateVersion or replaces an existing AutoupdateVersion. + rpc UpsertAutoupdateVersion(UpsertAutoupdateVersionRequest) returns (AutoupdateVersion); + + // DeleteAutoupdateVersion hard deletes the specified AutoupdateVersionRequest. + rpc DeleteAutoupdateVersion(DeleteAutoupdateVersionRequest) returns (google.protobuf.Empty); +} + +// Request for GetAutoupdateConfig. +message GetAutoupdateConfigRequest {} + +// Request for CreateAutoupdateConfig. +message CreateAutoupdateConfigRequest { + AutoupdateConfig config = 1; +} + +// Request for UpdateAutoupdateConfig. +message UpdateAutoupdateConfigRequest { + AutoupdateConfig config = 1; +} + +// Request for UpsertAutoupdateConfig. +message UpsertAutoupdateConfigRequest { + AutoupdateConfig config = 1; +} + +// Request for DeleteAutoupdateConfig. +message DeleteAutoupdateConfigRequest {} + +// Request for GetAutoupdateVersion. +message GetAutoupdateVersionRequest {} + +// Request for CreateAutoupdateVersion. +message CreateAutoupdateVersionRequest { + AutoupdateVersion version = 1; +} + +// Request for UpdateAutoupdateConfig. +message UpdateAutoupdateVersionRequest { + AutoupdateVersion version = 1; +} + +// Request for UpsertAutoupdateVersion. +message UpsertAutoupdateVersionRequest { + AutoupdateVersion version = 1; +} + +// Request for DeleteAutoupdateVersion. +message DeleteAutoupdateVersionRequest {} diff --git a/api/proto/teleport/legacy/client/proto/event.proto b/api/proto/teleport/legacy/client/proto/event.proto index 0eeb67fd4492e..d7d68a70556f4 100644 --- a/api/proto/teleport/legacy/client/proto/event.proto +++ b/api/proto/teleport/legacy/client/proto/event.proto @@ -18,6 +18,7 @@ package proto; import "teleport/accesslist/v1/accesslist.proto"; import "teleport/accessmonitoringrules/v1/access_monitoring_rules.proto"; +import "teleport/autoupdate/v1/autoupdate.proto"; import "teleport/clusterconfig/v1/access_graph_settings.proto"; import "teleport/crownjewel/v1/crownjewel.proto"; import "teleport/dbobject/v1/dbobject.proto"; @@ -177,5 +178,9 @@ message Event { teleport.machineid.v1.SPIFFEFederation SPIFFEFederation = 62; // StaticHostUser is a resource for static host users. teleport.userprovisioning.v1.StaticHostUser StaticHostUser = 63; + // AutoupdateConfig is a resource for autoupdate config. + teleport.autoupdate.v1.AutoupdateConfig AutoupdateConfig = 64; + // AutoupdateVersion is a resource for autoupdate version. + teleport.autoupdate.v1.AutoupdateVersion AutoupdateVersion = 65; } } diff --git a/api/types/autoupdate/config.go b/api/types/autoupdate/config.go new file mode 100644 index 0000000000000..16578e419acb1 --- /dev/null +++ b/api/types/autoupdate/config.go @@ -0,0 +1,60 @@ +/* + * Teleport + * Copyright (C) 2024 Gravitational, Inc. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package autoupdate + +import ( + "github.com/gravitational/trace" + + "github.com/gravitational/teleport/api/gen/proto/go/teleport/autoupdate/v1" + headerv1 "github.com/gravitational/teleport/api/gen/proto/go/teleport/header/v1" + "github.com/gravitational/teleport/api/types" +) + +// NewAutoupdateConfig creates a new autoupdate configuration resource. +func NewAutoupdateConfig(spec *autoupdate.AutoupdateConfigSpec) (*autoupdate.AutoupdateConfig, error) { + config := &autoupdate.AutoupdateConfig{ + Kind: types.KindAutoupdateConfig, + Version: types.V1, + Metadata: &headerv1.Metadata{ + Name: types.MetaNameAutoupdateConfig, + }, + Spec: spec, + } + if err := ValidateAutoupdateConfig(config); err != nil { + return nil, trace.Wrap(err) + } + + return config, nil +} + +// ValidateAutoupdateConfig checks that required parameters are set +// for the specified AutoupdateConfig. +func ValidateAutoupdateConfig(c *autoupdate.AutoupdateConfig) error { + if c == nil { + return trace.BadParameter("AutoupdateConfig is nil") + } + if c.Metadata == nil { + return trace.BadParameter("Metadata is nil") + } + if c.Spec == nil { + return trace.BadParameter("Spec is nil") + } + + return nil +} diff --git a/api/types/autoupdate/config_test.go b/api/types/autoupdate/config_test.go new file mode 100644 index 0000000000000..25a5079a3b6c1 --- /dev/null +++ b/api/types/autoupdate/config_test.go @@ -0,0 +1,94 @@ +/* + * Teleport + * Copyright (C) 2024 Gravitational, Inc. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package autoupdate + +import ( + "testing" + + "github.com/google/go-cmp/cmp" + "github.com/stretchr/testify/require" + "google.golang.org/protobuf/testing/protocmp" + + "github.com/gravitational/teleport/api/gen/proto/go/teleport/autoupdate/v1" + headerv1 "github.com/gravitational/teleport/api/gen/proto/go/teleport/header/v1" + "github.com/gravitational/teleport/api/types" +) + +// TestNewAutoupdateConfig verifies validation for autoupdate config resource. +func TestNewAutoupdateConfig(t *testing.T) { + tests := []struct { + name string + spec *autoupdate.AutoupdateConfigSpec + want *autoupdate.AutoupdateConfig + assertErr func(*testing.T, error, ...any) + }{ + { + name: "success tools autoupdate disabled", + spec: &autoupdate.AutoupdateConfigSpec{ + ToolsAutoupdate: false, + }, + assertErr: func(t *testing.T, err error, a ...any) { + require.NoError(t, err) + }, + want: &autoupdate.AutoupdateConfig{ + Kind: types.KindAutoupdateConfig, + Version: types.V1, + Metadata: &headerv1.Metadata{ + Name: types.MetaNameAutoupdateConfig, + }, + Spec: &autoupdate.AutoupdateConfigSpec{ + ToolsAutoupdate: false, + }, + }, + }, + { + name: "success tools autoupdate enabled", + spec: &autoupdate.AutoupdateConfigSpec{ + ToolsAutoupdate: true, + }, + assertErr: func(t *testing.T, err error, a ...any) { + require.NoError(t, err) + }, + want: &autoupdate.AutoupdateConfig{ + Kind: types.KindAutoupdateConfig, + Version: types.V1, + Metadata: &headerv1.Metadata{ + Name: types.MetaNameAutoupdateConfig, + }, + Spec: &autoupdate.AutoupdateConfigSpec{ + ToolsAutoupdate: true, + }, + }, + }, + { + name: "invalid spec", + spec: nil, + assertErr: func(t *testing.T, err error, a ...any) { + require.ErrorContains(t, err, "Spec is nil") + }, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + got, err := NewAutoupdateConfig(tt.spec) + tt.assertErr(t, err) + require.Empty(t, cmp.Diff(got, tt.want, protocmp.Transform())) + }) + } +} diff --git a/api/types/autoupdate/version.go b/api/types/autoupdate/version.go new file mode 100644 index 0000000000000..a9a445c8f3bf8 --- /dev/null +++ b/api/types/autoupdate/version.go @@ -0,0 +1,67 @@ +/* + * Teleport + * Copyright (C) 2024 Gravitational, Inc. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package autoupdate + +import ( + "github.com/coreos/go-semver/semver" + "github.com/gravitational/trace" + + "github.com/gravitational/teleport/api/gen/proto/go/teleport/autoupdate/v1" + headerv1 "github.com/gravitational/teleport/api/gen/proto/go/teleport/header/v1" + "github.com/gravitational/teleport/api/types" +) + +// NewAutoupdateVersion creates a new autoupdate version resource. +func NewAutoupdateVersion(spec *autoupdate.AutoupdateVersionSpec) (*autoupdate.AutoupdateVersion, error) { + version := &autoupdate.AutoupdateVersion{ + Kind: types.KindAutoupdateVersion, + Version: types.V1, + Metadata: &headerv1.Metadata{ + Name: types.MetaNameAutoupdateVersion, + }, + Spec: spec, + } + if err := ValidateAutoupdateVersion(version); err != nil { + return nil, trace.Wrap(err) + } + + return version, nil +} + +// ValidateAutoupdateVersion checks that required parameters are set +// for the specified AutoupdateVersion. +func ValidateAutoupdateVersion(v *autoupdate.AutoupdateVersion) error { + if v == nil { + return trace.BadParameter("AutoupdateVersion is nil") + } + if v.Metadata == nil { + return trace.BadParameter("Metadata is nil") + } + if v.Spec == nil { + return trace.BadParameter("Spec is nil") + } + + if v.Spec.ToolsVersion == "" { + return trace.BadParameter("ToolsVersion is unset") + } else if _, err := semver.NewVersion(v.Spec.ToolsVersion); err != nil { + return trace.BadParameter("ToolsVersion is not a valid semantic version") + } + + return nil +} diff --git a/api/types/autoupdate/version_test.go b/api/types/autoupdate/version_test.go new file mode 100644 index 0000000000000..df21d64abbd98 --- /dev/null +++ b/api/types/autoupdate/version_test.go @@ -0,0 +1,93 @@ +/* + * Teleport + * Copyright (C) 2024 Gravitational, Inc. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package autoupdate + +import ( + "testing" + + "github.com/google/go-cmp/cmp" + "github.com/stretchr/testify/require" + "google.golang.org/protobuf/testing/protocmp" + + "github.com/gravitational/teleport/api/gen/proto/go/teleport/autoupdate/v1" + headerv1 "github.com/gravitational/teleport/api/gen/proto/go/teleport/header/v1" + "github.com/gravitational/teleport/api/types" +) + +// TestNewAutoupdateVersion verifies validation for autoupdate version resource. +func TestNewAutoupdateVersion(t *testing.T) { + tests := []struct { + name string + spec *autoupdate.AutoupdateVersionSpec + want *autoupdate.AutoupdateVersion + assertErr func(*testing.T, error, ...any) + }{ + { + name: "success tools autoupdate version", + spec: &autoupdate.AutoupdateVersionSpec{ + ToolsVersion: "1.2.3-dev", + }, + assertErr: func(t *testing.T, err error, a ...any) { + require.NoError(t, err) + }, + want: &autoupdate.AutoupdateVersion{ + Kind: types.KindAutoupdateVersion, + Version: types.V1, + Metadata: &headerv1.Metadata{ + Name: types.MetaNameAutoupdateVersion, + }, + Spec: &autoupdate.AutoupdateVersionSpec{ + ToolsVersion: "1.2.3-dev", + }, + }, + }, + { + name: "invalid empty tools version", + spec: &autoupdate.AutoupdateVersionSpec{ + ToolsVersion: "", + }, + assertErr: func(t *testing.T, err error, a ...any) { + require.ErrorContains(t, err, "ToolsVersion is unset") + }, + }, + { + name: "invalid semantic tools version", + spec: &autoupdate.AutoupdateVersionSpec{ + ToolsVersion: "17-0-0", + }, + assertErr: func(t *testing.T, err error, a ...any) { + require.ErrorContains(t, err, "ToolsVersion is not a valid semantic version") + }, + }, + { + name: "invalid spec", + spec: nil, + assertErr: func(t *testing.T, err error, a ...any) { + require.ErrorContains(t, err, "Spec is nil") + }, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + got, err := NewAutoupdateVersion(tt.spec) + tt.assertErr(t, err) + require.Empty(t, cmp.Diff(got, tt.want, protocmp.Transform())) + }) + } +} diff --git a/api/types/constants.go b/api/types/constants.go index 3c5ed81f4ace3..f77fbef18fb73 100644 --- a/api/types/constants.go +++ b/api/types/constants.go @@ -320,6 +320,18 @@ const ( // alternative to their individual resource kinds. KindClusterConfig = "cluster_config" + // KindAutoupdateConfig is the resource with autoupdate configuration. + KindAutoupdateConfig = "autoupdate_config" + + // KindAutoupdateVersion is the resource with autoupdate versions. + KindAutoupdateVersion = "autoupdate_version" + + // MetaNameAutoupdateConfig is the name of a configuration resource for autoupdate config. + MetaNameAutoupdateConfig = "autoupdate-config" + + // MetaNameAutoupdateVersion is the name of a resource for autoupdate version. + MetaNameAutoupdateVersion = "autoupdate-version" + // KindClusterAuditConfig is the resource that holds cluster audit configuration. KindClusterAuditConfig = "cluster_audit_config" diff --git a/lib/auth/accesspoint/accesspoint.go b/lib/auth/accesspoint/accesspoint.go index 9fadf17ee8467..8d93215621f42 100644 --- a/lib/auth/accesspoint/accesspoint.go +++ b/lib/auth/accesspoint/accesspoint.go @@ -103,6 +103,7 @@ type Config struct { WebSession types.WebSessionInterface WebToken types.WebTokenInterface WindowsDesktops services.WindowsDesktops + AutoupdateService services.AutoupdateServiceGetter } func (c *Config) CheckAndSetDefaults() error { @@ -167,6 +168,7 @@ func NewCache(cfg Config) (*cache.Cache, error) { AppSession: cfg.AppSession, Apps: cfg.Apps, ClusterConfig: cfg.ClusterConfig, + AutoupdateService: cfg.AutoupdateService, CrownJewels: cfg.CrownJewels, DatabaseObjects: cfg.DatabaseObjects, DatabaseServices: cfg.DatabaseServices, diff --git a/lib/auth/auth.go b/lib/auth/auth.go index 702d3102721fc..ac1cce5bf5850 100644 --- a/lib/auth/auth.go +++ b/lib/auth/auth.go @@ -199,6 +199,12 @@ func NewServer(cfg *InitConfig, opts ...ServerOption) (*Server, error) { } cfg.ClusterConfiguration = clusterConfig } + if cfg.AutoupdateService == nil { + cfg.AutoupdateService, err = local.NewAutoupdateService(cfg.Backend) + if err != nil { + return nil, trace.Wrap(err) + } + } if cfg.Restrictions == nil { cfg.Restrictions = local.NewRestrictionsService(cfg.Backend) } @@ -411,6 +417,7 @@ func NewServer(cfg *InitConfig, opts ...ServerOption) (*Server, error) { Access: cfg.Access, DynamicAccessExt: cfg.DynamicAccessExt, ClusterConfiguration: cfg.ClusterConfiguration, + AutoupdateService: cfg.AutoupdateService, Restrictions: cfg.Restrictions, Apps: cfg.Apps, Kubernetes: cfg.Kubernetes, @@ -640,6 +647,7 @@ type Services struct { services.DevicesGetter services.SPIFFEFederations services.StaticHostUser + services.AutoupdateService } // GetWebSession returns existing web session described by req. diff --git a/lib/auth/authclient/api.go b/lib/auth/authclient/api.go index b4a3fd3479e65..38c344f72a323 100644 --- a/lib/auth/authclient/api.go +++ b/lib/auth/authclient/api.go @@ -28,6 +28,7 @@ import ( "github.com/gravitational/teleport/api/client/proto" accessmonitoringrules "github.com/gravitational/teleport/api/gen/proto/go/teleport/accessmonitoringrules/v1" + "github.com/gravitational/teleport/api/gen/proto/go/teleport/autoupdate/v1" clusterconfigpb "github.com/gravitational/teleport/api/gen/proto/go/teleport/clusterconfig/v1" crownjewelv1 "github.com/gravitational/teleport/api/gen/proto/go/teleport/crownjewel/v1" integrationpb "github.com/gravitational/teleport/api/gen/proto/go/teleport/integration/v1" @@ -306,6 +307,12 @@ type ReadProxyAccessPoint interface { // GetUserGroup returns the specified user group resources. GetUserGroup(ctx context.Context, name string) (types.UserGroup, error) + + // GetAutoupdateConfig gets the autoupdate config from the backend. + GetAutoupdateConfig(ctx context.Context) (*autoupdate.AutoupdateConfig, error) + + // GetAutoupdateVersion gets the autoupdate version from the backend. + GetAutoupdateVersion(ctx context.Context) (*autoupdate.AutoupdateVersion, error) } // SnowflakeSessionWatcher is watcher interface used by Snowflake web session watcher. @@ -1176,6 +1183,9 @@ type Cache interface { // DatabaseObjectsGetter defines methods for fetching database objects. services.DatabaseObjectsGetter + // AutoupdateServiceGetter defines method for fetching the autoupdate config and version resources. + services.AutoupdateServiceGetter + // GetAccessGraphSettings returns the access graph settings. GetAccessGraphSettings(context.Context) (*clusterconfigpb.AccessGraphSettings, error) diff --git a/lib/auth/authclient/clt.go b/lib/auth/authclient/clt.go index d4d00afc70cf9..8ad46f801337f 100644 --- a/lib/auth/authclient/clt.go +++ b/lib/auth/authclient/clt.go @@ -31,6 +31,7 @@ import ( "golang.org/x/crypto/ssh" "github.com/gravitational/teleport/api/client" + "github.com/gravitational/teleport/api/client/autoupdate" "github.com/gravitational/teleport/api/client/crownjewel" "github.com/gravitational/teleport/api/client/databaseobject" "github.com/gravitational/teleport/api/client/externalauditstorage" @@ -1525,6 +1526,7 @@ type ClientI interface { WebService services.Status services.ClusterConfiguration + services.AutoupdateServiceGetter services.SessionTrackerService services.ConnectionsDiagnostic services.SAMLIdPSession @@ -1777,6 +1779,9 @@ type ClientI interface { // will return "not implemented" errors (as per the default gRPC behavior). StaticHostUserClient() services.StaticHostUser + // AutoupdateServiceClient returns a Autoupdate service client. + AutoupdateServiceClient() *autoupdate.Client + // CloneHTTPClient creates a new HTTP client with the same configuration. CloneHTTPClient(params ...roundtrip.ClientParam) (*HTTPClient, error) diff --git a/lib/auth/autoupdate/v1/service.go b/lib/auth/autoupdate/v1/service.go new file mode 100644 index 0000000000000..5d39baf340f4f --- /dev/null +++ b/lib/auth/autoupdate/v1/service.go @@ -0,0 +1,244 @@ +/* + * Teleport + * Copyright (C) 2024 Gravitational, Inc. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package autoupdate + +import ( + "context" + + "github.com/gravitational/trace" + "google.golang.org/protobuf/types/known/emptypb" + + "github.com/gravitational/teleport/api/gen/proto/go/teleport/autoupdate/v1" + "github.com/gravitational/teleport/api/types" + "github.com/gravitational/teleport/lib/authz" + "github.com/gravitational/teleport/lib/services" +) + +// ServiceConfig holds configuration options for the autoupdate gRPC service. +type ServiceConfig struct { + // Authorizer is the authorizer used to check access to resources. + Authorizer authz.Authorizer + // Backend is the backend used to store autoupdate resources. + Backend services.AutoupdateService + // Cache is the cache used to store autoupdate resources. + Cache services.AutoupdateServiceGetter +} + +// Service implements the gRPC API layer for the Autoupdate. +type Service struct { + // Opting out of forward compatibility, this service must implement all service methods. + autoupdate.UnsafeAutoupdateServiceServer + + authorizer authz.Authorizer + backend services.AutoupdateService + cache services.AutoupdateServiceGetter +} + +// NewService returns a new Autoupdate API service using the given storage layer and authorizer. +func NewService(cfg ServiceConfig) (*Service, error) { + switch { + case cfg.Backend == nil: + return nil, trace.BadParameter("backend is required") + case cfg.Authorizer == nil: + return nil, trace.BadParameter("authorizer is required") + case cfg.Cache == nil: + return nil, trace.BadParameter("cache is required") + } + return &Service{ + authorizer: cfg.Authorizer, + backend: cfg.Backend, + cache: cfg.Cache, + }, nil +} + +// GetAutoupdateConfig gets the current autoupdate config singleton. +func (s *Service) GetAutoupdateConfig(ctx context.Context, req *autoupdate.GetAutoupdateConfigRequest) (*autoupdate.AutoupdateConfig, error) { + config, err := s.cache.GetAutoupdateConfig(ctx) + if err != nil { + return nil, trace.Wrap(err) + } + + return config, nil +} + +// CreateAutoupdateConfig creates autoupdate config singleton. +func (s *Service) CreateAutoupdateConfig(ctx context.Context, req *autoupdate.CreateAutoupdateConfigRequest) (*autoupdate.AutoupdateConfig, error) { + authCtx, err := s.authorizer.Authorize(ctx) + if err != nil { + return nil, trace.Wrap(err) + } + + if err := authCtx.CheckAccessToKind(types.KindAutoupdateConfig, types.VerbCreate); err != nil { + return nil, trace.Wrap(err) + } + + if err := authCtx.AuthorizeAdminActionAllowReusedMFA(); err != nil { + return nil, trace.Wrap(err) + } + + config, err := s.backend.CreateAutoupdateConfig(ctx, req.Config) + return config, trace.Wrap(err) +} + +// UpdateAutoupdateConfig updates autoupdate config singleton. +func (s *Service) UpdateAutoupdateConfig(ctx context.Context, req *autoupdate.UpdateAutoupdateConfigRequest) (*autoupdate.AutoupdateConfig, error) { + authCtx, err := s.authorizer.Authorize(ctx) + if err != nil { + return nil, trace.Wrap(err) + } + + if err := authCtx.CheckAccessToKind(types.KindAutoupdateConfig, types.VerbUpdate); err != nil { + return nil, trace.Wrap(err) + } + + if err := authCtx.AuthorizeAdminActionAllowReusedMFA(); err != nil { + return nil, trace.Wrap(err) + } + + config, err := s.backend.UpdateAutoupdateConfig(ctx, req.Config) + return config, trace.Wrap(err) +} + +// UpsertAutoupdateConfig updates or creates autoupdate config singleton. +func (s *Service) UpsertAutoupdateConfig(ctx context.Context, req *autoupdate.UpsertAutoupdateConfigRequest) (*autoupdate.AutoupdateConfig, error) { + authCtx, err := s.authorizer.Authorize(ctx) + if err != nil { + return nil, trace.Wrap(err) + } + + if err := authCtx.CheckAccessToKind(types.KindAutoupdateConfig, types.VerbCreate, types.VerbUpdate); err != nil { + return nil, trace.Wrap(err) + } + + if err := authCtx.AuthorizeAdminActionAllowReusedMFA(); err != nil { + return nil, trace.Wrap(err) + } + + config, err := s.backend.UpsertAutoupdateConfig(ctx, req.Config) + return config, trace.Wrap(err) +} + +// DeleteAutoupdateConfig deletes autoupdate config singleton. +func (s *Service) DeleteAutoupdateConfig(ctx context.Context, req *autoupdate.DeleteAutoupdateConfigRequest) (*emptypb.Empty, error) { + authCtx, err := s.authorizer.Authorize(ctx) + if err != nil { + return nil, trace.Wrap(err) + } + + if err := authCtx.CheckAccessToKind(types.KindAutoupdateConfig, types.VerbDelete); err != nil { + return nil, trace.Wrap(err) + } + + if err := authCtx.AuthorizeAdminAction(); err != nil { + return nil, trace.Wrap(err) + } + + if err := s.backend.DeleteAutoupdateConfig(ctx); err != nil { + return nil, trace.Wrap(err) + } + return &emptypb.Empty{}, nil +} + +// GetAutoupdateVersion gets the current autoupdate version singleton. +func (s *Service) GetAutoupdateVersion(ctx context.Context, req *autoupdate.GetAutoupdateVersionRequest) (*autoupdate.AutoupdateVersion, error) { + version, err := s.cache.GetAutoupdateVersion(ctx) + if err != nil { + return nil, trace.Wrap(err) + } + + return version, nil +} + +// CreateAutoupdateVersion creates autoupdate version singleton. +func (s *Service) CreateAutoupdateVersion(ctx context.Context, req *autoupdate.CreateAutoupdateVersionRequest) (*autoupdate.AutoupdateVersion, error) { + authCtx, err := s.authorizer.Authorize(ctx) + if err != nil { + return nil, trace.Wrap(err) + } + + if err := authCtx.CheckAccessToKind(types.KindAutoupdateVersion, types.VerbCreate); err != nil { + return nil, trace.Wrap(err) + } + + if err := authCtx.AuthorizeAdminActionAllowReusedMFA(); err != nil { + return nil, trace.Wrap(err) + } + + autoupdateVersion, err := s.backend.CreateAutoupdateVersion(ctx, req.Version) + return autoupdateVersion, trace.Wrap(err) +} + +// UpdateAutoupdateVersion updates autoupdate version singleton. +func (s *Service) UpdateAutoupdateVersion(ctx context.Context, req *autoupdate.UpdateAutoupdateVersionRequest) (*autoupdate.AutoupdateVersion, error) { + authCtx, err := s.authorizer.Authorize(ctx) + if err != nil { + return nil, trace.Wrap(err) + } + + if err := authCtx.CheckAccessToKind(types.KindAutoupdateVersion, types.VerbUpdate); err != nil { + return nil, trace.Wrap(err) + } + + if err := authCtx.AuthorizeAdminActionAllowReusedMFA(); err != nil { + return nil, trace.Wrap(err) + } + + autoupdateVersion, err := s.backend.UpdateAutoupdateVersion(ctx, req.Version) + return autoupdateVersion, trace.Wrap(err) +} + +// UpsertAutoupdateVersion updates or creates autoupdate version singleton. +func (s *Service) UpsertAutoupdateVersion(ctx context.Context, req *autoupdate.UpsertAutoupdateVersionRequest) (*autoupdate.AutoupdateVersion, error) { + authCtx, err := s.authorizer.Authorize(ctx) + if err != nil { + return nil, trace.Wrap(err) + } + + if err := authCtx.CheckAccessToKind(types.KindAutoupdateVersion, types.VerbCreate, types.VerbUpdate); err != nil { + return nil, trace.Wrap(err) + } + + if err := authCtx.AuthorizeAdminActionAllowReusedMFA(); err != nil { + return nil, trace.Wrap(err) + } + + autoupdateVersion, err := s.backend.UpsertAutoupdateVersion(ctx, req.Version) + return autoupdateVersion, trace.Wrap(err) +} + +// DeleteAutoupdateVersion deletes autoupdate version singleton. +func (s *Service) DeleteAutoupdateVersion(ctx context.Context, req *autoupdate.DeleteAutoupdateVersionRequest) (*emptypb.Empty, error) { + authCtx, err := s.authorizer.Authorize(ctx) + if err != nil { + return nil, trace.Wrap(err) + } + + if err := authCtx.CheckAccessToKind(types.KindAutoupdateVersion, types.VerbDelete); err != nil { + return nil, trace.Wrap(err) + } + + if err := authCtx.AuthorizeAdminAction(); err != nil { + return nil, trace.Wrap(err) + } + + if err := s.backend.DeleteAutoupdateVersion(ctx); err != nil { + return nil, trace.Wrap(err) + } + return &emptypb.Empty{}, nil +} diff --git a/lib/auth/autoupdate/v1/service_test.go b/lib/auth/autoupdate/v1/service_test.go new file mode 100644 index 0000000000000..576625e147bb2 --- /dev/null +++ b/lib/auth/autoupdate/v1/service_test.go @@ -0,0 +1,270 @@ +// Teleport +// Copyright (C) 2024 Gravitational, Inc. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +package autoupdate + +import ( + "context" + "fmt" + "slices" + "testing" + + "github.com/gravitational/trace" + "github.com/stretchr/testify/require" + + "github.com/gravitational/teleport/api/gen/proto/go/teleport/autoupdate/v1" + "github.com/gravitational/teleport/api/types" + "github.com/gravitational/teleport/lib/authz" + "github.com/gravitational/teleport/lib/backend/memory" + "github.com/gravitational/teleport/lib/services" + "github.com/gravitational/teleport/lib/services/local" + "github.com/gravitational/teleport/lib/utils" +) + +var allAdminStates = map[authz.AdminActionAuthState]string{ + authz.AdminActionAuthUnauthorized: "Unauthorized", + authz.AdminActionAuthNotRequired: "NotRequired", + authz.AdminActionAuthMFAVerified: "MFAVerified", + authz.AdminActionAuthMFAVerifiedWithReuse: "MFAVerifiedWithReuse", +} + +func stateToString(state authz.AdminActionAuthState) string { + str, ok := allAdminStates[state] + if !ok { + return fmt.Sprintf("unknown(%v)", state) + } + return str +} + +// otherAdminStates returns all admin states except for those passed in +func otherAdminStates(states []authz.AdminActionAuthState) []authz.AdminActionAuthState { + var out []authz.AdminActionAuthState + for state := range allAdminStates { + found := slices.Index(states, state) != -1 + if !found { + out = append(out, state) + } + } + return out +} + +// callMethod calls a method with given name in the DatabaseObjectService service +func callMethod(t *testing.T, service *Service, method string) error { + for _, desc := range autoupdate.AutoupdateService_ServiceDesc.Methods { + if desc.MethodName == method { + _, err := desc.Handler(service, context.Background(), func(_ any) error { return nil }, nil) + return err + } + } + require.FailNow(t, "method %v not found", method) + panic("this line should never be reached: FailNow() should interrupt the test") +} + +func TestServiceAccess(t *testing.T) { + t.Parallel() + + testCases := []struct { + name string + allowedVerbs []string + allowedStates []authz.AdminActionAuthState + disallowedStates []authz.AdminActionAuthState + }{ + { + name: "CreateAutoupdateConfig", + allowedStates: []authz.AdminActionAuthState{ + authz.AdminActionAuthNotRequired, + authz.AdminActionAuthMFAVerified, + authz.AdminActionAuthMFAVerifiedWithReuse, + }, + allowedVerbs: []string{types.VerbCreate}, + }, + { + name: "UpdateAutoupdateConfig", + allowedStates: []authz.AdminActionAuthState{ + authz.AdminActionAuthNotRequired, + authz.AdminActionAuthMFAVerified, + authz.AdminActionAuthMFAVerifiedWithReuse, + }, + allowedVerbs: []string{types.VerbUpdate}, + }, + { + name: "UpsertAutoupdateConfig", + allowedStates: []authz.AdminActionAuthState{ + authz.AdminActionAuthNotRequired, + authz.AdminActionAuthMFAVerified, + authz.AdminActionAuthMFAVerifiedWithReuse, + }, + allowedVerbs: []string{types.VerbUpdate, types.VerbCreate}, + }, + { + name: "GetAutoupdateConfig", + allowedStates: []authz.AdminActionAuthState{}, + disallowedStates: []authz.AdminActionAuthState{}, + allowedVerbs: []string{types.VerbRead}, + }, + { + name: "DeleteAutoupdateConfig", + allowedStates: []authz.AdminActionAuthState{authz.AdminActionAuthNotRequired, authz.AdminActionAuthMFAVerified}, + allowedVerbs: []string{types.VerbDelete}, + }, + // Autoupdate version check. + { + name: "CreateAutoupdateVersion", + allowedStates: []authz.AdminActionAuthState{ + authz.AdminActionAuthNotRequired, + authz.AdminActionAuthMFAVerified, + authz.AdminActionAuthMFAVerifiedWithReuse, + }, + allowedVerbs: []string{types.VerbCreate}, + }, + { + name: "UpdateAutoupdateVersion", + allowedStates: []authz.AdminActionAuthState{ + authz.AdminActionAuthNotRequired, + authz.AdminActionAuthMFAVerified, + authz.AdminActionAuthMFAVerifiedWithReuse, + }, + allowedVerbs: []string{types.VerbUpdate}, + }, + { + name: "UpsertAutoupdateVersion", + allowedStates: []authz.AdminActionAuthState{ + authz.AdminActionAuthNotRequired, + authz.AdminActionAuthMFAVerified, + authz.AdminActionAuthMFAVerifiedWithReuse, + }, + allowedVerbs: []string{types.VerbUpdate, types.VerbCreate}, + }, + { + name: "GetAutoupdateVersion", + allowedStates: []authz.AdminActionAuthState{}, + disallowedStates: []authz.AdminActionAuthState{}, + allowedVerbs: []string{types.VerbRead}, + }, + { + name: "DeleteAutoupdateVersion", + allowedStates: []authz.AdminActionAuthState{authz.AdminActionAuthNotRequired, authz.AdminActionAuthMFAVerified}, + allowedVerbs: []string{types.VerbDelete}, + }, + } + + for _, tt := range testCases { + t.Run(tt.name, func(t *testing.T) { + // test the method with allowed admin states, each one separately. + t.Run("allowed admin states", func(t *testing.T) { + for _, state := range tt.allowedStates { + t.Run(stateToString(state), func(t *testing.T) { + for _, verbs := range utils.Combinations(tt.allowedVerbs) { + t.Run(fmt.Sprintf("verbs=%v", verbs), func(t *testing.T) { + service := newService(t, state, fakeChecker{allowedVerbs: verbs}) + err := callMethod(t, service, tt.name) + // expect access denied except with full set of verbs. + if len(verbs) == len(tt.allowedVerbs) { + require.False(t, trace.IsAccessDenied(err)) + } else { + require.True(t, trace.IsAccessDenied(err), "expected access denied for verbs %v, got err=%v", verbs, err) + } + }) + } + }) + } + }) + + // test the method with disallowed admin states; expect failures. + t.Run("disallowed admin states", func(t *testing.T) { + disallowedStates := otherAdminStates(tt.allowedStates) + if tt.disallowedStates != nil { + disallowedStates = tt.disallowedStates + } + for _, state := range disallowedStates { + t.Run(stateToString(state), func(t *testing.T) { + // it is enough to test against tt.allowedVerbs, + // this is the only different data point compared to the test cases above. + service := newService(t, state, fakeChecker{allowedVerbs: tt.allowedVerbs}) + err := callMethod(t, service, tt.name) + require.True(t, trace.IsAccessDenied(err)) + }) + } + }) + }) + } + + // verify that all declared methods have matching test cases + t.Run("verify coverage", func(t *testing.T) { + for _, method := range autoupdate.AutoupdateService_ServiceDesc.Methods { + t.Run(method.MethodName, func(t *testing.T) { + match := false + for _, testCase := range testCases { + match = match || testCase.name == method.MethodName + } + require.True(t, match, "method %v without coverage, no matching tests", method.MethodName) + }) + } + }) +} + +type fakeChecker struct { + allowedVerbs []string + services.AccessChecker +} + +func (f fakeChecker) CheckAccessToRule(_ services.RuleContext, _ string, resource string, verb string) error { + if resource == types.KindAutoupdateConfig || resource == types.KindAutoupdateVersion { + for _, allowedVerb := range f.allowedVerbs { + if allowedVerb == verb { + return nil + } + } + } + + return trace.AccessDenied("access denied to rule=%v/verb=%v", resource, verb) +} + +func newService(t *testing.T, authState authz.AdminActionAuthState, checker services.AccessChecker) *Service { + t.Helper() + + bk, err := memory.New(memory.Config{}) + require.NoError(t, err) + + storage, err := local.NewAutoupdateService(bk) + require.NoError(t, err) + + return newServiceWithStorage(t, authState, checker, storage) +} + +func newServiceWithStorage(t *testing.T, authState authz.AdminActionAuthState, checker services.AccessChecker, storage services.AutoupdateService) *Service { + t.Helper() + + authorizer := authz.AuthorizerFunc(func(ctx context.Context) (*authz.Context, error) { + user, err := types.NewUser("alice") + if err != nil { + return nil, err + } + return &authz.Context{ + User: user, + Checker: checker, + AdminActionAuthState: authState, + }, nil + }) + + service, err := NewService(ServiceConfig{ + Authorizer: authorizer, + Backend: storage, + Cache: storage, + }) + require.NoError(t, err) + return service +} diff --git a/lib/auth/grpcserver.go b/lib/auth/grpcserver.go index f580ddad37405..aeb577d931404 100644 --- a/lib/auth/grpcserver.go +++ b/lib/auth/grpcserver.go @@ -51,6 +51,7 @@ import ( "github.com/gravitational/teleport/api/constants" accessmonitoringrules "github.com/gravitational/teleport/api/gen/proto/go/teleport/accessmonitoringrules/v1" auditlogpb "github.com/gravitational/teleport/api/gen/proto/go/teleport/auditlog/v1" + "github.com/gravitational/teleport/api/gen/proto/go/teleport/autoupdate/v1" clusterconfigpb "github.com/gravitational/teleport/api/gen/proto/go/teleport/clusterconfig/v1" crownjewelpb "github.com/gravitational/teleport/api/gen/proto/go/teleport/crownjewel/v1" dbobjectpb "github.com/gravitational/teleport/api/gen/proto/go/teleport/dbobject/v1" @@ -78,6 +79,7 @@ import ( "github.com/gravitational/teleport/api/types/wrappers" "github.com/gravitational/teleport/lib/accessmonitoringrules/accessmonitoringrulesv1" "github.com/gravitational/teleport/lib/auth/authclient" + autoupdatev1 "github.com/gravitational/teleport/lib/auth/autoupdate/v1" "github.com/gravitational/teleport/lib/auth/clusterconfig/clusterconfigv1" "github.com/gravitational/teleport/lib/auth/crownjewel/crownjewelv1" "github.com/gravitational/teleport/lib/auth/dbobject/dbobjectv1" @@ -508,7 +510,6 @@ func WatchEvents(watch *authpb.Watch, stream WatchEvent, componentName string, a Kinds: watch.Kinds, AllowPartialSuccess: watch.AllowPartialSuccess, } - events, err := auth.NewStream(stream.Context(), servicesWatch) if err != nil { return trace.Wrap(err) @@ -5434,6 +5435,16 @@ func NewGRPCServer(cfg GRPCServerConfig) (*GRPCServer, error) { } userprovisioningpb.RegisterStaticHostUsersServiceServer(server, staticHostUserServer) + autoupdateServiceServer, err := autoupdatev1.NewService(autoupdatev1.ServiceConfig{ + Authorizer: cfg.Authorizer, + Backend: cfg.AuthServer.Services, + Cache: cfg.AuthServer.Cache, + }) + if err != nil { + return nil, trace.Wrap(err) + } + autoupdate.RegisterAutoupdateServiceServer(server, autoupdateServiceServer) + // Only register the service if this is an open source build. Enterprise builds // register the actual service via an auth plugin, if we register here then all // Enterprise builds would fail with a duplicate service registered error. diff --git a/lib/auth/helpers.go b/lib/auth/helpers.go index 5d4605c21dc1c..a4d580af61936 100644 --- a/lib/auth/helpers.go +++ b/lib/auth/helpers.go @@ -324,6 +324,7 @@ func NewTestAuthServer(cfg TestAuthServerConfig) (*TestAuthServer, error) { AppSession: svces.Identity, Apps: svces.Apps, ClusterConfig: svces.ClusterConfiguration, + AutoupdateService: svces.AutoupdateService, CrownJewels: svces.CrownJewels, DatabaseObjects: svces.DatabaseObjects, DatabaseServices: svces.DatabaseServices, diff --git a/lib/auth/init.go b/lib/auth/init.go index 974ae19f13cda..1a06b056b1eb7 100644 --- a/lib/auth/init.go +++ b/lib/auth/init.go @@ -158,6 +158,9 @@ type InitConfig struct { // ClusterConfiguration is a services that holds cluster wide configuration. ClusterConfiguration services.ClusterConfiguration + // AutoupdateService is a service of autoupdate configuration and version. + AutoupdateService services.AutoupdateService + // Restrictions is a service to access network restrictions, etc Restrictions services.Restrictions diff --git a/lib/authz/permissions.go b/lib/authz/permissions.go index fc16841e602c5..2b13e7c0cc7ae 100644 --- a/lib/authz/permissions.go +++ b/lib/authz/permissions.go @@ -913,6 +913,8 @@ func roleSpecForProxy(clusterName string) types.RoleSpecV6 { types.NewRule(types.KindSAMLIdPServiceProvider, services.RO()), types.NewRule(types.KindUserGroup, services.RO()), types.NewRule(types.KindClusterMaintenanceConfig, services.RO()), + types.NewRule(types.KindAutoupdateConfig, services.RO()), + types.NewRule(types.KindAutoupdateVersion, services.RO()), types.NewRule(types.KindIntegration, append(services.RO(), types.VerbUse)), types.NewRule(types.KindAuditQuery, services.RO()), types.NewRule(types.KindSecurityReport, services.RO()), diff --git a/lib/cache/cache.go b/lib/cache/cache.go index 9229996865a2e..f69a7d2881a05 100644 --- a/lib/cache/cache.go +++ b/lib/cache/cache.go @@ -38,6 +38,7 @@ import ( "github.com/gravitational/teleport/api/client/proto" apidefaults "github.com/gravitational/teleport/api/defaults" accessmonitoringrulesv1 "github.com/gravitational/teleport/api/gen/proto/go/teleport/accessmonitoringrules/v1" + "github.com/gravitational/teleport/api/gen/proto/go/teleport/autoupdate/v1" clusterconfigpb "github.com/gravitational/teleport/api/gen/proto/go/teleport/clusterconfig/v1" crownjewelv1 "github.com/gravitational/teleport/api/gen/proto/go/teleport/crownjewel/v1" dbobjectv1 "github.com/gravitational/teleport/api/gen/proto/go/teleport/dbobject/v1" @@ -185,6 +186,8 @@ func ForAuth(cfg Config) Config { {Kind: types.KindAccessGraphSettings}, {Kind: types.KindSPIFFEFederation}, {Kind: types.KindStaticHostUser}, + {Kind: types.KindAutoupdateVersion}, + {Kind: types.KindAutoupdateConfig}, } cfg.QueueSize = defaults.AuthQueueSize // We don't want to enable partial health for auth cache because auth uses an event stream @@ -237,6 +240,8 @@ func ForProxy(cfg Config) Config { {Kind: types.KindSecurityReport}, {Kind: types.KindSecurityReportState}, {Kind: types.KindKubeWaitingContainer}, + {Kind: types.KindAutoupdateConfig}, + {Kind: types.KindAutoupdateVersion}, } cfg.QueueSize = defaults.ProxyQueueSize return cfg @@ -491,6 +496,7 @@ type Cache struct { trustCache services.Trust clusterConfigCache services.ClusterConfiguration + autoupdateCache *local.AutoupdateService provisionerCache services.Provisioner usersCache services.UsersService accessCache services.Access @@ -639,6 +645,8 @@ type Config struct { Trust services.Trust // ClusterConfig is a cluster configuration service ClusterConfig services.ClusterConfiguration + // AutoupdateService is an autoupdate service. + AutoupdateService services.AutoupdateServiceGetter // Provisioner is a provisioning service Provisioner services.Provisioner // Users is a users service @@ -918,6 +926,12 @@ func New(config Config) (*Cache, error) { return nil, trace.Wrap(err) } + autoupdateCache, err := local.NewAutoupdateService(config.Backend) + if err != nil { + cancel() + return nil, trace.Wrap(err) + } + fanout := services.NewFanoutV2(services.FanoutV2Config{}) lowVolumeFanouts := make([]*services.FanoutV2, 0, config.FanoutShards) for i := 0; i < config.FanoutShards; i++ { @@ -956,6 +970,7 @@ func New(config Config) (*Cache, error) { fnCache: fnCache, trustCache: local.NewCAService(config.Backend), clusterConfigCache: clusterConfigCache, + autoupdateCache: autoupdateCache, provisionerCache: local.NewProvisioningService(config.Backend), usersCache: local.NewIdentityService(config.Backend), accessCache: local.NewAccessService(config.Backend), @@ -1881,6 +1896,52 @@ func (c *Cache) GetClusterName(opts ...services.MarshalOption) (types.ClusterNam return rg.reader.GetClusterName(opts...) } +// GetAutoupdateConfig gets the autoupdate config from the backend. +func (c *Cache) GetAutoupdateConfig(ctx context.Context) (*autoupdate.AutoupdateConfig, error) { + ctx, span := c.Tracer.Start(ctx, "cache/GetAutoupdateConfig") + defer span.End() + + rg, err := readCollectionCache(c, c.collections.autoupdateConfigs) + if err != nil { + return nil, trace.Wrap(err) + } + defer rg.Release() + if !rg.IsCacheRead() { + cachedConfig, err := utils.FnCacheGet(ctx, c.fnCache, clusterConfigCacheKey{"name"}, func(ctx context.Context) (*autoupdate.AutoupdateConfig, error) { + cfg, err := rg.reader.GetAutoupdateConfig(ctx) + return cfg, err + }) + if err != nil { + return nil, trace.Wrap(err) + } + return protobuf.Clone(cachedConfig).(*autoupdate.AutoupdateConfig), nil + } + return rg.reader.GetAutoupdateConfig(ctx) +} + +// GetAutoupdateVersion gets the autoupdate version from the backend. +func (c *Cache) GetAutoupdateVersion(ctx context.Context) (*autoupdate.AutoupdateVersion, error) { + ctx, span := c.Tracer.Start(ctx, "cache/GetAutoupdateVersion") + defer span.End() + + rg, err := readCollectionCache(c, c.collections.autoupdateVersions) + if err != nil { + return nil, trace.Wrap(err) + } + defer rg.Release() + if !rg.IsCacheRead() { + cachedVersion, err := utils.FnCacheGet(ctx, c.fnCache, clusterConfigCacheKey{"name"}, func(ctx context.Context) (*autoupdate.AutoupdateVersion, error) { + version, err := rg.reader.GetAutoupdateVersion(ctx) + return version, err + }) + if err != nil { + return nil, trace.Wrap(err) + } + return protobuf.Clone(cachedVersion).(*autoupdate.AutoupdateVersion), nil + } + return rg.reader.GetAutoupdateVersion(ctx) +} + func (c *Cache) GetUIConfig(ctx context.Context) (types.UIConfig, error) { ctx, span := c.Tracer.Start(ctx, "cache/GetUIConfig") defer span.End() diff --git a/lib/cache/cache_test.go b/lib/cache/cache_test.go index e3f8e43719635..5bdc56877a2b4 100644 --- a/lib/cache/cache_test.go +++ b/lib/cache/cache_test.go @@ -43,6 +43,7 @@ import ( "github.com/gravitational/teleport/api/client/proto" apidefaults "github.com/gravitational/teleport/api/defaults" accessmonitoringrulesv1 "github.com/gravitational/teleport/api/gen/proto/go/teleport/accessmonitoringrules/v1" + "github.com/gravitational/teleport/api/gen/proto/go/teleport/autoupdate/v1" clusterconfigpb "github.com/gravitational/teleport/api/gen/proto/go/teleport/clusterconfig/v1" crownjewelv1 "github.com/gravitational/teleport/api/gen/proto/go/teleport/crownjewel/v1" dbobjectv1 "github.com/gravitational/teleport/api/gen/proto/go/teleport/dbobject/v1" @@ -52,6 +53,7 @@ import ( userprovisioningpb "github.com/gravitational/teleport/api/gen/proto/go/teleport/userprovisioning/v1" "github.com/gravitational/teleport/api/types" "github.com/gravitational/teleport/api/types/accesslist" + update "github.com/gravitational/teleport/api/types/autoupdate" "github.com/gravitational/teleport/api/types/clusterconfig" "github.com/gravitational/teleport/api/types/discoveryconfig" "github.com/gravitational/teleport/api/types/header" @@ -130,6 +132,7 @@ type testPack struct { databaseObjects services.DatabaseObjects spiffeFederations *local.SPIFFEFederationService staticHostUsers services.StaticHostUser + autoupdateService services.AutoupdateService } // testFuncs are functions to support testing an object in a cache. @@ -358,6 +361,11 @@ func newPackWithoutCache(dir string, opts ...packOption) (*testPack, error) { } p.staticHostUsers = staticHostUserService + p.autoupdateService, err = local.NewAutoupdateService(p.backend) + if err != nil { + return nil, trace.Wrap(err) + } + return p, nil } @@ -406,6 +414,7 @@ func newPack(dir string, setupConfig func(c Config) Config, opts ...packOption) SPIFFEFederations: p.spiffeFederations, DatabaseObjects: p.databaseObjects, StaticHostUsers: p.staticHostUsers, + AutoupdateService: p.autoupdateService, MaxRetryPeriod: 200 * time.Millisecond, EventsC: p.eventsC, })) @@ -812,6 +821,7 @@ func TestCompletenessInit(t *testing.T) { DatabaseObjects: p.databaseObjects, SPIFFEFederations: p.spiffeFederations, StaticHostUsers: p.staticHostUsers, + AutoupdateService: p.autoupdateService, MaxRetryPeriod: 200 * time.Millisecond, EventsC: p.eventsC, })) @@ -891,6 +901,7 @@ func TestCompletenessReset(t *testing.T) { DatabaseObjects: p.databaseObjects, SPIFFEFederations: p.spiffeFederations, StaticHostUsers: p.staticHostUsers, + AutoupdateService: p.autoupdateService, MaxRetryPeriod: 200 * time.Millisecond, EventsC: p.eventsC, })) @@ -1096,6 +1107,7 @@ func TestListResources_NodesTTLVariant(t *testing.T) { DatabaseObjects: p.databaseObjects, SPIFFEFederations: p.spiffeFederations, StaticHostUsers: p.staticHostUsers, + AutoupdateService: p.autoupdateService, MaxRetryPeriod: 200 * time.Millisecond, EventsC: p.eventsC, neverOK: true, // ensure reads are never healthy @@ -1186,6 +1198,7 @@ func initStrategy(t *testing.T) { DatabaseObjects: p.databaseObjects, SPIFFEFederations: p.spiffeFederations, StaticHostUsers: p.staticHostUsers, + AutoupdateService: p.autoupdateService, MaxRetryPeriod: 200 * time.Millisecond, EventsC: p.eventsC, })) @@ -2659,6 +2672,72 @@ func TestDatabaseObjects(t *testing.T) { }) } +// TestAutoupdateConfig tests that CRUD operations on autoupdate config resource is +// replicated from the backend to the cache. +func TestAutoupdateConfig(t *testing.T) { + t.Parallel() + + p := newTestPack(t, ForAuth) + t.Cleanup(p.Close) + + testResources153(t, p, testFuncs153[*autoupdate.AutoupdateConfig]{ + newResource: func(name string) (*autoupdate.AutoupdateConfig, error) { + return newAutoupdateConfig(t), nil + }, + create: func(ctx context.Context, item *autoupdate.AutoupdateConfig) error { + _, err := p.autoupdateService.UpsertAutoupdateConfig(ctx, item) + return trace.Wrap(err) + }, + list: func(ctx context.Context) ([]*autoupdate.AutoupdateConfig, error) { + item, err := p.autoupdateService.GetAutoupdateConfig(ctx) + return []*autoupdate.AutoupdateConfig{item}, trace.Wrap(err) + }, + cacheList: func(ctx context.Context) ([]*autoupdate.AutoupdateConfig, error) { + item, err := p.cache.GetAutoupdateConfig(ctx) + if trace.IsNotFound(err) { + return nil, nil + } + return []*autoupdate.AutoupdateConfig{item}, trace.Wrap(err) + }, + deleteAll: func(ctx context.Context) error { + return trace.Wrap(p.autoupdateService.DeleteAutoupdateConfig(ctx)) + }, + }) +} + +// TestAutoupdateVersion tests that CRUD operations on autoupdate version resource is +// replicated from the backend to the cache. +func TestAutoupdateVersion(t *testing.T) { + t.Parallel() + + p := newTestPack(t, ForAuth) + t.Cleanup(p.Close) + + testResources153(t, p, testFuncs153[*autoupdate.AutoupdateVersion]{ + newResource: func(name string) (*autoupdate.AutoupdateVersion, error) { + return newAutoupdateVersion(t), nil + }, + create: func(ctx context.Context, item *autoupdate.AutoupdateVersion) error { + _, err := p.autoupdateService.UpsertAutoupdateVersion(ctx, item) + return trace.Wrap(err) + }, + list: func(ctx context.Context) ([]*autoupdate.AutoupdateVersion, error) { + item, err := p.autoupdateService.GetAutoupdateVersion(ctx) + return []*autoupdate.AutoupdateVersion{item}, trace.Wrap(err) + }, + cacheList: func(ctx context.Context) ([]*autoupdate.AutoupdateVersion, error) { + item, err := p.cache.GetAutoupdateVersion(ctx) + if trace.IsNotFound(err) { + return nil, nil + } + return []*autoupdate.AutoupdateVersion{item}, trace.Wrap(err) + }, + deleteAll: func(ctx context.Context) error { + return trace.Wrap(p.autoupdateService.DeleteAutoupdateVersion(ctx)) + }, + }) +} + // TestGlobalNotifications tests that CRUD operations on global notification resources are // replicated from the backend to the cache. func TestGlobalNotifications(t *testing.T) { @@ -3291,6 +3370,8 @@ func TestCacheWatchKindExistsInEvents(t *testing.T) { types.KindAccessGraphSettings: types.Resource153ToLegacy(newAccessGraphSettings(t)), types.KindSPIFFEFederation: types.Resource153ToLegacy(newSPIFFEFederation("test")), types.KindStaticHostUser: types.Resource153ToLegacy(newStaticHostUser(t, "test")), + types.KindAutoupdateConfig: types.Resource153ToLegacy(newAutoupdateConfig(t)), + types.KindAutoupdateVersion: types.Resource153ToLegacy(newAutoupdateVersion(t)), } for name, cfg := range cases { @@ -3828,6 +3909,26 @@ func newStaticHostUser(t *testing.T, name string) *userprovisioningpb.StaticHost }) } +func newAutoupdateConfig(t *testing.T) *autoupdate.AutoupdateConfig { + t.Helper() + + r, err := update.NewAutoupdateConfig(&autoupdate.AutoupdateConfigSpec{ + ToolsAutoupdate: true, + }) + require.NoError(t, err) + return r +} + +func newAutoupdateVersion(t *testing.T) *autoupdate.AutoupdateVersion { + t.Helper() + + r, err := update.NewAutoupdateVersion(&autoupdate.AutoupdateVersionSpec{ + ToolsVersion: "1.2.3", + }) + require.NoError(t, err) + return r +} + func withKeepalive[T any](fn func(context.Context, T) (*types.KeepAlive, error)) func(context.Context, T) error { return func(ctx context.Context, resource T) error { _, err := fn(ctx, resource) diff --git a/lib/cache/collections.go b/lib/cache/collections.go index 747ede4464b61..6670ca2c2dcf4 100644 --- a/lib/cache/collections.go +++ b/lib/cache/collections.go @@ -29,6 +29,7 @@ import ( "github.com/gravitational/teleport/api/client/proto" apidefaults "github.com/gravitational/teleport/api/defaults" accessmonitoringrulesv1 "github.com/gravitational/teleport/api/gen/proto/go/teleport/accessmonitoringrules/v1" + "github.com/gravitational/teleport/api/gen/proto/go/teleport/autoupdate/v1" clusterconfigpb "github.com/gravitational/teleport/api/gen/proto/go/teleport/clusterconfig/v1" crownjewelv1 "github.com/gravitational/teleport/api/gen/proto/go/teleport/crownjewel/v1" dbobjectv1 "github.com/gravitational/teleport/api/gen/proto/go/teleport/dbobject/v1" @@ -254,6 +255,8 @@ type cacheCollections struct { globalNotifications collectionReader[notificationGetter] accessMonitoringRules collectionReader[accessMonitoringRuleGetter] spiffeFederations collectionReader[SPIFFEFederationReader] + autoupdateConfigs collectionReader[autoupdateConfigGetter] + autoupdateVersions collectionReader[autoupdateVersionGetter] } // setupCollections returns a registry of collections. @@ -764,6 +767,24 @@ func setupCollections(c *Cache, watches []types.WatchKind) (*cacheCollections, e watch: watch, } collections.byKind[resourceKind] = collections.spiffeFederations + case types.KindAutoupdateConfig: + if c.AutoupdateService == nil { + return nil, trace.BadParameter("missing parameter AutoupdateService") + } + collections.autoupdateConfigs = &genericCollection[*autoupdate.AutoupdateConfig, autoupdateConfigGetter, autoupdateConfigExecutor]{ + cache: c, + watch: watch, + } + collections.byKind[resourceKind] = collections.autoupdateConfigs + case types.KindAutoupdateVersion: + if c.AutoupdateService == nil { + return nil, trace.BadParameter("missing parameter AutoupdateService") + } + collections.autoupdateVersions = &genericCollection[*autoupdate.AutoupdateVersion, autoupdateVersionGetter, autoupdateVersionExecutor]{ + cache: c, + watch: watch, + } + collections.byKind[resourceKind] = collections.autoupdateVersions default: return nil, trace.BadParameter("resource %q is not supported", watch.Kind) } @@ -1269,7 +1290,75 @@ type clusterNameGetter interface { GetClusterName(opts ...services.MarshalOption) (types.ClusterName, error) } -var _ executor[types.ClusterName, clusterNameGetter] = clusterNameExecutor{} +type autoupdateConfigExecutor struct{} + +func (autoupdateConfigExecutor) getAll(ctx context.Context, cache *Cache, loadSecrets bool) ([]*autoupdate.AutoupdateConfig, error) { + config, err := cache.AutoupdateService.GetAutoupdateConfig(ctx) + return []*autoupdate.AutoupdateConfig{config}, trace.Wrap(err) +} + +func (autoupdateConfigExecutor) upsert(ctx context.Context, cache *Cache, resource *autoupdate.AutoupdateConfig) error { + _, err := cache.autoupdateCache.UpsertAutoupdateConfig(ctx, resource) + return trace.Wrap(err) +} + +func (autoupdateConfigExecutor) deleteAll(ctx context.Context, cache *Cache) error { + return cache.autoupdateCache.DeleteAutoupdateConfig(ctx) +} + +func (autoupdateConfigExecutor) delete(ctx context.Context, cache *Cache, resource types.Resource) error { + return cache.autoupdateCache.DeleteAutoupdateConfig(ctx) +} + +func (autoupdateConfigExecutor) isSingleton() bool { return true } + +func (autoupdateConfigExecutor) getReader(cache *Cache, cacheOK bool) autoupdateConfigGetter { + if cacheOK { + return cache.autoupdateCache + } + return cache.Config.AutoupdateService +} + +type autoupdateConfigGetter interface { + GetAutoupdateConfig(ctx context.Context) (*autoupdate.AutoupdateConfig, error) +} + +var _ executor[*autoupdate.AutoupdateConfig, autoupdateConfigGetter] = autoupdateConfigExecutor{} + +type autoupdateVersionExecutor struct{} + +func (autoupdateVersionExecutor) getAll(ctx context.Context, cache *Cache, loadSecrets bool) ([]*autoupdate.AutoupdateVersion, error) { + version, err := cache.AutoupdateService.GetAutoupdateVersion(ctx) + return []*autoupdate.AutoupdateVersion{version}, trace.Wrap(err) +} + +func (autoupdateVersionExecutor) upsert(ctx context.Context, cache *Cache, resource *autoupdate.AutoupdateVersion) error { + _, err := cache.autoupdateCache.UpsertAutoupdateVersion(ctx, resource) + return trace.Wrap(err) +} + +func (autoupdateVersionExecutor) deleteAll(ctx context.Context, cache *Cache) error { + return cache.autoupdateCache.DeleteAutoupdateVersion(ctx) +} + +func (autoupdateVersionExecutor) delete(ctx context.Context, cache *Cache, resource types.Resource) error { + return cache.autoupdateCache.DeleteAutoupdateVersion(ctx) +} + +func (autoupdateVersionExecutor) isSingleton() bool { return true } + +func (autoupdateVersionExecutor) getReader(cache *Cache, cacheOK bool) autoupdateVersionGetter { + if cacheOK { + return cache.autoupdateCache + } + return cache.Config.AutoupdateService +} + +type autoupdateVersionGetter interface { + GetAutoupdateVersion(ctx context.Context) (*autoupdate.AutoupdateVersion, error) +} + +var _ executor[*autoupdate.AutoupdateVersion, autoupdateVersionGetter] = autoupdateVersionExecutor{} type userExecutor struct{} diff --git a/lib/service/service.go b/lib/service/service.go index a0d64bd5d958a..b4f2d387472de 100644 --- a/lib/service/service.go +++ b/lib/service/service.go @@ -2137,6 +2137,7 @@ func (process *TeleportProcess) initAuthService() error { VersionStorage: process.storage, Authority: cfg.Keygen, ClusterConfiguration: cfg.ClusterConfiguration, + AutoupdateService: cfg.AutoupdateService, ClusterAuditConfig: cfg.Auth.AuditConfig, ClusterNetworkingConfig: cfg.Auth.NetworkingConfig, SessionRecordingConfig: cfg.Auth.SessionRecordingConfig, @@ -2605,6 +2606,7 @@ func (process *TeleportProcess) newAccessCacheForServices(cfg accesspoint.Config cfg.WebSession = services.Identity.WebSessions() cfg.WebToken = services.Identity.WebTokens() cfg.WindowsDesktops = services.WindowsDesktops + cfg.AutoupdateService = services.AutoupdateService return accesspoint.NewCache(cfg) } @@ -2648,6 +2650,7 @@ func (process *TeleportProcess) newAccessCacheForClient(cfg accesspoint.Config, cfg.WebSession = client.WebSessions() cfg.WebToken = client.WebTokens() cfg.WindowsDesktops = client + cfg.AutoupdateService = client.AutoupdateServiceClient() return accesspoint.NewCache(cfg) } diff --git a/lib/service/servicecfg/config.go b/lib/service/servicecfg/config.go index 33a89c6223fbc..9171081374736 100644 --- a/lib/service/servicecfg/config.go +++ b/lib/service/servicecfg/config.go @@ -169,6 +169,9 @@ type Config struct { // ClusterConfiguration is a service that provides cluster configuration ClusterConfiguration services.ClusterConfiguration + // AutoupdateService is a service that provides autoupdate configuration. + AutoupdateService services.AutoupdateService + // CipherSuites is a list of TLS ciphersuites that Teleport supports. If // omitted, a Teleport selected list of defaults will be used. CipherSuites []uint16 diff --git a/lib/services/autoupdates.go b/lib/services/autoupdates.go new file mode 100644 index 0000000000000..e65a4528719ce --- /dev/null +++ b/lib/services/autoupdates.go @@ -0,0 +1,63 @@ +/* + * Teleport + * Copyright (C) 2024 Gravitational, Inc. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package services + +import ( + "context" + + "github.com/gravitational/teleport/api/gen/proto/go/teleport/autoupdate/v1" +) + +// AutoupdateServiceGetter defines only read-only service methods. +type AutoupdateServiceGetter interface { + // GetAutoupdateConfig gets the autoupdate configuration from the backend. + GetAutoupdateConfig(ctx context.Context) (*autoupdate.AutoupdateConfig, error) + + // GetAutoupdateVersion gets the autoupdate version from the backend. + GetAutoupdateVersion(ctx context.Context) (*autoupdate.AutoupdateVersion, error) +} + +// AutoupdateService stores the autoupdate service. +type AutoupdateService interface { + AutoupdateServiceGetter + + // CreateAutoupdateConfig creates a AutoupdateConfig. + CreateAutoupdateConfig(ctx context.Context, config *autoupdate.AutoupdateConfig) (*autoupdate.AutoupdateConfig, error) + + // UpdateAutoupdateConfig updates a AutoupdateConfig. + UpdateAutoupdateConfig(ctx context.Context, config *autoupdate.AutoupdateConfig) (*autoupdate.AutoupdateConfig, error) + + // UpsertAutoupdateConfig sets autoupdate configuration. + UpsertAutoupdateConfig(ctx context.Context, c *autoupdate.AutoupdateConfig) (*autoupdate.AutoupdateConfig, error) + + // DeleteAutoupdateConfig deletes types.AutoupdateConfig from the backend. + DeleteAutoupdateConfig(ctx context.Context) error + + // CreateAutoupdateVersion creates a AutoupdateVersion. + CreateAutoupdateVersion(ctx context.Context, config *autoupdate.AutoupdateVersion) (*autoupdate.AutoupdateVersion, error) + + // UpdateAutoupdateVersion updates a AutoupdateVersion. + UpdateAutoupdateVersion(ctx context.Context, config *autoupdate.AutoupdateVersion) (*autoupdate.AutoupdateVersion, error) + + // UpsertAutoupdateVersion sets autoupdate version. + UpsertAutoupdateVersion(ctx context.Context, c *autoupdate.AutoupdateVersion) (*autoupdate.AutoupdateVersion, error) + + // DeleteAutoupdateVersion deletes types.AutoupdateVersion from the backend. + DeleteAutoupdateVersion(ctx context.Context) error +} diff --git a/lib/services/local/autoupdate.go b/lib/services/local/autoupdate.go new file mode 100644 index 0000000000000..a59cc59b987cc --- /dev/null +++ b/lib/services/local/autoupdate.go @@ -0,0 +1,166 @@ +/* + * Teleport + * Copyright (C) 2024 Gravitational, Inc. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package local + +import ( + "context" + + "github.com/gravitational/trace" + + "github.com/gravitational/teleport/api/gen/proto/go/teleport/autoupdate/v1" + "github.com/gravitational/teleport/api/types" + update "github.com/gravitational/teleport/api/types/autoupdate" + "github.com/gravitational/teleport/lib/backend" + "github.com/gravitational/teleport/lib/services" + "github.com/gravitational/teleport/lib/services/local/generic" +) + +const ( + autoupdateConfigPrefix = "autoupdate_config" + autoupdateVersionPrefix = "autoupdate_version" +) + +// AutoupdateService is responsible for managing autoupdate configuration and version management. +type AutoupdateService struct { + config *generic.ServiceWrapper[*autoupdate.AutoupdateConfig] + version *generic.ServiceWrapper[*autoupdate.AutoupdateVersion] +} + +// NewAutoupdateService returns a new AutoupdateService. +func NewAutoupdateService(backend backend.Backend) (*AutoupdateService, error) { + config, err := generic.NewServiceWrapper( + backend, + types.KindAutoupdateConfig, + autoupdateConfigPrefix, + services.MarshalProtoResource[*autoupdate.AutoupdateConfig], + services.UnmarshalProtoResource[*autoupdate.AutoupdateConfig], + ) + if err != nil { + return nil, trace.Wrap(err) + } + version, err := generic.NewServiceWrapper( + backend, + types.KindAutoupdateVersion, + autoupdateVersionPrefix, + services.MarshalProtoResource[*autoupdate.AutoupdateVersion], + services.UnmarshalProtoResource[*autoupdate.AutoupdateVersion], + ) + if err != nil { + return nil, trace.Wrap(err) + } + + return &AutoupdateService{ + config: config, + version: version, + }, nil +} + +// CreateAutoupdateConfig creates autoupdate configuration singleton. +func (s *AutoupdateService) CreateAutoupdateConfig( + ctx context.Context, + c *autoupdate.AutoupdateConfig, +) (*autoupdate.AutoupdateConfig, error) { + if err := update.ValidateAutoupdateConfig(c); err != nil { + return nil, trace.Wrap(err) + } + config, err := s.config.CreateResource(ctx, c) + return config, trace.Wrap(err) +} + +// UpdateAutoupdateConfig update autoupdate configuration singleton. +func (s *AutoupdateService) UpdateAutoupdateConfig( + ctx context.Context, + c *autoupdate.AutoupdateConfig, +) (*autoupdate.AutoupdateConfig, error) { + if err := update.ValidateAutoupdateConfig(c); err != nil { + return nil, trace.Wrap(err) + } + config, err := s.config.UpdateResource(ctx, c) + return config, trace.Wrap(err) +} + +// UpsertAutoupdateConfig sets autoupdate configuration. +func (s *AutoupdateService) UpsertAutoupdateConfig( + ctx context.Context, + c *autoupdate.AutoupdateConfig, +) (*autoupdate.AutoupdateConfig, error) { + if err := update.ValidateAutoupdateConfig(c); err != nil { + return nil, trace.Wrap(err) + } + config, err := s.config.UpsertResource(ctx, c) + return config, trace.Wrap(err) +} + +// GetAutoupdateConfig gets the autoupdate configuration from the backend. +func (s *AutoupdateService) GetAutoupdateConfig(ctx context.Context) (*autoupdate.AutoupdateConfig, error) { + config, err := s.config.GetResource(ctx, types.MetaNameAutoupdateConfig) + return config, trace.Wrap(err) +} + +// DeleteAutoupdateConfig deletes types.AutoupdateConfig from the backend. +func (s *AutoupdateService) DeleteAutoupdateConfig(ctx context.Context) error { + return trace.Wrap(s.config.DeleteResource(ctx, types.MetaNameAutoupdateConfig)) +} + +// CreateAutoupdateVersion creates autoupdate version resource. +func (s *AutoupdateService) CreateAutoupdateVersion( + ctx context.Context, + v *autoupdate.AutoupdateVersion, +) (*autoupdate.AutoupdateVersion, error) { + if err := update.ValidateAutoupdateVersion(v); err != nil { + return nil, trace.Wrap(err) + } + version, err := s.version.CreateResource(ctx, v) + return version, trace.Wrap(err) +} + +// UpdateAutoupdateVersion updates autoupdate version resource. +func (s *AutoupdateService) UpdateAutoupdateVersion( + ctx context.Context, + v *autoupdate.AutoupdateVersion, +) (*autoupdate.AutoupdateVersion, error) { + if err := update.ValidateAutoupdateVersion(v); err != nil { + return nil, trace.Wrap(err) + } + version, err := s.version.UpdateResource(ctx, v) + return version, trace.Wrap(err) +} + +// UpsertAutoupdateVersion sets autoupdate version resource. +func (s *AutoupdateService) UpsertAutoupdateVersion( + ctx context.Context, + v *autoupdate.AutoupdateVersion, +) (*autoupdate.AutoupdateVersion, error) { + if err := update.ValidateAutoupdateVersion(v); err != nil { + return nil, trace.Wrap(err) + } + version, err := s.version.UpsertResource(ctx, v) + return version, trace.Wrap(err) +} + +// GetAutoupdateVersion gets the autoupdate version from the backend. +func (s *AutoupdateService) GetAutoupdateVersion(ctx context.Context) (*autoupdate.AutoupdateVersion, error) { + version, err := s.version.GetResource(ctx, types.MetaNameAutoupdateVersion) + return version, trace.Wrap(err) +} + +// DeleteAutoupdateVersion deletes types.AutoupdateVersion from the backend. +func (s *AutoupdateService) DeleteAutoupdateVersion(ctx context.Context) error { + return trace.Wrap(s.version.DeleteResource(ctx, types.MetaNameAutoupdateVersion)) +} diff --git a/lib/services/local/autoupdate_test.go b/lib/services/local/autoupdate_test.go new file mode 100644 index 0000000000000..6112096339305 --- /dev/null +++ b/lib/services/local/autoupdate_test.go @@ -0,0 +1,146 @@ +/* + * Teleport + * Copyright (C) 2024 Gravitational, Inc. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package local + +import ( + "context" + "testing" + + "github.com/google/go-cmp/cmp" + "github.com/google/go-cmp/cmp/cmpopts" + "github.com/gravitational/trace" + "github.com/stretchr/testify/require" + + "github.com/gravitational/teleport/api/gen/proto/go/teleport/autoupdate/v1" + headerv1 "github.com/gravitational/teleport/api/gen/proto/go/teleport/header/v1" + "github.com/gravitational/teleport/api/types" + "github.com/gravitational/teleport/lib/backend/memory" +) + +// TestAutoupdateServiceConfigCRUD verifies get/create/update/upsert/delete methods of the backend service +// for autoupdate config resource. +func TestAutoupdateServiceConfigCRUD(t *testing.T) { + t.Parallel() + + bk, err := memory.New(memory.Config{}) + require.NoError(t, err) + + service, err := NewAutoupdateService(bk) + require.NoError(t, err) + + ctx := context.Background() + config := &autoupdate.AutoupdateConfig{ + Kind: types.KindAutoupdateConfig, + Version: types.V1, + Metadata: &headerv1.Metadata{Name: types.MetaNameAutoupdateConfig}, + Spec: &autoupdate.AutoupdateConfigSpec{ToolsAutoupdate: true}, + } + + created, err := service.CreateAutoupdateConfig(ctx, config) + require.NoError(t, err) + diff := cmp.Diff(config, created, + cmpopts.IgnoreFields(headerv1.Metadata{}, "Revision"), + cmpopts.IgnoreUnexported(autoupdate.AutoupdateConfig{}, autoupdate.AutoupdateConfigSpec{}, headerv1.Metadata{}), + ) + require.Empty(t, diff) + require.NotEmpty(t, created.GetMetadata().GetRevision()) + + got, err := service.GetAutoupdateConfig(ctx) + require.NoError(t, err) + diff = cmp.Diff(config, got, + cmpopts.IgnoreFields(headerv1.Metadata{}, "Revision"), + cmpopts.IgnoreUnexported(autoupdate.AutoupdateConfig{}, autoupdate.AutoupdateConfigSpec{}, headerv1.Metadata{}), + ) + require.Empty(t, diff) + require.Equal(t, created.GetMetadata().GetRevision(), got.GetMetadata().GetRevision()) + + config.Spec.ToolsAutoupdate = false + updated, err := service.UpdateAutoupdateConfig(ctx, config) + require.NoError(t, err) + require.NotEqual(t, got.GetSpec().GetToolsAutoupdate(), updated.GetSpec().GetToolsAutoupdate()) + + _, err = service.UpsertAutoupdateConfig(ctx, config) + require.NoError(t, err) + + err = service.DeleteAutoupdateConfig(ctx) + require.NoError(t, err) + + _, err = service.GetAutoupdateConfig(ctx) + var notFoundError *trace.NotFoundError + require.ErrorAs(t, err, ¬FoundError) + + _, err = service.UpdateAutoupdateConfig(ctx, config) + require.ErrorAs(t, err, ¬FoundError) +} + +// TestAutoupdateServiceVersionCRUD verifies get/create/update/upsert/delete methods of the backend service +// for autoupdate version resource. +func TestAutoupdateServiceVersionCRUD(t *testing.T) { + t.Parallel() + + bk, err := memory.New(memory.Config{}) + require.NoError(t, err) + + service, err := NewAutoupdateService(bk) + require.NoError(t, err) + + ctx := context.Background() + version := &autoupdate.AutoupdateVersion{ + Kind: types.KindAutoupdateVersion, + Version: types.V1, + Metadata: &headerv1.Metadata{Name: types.MetaNameAutoupdateVersion}, + Spec: &autoupdate.AutoupdateVersionSpec{ToolsVersion: "1.2.3"}, + } + + created, err := service.CreateAutoupdateVersion(ctx, version) + require.NoError(t, err) + diff := cmp.Diff(version, created, + cmpopts.IgnoreFields(headerv1.Metadata{}, "Revision"), + cmpopts.IgnoreUnexported(autoupdate.AutoupdateVersion{}, autoupdate.AutoupdateVersionSpec{}, headerv1.Metadata{}), + ) + require.Empty(t, diff) + require.NotEmpty(t, created.GetMetadata().GetRevision()) + + got, err := service.GetAutoupdateVersion(ctx) + require.NoError(t, err) + diff = cmp.Diff(version, got, + cmpopts.IgnoreFields(headerv1.Metadata{}, "Revision"), + cmpopts.IgnoreUnexported(autoupdate.AutoupdateVersion{}, autoupdate.AutoupdateVersionSpec{}, headerv1.Metadata{}), + ) + require.Empty(t, diff) + require.Equal(t, created.GetMetadata().GetRevision(), got.GetMetadata().GetRevision()) + + version.Spec.ToolsVersion = "3.2.1" + updated, err := service.UpdateAutoupdateVersion(ctx, version) + require.NoError(t, err) + require.NotEqual(t, got.GetSpec().GetToolsVersion(), updated.GetSpec().GetToolsVersion()) + + _, err = service.UpsertAutoupdateVersion(ctx, version) + require.NoError(t, err) + + err = service.DeleteAutoupdateVersion(ctx) + require.NoError(t, err) + + _, err = service.GetAutoupdateVersion(ctx) + var notFoundError *trace.NotFoundError + require.ErrorAs(t, err, ¬FoundError) + + _, err = service.UpdateAutoupdateVersion(ctx, version) + require.ErrorAs(t, err, ¬FoundError) +} diff --git a/lib/services/local/events.go b/lib/services/local/events.go index e7754a2d65923..5018b3aff6946 100644 --- a/lib/services/local/events.go +++ b/lib/services/local/events.go @@ -30,6 +30,7 @@ import ( "github.com/gravitational/teleport" apidefaults "github.com/gravitational/teleport/api/defaults" accessgraphsecretsv1pb "github.com/gravitational/teleport/api/gen/proto/go/teleport/accessgraph/v1" + "github.com/gravitational/teleport/api/gen/proto/go/teleport/autoupdate/v1" dbobjectv1 "github.com/gravitational/teleport/api/gen/proto/go/teleport/dbobject/v1" headerv1 "github.com/gravitational/teleport/api/gen/proto/go/teleport/header/v1" kubewaitingcontainerpb "github.com/gravitational/teleport/api/gen/proto/go/teleport/kubewaitingcontainer/v1" @@ -95,6 +96,10 @@ func (e *EventsService) NewWatcher(ctx context.Context, watch types.Watch) (type parser = newUIConfigParser() case types.KindClusterName: parser = newClusterNameParser() + case types.KindAutoupdateConfig: + parser = newAutoupdateConfigParser() + case types.KindAutoupdateVersion: + parser = newAutoupdateVersionParser() case types.KindNamespace: parser = newNamespaceParser(kind.Name) case types.KindRole: @@ -703,6 +708,72 @@ func (p *clusterNameParser) parse(event backend.Event) (types.Resource, error) { } } +func newAutoupdateConfigParser() *autoupdateConfigParser { + return &autoupdateConfigParser{ + baseParser: newBaseParser(backend.NewKey(autoupdateConfigPrefix)), + } +} + +type autoupdateConfigParser struct { + baseParser +} + +func (p *autoupdateConfigParser) parse(event backend.Event) (types.Resource, error) { + switch event.Type { + case types.OpDelete: + h, err := resourceHeader(event, types.KindAutoupdateConfig, types.V1, 0) + if err != nil { + return nil, trace.Wrap(err) + } + h.SetName(types.MetaNameAutoupdateConfig) + return h, nil + case types.OpPut: + autoupdateConfig, err := services.UnmarshalProtoResource[*autoupdate.AutoupdateConfig](event.Item.Value, + services.WithExpires(event.Item.Expires), + services.WithRevision(event.Item.Revision), + ) + if err != nil { + return nil, trace.Wrap(err) + } + return types.Resource153ToLegacy(autoupdateConfig), nil + default: + return nil, trace.BadParameter("event %v is not supported", event.Type) + } +} + +func newAutoupdateVersionParser() *autoupdateVersionParser { + return &autoupdateVersionParser{ + baseParser: newBaseParser(backend.NewKey(autoupdateVersionPrefix)), + } +} + +type autoupdateVersionParser struct { + baseParser +} + +func (p *autoupdateVersionParser) parse(event backend.Event) (types.Resource, error) { + switch event.Type { + case types.OpDelete: + h, err := resourceHeader(event, types.KindAutoupdateVersion, types.V1, 0) + if err != nil { + return nil, trace.Wrap(err) + } + h.SetName(types.MetaNameAutoupdateVersion) + return h, nil + case types.OpPut: + autoupdateVersion, err := services.UnmarshalProtoResource[*autoupdate.AutoupdateVersion](event.Item.Value, + services.WithExpires(event.Item.Expires), + services.WithRevision(event.Item.Revision), + ) + if err != nil { + return nil, trace.Wrap(err) + } + return types.Resource153ToLegacy(autoupdateVersion), nil + default: + return nil, trace.BadParameter("event %v is not supported", event.Type) + } +} + func newNamespaceParser(name string) *namespaceParser { prefix := backend.NewKey(namespacesPrefix) if name != "" { diff --git a/lib/services/resource.go b/lib/services/resource.go index bb384b582f9da..82f6ec094c0b3 100644 --- a/lib/services/resource.go +++ b/lib/services/resource.go @@ -241,6 +241,10 @@ func ParseShortcut(in string) (string, error) { return types.KindPlugin, nil case types.KindAccessGraphSettings, "ags": return types.KindAccessGraphSettings, nil + case types.KindAutoupdateConfig: + return types.KindAutoupdateConfig, nil + case types.KindAutoupdateVersion: + return types.KindAutoupdateVersion, nil } return "", trace.BadParameter("unsupported resource: %q - resources should be expressed as 'type/name', for example 'connector/github'", in) } diff --git a/tool/tctl/common/collection.go b/tool/tctl/common/collection.go index d74fcf21cd418..d6b613100cae0 100644 --- a/tool/tctl/common/collection.go +++ b/tool/tctl/common/collection.go @@ -30,6 +30,7 @@ import ( "github.com/gravitational/trace" "github.com/gravitational/teleport/api/constants" + "github.com/gravitational/teleport/api/gen/proto/go/teleport/autoupdate/v1" crownjewelv1 "github.com/gravitational/teleport/api/gen/proto/go/teleport/crownjewel/v1" dbobjectv1 "github.com/gravitational/teleport/api/gen/proto/go/teleport/dbobject/v1" dbobjectimportrulev1 "github.com/gravitational/teleport/api/gen/proto/go/teleport/dbobjectimportrule/v1" @@ -1733,3 +1734,39 @@ func (c *spiffeFederationCollection) writeText(w io.Writer, verbose bool) error _, err := t.AsBuffer().WriteTo(w) return trace.Wrap(err) } + +type autoupdateConfigCollection struct { + config *autoupdate.AutoupdateConfig +} + +func (c *autoupdateConfigCollection) resources() []types.Resource { + return []types.Resource{types.Resource153ToLegacy(c.config)} +} + +func (c *autoupdateConfigCollection) writeText(w io.Writer, verbose bool) error { + t := asciitable.MakeTable([]string{"Name", "Tools Autoupdate Enabled"}) + t.AddRow([]string{ + c.config.GetMetadata().GetName(), + fmt.Sprintf("%v", c.config.GetSpec().GetToolsAutoupdate()), + }) + _, err := t.AsBuffer().WriteTo(w) + return trace.Wrap(err) +} + +type autoupdateVersionCollection struct { + version *autoupdate.AutoupdateVersion +} + +func (c *autoupdateVersionCollection) resources() []types.Resource { + return []types.Resource{types.Resource153ToLegacy(c.version)} +} + +func (c *autoupdateVersionCollection) writeText(w io.Writer, verbose bool) error { + t := asciitable.MakeTable([]string{"Name", "Tools Autoupdate Version"}) + t.AddRow([]string{ + c.version.GetMetadata().GetName(), + fmt.Sprintf("%v", c.version.GetSpec().GetToolsVersion()), + }) + _, err := t.AsBuffer().WriteTo(w) + return trace.Wrap(err) +} diff --git a/tool/tctl/common/edit_command_test.go b/tool/tctl/common/edit_command_test.go index b42517ac70382..e374266218d9a 100644 --- a/tool/tctl/common/edit_command_test.go +++ b/tool/tctl/common/edit_command_test.go @@ -30,7 +30,9 @@ import ( "github.com/stretchr/testify/require" "github.com/gravitational/teleport/api/constants" + autoupdatepb "github.com/gravitational/teleport/api/gen/proto/go/teleport/autoupdate/v1" "github.com/gravitational/teleport/api/types" + "github.com/gravitational/teleport/api/types/autoupdate" "github.com/gravitational/teleport/entitlements" "github.com/gravitational/teleport/lib/auth/authclient" "github.com/gravitational/teleport/lib/backend" @@ -73,6 +75,14 @@ func TestEditResources(t *testing.T) { kind: types.KindSessionRecordingConfig, edit: testEditSessionRecordingConfig, }, + { + kind: types.KindAutoupdateConfig, + edit: testEditAutoupdateConfig, + }, + { + kind: types.KindAutoupdateVersion, + edit: testEditAutoupdateVersion, + }, } for _, test := range tests { @@ -485,3 +495,69 @@ func testEditSAMLConnector(t *testing.T, clt *authclient.Client) { assert.Error(t, err, "stale connector was allowed to be updated") require.ErrorIs(t, err, backend.ErrIncorrectRevision, "expected an incorrect revision error, got %T", err) } + +func testEditAutoupdateConfig(t *testing.T, clt *authclient.Client) { + ctx := context.Background() + + expected, err := autoupdate.NewAutoupdateConfig(&autoupdatepb.AutoupdateConfigSpec{ToolsAutoupdate: true}) + require.NoError(t, err) + + initial, err := autoupdate.NewAutoupdateConfig(&autoupdatepb.AutoupdateConfigSpec{ToolsAutoupdate: false}) + require.NoError(t, err) + + _, err = clt.AutoupdateServiceClient().CreateAutoupdateConfig(ctx, initial) + require.NoError(t, err, "creating initial autoupdate config") + + editor := func(name string) error { + f, err := os.Create(name) + if err != nil { + return trace.Wrap(err, "opening file to edit") + } + expected.GetMetadata().Revision = initial.GetMetadata().GetRevision() + collection := &autoupdateConfigCollection{config: expected} + return trace.NewAggregate(writeYAML(collection, f), f.Close()) + } + + // Edit the autoupdate configuration resource. + _, err = runEditCommand(t, clt, []string{"edit", "autoupdate_config"}, withEditor(editor)) + require.NoError(t, err, "expected editing autoupdate config to succeed") + + actual, err := clt.GetAutoupdateConfig(ctx) + require.NoError(t, err, "failed to get autoupdate config after edit") + assert.NotEqual(t, initial.GetSpec().GetToolsAutoupdate(), actual.GetSpec().GetToolsAutoupdate(), + "tools_autoupdate should have been modified by edit") + assert.Equal(t, expected.GetSpec().GetToolsAutoupdate(), actual.GetSpec().GetToolsAutoupdate()) +} + +func testEditAutoupdateVersion(t *testing.T, clt *authclient.Client) { + ctx := context.Background() + + expected, err := autoupdate.NewAutoupdateVersion(&autoupdatepb.AutoupdateVersionSpec{ToolsVersion: "3.2.1"}) + require.NoError(t, err) + + initial, err := autoupdate.NewAutoupdateVersion(&autoupdatepb.AutoupdateVersionSpec{ToolsVersion: "1.2.3"}) + require.NoError(t, err) + + _, err = clt.AutoupdateServiceClient().CreateAutoupdateVersion(ctx, initial) + require.NoError(t, err, "creating initial autoupdate version") + + editor := func(name string) error { + f, err := os.Create(name) + if err != nil { + return trace.Wrap(err, "opening file to edit") + } + expected.GetMetadata().Revision = initial.GetMetadata().GetRevision() + collection := &autoupdateVersionCollection{version: expected} + return trace.NewAggregate(writeYAML(collection, f), f.Close()) + } + + // Edit the autoupdate version resource. + _, err = runEditCommand(t, clt, []string{"edit", "autoupdate_version"}, withEditor(editor)) + require.NoError(t, err, "expected editing autoupdate version to succeed") + + actual, err := clt.GetAutoupdateVersion(ctx) + require.NoError(t, err, "failed to get autoupdate version after edit") + assert.NotEqual(t, initial.GetSpec().GetToolsVersion(), actual.GetSpec().GetToolsVersion(), + "tools_autoupdate should have been modified by edit") + assert.Equal(t, expected.GetSpec().GetToolsVersion(), actual.GetSpec().GetToolsVersion()) +} diff --git a/tool/tctl/common/resource_command.go b/tool/tctl/common/resource_command.go index 3193cc28902aa..e9d2ed429d139 100644 --- a/tool/tctl/common/resource_command.go +++ b/tool/tctl/common/resource_command.go @@ -42,6 +42,7 @@ import ( apiclient "github.com/gravitational/teleport/api/client" "github.com/gravitational/teleport/api/client/proto" apidefaults "github.com/gravitational/teleport/api/defaults" + "github.com/gravitational/teleport/api/gen/proto/go/teleport/autoupdate/v1" clusterconfigpb "github.com/gravitational/teleport/api/gen/proto/go/teleport/clusterconfig/v1" crownjewelv1 "github.com/gravitational/teleport/api/gen/proto/go/teleport/crownjewel/v1" dbobjectv1 "github.com/gravitational/teleport/api/gen/proto/go/teleport/dbobject/v1" @@ -166,6 +167,8 @@ func (rc *ResourceCommand) Initialize(app *kingpin.Application, config *servicec types.KindAccessGraphSettings: rc.upsertAccessGraphSettings, types.KindPlugin: rc.createPlugin, types.KindSPIFFEFederation: rc.createSPIFFEFederation, + types.KindAutoupdateConfig: rc.createAutoupdateConfig, + types.KindAutoupdateVersion: rc.createAutoupdateVersion, } rc.UpdateHandlers = map[ResourceKind]ResourceCreateHandler{ types.KindUser: rc.updateUser, @@ -181,6 +184,8 @@ func (rc *ResourceCommand) Initialize(app *kingpin.Application, config *servicec types.KindVnetConfig: rc.updateVnetConfig, types.KindAccessGraphSettings: rc.updateAccessGraphSettings, types.KindPlugin: rc.updatePlugin, + types.KindAutoupdateConfig: rc.updateAutoupdateConfig, + types.KindAutoupdateVersion: rc.updateAutoupdateVersion, } rc.config = config @@ -2929,7 +2934,20 @@ func (rc *ResourceCommand) getCollection(ctx context.Context, client *authclient } return &botInstanceCollection{items: instances}, nil + case types.KindAutoupdateConfig: + config, err := client.AutoupdateServiceClient().GetAutoupdateConfig(ctx) + if err != nil { + return nil, trace.Wrap(err) + } + return &autoupdateConfigCollection{config}, nil + case types.KindAutoupdateVersion: + version, err := client.AutoupdateServiceClient().GetAutoupdateVersion(ctx) + if err != nil { + return nil, trace.Wrap(err) + } + return &autoupdateVersionCollection{version}, nil } + return nil, trace.BadParameter("getting %q is not supported", rc.ref.String()) } @@ -3274,3 +3292,65 @@ func (rc *ResourceCommand) updateAccessGraphSettings(ctx context.Context, client fmt.Println("access_graph_settings has been updated") return nil } + +func (rc *ResourceCommand) createAutoupdateConfig(ctx context.Context, client *authclient.Client, raw services.UnknownResource) error { + config, err := services.UnmarshalProtoResource[*autoupdate.AutoupdateConfig](raw.Raw) + if err != nil { + return trace.Wrap(err) + } + + if rc.IsForced() { + _, err = client.AutoupdateServiceClient().UpsertAutoupdateConfig(ctx, config) + } else { + _, err = client.AutoupdateServiceClient().CreateAutoupdateConfig(ctx, config) + } + if err != nil { + return trace.Wrap(err) + } + + fmt.Println("autoupdate_config has been created") + return nil +} + +func (rc *ResourceCommand) updateAutoupdateConfig(ctx context.Context, client *authclient.Client, raw services.UnknownResource) error { + config, err := services.UnmarshalProtoResource[*autoupdate.AutoupdateConfig](raw.Raw) + if err != nil { + return trace.Wrap(err) + } + if _, err := client.AutoupdateServiceClient().UpdateAutoupdateConfig(ctx, config); err != nil { + return trace.Wrap(err) + } + fmt.Println("autoupdate_config has been updated") + return nil +} + +func (rc *ResourceCommand) createAutoupdateVersion(ctx context.Context, client *authclient.Client, raw services.UnknownResource) error { + version, err := services.UnmarshalProtoResource[*autoupdate.AutoupdateVersion](raw.Raw) + if err != nil { + return trace.Wrap(err) + } + + if rc.IsForced() { + _, err = client.AutoupdateServiceClient().UpsertAutoupdateVersion(ctx, version) + } else { + _, err = client.AutoupdateServiceClient().CreateAutoupdateVersion(ctx, version) + } + if err != nil { + return trace.Wrap(err) + } + + fmt.Println("autoupdate_version has been created") + return nil +} + +func (rc *ResourceCommand) updateAutoupdateVersion(ctx context.Context, client *authclient.Client, raw services.UnknownResource) error { + version, err := services.UnmarshalProtoResource[*autoupdate.AutoupdateVersion](raw.Raw) + if err != nil { + return trace.Wrap(err) + } + if _, err := client.AutoupdateServiceClient().UpdateAutoupdateVersion(ctx, version); err != nil { + return trace.Wrap(err) + } + fmt.Println("autoupdate_version has been updated") + return nil +} diff --git a/tool/tctl/common/resource_command_test.go b/tool/tctl/common/resource_command_test.go index 43002008f28d1..d092e731d0acf 100644 --- a/tool/tctl/common/resource_command_test.go +++ b/tool/tctl/common/resource_command_test.go @@ -41,6 +41,7 @@ import ( "github.com/gravitational/teleport/api/constants" apidefaults "github.com/gravitational/teleport/api/defaults" + "github.com/gravitational/teleport/api/gen/proto/go/teleport/autoupdate/v1" headerv1 "github.com/gravitational/teleport/api/gen/proto/go/teleport/header/v1" "github.com/gravitational/teleport/api/types" "github.com/gravitational/teleport/api/types/discoveryconfig" @@ -1405,6 +1406,14 @@ func TestCreateResources(t *testing.T) { kind: types.KindAppServer, create: testCreateAppServer, }, + { + kind: types.KindAutoupdateConfig, + create: testCreateAutoupdateConfig, + }, + { + kind: types.KindAutoupdateVersion, + create: testCreateAutoupdateVersion, + }, } for _, test := range tests { @@ -2205,6 +2214,78 @@ spec: require.NoError(t, err) } +func testCreateAutoupdateConfig(t *testing.T, clt *authclient.Client) { + const resourceYAML = `kind: autoupdate_config +metadata: + name: autoupdate-config + revision: 3a43b44a-201e-4d7f-aef1-ae2f6d9811ed +spec: + tools_autoupdate: true +version: v1 +` + _, err := runResourceCommand(t, clt, []string{"get", types.KindAutoupdateConfig, "--format=json"}) + require.ErrorContains(t, err, "doesn't exist") + + // Create the resource. + resourceYAMLPath := filepath.Join(t.TempDir(), "resource.yaml") + require.NoError(t, os.WriteFile(resourceYAMLPath, []byte(resourceYAML), 0644)) + _, err = runResourceCommand(t, clt, []string{"create", resourceYAMLPath}) + require.NoError(t, err) + + // Get the resource + buf, err := runResourceCommand(t, clt, []string{"get", types.KindAutoupdateConfig, "--format=json"}) + require.NoError(t, err) + resources := mustDecodeJSON[[]autoupdate.AutoupdateConfig](t, buf) + require.Len(t, resources, 1) + + // Compare with baseline + cmpOpts := []cmp.Option{ + protocmp.IgnoreFields(&headerv1.Metadata{}, "revision", "expires"), + protocmp.Transform(), + } + + var expected autoupdate.AutoupdateConfig + require.NoError(t, yaml.Unmarshal([]byte(resourceYAML), &expected)) + + require.Equal(t, "", cmp.Diff(expected, resources[0], cmpOpts...)) +} + +func testCreateAutoupdateVersion(t *testing.T, clt *authclient.Client) { + const resourceYAML = `kind: autoupdate_version +metadata: + name: autoupdate-version + revision: 3a43b44a-201e-4d7f-aef1-ae2f6d9811ed +spec: + tools_version: 1.2.3 +version: v1 +` + _, err := runResourceCommand(t, clt, []string{"get", types.KindAutoupdateVersion, "--format=json"}) + require.ErrorContains(t, err, "doesn't exist") + + // Create the resource. + resourceYAMLPath := filepath.Join(t.TempDir(), "resource.yaml") + require.NoError(t, os.WriteFile(resourceYAMLPath, []byte(resourceYAML), 0644)) + _, err = runResourceCommand(t, clt, []string{"create", resourceYAMLPath}) + require.NoError(t, err) + + // Get the resource + buf, err := runResourceCommand(t, clt, []string{"get", types.KindAutoupdateVersion, "--format=json"}) + require.NoError(t, err) + resources := mustDecodeJSON[[]autoupdate.AutoupdateVersion](t, buf) + require.Len(t, resources, 1) + + // Compare with baseline + cmpOpts := []cmp.Option{ + protocmp.IgnoreFields(&headerv1.Metadata{}, "revision", "expires"), + protocmp.Transform(), + } + + var expected autoupdate.AutoupdateVersion + require.NoError(t, yaml.Unmarshal([]byte(resourceYAML), &expected)) + + require.Equal(t, "", cmp.Diff(expected, resources[0], cmpOpts...)) +} + func TestPluginResourceWrapper(t *testing.T) { tests := []struct { name string