diff --git a/api/client/client.go b/api/client/client.go
index 518b82de27ede..00d068eb37b3c 100644
--- a/api/client/client.go
+++ b/api/client/client.go
@@ -87,7 +87,7 @@ import (
secreportsv1 "github.com/gravitational/teleport/api/gen/proto/go/teleport/secreports/v1"
trustpb "github.com/gravitational/teleport/api/gen/proto/go/teleport/trust/v1"
userloginstatev1 "github.com/gravitational/teleport/api/gen/proto/go/teleport/userloginstate/v1"
- userprovisioningpb "github.com/gravitational/teleport/api/gen/proto/go/teleport/userprovisioning/v1"
+ userprovisioningpb "github.com/gravitational/teleport/api/gen/proto/go/teleport/userprovisioning/v2"
userspb "github.com/gravitational/teleport/api/gen/proto/go/teleport/users/v1"
"github.com/gravitational/teleport/api/gen/proto/go/teleport/vnet/v1"
userpreferencespb "github.com/gravitational/teleport/api/gen/proto/go/userpreferences/v1"
diff --git a/api/client/events.go b/api/client/events.go
index 70b4eb77be0eb..1317b923ced96 100644
--- a/api/client/events.go
+++ b/api/client/events.go
@@ -25,7 +25,7 @@ import (
kubewaitingcontainerpb "github.com/gravitational/teleport/api/gen/proto/go/teleport/kubewaitingcontainer/v1"
machineidv1 "github.com/gravitational/teleport/api/gen/proto/go/teleport/machineid/v1"
notificationsv1 "github.com/gravitational/teleport/api/gen/proto/go/teleport/notifications/v1"
- userprovisioningpb "github.com/gravitational/teleport/api/gen/proto/go/teleport/userprovisioning/v1"
+ userprovisioningpb "github.com/gravitational/teleport/api/gen/proto/go/teleport/userprovisioning/v2"
"github.com/gravitational/teleport/api/types"
"github.com/gravitational/teleport/api/types/accesslist"
accesslistv1conv "github.com/gravitational/teleport/api/types/accesslist/convert/v1"
@@ -96,8 +96,8 @@ func EventToGRPC(in types.Event) (*proto.Event, error) {
SPIFFEFederation: r,
}
case *userprovisioningpb.StaticHostUser:
- out.Resource = &proto.Event_StaticHostUser{
- StaticHostUser: r,
+ out.Resource = &proto.Event_StaticHostUserV2{
+ StaticHostUserV2: r,
}
default:
return nil, trace.BadParameter("resource type %T is not supported", r)
@@ -539,7 +539,7 @@ func EventFromGRPC(in *proto.Event) (*types.Event, error) {
} else if r := in.GetSPIFFEFederation(); r != nil {
out.Resource = types.Resource153ToLegacy(r)
return &out, nil
- } else if r := in.GetStaticHostUser(); r != nil {
+ } else if r := in.GetStaticHostUserV2(); r != nil {
out.Resource = types.Resource153ToLegacy(r)
return &out, nil
} else {
diff --git a/api/client/proto/event.pb.go b/api/client/proto/event.pb.go
index 5c7809c4cd571..5a3805850ec47 100644
--- a/api/client/proto/event.pb.go
+++ b/api/client/proto/event.pb.go
@@ -23,7 +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"
+ v111 "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"
@@ -33,7 +33,7 @@ import (
v16 "github.com/gravitational/teleport/api/gen/proto/go/teleport/notifications/v1"
v13 "github.com/gravitational/teleport/api/gen/proto/go/teleport/secreports/v1"
v11 "github.com/gravitational/teleport/api/gen/proto/go/teleport/userloginstate/v1"
- v111 "github.com/gravitational/teleport/api/gen/proto/go/teleport/userprovisioning/v1"
+ v2 "github.com/gravitational/teleport/api/gen/proto/go/teleport/userprovisioning/v2"
types "github.com/gravitational/teleport/api/types"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
@@ -173,9 +173,9 @@ type Event struct {
// *Event_BotInstance
// *Event_AccessGraphSettings
// *Event_SPIFFEFederation
- // *Event_StaticHostUser
// *Event_AutoUpdateConfig
// *Event_AutoUpdateVersion
+ // *Event_StaticHostUserV2
Resource isEvent_Resource `protobuf_oneof:"Resource"`
}
@@ -638,27 +638,27 @@ func (x *Event) GetSPIFFEFederation() *v19.SPIFFEFederation {
return nil
}
-func (x *Event) GetStaticHostUser() *v111.StaticHostUser {
- if x, ok := x.GetResource().(*Event_StaticHostUser); ok {
- return x.StaticHostUser
- }
- return nil
-}
-
-func (x *Event) GetAutoUpdateConfig() *v112.AutoUpdateConfig {
+func (x *Event) GetAutoUpdateConfig() *v111.AutoUpdateConfig {
if x, ok := x.GetResource().(*Event_AutoUpdateConfig); ok {
return x.AutoUpdateConfig
}
return nil
}
-func (x *Event) GetAutoUpdateVersion() *v112.AutoUpdateVersion {
+func (x *Event) GetAutoUpdateVersion() *v111.AutoUpdateVersion {
if x, ok := x.GetResource().(*Event_AutoUpdateVersion); ok {
return x.AutoUpdateVersion
}
return nil
}
+func (x *Event) GetStaticHostUserV2() *v2.StaticHostUser {
+ if x, ok := x.GetResource().(*Event_StaticHostUserV2); ok {
+ return x.StaticHostUserV2
+ }
+ return nil
+}
+
type isEvent_Resource interface {
isEvent_Resource()
}
@@ -961,19 +961,19 @@ type Event_SPIFFEFederation struct {
SPIFFEFederation *v19.SPIFFEFederation `protobuf:"bytes,62,opt,name=SPIFFEFederation,proto3,oneof"`
}
-type Event_StaticHostUser struct {
- // StaticHostUser is a resource for static host users.
- 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"`
+ AutoUpdateConfig *v111.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"`
+ AutoUpdateVersion *v111.AutoUpdateVersion `protobuf:"bytes,65,opt,name=AutoUpdateVersion,proto3,oneof"`
+}
+
+type Event_StaticHostUserV2 struct {
+ // StaticHostUserV2 is a resource for static host users.
+ StaticHostUserV2 *v2.StaticHostUser `protobuf:"bytes,66,opt,name=StaticHostUserV2,proto3,oneof"`
}
func (*Event_ResourceHeader) isEvent_Resource() {}
@@ -1094,12 +1094,12 @@ func (*Event_AccessGraphSettings) isEvent_Resource() {}
func (*Event_SPIFFEFederation) isEvent_Resource() {}
-func (*Event_StaticHostUser) isEvent_Resource() {}
-
func (*Event_AutoUpdateConfig) isEvent_Resource() {}
func (*Event_AutoUpdateVersion) isEvent_Resource() {}
+func (*Event_StaticHostUserV2) isEvent_Resource() {}
+
var File_teleport_legacy_client_proto_event_proto protoreflect.FileDescriptor
var file_teleport_legacy_client_proto_event_proto_rawDesc = []byte{
@@ -1148,8 +1148,8 @@ var file_teleport_legacy_client_proto_event_proto_rawDesc = []byte{
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,
+ 0x6e, 0x67, 0x2f, 0x76, 0x32, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x69, 0x63, 0x68, 0x6f, 0x73, 0x74,
+ 0x75, 0x73, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xee, 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,
@@ -1407,33 +1407,35 @@ var file_teleport_legacy_client_proto_event_proto_rawDesc = []byte{
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, 0x55, 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, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65,
- 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x48, 0x00, 0x52, 0x10, 0x41, 0x75, 0x74, 0x6f, 0x55, 0x70,
- 0x64, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x59, 0x0a, 0x11, 0x41, 0x75,
- 0x74, 0x6f, 0x55, 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, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e,
- 0x48, 0x00, 0x52, 0x11, 0x41, 0x75, 0x74, 0x6f, 0x55, 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,
+ 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x56, 0x0a, 0x10, 0x41, 0x75,
+ 0x74, 0x6f, 0x55, 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, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x48, 0x00,
+ 0x52, 0x10, 0x41, 0x75, 0x74, 0x6f, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66,
+ 0x69, 0x67, 0x12, 0x59, 0x0a, 0x11, 0x41, 0x75, 0x74, 0x6f, 0x55, 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, 0x55, 0x70, 0x64, 0x61, 0x74,
+ 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x11, 0x41, 0x75, 0x74, 0x6f,
+ 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x5a, 0x0a,
+ 0x10, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x48, 0x6f, 0x73, 0x74, 0x55, 0x73, 0x65, 0x72, 0x56,
+ 0x32, 0x18, 0x42, 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, 0x32, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x48, 0x6f, 0x73,
+ 0x74, 0x55, 0x73, 0x65, 0x72, 0x48, 0x00, 0x52, 0x10, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x48,
+ 0x6f, 0x73, 0x74, 0x55, 0x73, 0x65, 0x72, 0x56, 0x32, 0x42, 0x0a, 0x0a, 0x08, 0x52, 0x65, 0x73,
+ 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4a, 0x04, 0x08, 0x07, 0x10, 0x08, 0x4a, 0x04, 0x08, 0x31, 0x10,
+ 0x32, 0x4a, 0x04, 0x08, 0x3f, 0x10, 0x40, 0x52, 0x12, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61,
+ 0x6c, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x41, 0x75, 0x64, 0x69, 0x74, 0x52, 0x0e, 0x53, 0x74, 0x61,
+ 0x74, 0x69, 0x63, 0x48, 0x6f, 0x73, 0x74, 0x55, 0x73, 0x65, 0x72, 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 (
@@ -1509,9 +1511,9 @@ var file_teleport_legacy_client_proto_event_proto_goTypes = []any{
(*v19.BotInstance)(nil), // 55: teleport.machineid.v1.BotInstance
(*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
+ (*v111.AutoUpdateConfig)(nil), // 58: teleport.autoupdate.v1.AutoUpdateConfig
+ (*v111.AutoUpdateVersion)(nil), // 59: teleport.autoupdate.v1.AutoUpdateVersion
+ (*v2.StaticHostUser)(nil), // 60: teleport.userprovisioning.v2.StaticHostUser
}
var file_teleport_legacy_client_proto_event_proto_depIdxs = []int32{
0, // 0: proto.Event.Type:type_name -> proto.Operation
@@ -1574,9 +1576,9 @@ var file_teleport_legacy_client_proto_event_proto_depIdxs = []int32{
55, // 57: proto.Event.BotInstance:type_name -> teleport.machineid.v1.BotInstance
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
- 59, // 61: proto.Event.AutoUpdateConfig:type_name -> teleport.autoupdate.v1.AutoUpdateConfig
- 60, // 62: proto.Event.AutoUpdateVersion:type_name -> teleport.autoupdate.v1.AutoUpdateVersion
+ 58, // 60: proto.Event.AutoUpdateConfig:type_name -> teleport.autoupdate.v1.AutoUpdateConfig
+ 59, // 61: proto.Event.AutoUpdateVersion:type_name -> teleport.autoupdate.v1.AutoUpdateVersion
+ 60, // 62: proto.Event.StaticHostUserV2:type_name -> teleport.userprovisioning.v2.StaticHostUser
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
@@ -1663,9 +1665,9 @@ func file_teleport_legacy_client_proto_event_proto_init() {
(*Event_BotInstance)(nil),
(*Event_AccessGraphSettings)(nil),
(*Event_SPIFFEFederation)(nil),
- (*Event_StaticHostUser)(nil),
(*Event_AutoUpdateConfig)(nil),
(*Event_AutoUpdateVersion)(nil),
+ (*Event_StaticHostUserV2)(nil),
}
type x struct{}
out := protoimpl.TypeBuilder{
diff --git a/api/client/statichostuser/statichostuser.go b/api/client/statichostuser/statichostuser.go
index f8100ff9998fc..3aa883d96b7ee 100644
--- a/api/client/statichostuser/statichostuser.go
+++ b/api/client/statichostuser/statichostuser.go
@@ -19,7 +19,7 @@ import (
"github.com/gravitational/trace"
- userprovisioningpb "github.com/gravitational/teleport/api/gen/proto/go/teleport/userprovisioning/v1"
+ userprovisioningpb "github.com/gravitational/teleport/api/gen/proto/go/teleport/userprovisioning/v2"
)
// Client is a StaticHostUser client.
diff --git a/api/gen/proto/go/teleport/userprovisioning/v1/statichostuser.pb.go b/api/gen/proto/go/teleport/userprovisioning/v2/statichostuser.pb.go
similarity index 50%
rename from api/gen/proto/go/teleport/userprovisioning/v1/statichostuser.pb.go
rename to api/gen/proto/go/teleport/userprovisioning/v2/statichostuser.pb.go
index c04959c336da5..78c0909fdc07d 100644
--- a/api/gen/proto/go/teleport/userprovisioning/v1/statichostuser.pb.go
+++ b/api/gen/proto/go/teleport/userprovisioning/v2/statichostuser.pb.go
@@ -16,13 +16,13 @@
// versions:
// protoc-gen-go v1.34.2
// protoc (unknown)
-// source: teleport/userprovisioning/v1/statichostuser.proto
+// source: teleport/userprovisioning/v2/statichostuser.proto
-package userprovisioningv1
+package userprovisioningv2
import (
v1 "github.com/gravitational/teleport/api/gen/proto/go/teleport/header/v1"
- wrappers "github.com/gravitational/teleport/api/types/wrappers"
+ v11 "github.com/gravitational/teleport/api/gen/proto/go/teleport/label/v1"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
@@ -48,7 +48,7 @@ type StaticHostUser struct {
// sub_kind is an optional resource sub kind, used in some resources.
SubKind string `protobuf:"bytes,2,opt,name=sub_kind,json=subKind,proto3" json:"sub_kind,omitempty"`
// version is the resource version. It must be specified.
- // Supported values are: `v1`.
+ // Supported values are: `v2`.
Version string `protobuf:"bytes,3,opt,name=version,proto3" json:"version,omitempty"`
// metadata is resource metadata.
Metadata *v1.Metadata `protobuf:"bytes,4,opt,name=metadata,proto3" json:"metadata,omitempty"`
@@ -59,7 +59,7 @@ type StaticHostUser struct {
func (x *StaticHostUser) Reset() {
*x = StaticHostUser{}
if protoimpl.UnsafeEnabled {
- mi := &file_teleport_userprovisioning_v1_statichostuser_proto_msgTypes[0]
+ mi := &file_teleport_userprovisioning_v2_statichostuser_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -72,7 +72,7 @@ func (x *StaticHostUser) String() string {
func (*StaticHostUser) ProtoMessage() {}
func (x *StaticHostUser) ProtoReflect() protoreflect.Message {
- mi := &file_teleport_userprovisioning_v1_statichostuser_proto_msgTypes[0]
+ mi := &file_teleport_userprovisioning_v2_statichostuser_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -85,7 +85,7 @@ func (x *StaticHostUser) ProtoReflect() protoreflect.Message {
// Deprecated: Use StaticHostUser.ProtoReflect.Descriptor instead.
func (*StaticHostUser) Descriptor() ([]byte, []int) {
- return file_teleport_userprovisioning_v1_statichostuser_proto_rawDescGZIP(), []int{0}
+ return file_teleport_userprovisioning_v2_statichostuser_proto_rawDescGZIP(), []int{0}
}
func (x *StaticHostUser) GetKind() string {
@@ -123,47 +123,45 @@ func (x *StaticHostUser) GetSpec() *StaticHostUserSpec {
return nil
}
-// StaticHostUserSpec is the static host user spec.
-type StaticHostUserSpec struct {
+// Matcher is a matcher for nodes to add the user to.
+type Matcher struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
- // login is the login to create on the node.
- Login string `protobuf:"bytes,1,opt,name=login,proto3" json:"login,omitempty"`
- // groups is a list of additional groups to add the user to.
- Groups []string `protobuf:"bytes,2,rep,name=groups,proto3" json:"groups,omitempty"`
- // sudoers is a list of sudoer entries to add.
- Sudoers []string `protobuf:"bytes,3,rep,name=sudoers,proto3" json:"sudoers,omitempty"`
- // uid is the new user's uid.
- Uid string `protobuf:"bytes,4,opt,name=uid,proto3" json:"uid,omitempty"`
- // gid is the new user's gid.
- Gid string `protobuf:"bytes,5,opt,name=gid,proto3" json:"gid,omitempty"`
// node_labels is a map of node labels that will create a user from this
// resource.
- NodeLabels *wrappers.LabelValues `protobuf:"bytes,6,opt,name=node_labels,json=nodeLabels,proto3" json:"node_labels,omitempty"`
+ NodeLabels []*v11.Label `protobuf:"bytes,1,rep,name=node_labels,json=nodeLabels,proto3" json:"node_labels,omitempty"`
// node_labels_expression is a predicate expression to create a user from
// this resource.
- NodeLabelsExpression string `protobuf:"bytes,7,opt,name=node_labels_expression,json=nodeLabelsExpression,proto3" json:"node_labels_expression,omitempty"`
+ NodeLabelsExpression string `protobuf:"bytes,2,opt,name=node_labels_expression,json=nodeLabelsExpression,proto3" json:"node_labels_expression,omitempty"`
+ // groups is a list of additional groups to add the user to.
+ Groups []string `protobuf:"bytes,3,rep,name=groups,proto3" json:"groups,omitempty"`
+ // sudoers is a list of sudoer entries to add.
+ Sudoers []string `protobuf:"bytes,4,rep,name=sudoers,proto3" json:"sudoers,omitempty"`
+ // uid is the new user's uid.
+ Uid int64 `protobuf:"varint,5,opt,name=uid,proto3" json:"uid,omitempty"`
+ // gid is the new user's gid.
+ Gid int64 `protobuf:"varint,6,opt,name=gid,proto3" json:"gid,omitempty"`
}
-func (x *StaticHostUserSpec) Reset() {
- *x = StaticHostUserSpec{}
+func (x *Matcher) Reset() {
+ *x = Matcher{}
if protoimpl.UnsafeEnabled {
- mi := &file_teleport_userprovisioning_v1_statichostuser_proto_msgTypes[1]
+ mi := &file_teleport_userprovisioning_v2_statichostuser_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
-func (x *StaticHostUserSpec) String() string {
+func (x *Matcher) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*StaticHostUserSpec) ProtoMessage() {}
+func (*Matcher) ProtoMessage() {}
-func (x *StaticHostUserSpec) ProtoReflect() protoreflect.Message {
- mi := &file_teleport_userprovisioning_v1_statichostuser_proto_msgTypes[1]
+func (x *Matcher) ProtoReflect() protoreflect.Message {
+ mi := &file_teleport_userprovisioning_v2_statichostuser_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -174,73 +172,113 @@ func (x *StaticHostUserSpec) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
-// Deprecated: Use StaticHostUserSpec.ProtoReflect.Descriptor instead.
-func (*StaticHostUserSpec) Descriptor() ([]byte, []int) {
- return file_teleport_userprovisioning_v1_statichostuser_proto_rawDescGZIP(), []int{1}
+// Deprecated: Use Matcher.ProtoReflect.Descriptor instead.
+func (*Matcher) Descriptor() ([]byte, []int) {
+ return file_teleport_userprovisioning_v2_statichostuser_proto_rawDescGZIP(), []int{1}
}
-func (x *StaticHostUserSpec) GetLogin() string {
+func (x *Matcher) GetNodeLabels() []*v11.Label {
if x != nil {
- return x.Login
+ return x.NodeLabels
+ }
+ return nil
+}
+
+func (x *Matcher) GetNodeLabelsExpression() string {
+ if x != nil {
+ return x.NodeLabelsExpression
}
return ""
}
-func (x *StaticHostUserSpec) GetGroups() []string {
+func (x *Matcher) GetGroups() []string {
if x != nil {
return x.Groups
}
return nil
}
-func (x *StaticHostUserSpec) GetSudoers() []string {
+func (x *Matcher) GetSudoers() []string {
if x != nil {
return x.Sudoers
}
return nil
}
-func (x *StaticHostUserSpec) GetUid() string {
+func (x *Matcher) GetUid() int64 {
if x != nil {
return x.Uid
}
- return ""
+ return 0
}
-func (x *StaticHostUserSpec) GetGid() string {
+func (x *Matcher) GetGid() int64 {
if x != nil {
return x.Gid
}
- return ""
+ return 0
}
-func (x *StaticHostUserSpec) GetNodeLabels() *wrappers.LabelValues {
- if x != nil {
- return x.NodeLabels
+// StaticHostUserSpec is the static host user spec.
+type StaticHostUserSpec struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Matchers []*Matcher `protobuf:"bytes,1,rep,name=matchers,proto3" json:"matchers,omitempty"`
+}
+
+func (x *StaticHostUserSpec) Reset() {
+ *x = StaticHostUserSpec{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_teleport_userprovisioning_v2_statichostuser_proto_msgTypes[2]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
- return nil
}
-func (x *StaticHostUserSpec) GetNodeLabelsExpression() string {
+func (x *StaticHostUserSpec) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*StaticHostUserSpec) ProtoMessage() {}
+
+func (x *StaticHostUserSpec) ProtoReflect() protoreflect.Message {
+ mi := &file_teleport_userprovisioning_v2_statichostuser_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 StaticHostUserSpec.ProtoReflect.Descriptor instead.
+func (*StaticHostUserSpec) Descriptor() ([]byte, []int) {
+ return file_teleport_userprovisioning_v2_statichostuser_proto_rawDescGZIP(), []int{2}
+}
+
+func (x *StaticHostUserSpec) GetMatchers() []*Matcher {
if x != nil {
- return x.NodeLabelsExpression
+ return x.Matchers
}
- return ""
+ return nil
}
-var File_teleport_userprovisioning_v1_statichostuser_proto protoreflect.FileDescriptor
+var File_teleport_userprovisioning_v2_statichostuser_proto protoreflect.FileDescriptor
-var file_teleport_userprovisioning_v1_statichostuser_proto_rawDesc = []byte{
+var file_teleport_userprovisioning_v2_statichostuser_proto_rawDesc = []byte{
0x0a, 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,
+ 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x32, 0x2f, 0x73,
0x74, 0x61, 0x74, 0x69, 0x63, 0x68, 0x6f, 0x73, 0x74, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x12, 0x1c, 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, 0x1a, 0x21, 0x74, 0x65, 0x6c, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x68, 0x65, 0x61, 0x64,
+ 0x32, 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, 0x1a, 0x2d, 0x74, 0x65, 0x6c, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x6c,
- 0x65, 0x67, 0x61, 0x63, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x77, 0x72, 0x61, 0x70,
- 0x70, 0x65, 0x72, 0x73, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72,
+ 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x74, 0x65, 0x6c, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x6c,
+ 0x61, 0x62, 0x65, 0x6c, 0x2f, 0x76, 0x31, 0x2f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x2e, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x22, 0xd9, 0x01, 0x0a, 0x0e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x48, 0x6f,
0x73, 0x74, 0x55, 0x73, 0x65, 0x72, 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,
@@ -253,69 +291,75 @@ var file_teleport_userprovisioning_v1_statichostuser_proto_rawDesc = []byte{
0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x44, 0x0a, 0x04, 0x73, 0x70, 0x65,
0x63, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 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,
+ 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x48, 0x6f, 0x73,
0x74, 0x55, 0x73, 0x65, 0x72, 0x53, 0x70, 0x65, 0x63, 0x52, 0x04, 0x73, 0x70, 0x65, 0x63, 0x22,
- 0xee, 0x01, 0x0a, 0x12, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x48, 0x6f, 0x73, 0x74, 0x55, 0x73,
- 0x65, 0x72, 0x53, 0x70, 0x65, 0x63, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x18,
- 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x12, 0x16, 0x0a, 0x06,
- 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x67, 0x72,
+ 0xd0, 0x01, 0x0a, 0x07, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x12, 0x39, 0x0a, 0x0b, 0x6e,
+ 0x6f, 0x64, 0x65, 0x5f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b,
+ 0x32, 0x18, 0x2e, 0x74, 0x65, 0x6c, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x6c, 0x61, 0x62, 0x65,
+ 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x52, 0x0a, 0x6e, 0x6f, 0x64, 0x65,
+ 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x34, 0x0a, 0x16, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x6c,
+ 0x61, 0x62, 0x65, 0x6c, 0x73, 0x5f, 0x65, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e,
+ 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, 0x6e, 0x6f, 0x64, 0x65, 0x4c, 0x61, 0x62, 0x65,
+ 0x6c, 0x73, 0x45, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06,
+ 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x67, 0x72,
0x6f, 0x75, 0x70, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x64, 0x6f, 0x65, 0x72, 0x73, 0x18,
- 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x73, 0x75, 0x64, 0x6f, 0x65, 0x72, 0x73, 0x12, 0x10,
- 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64,
- 0x12, 0x10, 0x0a, 0x03, 0x67, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x67,
- 0x69, 0x64, 0x12, 0x36, 0x0a, 0x0b, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x6c, 0x61, 0x62, 0x65, 0x6c,
- 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65,
- 0x72, 0x73, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x52, 0x0a,
- 0x6e, 0x6f, 0x64, 0x65, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x34, 0x0a, 0x16, 0x6e, 0x6f,
- 0x64, 0x65, 0x5f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x5f, 0x65, 0x78, 0x70, 0x72, 0x65, 0x73,
- 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, 0x6e, 0x6f, 0x64, 0x65,
- 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e,
- 0x42, 0x64, 0x5a, 0x62, 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,
- 0x75, 0x73, 0x65, 0x72, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67,
- 0x2f, 0x76, 0x31, 0x3b, 0x75, 0x73, 0x65, 0x72, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f,
- 0x6e, 0x69, 0x6e, 0x67, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+ 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x73, 0x75, 0x64, 0x6f, 0x65, 0x72, 0x73, 0x12, 0x10,
+ 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x75, 0x69, 0x64,
+ 0x12, 0x10, 0x0a, 0x03, 0x67, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x67,
+ 0x69, 0x64, 0x22, 0x57, 0x0a, 0x12, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x48, 0x6f, 0x73, 0x74,
+ 0x55, 0x73, 0x65, 0x72, 0x53, 0x70, 0x65, 0x63, 0x12, 0x41, 0x0a, 0x08, 0x6d, 0x61, 0x74, 0x63,
+ 0x68, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 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, 0x32, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65,
+ 0x72, 0x52, 0x08, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x73, 0x42, 0x64, 0x5a, 0x62, 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, 0x75, 0x73, 0x65, 0x72, 0x70,
+ 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x32, 0x3b, 0x75,
+ 0x73, 0x65, 0x72, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x76,
+ 0x32, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
- file_teleport_userprovisioning_v1_statichostuser_proto_rawDescOnce sync.Once
- file_teleport_userprovisioning_v1_statichostuser_proto_rawDescData = file_teleport_userprovisioning_v1_statichostuser_proto_rawDesc
+ file_teleport_userprovisioning_v2_statichostuser_proto_rawDescOnce sync.Once
+ file_teleport_userprovisioning_v2_statichostuser_proto_rawDescData = file_teleport_userprovisioning_v2_statichostuser_proto_rawDesc
)
-func file_teleport_userprovisioning_v1_statichostuser_proto_rawDescGZIP() []byte {
- file_teleport_userprovisioning_v1_statichostuser_proto_rawDescOnce.Do(func() {
- file_teleport_userprovisioning_v1_statichostuser_proto_rawDescData = protoimpl.X.CompressGZIP(file_teleport_userprovisioning_v1_statichostuser_proto_rawDescData)
+func file_teleport_userprovisioning_v2_statichostuser_proto_rawDescGZIP() []byte {
+ file_teleport_userprovisioning_v2_statichostuser_proto_rawDescOnce.Do(func() {
+ file_teleport_userprovisioning_v2_statichostuser_proto_rawDescData = protoimpl.X.CompressGZIP(file_teleport_userprovisioning_v2_statichostuser_proto_rawDescData)
})
- return file_teleport_userprovisioning_v1_statichostuser_proto_rawDescData
-}
-
-var file_teleport_userprovisioning_v1_statichostuser_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
-var file_teleport_userprovisioning_v1_statichostuser_proto_goTypes = []any{
- (*StaticHostUser)(nil), // 0: teleport.userprovisioning.v1.StaticHostUser
- (*StaticHostUserSpec)(nil), // 1: teleport.userprovisioning.v1.StaticHostUserSpec
- (*v1.Metadata)(nil), // 2: teleport.header.v1.Metadata
- (*wrappers.LabelValues)(nil), // 3: wrappers.LabelValues
-}
-var file_teleport_userprovisioning_v1_statichostuser_proto_depIdxs = []int32{
- 2, // 0: teleport.userprovisioning.v1.StaticHostUser.metadata:type_name -> teleport.header.v1.Metadata
- 1, // 1: teleport.userprovisioning.v1.StaticHostUser.spec:type_name -> teleport.userprovisioning.v1.StaticHostUserSpec
- 3, // 2: teleport.userprovisioning.v1.StaticHostUserSpec.node_labels:type_name -> wrappers.LabelValues
- 3, // [3:3] is the sub-list for method output_type
- 3, // [3:3] is the sub-list for method input_type
- 3, // [3:3] is the sub-list for extension type_name
- 3, // [3:3] is the sub-list for extension extendee
- 0, // [0:3] is the sub-list for field type_name
-}
-
-func init() { file_teleport_userprovisioning_v1_statichostuser_proto_init() }
-func file_teleport_userprovisioning_v1_statichostuser_proto_init() {
- if File_teleport_userprovisioning_v1_statichostuser_proto != nil {
+ return file_teleport_userprovisioning_v2_statichostuser_proto_rawDescData
+}
+
+var file_teleport_userprovisioning_v2_statichostuser_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
+var file_teleport_userprovisioning_v2_statichostuser_proto_goTypes = []any{
+ (*StaticHostUser)(nil), // 0: teleport.userprovisioning.v2.StaticHostUser
+ (*Matcher)(nil), // 1: teleport.userprovisioning.v2.Matcher
+ (*StaticHostUserSpec)(nil), // 2: teleport.userprovisioning.v2.StaticHostUserSpec
+ (*v1.Metadata)(nil), // 3: teleport.header.v1.Metadata
+ (*v11.Label)(nil), // 4: teleport.label.v1.Label
+}
+var file_teleport_userprovisioning_v2_statichostuser_proto_depIdxs = []int32{
+ 3, // 0: teleport.userprovisioning.v2.StaticHostUser.metadata:type_name -> teleport.header.v1.Metadata
+ 2, // 1: teleport.userprovisioning.v2.StaticHostUser.spec:type_name -> teleport.userprovisioning.v2.StaticHostUserSpec
+ 4, // 2: teleport.userprovisioning.v2.Matcher.node_labels:type_name -> teleport.label.v1.Label
+ 1, // 3: teleport.userprovisioning.v2.StaticHostUserSpec.matchers:type_name -> teleport.userprovisioning.v2.Matcher
+ 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_userprovisioning_v2_statichostuser_proto_init() }
+func file_teleport_userprovisioning_v2_statichostuser_proto_init() {
+ if File_teleport_userprovisioning_v2_statichostuser_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
- file_teleport_userprovisioning_v1_statichostuser_proto_msgTypes[0].Exporter = func(v any, i int) any {
+ file_teleport_userprovisioning_v2_statichostuser_proto_msgTypes[0].Exporter = func(v any, i int) any {
switch v := v.(*StaticHostUser); i {
case 0:
return &v.state
@@ -327,7 +371,19 @@ func file_teleport_userprovisioning_v1_statichostuser_proto_init() {
return nil
}
}
- file_teleport_userprovisioning_v1_statichostuser_proto_msgTypes[1].Exporter = func(v any, i int) any {
+ file_teleport_userprovisioning_v2_statichostuser_proto_msgTypes[1].Exporter = func(v any, i int) any {
+ switch v := v.(*Matcher); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_teleport_userprovisioning_v2_statichostuser_proto_msgTypes[2].Exporter = func(v any, i int) any {
switch v := v.(*StaticHostUserSpec); i {
case 0:
return &v.state
@@ -344,18 +400,18 @@ func file_teleport_userprovisioning_v1_statichostuser_proto_init() {
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
- RawDescriptor: file_teleport_userprovisioning_v1_statichostuser_proto_rawDesc,
+ RawDescriptor: file_teleport_userprovisioning_v2_statichostuser_proto_rawDesc,
NumEnums: 0,
- NumMessages: 2,
+ NumMessages: 3,
NumExtensions: 0,
NumServices: 0,
},
- GoTypes: file_teleport_userprovisioning_v1_statichostuser_proto_goTypes,
- DependencyIndexes: file_teleport_userprovisioning_v1_statichostuser_proto_depIdxs,
- MessageInfos: file_teleport_userprovisioning_v1_statichostuser_proto_msgTypes,
+ GoTypes: file_teleport_userprovisioning_v2_statichostuser_proto_goTypes,
+ DependencyIndexes: file_teleport_userprovisioning_v2_statichostuser_proto_depIdxs,
+ MessageInfos: file_teleport_userprovisioning_v2_statichostuser_proto_msgTypes,
}.Build()
- File_teleport_userprovisioning_v1_statichostuser_proto = out.File
- file_teleport_userprovisioning_v1_statichostuser_proto_rawDesc = nil
- file_teleport_userprovisioning_v1_statichostuser_proto_goTypes = nil
- file_teleport_userprovisioning_v1_statichostuser_proto_depIdxs = nil
+ File_teleport_userprovisioning_v2_statichostuser_proto = out.File
+ file_teleport_userprovisioning_v2_statichostuser_proto_rawDesc = nil
+ file_teleport_userprovisioning_v2_statichostuser_proto_goTypes = nil
+ file_teleport_userprovisioning_v2_statichostuser_proto_depIdxs = nil
}
diff --git a/api/gen/proto/go/teleport/userprovisioning/v1/statichostuser_service.pb.go b/api/gen/proto/go/teleport/userprovisioning/v2/statichostuser_service.pb.go
similarity index 78%
rename from api/gen/proto/go/teleport/userprovisioning/v1/statichostuser_service.pb.go
rename to api/gen/proto/go/teleport/userprovisioning/v2/statichostuser_service.pb.go
index ccb801a403b20..d532b529bb52a 100644
--- a/api/gen/proto/go/teleport/userprovisioning/v1/statichostuser_service.pb.go
+++ b/api/gen/proto/go/teleport/userprovisioning/v2/statichostuser_service.pb.go
@@ -16,9 +16,9 @@
// versions:
// protoc-gen-go v1.34.2
// protoc (unknown)
-// source: teleport/userprovisioning/v1/statichostuser_service.proto
+// source: teleport/userprovisioning/v2/statichostuser_service.proto
-package userprovisioningv1
+package userprovisioningv2
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
@@ -48,7 +48,7 @@ type GetStaticHostUserRequest struct {
func (x *GetStaticHostUserRequest) Reset() {
*x = GetStaticHostUserRequest{}
if protoimpl.UnsafeEnabled {
- mi := &file_teleport_userprovisioning_v1_statichostuser_service_proto_msgTypes[0]
+ mi := &file_teleport_userprovisioning_v2_statichostuser_service_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -61,7 +61,7 @@ func (x *GetStaticHostUserRequest) String() string {
func (*GetStaticHostUserRequest) ProtoMessage() {}
func (x *GetStaticHostUserRequest) ProtoReflect() protoreflect.Message {
- mi := &file_teleport_userprovisioning_v1_statichostuser_service_proto_msgTypes[0]
+ mi := &file_teleport_userprovisioning_v2_statichostuser_service_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -74,7 +74,7 @@ func (x *GetStaticHostUserRequest) ProtoReflect() protoreflect.Message {
// Deprecated: Use GetStaticHostUserRequest.ProtoReflect.Descriptor instead.
func (*GetStaticHostUserRequest) Descriptor() ([]byte, []int) {
- return file_teleport_userprovisioning_v1_statichostuser_service_proto_rawDescGZIP(), []int{0}
+ return file_teleport_userprovisioning_v2_statichostuser_service_proto_rawDescGZIP(), []int{0}
}
func (x *GetStaticHostUserRequest) GetName() string {
@@ -103,7 +103,7 @@ type ListStaticHostUsersRequest struct {
func (x *ListStaticHostUsersRequest) Reset() {
*x = ListStaticHostUsersRequest{}
if protoimpl.UnsafeEnabled {
- mi := &file_teleport_userprovisioning_v1_statichostuser_service_proto_msgTypes[1]
+ mi := &file_teleport_userprovisioning_v2_statichostuser_service_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -116,7 +116,7 @@ func (x *ListStaticHostUsersRequest) String() string {
func (*ListStaticHostUsersRequest) ProtoMessage() {}
func (x *ListStaticHostUsersRequest) ProtoReflect() protoreflect.Message {
- mi := &file_teleport_userprovisioning_v1_statichostuser_service_proto_msgTypes[1]
+ mi := &file_teleport_userprovisioning_v2_statichostuser_service_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -129,7 +129,7 @@ func (x *ListStaticHostUsersRequest) ProtoReflect() protoreflect.Message {
// Deprecated: Use ListStaticHostUsersRequest.ProtoReflect.Descriptor instead.
func (*ListStaticHostUsersRequest) Descriptor() ([]byte, []int) {
- return file_teleport_userprovisioning_v1_statichostuser_service_proto_rawDescGZIP(), []int{1}
+ return file_teleport_userprovisioning_v2_statichostuser_service_proto_rawDescGZIP(), []int{1}
}
func (x *ListStaticHostUsersRequest) GetPageSize() int32 {
@@ -162,7 +162,7 @@ type ListStaticHostUsersResponse struct {
func (x *ListStaticHostUsersResponse) Reset() {
*x = ListStaticHostUsersResponse{}
if protoimpl.UnsafeEnabled {
- mi := &file_teleport_userprovisioning_v1_statichostuser_service_proto_msgTypes[2]
+ mi := &file_teleport_userprovisioning_v2_statichostuser_service_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -175,7 +175,7 @@ func (x *ListStaticHostUsersResponse) String() string {
func (*ListStaticHostUsersResponse) ProtoMessage() {}
func (x *ListStaticHostUsersResponse) ProtoReflect() protoreflect.Message {
- mi := &file_teleport_userprovisioning_v1_statichostuser_service_proto_msgTypes[2]
+ mi := &file_teleport_userprovisioning_v2_statichostuser_service_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -188,7 +188,7 @@ func (x *ListStaticHostUsersResponse) ProtoReflect() protoreflect.Message {
// Deprecated: Use ListStaticHostUsersResponse.ProtoReflect.Descriptor instead.
func (*ListStaticHostUsersResponse) Descriptor() ([]byte, []int) {
- return file_teleport_userprovisioning_v1_statichostuser_service_proto_rawDescGZIP(), []int{2}
+ return file_teleport_userprovisioning_v2_statichostuser_service_proto_rawDescGZIP(), []int{2}
}
func (x *ListStaticHostUsersResponse) GetUsers() []*StaticHostUser {
@@ -218,7 +218,7 @@ type CreateStaticHostUserRequest struct {
func (x *CreateStaticHostUserRequest) Reset() {
*x = CreateStaticHostUserRequest{}
if protoimpl.UnsafeEnabled {
- mi := &file_teleport_userprovisioning_v1_statichostuser_service_proto_msgTypes[3]
+ mi := &file_teleport_userprovisioning_v2_statichostuser_service_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -231,7 +231,7 @@ func (x *CreateStaticHostUserRequest) String() string {
func (*CreateStaticHostUserRequest) ProtoMessage() {}
func (x *CreateStaticHostUserRequest) ProtoReflect() protoreflect.Message {
- mi := &file_teleport_userprovisioning_v1_statichostuser_service_proto_msgTypes[3]
+ mi := &file_teleport_userprovisioning_v2_statichostuser_service_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -244,7 +244,7 @@ func (x *CreateStaticHostUserRequest) ProtoReflect() protoreflect.Message {
// Deprecated: Use CreateStaticHostUserRequest.ProtoReflect.Descriptor instead.
func (*CreateStaticHostUserRequest) Descriptor() ([]byte, []int) {
- return file_teleport_userprovisioning_v1_statichostuser_service_proto_rawDescGZIP(), []int{3}
+ return file_teleport_userprovisioning_v2_statichostuser_service_proto_rawDescGZIP(), []int{3}
}
func (x *CreateStaticHostUserRequest) GetUser() *StaticHostUser {
@@ -267,7 +267,7 @@ type UpdateStaticHostUserRequest struct {
func (x *UpdateStaticHostUserRequest) Reset() {
*x = UpdateStaticHostUserRequest{}
if protoimpl.UnsafeEnabled {
- mi := &file_teleport_userprovisioning_v1_statichostuser_service_proto_msgTypes[4]
+ mi := &file_teleport_userprovisioning_v2_statichostuser_service_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -280,7 +280,7 @@ func (x *UpdateStaticHostUserRequest) String() string {
func (*UpdateStaticHostUserRequest) ProtoMessage() {}
func (x *UpdateStaticHostUserRequest) ProtoReflect() protoreflect.Message {
- mi := &file_teleport_userprovisioning_v1_statichostuser_service_proto_msgTypes[4]
+ mi := &file_teleport_userprovisioning_v2_statichostuser_service_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -293,7 +293,7 @@ func (x *UpdateStaticHostUserRequest) ProtoReflect() protoreflect.Message {
// Deprecated: Use UpdateStaticHostUserRequest.ProtoReflect.Descriptor instead.
func (*UpdateStaticHostUserRequest) Descriptor() ([]byte, []int) {
- return file_teleport_userprovisioning_v1_statichostuser_service_proto_rawDescGZIP(), []int{4}
+ return file_teleport_userprovisioning_v2_statichostuser_service_proto_rawDescGZIP(), []int{4}
}
func (x *UpdateStaticHostUserRequest) GetUser() *StaticHostUser {
@@ -316,7 +316,7 @@ type UpsertStaticHostUserRequest struct {
func (x *UpsertStaticHostUserRequest) Reset() {
*x = UpsertStaticHostUserRequest{}
if protoimpl.UnsafeEnabled {
- mi := &file_teleport_userprovisioning_v1_statichostuser_service_proto_msgTypes[5]
+ mi := &file_teleport_userprovisioning_v2_statichostuser_service_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -329,7 +329,7 @@ func (x *UpsertStaticHostUserRequest) String() string {
func (*UpsertStaticHostUserRequest) ProtoMessage() {}
func (x *UpsertStaticHostUserRequest) ProtoReflect() protoreflect.Message {
- mi := &file_teleport_userprovisioning_v1_statichostuser_service_proto_msgTypes[5]
+ mi := &file_teleport_userprovisioning_v2_statichostuser_service_proto_msgTypes[5]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -342,7 +342,7 @@ func (x *UpsertStaticHostUserRequest) ProtoReflect() protoreflect.Message {
// Deprecated: Use UpsertStaticHostUserRequest.ProtoReflect.Descriptor instead.
func (*UpsertStaticHostUserRequest) Descriptor() ([]byte, []int) {
- return file_teleport_userprovisioning_v1_statichostuser_service_proto_rawDescGZIP(), []int{5}
+ return file_teleport_userprovisioning_v2_statichostuser_service_proto_rawDescGZIP(), []int{5}
}
func (x *UpsertStaticHostUserRequest) GetUser() *StaticHostUser {
@@ -365,7 +365,7 @@ type DeleteStaticHostUserRequest struct {
func (x *DeleteStaticHostUserRequest) Reset() {
*x = DeleteStaticHostUserRequest{}
if protoimpl.UnsafeEnabled {
- mi := &file_teleport_userprovisioning_v1_statichostuser_service_proto_msgTypes[6]
+ mi := &file_teleport_userprovisioning_v2_statichostuser_service_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -378,7 +378,7 @@ func (x *DeleteStaticHostUserRequest) String() string {
func (*DeleteStaticHostUserRequest) ProtoMessage() {}
func (x *DeleteStaticHostUserRequest) ProtoReflect() protoreflect.Message {
- mi := &file_teleport_userprovisioning_v1_statichostuser_service_proto_msgTypes[6]
+ mi := &file_teleport_userprovisioning_v2_statichostuser_service_proto_msgTypes[6]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -391,7 +391,7 @@ func (x *DeleteStaticHostUserRequest) ProtoReflect() protoreflect.Message {
// Deprecated: Use DeleteStaticHostUserRequest.ProtoReflect.Descriptor instead.
func (*DeleteStaticHostUserRequest) Descriptor() ([]byte, []int) {
- return file_teleport_userprovisioning_v1_statichostuser_service_proto_rawDescGZIP(), []int{6}
+ return file_teleport_userprovisioning_v2_statichostuser_service_proto_rawDescGZIP(), []int{6}
}
func (x *DeleteStaticHostUserRequest) GetName() string {
@@ -401,19 +401,19 @@ func (x *DeleteStaticHostUserRequest) GetName() string {
return ""
}
-var File_teleport_userprovisioning_v1_statichostuser_service_proto protoreflect.FileDescriptor
+var File_teleport_userprovisioning_v2_statichostuser_service_proto protoreflect.FileDescriptor
-var file_teleport_userprovisioning_v1_statichostuser_service_proto_rawDesc = []byte{
+var file_teleport_userprovisioning_v2_statichostuser_service_proto_rawDesc = []byte{
0x0a, 0x39, 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,
+ 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x32, 0x2f, 0x73,
0x74, 0x61, 0x74, 0x69, 0x63, 0x68, 0x6f, 0x73, 0x74, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x73, 0x65,
0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1c, 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, 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
+ 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x32, 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, 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,
+ 0x67, 0x2f, 0x76, 0x32, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x69, 0x63, 0x68, 0x6f, 0x73, 0x74, 0x75,
0x73, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x2e, 0x0a, 0x18, 0x47, 0x65, 0x74,
0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x48, 0x6f, 0x73, 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65,
0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20,
@@ -428,7 +428,7 @@ var file_teleport_userprovisioning_v1_statichostuser_service_proto_rawDesc = []b
0x6e, 0x73, 0x65, 0x12, 0x42, 0x0a, 0x05, 0x75, 0x73, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03,
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,
+ 0x32, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x48, 0x6f, 0x73, 0x74, 0x55, 0x73, 0x65, 0x72,
0x52, 0x05, 0x75, 0x73, 0x65, 0x72, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f,
0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22,
@@ -436,19 +436,19 @@ var file_teleport_userprovisioning_v1_statichostuser_service_proto_rawDesc = []b
0x6f, 0x73, 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x40,
0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x01, 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, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x74, 0x61, 0x74,
0x69, 0x63, 0x48, 0x6f, 0x73, 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72,
0x22, 0x5f, 0x0a, 0x1b, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63,
0x48, 0x6f, 0x73, 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12,
0x40, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x02, 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,
+ 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x74, 0x61,
0x74, 0x69, 0x63, 0x48, 0x6f, 0x73, 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, 0x04, 0x75, 0x73, 0x65,
0x72, 0x22, 0x5f, 0x0a, 0x1b, 0x55, 0x70, 0x73, 0x65, 0x72, 0x74, 0x53, 0x74, 0x61, 0x74, 0x69,
0x63, 0x48, 0x6f, 0x73, 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
0x12, 0x40, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x02, 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,
+ 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x74,
0x61, 0x74, 0x69, 0x63, 0x48, 0x6f, 0x73, 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, 0x04, 0x75, 0x73,
0x65, 0x72, 0x22, 0x31, 0x0a, 0x1b, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74,
0x69, 0x63, 0x48, 0x6f, 0x73, 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
@@ -458,48 +458,48 @@ var file_teleport_userprovisioning_v1_statichostuser_service_proto_rawDesc = []b
0x12, 0x79, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x48, 0x6f, 0x73,
0x74, 0x55, 0x73, 0x65, 0x72, 0x12, 0x36, 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, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x48, 0x6f,
+ 0x67, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x48, 0x6f,
0x73, 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 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,
+ 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x74, 0x61,
0x74, 0x69, 0x63, 0x48, 0x6f, 0x73, 0x74, 0x55, 0x73, 0x65, 0x72, 0x12, 0x8a, 0x01, 0x0a, 0x13,
0x4c, 0x69, 0x73, 0x74, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x48, 0x6f, 0x73, 0x74, 0x55, 0x73,
0x65, 0x72, 0x73, 0x12, 0x38, 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, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x48, 0x6f, 0x73,
+ 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x48, 0x6f, 0x73,
0x74, 0x55, 0x73, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x39, 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, 0x4c, 0x69, 0x73,
+ 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73,
0x74, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x48, 0x6f, 0x73, 0x74, 0x55, 0x73, 0x65, 0x72, 0x73,
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x7f, 0x0a, 0x14, 0x43, 0x72, 0x65, 0x61,
0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x48, 0x6f, 0x73, 0x74, 0x55, 0x73, 0x65, 0x72,
0x12, 0x39, 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,
+ 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x32, 0x2e,
0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x48, 0x6f, 0x73, 0x74,
0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 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,
+ 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x69,
0x63, 0x48, 0x6f, 0x73, 0x74, 0x55, 0x73, 0x65, 0x72, 0x12, 0x7f, 0x0a, 0x14, 0x55, 0x70, 0x64,
0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x48, 0x6f, 0x73, 0x74, 0x55, 0x73, 0x65,
0x72, 0x12, 0x39, 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,
+ 0x72, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x32,
0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x48, 0x6f, 0x73,
0x74, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 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, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x74, 0x61, 0x74,
0x69, 0x63, 0x48, 0x6f, 0x73, 0x74, 0x55, 0x73, 0x65, 0x72, 0x12, 0x7f, 0x0a, 0x14, 0x55, 0x70,
0x73, 0x65, 0x72, 0x74, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x48, 0x6f, 0x73, 0x74, 0x55, 0x73,
0x65, 0x72, 0x12, 0x39, 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, 0x55, 0x70, 0x73, 0x65, 0x72, 0x74, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x48, 0x6f,
+ 0x32, 0x2e, 0x55, 0x70, 0x73, 0x65, 0x72, 0x74, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x48, 0x6f,
0x73, 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 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,
+ 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x74, 0x61,
0x74, 0x69, 0x63, 0x48, 0x6f, 0x73, 0x74, 0x55, 0x73, 0x65, 0x72, 0x12, 0x69, 0x0a, 0x14, 0x44,
0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x48, 0x6f, 0x73, 0x74, 0x55,
0x73, 0x65, 0x72, 0x12, 0x39, 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, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x48,
+ 0x76, 0x32, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x48,
0x6f, 0x73, 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16,
0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,
0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x42, 0x64, 0x5a, 0x62, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62,
@@ -507,52 +507,52 @@ var file_teleport_userprovisioning_v1_statichostuser_service_proto_rawDesc = []b
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, 0x75, 0x73, 0x65, 0x72, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73,
- 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x3b, 0x75, 0x73, 0x65, 0x72, 0x70, 0x72,
- 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72,
+ 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x32, 0x3b, 0x75, 0x73, 0x65, 0x72, 0x70, 0x72,
+ 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x76, 0x32, 0x62, 0x06, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x33,
}
var (
- file_teleport_userprovisioning_v1_statichostuser_service_proto_rawDescOnce sync.Once
- file_teleport_userprovisioning_v1_statichostuser_service_proto_rawDescData = file_teleport_userprovisioning_v1_statichostuser_service_proto_rawDesc
+ file_teleport_userprovisioning_v2_statichostuser_service_proto_rawDescOnce sync.Once
+ file_teleport_userprovisioning_v2_statichostuser_service_proto_rawDescData = file_teleport_userprovisioning_v2_statichostuser_service_proto_rawDesc
)
-func file_teleport_userprovisioning_v1_statichostuser_service_proto_rawDescGZIP() []byte {
- file_teleport_userprovisioning_v1_statichostuser_service_proto_rawDescOnce.Do(func() {
- file_teleport_userprovisioning_v1_statichostuser_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_teleport_userprovisioning_v1_statichostuser_service_proto_rawDescData)
+func file_teleport_userprovisioning_v2_statichostuser_service_proto_rawDescGZIP() []byte {
+ file_teleport_userprovisioning_v2_statichostuser_service_proto_rawDescOnce.Do(func() {
+ file_teleport_userprovisioning_v2_statichostuser_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_teleport_userprovisioning_v2_statichostuser_service_proto_rawDescData)
})
- return file_teleport_userprovisioning_v1_statichostuser_service_proto_rawDescData
-}
-
-var file_teleport_userprovisioning_v1_statichostuser_service_proto_msgTypes = make([]protoimpl.MessageInfo, 7)
-var file_teleport_userprovisioning_v1_statichostuser_service_proto_goTypes = []any{
- (*GetStaticHostUserRequest)(nil), // 0: teleport.userprovisioning.v1.GetStaticHostUserRequest
- (*ListStaticHostUsersRequest)(nil), // 1: teleport.userprovisioning.v1.ListStaticHostUsersRequest
- (*ListStaticHostUsersResponse)(nil), // 2: teleport.userprovisioning.v1.ListStaticHostUsersResponse
- (*CreateStaticHostUserRequest)(nil), // 3: teleport.userprovisioning.v1.CreateStaticHostUserRequest
- (*UpdateStaticHostUserRequest)(nil), // 4: teleport.userprovisioning.v1.UpdateStaticHostUserRequest
- (*UpsertStaticHostUserRequest)(nil), // 5: teleport.userprovisioning.v1.UpsertStaticHostUserRequest
- (*DeleteStaticHostUserRequest)(nil), // 6: teleport.userprovisioning.v1.DeleteStaticHostUserRequest
- (*StaticHostUser)(nil), // 7: teleport.userprovisioning.v1.StaticHostUser
+ return file_teleport_userprovisioning_v2_statichostuser_service_proto_rawDescData
+}
+
+var file_teleport_userprovisioning_v2_statichostuser_service_proto_msgTypes = make([]protoimpl.MessageInfo, 7)
+var file_teleport_userprovisioning_v2_statichostuser_service_proto_goTypes = []any{
+ (*GetStaticHostUserRequest)(nil), // 0: teleport.userprovisioning.v2.GetStaticHostUserRequest
+ (*ListStaticHostUsersRequest)(nil), // 1: teleport.userprovisioning.v2.ListStaticHostUsersRequest
+ (*ListStaticHostUsersResponse)(nil), // 2: teleport.userprovisioning.v2.ListStaticHostUsersResponse
+ (*CreateStaticHostUserRequest)(nil), // 3: teleport.userprovisioning.v2.CreateStaticHostUserRequest
+ (*UpdateStaticHostUserRequest)(nil), // 4: teleport.userprovisioning.v2.UpdateStaticHostUserRequest
+ (*UpsertStaticHostUserRequest)(nil), // 5: teleport.userprovisioning.v2.UpsertStaticHostUserRequest
+ (*DeleteStaticHostUserRequest)(nil), // 6: teleport.userprovisioning.v2.DeleteStaticHostUserRequest
+ (*StaticHostUser)(nil), // 7: teleport.userprovisioning.v2.StaticHostUser
(*emptypb.Empty)(nil), // 8: google.protobuf.Empty
}
-var file_teleport_userprovisioning_v1_statichostuser_service_proto_depIdxs = []int32{
- 7, // 0: teleport.userprovisioning.v1.ListStaticHostUsersResponse.users:type_name -> teleport.userprovisioning.v1.StaticHostUser
- 7, // 1: teleport.userprovisioning.v1.CreateStaticHostUserRequest.user:type_name -> teleport.userprovisioning.v1.StaticHostUser
- 7, // 2: teleport.userprovisioning.v1.UpdateStaticHostUserRequest.user:type_name -> teleport.userprovisioning.v1.StaticHostUser
- 7, // 3: teleport.userprovisioning.v1.UpsertStaticHostUserRequest.user:type_name -> teleport.userprovisioning.v1.StaticHostUser
- 0, // 4: teleport.userprovisioning.v1.StaticHostUsersService.GetStaticHostUser:input_type -> teleport.userprovisioning.v1.GetStaticHostUserRequest
- 1, // 5: teleport.userprovisioning.v1.StaticHostUsersService.ListStaticHostUsers:input_type -> teleport.userprovisioning.v1.ListStaticHostUsersRequest
- 3, // 6: teleport.userprovisioning.v1.StaticHostUsersService.CreateStaticHostUser:input_type -> teleport.userprovisioning.v1.CreateStaticHostUserRequest
- 4, // 7: teleport.userprovisioning.v1.StaticHostUsersService.UpdateStaticHostUser:input_type -> teleport.userprovisioning.v1.UpdateStaticHostUserRequest
- 5, // 8: teleport.userprovisioning.v1.StaticHostUsersService.UpsertStaticHostUser:input_type -> teleport.userprovisioning.v1.UpsertStaticHostUserRequest
- 6, // 9: teleport.userprovisioning.v1.StaticHostUsersService.DeleteStaticHostUser:input_type -> teleport.userprovisioning.v1.DeleteStaticHostUserRequest
- 7, // 10: teleport.userprovisioning.v1.StaticHostUsersService.GetStaticHostUser:output_type -> teleport.userprovisioning.v1.StaticHostUser
- 2, // 11: teleport.userprovisioning.v1.StaticHostUsersService.ListStaticHostUsers:output_type -> teleport.userprovisioning.v1.ListStaticHostUsersResponse
- 7, // 12: teleport.userprovisioning.v1.StaticHostUsersService.CreateStaticHostUser:output_type -> teleport.userprovisioning.v1.StaticHostUser
- 7, // 13: teleport.userprovisioning.v1.StaticHostUsersService.UpdateStaticHostUser:output_type -> teleport.userprovisioning.v1.StaticHostUser
- 7, // 14: teleport.userprovisioning.v1.StaticHostUsersService.UpsertStaticHostUser:output_type -> teleport.userprovisioning.v1.StaticHostUser
- 8, // 15: teleport.userprovisioning.v1.StaticHostUsersService.DeleteStaticHostUser:output_type -> google.protobuf.Empty
+var file_teleport_userprovisioning_v2_statichostuser_service_proto_depIdxs = []int32{
+ 7, // 0: teleport.userprovisioning.v2.ListStaticHostUsersResponse.users:type_name -> teleport.userprovisioning.v2.StaticHostUser
+ 7, // 1: teleport.userprovisioning.v2.CreateStaticHostUserRequest.user:type_name -> teleport.userprovisioning.v2.StaticHostUser
+ 7, // 2: teleport.userprovisioning.v2.UpdateStaticHostUserRequest.user:type_name -> teleport.userprovisioning.v2.StaticHostUser
+ 7, // 3: teleport.userprovisioning.v2.UpsertStaticHostUserRequest.user:type_name -> teleport.userprovisioning.v2.StaticHostUser
+ 0, // 4: teleport.userprovisioning.v2.StaticHostUsersService.GetStaticHostUser:input_type -> teleport.userprovisioning.v2.GetStaticHostUserRequest
+ 1, // 5: teleport.userprovisioning.v2.StaticHostUsersService.ListStaticHostUsers:input_type -> teleport.userprovisioning.v2.ListStaticHostUsersRequest
+ 3, // 6: teleport.userprovisioning.v2.StaticHostUsersService.CreateStaticHostUser:input_type -> teleport.userprovisioning.v2.CreateStaticHostUserRequest
+ 4, // 7: teleport.userprovisioning.v2.StaticHostUsersService.UpdateStaticHostUser:input_type -> teleport.userprovisioning.v2.UpdateStaticHostUserRequest
+ 5, // 8: teleport.userprovisioning.v2.StaticHostUsersService.UpsertStaticHostUser:input_type -> teleport.userprovisioning.v2.UpsertStaticHostUserRequest
+ 6, // 9: teleport.userprovisioning.v2.StaticHostUsersService.DeleteStaticHostUser:input_type -> teleport.userprovisioning.v2.DeleteStaticHostUserRequest
+ 7, // 10: teleport.userprovisioning.v2.StaticHostUsersService.GetStaticHostUser:output_type -> teleport.userprovisioning.v2.StaticHostUser
+ 2, // 11: teleport.userprovisioning.v2.StaticHostUsersService.ListStaticHostUsers:output_type -> teleport.userprovisioning.v2.ListStaticHostUsersResponse
+ 7, // 12: teleport.userprovisioning.v2.StaticHostUsersService.CreateStaticHostUser:output_type -> teleport.userprovisioning.v2.StaticHostUser
+ 7, // 13: teleport.userprovisioning.v2.StaticHostUsersService.UpdateStaticHostUser:output_type -> teleport.userprovisioning.v2.StaticHostUser
+ 7, // 14: teleport.userprovisioning.v2.StaticHostUsersService.UpsertStaticHostUser:output_type -> teleport.userprovisioning.v2.StaticHostUser
+ 8, // 15: teleport.userprovisioning.v2.StaticHostUsersService.DeleteStaticHostUser:output_type -> google.protobuf.Empty
10, // [10:16] is the sub-list for method output_type
4, // [4:10] is the sub-list for method input_type
4, // [4:4] is the sub-list for extension type_name
@@ -560,14 +560,14 @@ var file_teleport_userprovisioning_v1_statichostuser_service_proto_depIdxs = []i
0, // [0:4] is the sub-list for field type_name
}
-func init() { file_teleport_userprovisioning_v1_statichostuser_service_proto_init() }
-func file_teleport_userprovisioning_v1_statichostuser_service_proto_init() {
- if File_teleport_userprovisioning_v1_statichostuser_service_proto != nil {
+func init() { file_teleport_userprovisioning_v2_statichostuser_service_proto_init() }
+func file_teleport_userprovisioning_v2_statichostuser_service_proto_init() {
+ if File_teleport_userprovisioning_v2_statichostuser_service_proto != nil {
return
}
- file_teleport_userprovisioning_v1_statichostuser_proto_init()
+ file_teleport_userprovisioning_v2_statichostuser_proto_init()
if !protoimpl.UnsafeEnabled {
- file_teleport_userprovisioning_v1_statichostuser_service_proto_msgTypes[0].Exporter = func(v any, i int) any {
+ file_teleport_userprovisioning_v2_statichostuser_service_proto_msgTypes[0].Exporter = func(v any, i int) any {
switch v := v.(*GetStaticHostUserRequest); i {
case 0:
return &v.state
@@ -579,7 +579,7 @@ func file_teleport_userprovisioning_v1_statichostuser_service_proto_init() {
return nil
}
}
- file_teleport_userprovisioning_v1_statichostuser_service_proto_msgTypes[1].Exporter = func(v any, i int) any {
+ file_teleport_userprovisioning_v2_statichostuser_service_proto_msgTypes[1].Exporter = func(v any, i int) any {
switch v := v.(*ListStaticHostUsersRequest); i {
case 0:
return &v.state
@@ -591,7 +591,7 @@ func file_teleport_userprovisioning_v1_statichostuser_service_proto_init() {
return nil
}
}
- file_teleport_userprovisioning_v1_statichostuser_service_proto_msgTypes[2].Exporter = func(v any, i int) any {
+ file_teleport_userprovisioning_v2_statichostuser_service_proto_msgTypes[2].Exporter = func(v any, i int) any {
switch v := v.(*ListStaticHostUsersResponse); i {
case 0:
return &v.state
@@ -603,7 +603,7 @@ func file_teleport_userprovisioning_v1_statichostuser_service_proto_init() {
return nil
}
}
- file_teleport_userprovisioning_v1_statichostuser_service_proto_msgTypes[3].Exporter = func(v any, i int) any {
+ file_teleport_userprovisioning_v2_statichostuser_service_proto_msgTypes[3].Exporter = func(v any, i int) any {
switch v := v.(*CreateStaticHostUserRequest); i {
case 0:
return &v.state
@@ -615,7 +615,7 @@ func file_teleport_userprovisioning_v1_statichostuser_service_proto_init() {
return nil
}
}
- file_teleport_userprovisioning_v1_statichostuser_service_proto_msgTypes[4].Exporter = func(v any, i int) any {
+ file_teleport_userprovisioning_v2_statichostuser_service_proto_msgTypes[4].Exporter = func(v any, i int) any {
switch v := v.(*UpdateStaticHostUserRequest); i {
case 0:
return &v.state
@@ -627,7 +627,7 @@ func file_teleport_userprovisioning_v1_statichostuser_service_proto_init() {
return nil
}
}
- file_teleport_userprovisioning_v1_statichostuser_service_proto_msgTypes[5].Exporter = func(v any, i int) any {
+ file_teleport_userprovisioning_v2_statichostuser_service_proto_msgTypes[5].Exporter = func(v any, i int) any {
switch v := v.(*UpsertStaticHostUserRequest); i {
case 0:
return &v.state
@@ -639,7 +639,7 @@ func file_teleport_userprovisioning_v1_statichostuser_service_proto_init() {
return nil
}
}
- file_teleport_userprovisioning_v1_statichostuser_service_proto_msgTypes[6].Exporter = func(v any, i int) any {
+ file_teleport_userprovisioning_v2_statichostuser_service_proto_msgTypes[6].Exporter = func(v any, i int) any {
switch v := v.(*DeleteStaticHostUserRequest); i {
case 0:
return &v.state
@@ -656,18 +656,18 @@ func file_teleport_userprovisioning_v1_statichostuser_service_proto_init() {
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
- RawDescriptor: file_teleport_userprovisioning_v1_statichostuser_service_proto_rawDesc,
+ RawDescriptor: file_teleport_userprovisioning_v2_statichostuser_service_proto_rawDesc,
NumEnums: 0,
NumMessages: 7,
NumExtensions: 0,
NumServices: 1,
},
- GoTypes: file_teleport_userprovisioning_v1_statichostuser_service_proto_goTypes,
- DependencyIndexes: file_teleport_userprovisioning_v1_statichostuser_service_proto_depIdxs,
- MessageInfos: file_teleport_userprovisioning_v1_statichostuser_service_proto_msgTypes,
+ GoTypes: file_teleport_userprovisioning_v2_statichostuser_service_proto_goTypes,
+ DependencyIndexes: file_teleport_userprovisioning_v2_statichostuser_service_proto_depIdxs,
+ MessageInfos: file_teleport_userprovisioning_v2_statichostuser_service_proto_msgTypes,
}.Build()
- File_teleport_userprovisioning_v1_statichostuser_service_proto = out.File
- file_teleport_userprovisioning_v1_statichostuser_service_proto_rawDesc = nil
- file_teleport_userprovisioning_v1_statichostuser_service_proto_goTypes = nil
- file_teleport_userprovisioning_v1_statichostuser_service_proto_depIdxs = nil
+ File_teleport_userprovisioning_v2_statichostuser_service_proto = out.File
+ file_teleport_userprovisioning_v2_statichostuser_service_proto_rawDesc = nil
+ file_teleport_userprovisioning_v2_statichostuser_service_proto_goTypes = nil
+ file_teleport_userprovisioning_v2_statichostuser_service_proto_depIdxs = nil
}
diff --git a/api/gen/proto/go/teleport/userprovisioning/v1/statichostuser_service_grpc.pb.go b/api/gen/proto/go/teleport/userprovisioning/v2/statichostuser_service_grpc.pb.go
similarity index 96%
rename from api/gen/proto/go/teleport/userprovisioning/v1/statichostuser_service_grpc.pb.go
rename to api/gen/proto/go/teleport/userprovisioning/v2/statichostuser_service_grpc.pb.go
index 1ea975f12228b..99a10898fa3ab 100644
--- a/api/gen/proto/go/teleport/userprovisioning/v1/statichostuser_service_grpc.pb.go
+++ b/api/gen/proto/go/teleport/userprovisioning/v2/statichostuser_service_grpc.pb.go
@@ -16,9 +16,9 @@
// versions:
// - protoc-gen-go-grpc v1.5.1
// - protoc (unknown)
-// source: teleport/userprovisioning/v1/statichostuser_service.proto
+// source: teleport/userprovisioning/v2/statichostuser_service.proto
-package userprovisioningv1
+package userprovisioningv2
import (
context "context"
@@ -34,12 +34,12 @@ import (
const _ = grpc.SupportPackageIsVersion9
const (
- StaticHostUsersService_GetStaticHostUser_FullMethodName = "/teleport.userprovisioning.v1.StaticHostUsersService/GetStaticHostUser"
- StaticHostUsersService_ListStaticHostUsers_FullMethodName = "/teleport.userprovisioning.v1.StaticHostUsersService/ListStaticHostUsers"
- StaticHostUsersService_CreateStaticHostUser_FullMethodName = "/teleport.userprovisioning.v1.StaticHostUsersService/CreateStaticHostUser"
- StaticHostUsersService_UpdateStaticHostUser_FullMethodName = "/teleport.userprovisioning.v1.StaticHostUsersService/UpdateStaticHostUser"
- StaticHostUsersService_UpsertStaticHostUser_FullMethodName = "/teleport.userprovisioning.v1.StaticHostUsersService/UpsertStaticHostUser"
- StaticHostUsersService_DeleteStaticHostUser_FullMethodName = "/teleport.userprovisioning.v1.StaticHostUsersService/DeleteStaticHostUser"
+ StaticHostUsersService_GetStaticHostUser_FullMethodName = "/teleport.userprovisioning.v2.StaticHostUsersService/GetStaticHostUser"
+ StaticHostUsersService_ListStaticHostUsers_FullMethodName = "/teleport.userprovisioning.v2.StaticHostUsersService/ListStaticHostUsers"
+ StaticHostUsersService_CreateStaticHostUser_FullMethodName = "/teleport.userprovisioning.v2.StaticHostUsersService/CreateStaticHostUser"
+ StaticHostUsersService_UpdateStaticHostUser_FullMethodName = "/teleport.userprovisioning.v2.StaticHostUsersService/UpdateStaticHostUser"
+ StaticHostUsersService_UpsertStaticHostUser_FullMethodName = "/teleport.userprovisioning.v2.StaticHostUsersService/UpsertStaticHostUser"
+ StaticHostUsersService_DeleteStaticHostUser_FullMethodName = "/teleport.userprovisioning.v2.StaticHostUsersService/DeleteStaticHostUser"
)
// StaticHostUsersServiceClient is the client API for StaticHostUsersService service.
@@ -310,7 +310,7 @@ func _StaticHostUsersService_DeleteStaticHostUser_Handler(srv interface{}, ctx c
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var StaticHostUsersService_ServiceDesc = grpc.ServiceDesc{
- ServiceName: "teleport.userprovisioning.v1.StaticHostUsersService",
+ ServiceName: "teleport.userprovisioning.v2.StaticHostUsersService",
HandlerType: (*StaticHostUsersServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
@@ -339,5 +339,5 @@ var StaticHostUsersService_ServiceDesc = grpc.ServiceDesc{
},
},
Streams: []grpc.StreamDesc{},
- Metadata: "teleport/userprovisioning/v1/statichostuser_service.proto",
+ Metadata: "teleport/userprovisioning/v2/statichostuser_service.proto",
}
diff --git a/api/proto/teleport/legacy/client/proto/event.proto b/api/proto/teleport/legacy/client/proto/event.proto
index 1724044c96496..793ed8f43fd6d 100644
--- a/api/proto/teleport/legacy/client/proto/event.proto
+++ b/api/proto/teleport/legacy/client/proto/event.proto
@@ -30,7 +30,7 @@ import "teleport/machineid/v1/federation.proto";
import "teleport/notifications/v1/notifications.proto";
import "teleport/secreports/v1/secreports.proto";
import "teleport/userloginstate/v1/userloginstate.proto";
-import "teleport/userprovisioning/v1/statichostuser.proto";
+import "teleport/userprovisioning/v2/statichostuser.proto";
option go_package = "github.com/gravitational/teleport/api/client/proto";
@@ -49,7 +49,9 @@ enum Operation {
message Event {
reserved 7;
reserved 49;
+ reserved 63;
reserved "ExternalCloudAudit";
+ reserved "StaticHostUser";
// Operation identifies operation
Operation Type = 1;
@@ -176,11 +178,11 @@ message Event {
teleport.clusterconfig.v1.AccessGraphSettings AccessGraphSettings = 61;
// SPIFFEFederation is a resource for SPIFFE federation.
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;
+ // StaticHostUserV2 is a resource for static host users.
+ teleport.userprovisioning.v2.StaticHostUser StaticHostUserV2 = 66;
}
}
diff --git a/api/proto/teleport/userprovisioning/v1/statichostuser.proto b/api/proto/teleport/userprovisioning/v2/statichostuser.proto
similarity index 78%
rename from api/proto/teleport/userprovisioning/v1/statichostuser.proto
rename to api/proto/teleport/userprovisioning/v2/statichostuser.proto
index 24309445c89bc..61875fe007890 100644
--- a/api/proto/teleport/userprovisioning/v1/statichostuser.proto
+++ b/api/proto/teleport/userprovisioning/v2/statichostuser.proto
@@ -14,12 +14,12 @@
syntax = "proto3";
-package teleport.userprovisioning.v1;
+package teleport.userprovisioning.v2;
import "teleport/header/v1/metadata.proto";
-import "teleport/legacy/types/wrappers/wrappers.proto";
+import "teleport/label/v1/label.proto";
-option go_package = "github.com/gravitational/teleport/api/gen/proto/go/teleport/userprovisioning/v1;userprovisioningv1";
+option go_package = "github.com/gravitational/teleport/api/gen/proto/go/teleport/userprovisioning/v2;userprovisioningv2";
// StaticHostUser is a resource that represents host users that should be
// created on matching nodes.
@@ -29,7 +29,7 @@ message StaticHostUser {
// sub_kind is an optional resource sub kind, used in some resources.
string sub_kind = 2;
// version is the resource version. It must be specified.
- // Supported values are: `v1`.
+ // Supported values are: `v2`.
string version = 3;
// metadata is resource metadata.
teleport.header.v1.Metadata metadata = 4;
@@ -37,22 +37,25 @@ message StaticHostUser {
StaticHostUserSpec spec = 5;
}
-// StaticHostUserSpec is the static host user spec.
-message StaticHostUserSpec {
- // login is the login to create on the node.
- string login = 1;
- // groups is a list of additional groups to add the user to.
- repeated string groups = 2;
- // sudoers is a list of sudoer entries to add.
- repeated string sudoers = 3;
- // uid is the new user's uid.
- string uid = 4;
- // gid is the new user's gid.
- string gid = 5;
+// Matcher is a matcher for nodes to add the user to.
+message Matcher {
// node_labels is a map of node labels that will create a user from this
// resource.
- wrappers.LabelValues node_labels = 6;
+ repeated teleport.label.v1.Label node_labels = 1;
// node_labels_expression is a predicate expression to create a user from
// this resource.
- string node_labels_expression = 7;
+ string node_labels_expression = 2;
+ // groups is a list of additional groups to add the user to.
+ repeated string groups = 3;
+ // sudoers is a list of sudoer entries to add.
+ repeated string sudoers = 4;
+ // uid is the new user's uid.
+ int64 uid = 5;
+ // gid is the new user's gid.
+ int64 gid = 6;
+}
+
+// StaticHostUserSpec is the static host user spec.
+message StaticHostUserSpec {
+ repeated Matcher matchers = 1;
}
diff --git a/api/proto/teleport/userprovisioning/v1/statichostuser_service.proto b/api/proto/teleport/userprovisioning/v2/statichostuser_service.proto
similarity index 95%
rename from api/proto/teleport/userprovisioning/v1/statichostuser_service.proto
rename to api/proto/teleport/userprovisioning/v2/statichostuser_service.proto
index 35ff5b890bacd..a6b116502f292 100644
--- a/api/proto/teleport/userprovisioning/v1/statichostuser_service.proto
+++ b/api/proto/teleport/userprovisioning/v2/statichostuser_service.proto
@@ -14,12 +14,12 @@
syntax = "proto3";
-package teleport.userprovisioning.v1;
+package teleport.userprovisioning.v2;
import "google/protobuf/empty.proto";
-import "teleport/userprovisioning/v1/statichostuser.proto";
+import "teleport/userprovisioning/v2/statichostuser.proto";
-option go_package = "github.com/gravitational/teleport/api/gen/proto/go/teleport/userprovisioning/v1;userprovisioningv1";
+option go_package = "github.com/gravitational/teleport/api/gen/proto/go/teleport/userprovisioning/v2;userprovisioningv2";
// StaticHostUsersService provides methods to manage static host users.
service StaticHostUsersService {
diff --git a/api/types/userprovisioning/statichostuser.go b/api/types/userprovisioning/statichostuser.go
index e9bab8cbf5d55..0755893c6d5f5 100644
--- a/api/types/userprovisioning/statichostuser.go
+++ b/api/types/userprovisioning/statichostuser.go
@@ -20,7 +20,7 @@ package userprovisioning
import (
headerv1 "github.com/gravitational/teleport/api/gen/proto/go/teleport/header/v1"
- userprovisioningpb "github.com/gravitational/teleport/api/gen/proto/go/teleport/userprovisioning/v1"
+ userprovisioningpb "github.com/gravitational/teleport/api/gen/proto/go/teleport/userprovisioning/v2"
"github.com/gravitational/teleport/api/types"
)
@@ -28,7 +28,7 @@ import (
func NewStaticHostUser(name string, spec *userprovisioningpb.StaticHostUserSpec) *userprovisioningpb.StaticHostUser {
return &userprovisioningpb.StaticHostUser{
Kind: types.KindStaticHostUser,
- Version: types.V1,
+ Version: types.V2,
Metadata: &headerv1.Metadata{
Name: name,
},
diff --git a/lib/auth/authclient/api.go b/lib/auth/authclient/api.go
index b4a3fd3479e65..83c7f1c9c8c89 100644
--- a/lib/auth/authclient/api.go
+++ b/lib/auth/authclient/api.go
@@ -33,7 +33,7 @@ import (
integrationpb "github.com/gravitational/teleport/api/gen/proto/go/teleport/integration/v1"
kubewaitingcontainerpb "github.com/gravitational/teleport/api/gen/proto/go/teleport/kubewaitingcontainer/v1"
machineidv1 "github.com/gravitational/teleport/api/gen/proto/go/teleport/machineid/v1"
- userprovisioningpb "github.com/gravitational/teleport/api/gen/proto/go/teleport/userprovisioning/v1"
+ userprovisioningpb "github.com/gravitational/teleport/api/gen/proto/go/teleport/userprovisioning/v2"
userspb "github.com/gravitational/teleport/api/gen/proto/go/teleport/users/v1"
"github.com/gravitational/teleport/api/types"
"github.com/gravitational/teleport/api/types/accesslist"
diff --git a/lib/auth/grpcserver.go b/lib/auth/grpcserver.go
index f580ddad37405..7cb9c7ac702fe 100644
--- a/lib/auth/grpcserver.go
+++ b/lib/auth/grpcserver.go
@@ -66,7 +66,7 @@ import (
presencev1pb "github.com/gravitational/teleport/api/gen/proto/go/teleport/presence/v1"
trustpb "github.com/gravitational/teleport/api/gen/proto/go/teleport/trust/v1"
userloginstatev1 "github.com/gravitational/teleport/api/gen/proto/go/teleport/userloginstate/v1"
- userprovisioningpb "github.com/gravitational/teleport/api/gen/proto/go/teleport/userprovisioning/v1"
+ userprovisioningpb "github.com/gravitational/teleport/api/gen/proto/go/teleport/userprovisioning/v2"
userspb "github.com/gravitational/teleport/api/gen/proto/go/teleport/users/v1"
"github.com/gravitational/teleport/api/gen/proto/go/teleport/vnet/v1"
userpreferencespb "github.com/gravitational/teleport/api/gen/proto/go/userpreferences/v1"
@@ -90,10 +90,10 @@ import (
notifications "github.com/gravitational/teleport/lib/auth/notifications/notificationsv1"
"github.com/gravitational/teleport/lib/auth/okta"
"github.com/gravitational/teleport/lib/auth/presence/presencev1"
- statichostuserv1 "github.com/gravitational/teleport/lib/auth/statichostuser"
"github.com/gravitational/teleport/lib/auth/trust/trustv1"
"github.com/gravitational/teleport/lib/auth/userloginstate"
"github.com/gravitational/teleport/lib/auth/userpreferences/userpreferencesv1"
+ userprovisioningv1 "github.com/gravitational/teleport/lib/auth/userprovisioning/v2"
"github.com/gravitational/teleport/lib/auth/users/usersv1"
"github.com/gravitational/teleport/lib/auth/vnetconfig/v1"
"github.com/gravitational/teleport/lib/authz"
@@ -5424,7 +5424,7 @@ func NewGRPCServer(cfg GRPCServerConfig) (*GRPCServer, error) {
vnetConfigServiceServer := vnetconfig.NewService(vnetConfigStorage, cfg.Authorizer)
vnet.RegisterVnetConfigServiceServer(server, vnetConfigServiceServer)
- staticHostUserServer, err := statichostuserv1.NewService(statichostuserv1.ServiceConfig{
+ staticHostUserServer, err := userprovisioningv1.NewService(userprovisioningv1.ServiceConfig{
Authorizer: cfg.Authorizer,
Backend: cfg.AuthServer.Services,
Cache: cfg.AuthServer.Cache,
diff --git a/lib/auth/statichostuser/service.go b/lib/auth/userprovisioning/v2/service.go
similarity index 99%
rename from lib/auth/statichostuser/service.go
rename to lib/auth/userprovisioning/v2/service.go
index 2e157bbe9dec1..cd949eaac8d36 100644
--- a/lib/auth/statichostuser/service.go
+++ b/lib/auth/userprovisioning/v2/service.go
@@ -14,7 +14,7 @@
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see .
-package statichostuser
+package v2
import (
"context"
@@ -22,7 +22,7 @@ import (
"github.com/gravitational/trace"
"google.golang.org/protobuf/types/known/emptypb"
- userprovisioningpb "github.com/gravitational/teleport/api/gen/proto/go/teleport/userprovisioning/v1"
+ userprovisioningpb "github.com/gravitational/teleport/api/gen/proto/go/teleport/userprovisioning/v2"
"github.com/gravitational/teleport/api/types"
"github.com/gravitational/teleport/lib/authz"
"github.com/gravitational/teleport/lib/services"
diff --git a/lib/auth/statichostuser/service_test.go b/lib/auth/userprovisioning/v2/service_test.go
similarity index 97%
rename from lib/auth/statichostuser/service_test.go
rename to lib/auth/userprovisioning/v2/service_test.go
index 8bb954be0a672..1626510417826 100644
--- a/lib/auth/statichostuser/service_test.go
+++ b/lib/auth/userprovisioning/v2/service_test.go
@@ -14,7 +14,7 @@
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see .
-package statichostuser
+package v2
import (
"context"
@@ -25,10 +25,10 @@ import (
"github.com/gravitational/trace"
"github.com/stretchr/testify/require"
- userprovisioningpb "github.com/gravitational/teleport/api/gen/proto/go/teleport/userprovisioning/v1"
+ labelv1 "github.com/gravitational/teleport/api/gen/proto/go/teleport/label/v1"
+ userprovisioningpb "github.com/gravitational/teleport/api/gen/proto/go/teleport/userprovisioning/v2"
"github.com/gravitational/teleport/api/types"
"github.com/gravitational/teleport/api/types/userprovisioning"
- "github.com/gravitational/teleport/api/types/wrappers"
"github.com/gravitational/teleport/lib/authz"
"github.com/gravitational/teleport/lib/backend/memory"
"github.com/gravitational/teleport/lib/services/local"
@@ -44,13 +44,15 @@ func staticHostUserName(i int) string {
func makeStaticHostUser(i int) *userprovisioningpb.StaticHostUser {
name := staticHostUserName(i)
return userprovisioning.NewStaticHostUser(name, &userprovisioningpb.StaticHostUserSpec{
- Login: name,
- Groups: []string{"foo", "bar"},
- NodeLabels: &wrappers.LabelValues{
- Values: map[string]wrappers.StringValues{
- "foo": {
- Values: []string{"bar"},
+ Matchers: []*userprovisioningpb.Matcher{
+ {
+ NodeLabels: []*labelv1.Label{
+ {
+ Name: "foo",
+ Values: []string{"bar"},
+ },
},
+ Groups: []string{"foo", "bar"},
},
},
})
@@ -121,7 +123,7 @@ func TestStaticHostUserCRUD(t *testing.T) {
if err != nil {
return trace.Wrap(err)
}
- hostUser.Spec.Login = "bob"
+ hostUser.Spec.Matchers[0].Groups = []string{"baz", "quux"}
_, err = svc.UpdateStaticHostUser(ctx, &userprovisioningpb.UpdateStaticHostUserRequest{
User: hostUser,
})
diff --git a/lib/cache/cache.go b/lib/cache/cache.go
index 9229996865a2e..9a73ca730b4f7 100644
--- a/lib/cache/cache.go
+++ b/lib/cache/cache.go
@@ -43,7 +43,7 @@ import (
dbobjectv1 "github.com/gravitational/teleport/api/gen/proto/go/teleport/dbobject/v1"
kubewaitingcontainerpb "github.com/gravitational/teleport/api/gen/proto/go/teleport/kubewaitingcontainer/v1"
notificationsv1 "github.com/gravitational/teleport/api/gen/proto/go/teleport/notifications/v1"
- userprovisioningpb "github.com/gravitational/teleport/api/gen/proto/go/teleport/userprovisioning/v1"
+ userprovisioningpb "github.com/gravitational/teleport/api/gen/proto/go/teleport/userprovisioning/v2"
userspb "github.com/gravitational/teleport/api/gen/proto/go/teleport/users/v1"
"github.com/gravitational/teleport/api/internalutils/stream"
apitracing "github.com/gravitational/teleport/api/observability/tracing"
diff --git a/lib/cache/cache_test.go b/lib/cache/cache_test.go
index e3f8e43719635..e9211aed2cdb0 100644
--- a/lib/cache/cache_test.go
+++ b/lib/cache/cache_test.go
@@ -48,8 +48,9 @@ import (
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"
+ labelv1 "github.com/gravitational/teleport/api/gen/proto/go/teleport/label/v1"
notificationsv1 "github.com/gravitational/teleport/api/gen/proto/go/teleport/notifications/v1"
- userprovisioningpb "github.com/gravitational/teleport/api/gen/proto/go/teleport/userprovisioning/v1"
+ userprovisioningpb "github.com/gravitational/teleport/api/gen/proto/go/teleport/userprovisioning/v2"
"github.com/gravitational/teleport/api/types"
"github.com/gravitational/teleport/api/types/accesslist"
"github.com/gravitational/teleport/api/types/clusterconfig"
@@ -3823,8 +3824,17 @@ func newAccessMonitoringRule(t *testing.T) *accessmonitoringrulesv1.AccessMonito
func newStaticHostUser(t *testing.T, name string) *userprovisioningpb.StaticHostUser {
t.Helper()
return userprovisioning.NewStaticHostUser(name, &userprovisioningpb.StaticHostUserSpec{
- Login: "foo",
- Groups: []string{"bar", "baz"},
+ Matchers: []*userprovisioningpb.Matcher{
+ {
+ NodeLabels: []*labelv1.Label{
+ {
+ Name: "foo",
+ Values: []string{"bar"},
+ },
+ },
+ Groups: []string{"foo", "bar"},
+ },
+ },
})
}
diff --git a/lib/cache/collections.go b/lib/cache/collections.go
index 747ede4464b61..d12b8d9961306 100644
--- a/lib/cache/collections.go
+++ b/lib/cache/collections.go
@@ -35,7 +35,7 @@ import (
kubewaitingcontainerpb "github.com/gravitational/teleport/api/gen/proto/go/teleport/kubewaitingcontainer/v1"
machineidv1 "github.com/gravitational/teleport/api/gen/proto/go/teleport/machineid/v1"
notificationsv1 "github.com/gravitational/teleport/api/gen/proto/go/teleport/notifications/v1"
- userprovisioningpb "github.com/gravitational/teleport/api/gen/proto/go/teleport/userprovisioning/v1"
+ userprovisioningpb "github.com/gravitational/teleport/api/gen/proto/go/teleport/userprovisioning/v2"
userspb "github.com/gravitational/teleport/api/gen/proto/go/teleport/users/v1"
"github.com/gravitational/teleport/api/types"
"github.com/gravitational/teleport/api/types/accesslist"
diff --git a/lib/services/local/events.go b/lib/services/local/events.go
index af4ce9f862189..a36f431208091 100644
--- a/lib/services/local/events.go
+++ b/lib/services/local/events.go
@@ -33,7 +33,7 @@ import (
kubewaitingcontainerpb "github.com/gravitational/teleport/api/gen/proto/go/teleport/kubewaitingcontainer/v1"
machineidv1 "github.com/gravitational/teleport/api/gen/proto/go/teleport/machineid/v1"
notificationsv1 "github.com/gravitational/teleport/api/gen/proto/go/teleport/notifications/v1"
- userprovisioningpb "github.com/gravitational/teleport/api/gen/proto/go/teleport/userprovisioning/v1"
+ userprovisioningpb "github.com/gravitational/teleport/api/gen/proto/go/teleport/userprovisioning/v2"
"github.com/gravitational/teleport/api/types"
"github.com/gravitational/teleport/api/types/kubewaitingcontainer"
"github.com/gravitational/teleport/lib/backend"
diff --git a/lib/services/local/statichostuser.go b/lib/services/local/statichostuser.go
index 83eeead686f57..5f4edda94cb7f 100644
--- a/lib/services/local/statichostuser.go
+++ b/lib/services/local/statichostuser.go
@@ -23,7 +23,7 @@ import (
"github.com/gravitational/trace"
- userprovisioningpb "github.com/gravitational/teleport/api/gen/proto/go/teleport/userprovisioning/v1"
+ userprovisioningpb "github.com/gravitational/teleport/api/gen/proto/go/teleport/userprovisioning/v2"
"github.com/gravitational/teleport/api/types"
"github.com/gravitational/teleport/lib/backend"
"github.com/gravitational/teleport/lib/services"
diff --git a/lib/services/local/statichostuser_test.go b/lib/services/local/statichostuser_test.go
index 65e1fb6f95209..8f0e02b64e400 100644
--- a/lib/services/local/statichostuser_test.go
+++ b/lib/services/local/statichostuser_test.go
@@ -34,7 +34,8 @@ import (
"google.golang.org/protobuf/types/known/timestamppb"
headerv1 "github.com/gravitational/teleport/api/gen/proto/go/teleport/header/v1"
- userprovisioningpb "github.com/gravitational/teleport/api/gen/proto/go/teleport/userprovisioning/v1"
+ labelv1 "github.com/gravitational/teleport/api/gen/proto/go/teleport/label/v1"
+ userprovisioningpb "github.com/gravitational/teleport/api/gen/proto/go/teleport/userprovisioning/v2"
"github.com/gravitational/teleport/api/types/userprovisioning"
"github.com/gravitational/teleport/lib/backend/memory"
"github.com/gravitational/teleport/lib/services"
@@ -265,10 +266,19 @@ func getStaticHostUserService(t *testing.T) services.StaticHostUser {
func getStaticHostUser(index int) *userprovisioningpb.StaticHostUser {
name := fmt.Sprintf("obj%v", index)
return userprovisioning.NewStaticHostUser(name, &userprovisioningpb.StaticHostUserSpec{
- Login: "alice",
- Groups: []string{"foo", "bar"},
- Uid: "1234",
- Gid: "1234",
+ Matchers: []*userprovisioningpb.Matcher{
+ {
+ NodeLabels: []*labelv1.Label{
+ {
+ Name: "foo",
+ Values: []string{"bar"},
+ },
+ },
+ Groups: []string{"foo", "bar"},
+ Uid: 1234,
+ Gid: 5678,
+ },
+ },
})
}
diff --git a/lib/services/statichostuser.go b/lib/services/statichostuser.go
index 6d6b9c362c86f..599cb2cd83cbf 100644
--- a/lib/services/statichostuser.go
+++ b/lib/services/statichostuser.go
@@ -20,11 +20,10 @@ package services
import (
"context"
- "strconv"
"github.com/gravitational/trace"
- userprovisioningpb "github.com/gravitational/teleport/api/gen/proto/go/teleport/userprovisioning/v1"
+ userprovisioningpb "github.com/gravitational/teleport/api/gen/proto/go/teleport/userprovisioning/v2"
"github.com/gravitational/teleport/api/types"
)
@@ -45,20 +44,10 @@ type StaticHostUser interface {
DeleteStaticHostUser(ctx context.Context, name string) error
}
-func isValidUidOrGid(s string) bool {
- // No uid/gid is OK.
- if s == "" {
- return true
- }
- // If uid/gid is present, it must be an integer (uid/gid are strings instead
- // of ints to match user traits).
- _, err := strconv.Atoi(s)
- return err == nil
-}
-
// ValidateStaticHostUser checks that required parameters are set for the
// specified StaticHostUser.
func ValidateStaticHostUser(u *userprovisioningpb.StaticHostUser) error {
+ // Check if required info exists.
if u == nil {
return trace.BadParameter("StaticHostUser is nil")
}
@@ -71,26 +60,25 @@ func ValidateStaticHostUser(u *userprovisioningpb.StaticHostUser) error {
if u.Spec == nil {
return trace.BadParameter("Spec is nil")
}
- if u.Spec.Login == "" {
- return trace.BadParameter("missing login")
+
+ if len(u.Spec.Matchers) == 0 {
+ return trace.BadParameter("missing matchers")
}
- if u.Spec.NodeLabels != nil {
- for key, value := range u.Spec.NodeLabels.Values {
- if key == types.Wildcard && !(len(value.Values) == 1 && value.Values[0] == types.Wildcard) {
+ for _, matcher := range u.Spec.Matchers {
+ // Check if matcher can match any resources.
+ if len(matcher.NodeLabels) == 0 && len(matcher.NodeLabelsExpression) == 0 {
+ return trace.BadParameter("either NodeLabels or NodeLabelsExpression must be set")
+ }
+ for _, label := range matcher.NodeLabels {
+ if label.Name == types.Wildcard && !(len(label.Values) == 1 && label.Values[0] == types.Wildcard) {
return trace.BadParameter("selector *: is not supported")
}
}
- }
- if len(u.Spec.NodeLabelsExpression) > 0 {
- if _, err := parseLabelExpression(u.Spec.NodeLabelsExpression); err != nil {
- return trace.BadParameter("parsing node labels expression: %v", err)
+ if len(matcher.NodeLabelsExpression) > 0 {
+ if _, err := parseLabelExpression(matcher.NodeLabelsExpression); err != nil {
+ return trace.BadParameter("parsing node labels expression: %v", err)
+ }
}
}
- if !isValidUidOrGid(u.Spec.Uid) {
- return trace.BadParameter("invalid uid: %q", u.Spec.Uid)
- }
- if !isValidUidOrGid(u.Spec.Gid) {
- return trace.BadParameter("invalid gid: %q", u.Spec.Gid)
- }
return nil
}
diff --git a/lib/services/statichostuser_test.go b/lib/services/statichostuser_test.go
index 454e3e26efed4..39af255229f74 100644
--- a/lib/services/statichostuser_test.go
+++ b/lib/services/statichostuser_test.go
@@ -23,30 +23,15 @@ import (
"github.com/stretchr/testify/require"
- userprovisioningpb "github.com/gravitational/teleport/api/gen/proto/go/teleport/userprovisioning/v1"
+ labelv1 "github.com/gravitational/teleport/api/gen/proto/go/teleport/label/v1"
+ userprovisioningpb "github.com/gravitational/teleport/api/gen/proto/go/teleport/userprovisioning/v2"
"github.com/gravitational/teleport/api/types"
"github.com/gravitational/teleport/api/types/userprovisioning"
- "github.com/gravitational/teleport/api/types/wrappers"
)
func TestValidateStaticHostUser(t *testing.T) {
t.Parallel()
- nodeLabels := func(labels map[string]string) *wrappers.LabelValues {
- if len(labels) == 0 {
- return nil
- }
- values := &wrappers.LabelValues{
- Values: make(map[string]wrappers.StringValues, len(labels)),
- }
- for k, v := range labels {
- values.Values[k] = wrappers.StringValues{
- Values: []string{v},
- }
- }
- return values
- }
-
tests := []struct {
name string
hostUser *userprovisioningpb.StaticHostUser
@@ -59,7 +44,16 @@ func TestValidateStaticHostUser(t *testing.T) {
{
name: "no name",
hostUser: userprovisioning.NewStaticHostUser("", &userprovisioningpb.StaticHostUserSpec{
- Login: "alice",
+ Matchers: []*userprovisioningpb.Matcher{
+ {
+ NodeLabels: []*labelv1.Label{
+ {
+ Name: "foo",
+ Values: []string{"bar"},
+ },
+ },
+ },
+ },
}),
assert: require.Error,
},
@@ -69,68 +63,78 @@ func TestValidateStaticHostUser(t *testing.T) {
assert: require.Error,
},
{
- name: "missing login",
- hostUser: userprovisioning.NewStaticHostUser("alice_user", &userprovisioningpb.StaticHostUserSpec{}),
+ name: "no matchers",
+ hostUser: userprovisioning.NewStaticHostUser("alice", &userprovisioningpb.StaticHostUserSpec{}),
assert: require.Error,
},
{
name: "invalid node labels",
hostUser: userprovisioning.NewStaticHostUser("alice_user", &userprovisioningpb.StaticHostUserSpec{
- Login: "alice",
- NodeLabels: nodeLabels(map[string]string{types.Wildcard: "bar"}),
+ Matchers: []*userprovisioningpb.Matcher{
+ {
+ NodeLabels: []*labelv1.Label{
+ {
+ Name: types.Wildcard,
+ Values: []string{"bar"},
+ },
+ },
+ },
+ },
}),
assert: require.Error,
},
{
name: "invalid node labels expression",
hostUser: userprovisioning.NewStaticHostUser("alice_user", &userprovisioningpb.StaticHostUserSpec{
- Login: "alice",
- NodeLabelsExpression: "foo bar xyz",
+ Matchers: []*userprovisioningpb.Matcher{
+ {
+ NodeLabelsExpression: "foo bar xyz",
+ },
+ },
}),
assert: require.Error,
},
{
name: "valid wildcard labels",
hostUser: userprovisioning.NewStaticHostUser("alice_user", &userprovisioningpb.StaticHostUserSpec{
- Login: "alice",
- NodeLabels: nodeLabels(map[string]string{
- "foo": types.Wildcard,
- types.Wildcard: types.Wildcard,
- }),
+ Matchers: []*userprovisioningpb.Matcher{
+ {
+ NodeLabels: []*labelv1.Label{
+ {
+ Name: "foo",
+ Values: []string{types.Wildcard},
+ },
+ },
+ },
+ {
+ NodeLabels: []*labelv1.Label{
+ {
+ Name: types.Wildcard,
+ Values: []string{types.Wildcard},
+ },
+ },
+ },
+ },
}),
assert: require.NoError,
},
- {
- name: "non-numeric uid",
- hostUser: userprovisioning.NewStaticHostUser("alice_user", &userprovisioningpb.StaticHostUserSpec{
- Login: "alice",
- Groups: []string{"foo", "bar"},
- Uid: "abcd",
- Gid: "1234",
- NodeLabels: nodeLabels(map[string]string{"foo": "bar"}),
- }),
- assert: require.Error,
- },
- {
- name: "non-numeric gid",
- hostUser: userprovisioning.NewStaticHostUser("alice_user", &userprovisioningpb.StaticHostUserSpec{
- Login: "alice",
- Groups: []string{"foo", "bar"},
- Uid: "1234",
- Gid: "abcd",
- NodeLabels: nodeLabels(map[string]string{"foo": "bar"}),
- }),
- assert: require.Error,
- },
{
name: "ok",
hostUser: userprovisioning.NewStaticHostUser("alice_user", &userprovisioningpb.StaticHostUserSpec{
- Login: "alice",
- Groups: []string{"foo", "bar"},
- Uid: "1234",
- Gid: "5678",
- NodeLabels: nodeLabels(map[string]string{"foo": "bar"}),
- NodeLabelsExpression: `labels["env"] == "staging" || labels["env"] == "test"`,
+ Matchers: []*userprovisioningpb.Matcher{
+ {
+ NodeLabels: []*labelv1.Label{
+ {
+ Name: "foo",
+ Values: []string{"bar"},
+ },
+ },
+ Groups: []string{"foo", "bar"},
+ NodeLabelsExpression: `labels["env"] == "staging" || labels["env"] == "test"`,
+ Uid: 1234,
+ Gid: 1234,
+ },
+ },
}),
assert: require.NoError,
},