loginrulev1

package
v0.0.0-...-d18ea81 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 4, 2024 License: Apache-2.0 Imports: 11 Imported by: 10

Documentation

Index

Constants

View Source
const (
	LoginRuleService_CreateLoginRule_FullMethodName = "/teleport.loginrule.v1.LoginRuleService/CreateLoginRule"
	LoginRuleService_UpsertLoginRule_FullMethodName = "/teleport.loginrule.v1.LoginRuleService/UpsertLoginRule"
	LoginRuleService_GetLoginRule_FullMethodName    = "/teleport.loginrule.v1.LoginRuleService/GetLoginRule"
	LoginRuleService_ListLoginRules_FullMethodName  = "/teleport.loginrule.v1.LoginRuleService/ListLoginRules"
	LoginRuleService_DeleteLoginRule_FullMethodName = "/teleport.loginrule.v1.LoginRuleService/DeleteLoginRule"
	LoginRuleService_TestLoginRule_FullMethodName   = "/teleport.loginrule.v1.LoginRuleService/TestLoginRule"
)

Variables

View Source
var File_teleport_loginrule_v1_loginrule_proto protoreflect.FileDescriptor
View Source
var File_teleport_loginrule_v1_loginrule_service_proto protoreflect.FileDescriptor
View Source
var LoginRuleService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "teleport.loginrule.v1.LoginRuleService",
	HandlerType: (*LoginRuleServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "CreateLoginRule",
			Handler:    _LoginRuleService_CreateLoginRule_Handler,
		},
		{
			MethodName: "UpsertLoginRule",
			Handler:    _LoginRuleService_UpsertLoginRule_Handler,
		},
		{
			MethodName: "GetLoginRule",
			Handler:    _LoginRuleService_GetLoginRule_Handler,
		},
		{
			MethodName: "ListLoginRules",
			Handler:    _LoginRuleService_ListLoginRules_Handler,
		},
		{
			MethodName: "DeleteLoginRule",
			Handler:    _LoginRuleService_DeleteLoginRule_Handler,
		},
		{
			MethodName: "TestLoginRule",
			Handler:    _LoginRuleService_TestLoginRule_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "teleport/loginrule/v1/loginrule_service.proto",
}

LoginRuleService_ServiceDesc is the grpc.ServiceDesc for LoginRuleService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterLoginRuleServiceServer

func RegisterLoginRuleServiceServer(s grpc.ServiceRegistrar, srv LoginRuleServiceServer)

Types

type CreateLoginRuleRequest

type CreateLoginRuleRequest struct {

	// LoginRule is the login rule to be created.
	LoginRule *LoginRule `protobuf:"bytes,1,opt,name=login_rule,json=loginRule,proto3" json:"login_rule,omitempty"`
	// contains filtered or unexported fields
}

CreateLoginRuleRequest is a request to create a login rule.

func (*CreateLoginRuleRequest) Descriptor deprecated

func (*CreateLoginRuleRequest) Descriptor() ([]byte, []int)

Deprecated: Use CreateLoginRuleRequest.ProtoReflect.Descriptor instead.

func (*CreateLoginRuleRequest) GetLoginRule

func (x *CreateLoginRuleRequest) GetLoginRule() *LoginRule

func (*CreateLoginRuleRequest) ProtoMessage

func (*CreateLoginRuleRequest) ProtoMessage()

func (*CreateLoginRuleRequest) ProtoReflect

func (x *CreateLoginRuleRequest) ProtoReflect() protoreflect.Message

func (*CreateLoginRuleRequest) Reset

func (x *CreateLoginRuleRequest) Reset()

func (*CreateLoginRuleRequest) String

func (x *CreateLoginRuleRequest) String() string

type DeleteLoginRuleRequest

type DeleteLoginRuleRequest struct {

	// Name is the name of the login rule to delete.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// contains filtered or unexported fields
}

DeleteLoginRuleRequest is a request to delete a login rule.

func (*DeleteLoginRuleRequest) Descriptor deprecated

func (*DeleteLoginRuleRequest) Descriptor() ([]byte, []int)

Deprecated: Use DeleteLoginRuleRequest.ProtoReflect.Descriptor instead.

func (*DeleteLoginRuleRequest) GetName

func (x *DeleteLoginRuleRequest) GetName() string

func (*DeleteLoginRuleRequest) ProtoMessage

func (*DeleteLoginRuleRequest) ProtoMessage()

func (*DeleteLoginRuleRequest) ProtoReflect

func (x *DeleteLoginRuleRequest) ProtoReflect() protoreflect.Message

func (*DeleteLoginRuleRequest) Reset

func (x *DeleteLoginRuleRequest) Reset()

func (*DeleteLoginRuleRequest) String

func (x *DeleteLoginRuleRequest) String() string

type GetLoginRuleRequest

type GetLoginRuleRequest struct {

	// Name is the name of the login rule to get.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// contains filtered or unexported fields
}

GetLoginRuleRequest is a request to get a single login rule.

func (*GetLoginRuleRequest) Descriptor deprecated

func (*GetLoginRuleRequest) Descriptor() ([]byte, []int)

Deprecated: Use GetLoginRuleRequest.ProtoReflect.Descriptor instead.

func (*GetLoginRuleRequest) GetName

func (x *GetLoginRuleRequest) GetName() string

func (*GetLoginRuleRequest) ProtoMessage

func (*GetLoginRuleRequest) ProtoMessage()

func (*GetLoginRuleRequest) ProtoReflect

func (x *GetLoginRuleRequest) ProtoReflect() protoreflect.Message

func (*GetLoginRuleRequest) Reset

func (x *GetLoginRuleRequest) Reset()

func (*GetLoginRuleRequest) String

func (x *GetLoginRuleRequest) String() string

type ListLoginRulesRequest

type ListLoginRulesRequest struct {

	// PageSize is The maximum number of login rules to return in a single
	// reponse.
	PageSize int32 `protobuf:"varint,1,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
	// PageToken is the NextPageToken value returned from a previous
	// ListLoginRules request, if any.
	PageToken string `protobuf:"bytes,2,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"`
	// contains filtered or unexported fields
}

ListLoginRulesRequest is a paginated request to list all login rules.

func (*ListLoginRulesRequest) Descriptor deprecated

func (*ListLoginRulesRequest) Descriptor() ([]byte, []int)

Deprecated: Use ListLoginRulesRequest.ProtoReflect.Descriptor instead.

func (*ListLoginRulesRequest) GetPageSize

func (x *ListLoginRulesRequest) GetPageSize() int32

func (*ListLoginRulesRequest) GetPageToken

func (x *ListLoginRulesRequest) GetPageToken() string

func (*ListLoginRulesRequest) ProtoMessage

func (*ListLoginRulesRequest) ProtoMessage()

func (*ListLoginRulesRequest) ProtoReflect

func (x *ListLoginRulesRequest) ProtoReflect() protoreflect.Message

func (*ListLoginRulesRequest) Reset

func (x *ListLoginRulesRequest) Reset()

func (*ListLoginRulesRequest) String

func (x *ListLoginRulesRequest) String() string

type ListLoginRulesResponse

type ListLoginRulesResponse struct {

	// LoginRules is the list of login rules.
	LoginRules []*LoginRule `protobuf:"bytes,1,rep,name=login_rules,json=loginRules,proto3" json:"login_rules,omitempty"`
	// NextPageToken is a token to retrieve the next page of results, or empty
	// if there are no more results.
	NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
	// contains filtered or unexported fields
}

ListLoginRulesResponse is a paginated response to a ListLoginRulesRequest.

func (*ListLoginRulesResponse) Descriptor deprecated

func (*ListLoginRulesResponse) Descriptor() ([]byte, []int)

Deprecated: Use ListLoginRulesResponse.ProtoReflect.Descriptor instead.

func (*ListLoginRulesResponse) GetLoginRules

func (x *ListLoginRulesResponse) GetLoginRules() []*LoginRule

func (*ListLoginRulesResponse) GetNextPageToken

func (x *ListLoginRulesResponse) GetNextPageToken() string

func (*ListLoginRulesResponse) ProtoMessage

func (*ListLoginRulesResponse) ProtoMessage()

func (*ListLoginRulesResponse) ProtoReflect

func (x *ListLoginRulesResponse) ProtoReflect() protoreflect.Message

func (*ListLoginRulesResponse) Reset

func (x *ListLoginRulesResponse) Reset()

func (*ListLoginRulesResponse) String

func (x *ListLoginRulesResponse) String() string

type LoginRule

type LoginRule struct {

	// Metadata is resource metadata.
	Metadata *types.Metadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"`
	// Version is the resource version.
	Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"`
	// Priority is the priority of the login rule relative to other login rules
	// in the same cluster. Login rules with a lower numbered priority will be
	// evaluated first.
	Priority int32 `protobuf:"varint,3,opt,name=priority,proto3" json:"priority,omitempty"`
	// TraitsMap is a map of trait keys to lists of predicate expressions which
	// should evaluate to the desired values for that trait.
	TraitsMap map[string]*wrappers.StringValues `` /* 176-byte string literal not displayed */
	// TraitsExpression is a predicate expression which should return the
	// desired traits for the user upon login.
	TraitsExpression string `protobuf:"bytes,5,opt,name=traits_expression,json=traitsExpression,proto3" json:"traits_expression,omitempty"`
	// contains filtered or unexported fields
}

LoginRule is a resource to configure rules and logic which should run during Teleport user login.

func (*LoginRule) Descriptor deprecated

func (*LoginRule) Descriptor() ([]byte, []int)

Deprecated: Use LoginRule.ProtoReflect.Descriptor instead.

func (*LoginRule) GetMetadata

func (x *LoginRule) GetMetadata() *types.Metadata

func (*LoginRule) GetPriority

func (x *LoginRule) GetPriority() int32

func (*LoginRule) GetTraitsExpression

func (x *LoginRule) GetTraitsExpression() string

func (*LoginRule) GetTraitsMap

func (x *LoginRule) GetTraitsMap() map[string]*wrappers.StringValues

func (*LoginRule) GetVersion

func (x *LoginRule) GetVersion() string

func (*LoginRule) ProtoMessage

func (*LoginRule) ProtoMessage()

func (*LoginRule) ProtoReflect

func (x *LoginRule) ProtoReflect() protoreflect.Message

func (*LoginRule) Reset

func (x *LoginRule) Reset()

func (*LoginRule) String

func (x *LoginRule) String() string

type LoginRuleServiceClient

type LoginRuleServiceClient interface {
	// CreateLoginRule creates a login rule if one with the same name does not
	// already exist, else it returns an error.
	CreateLoginRule(ctx context.Context, in *CreateLoginRuleRequest, opts ...grpc.CallOption) (*LoginRule, error)
	// UpsertLoginRule creates a login rule if one with the same name does not
	// already exist, else it replaces the existing login rule.
	UpsertLoginRule(ctx context.Context, in *UpsertLoginRuleRequest, opts ...grpc.CallOption) (*LoginRule, error)
	// GetLoginRule retrieves a login rule described by the given request.
	GetLoginRule(ctx context.Context, in *GetLoginRuleRequest, opts ...grpc.CallOption) (*LoginRule, error)
	// ListLoginRules lists all login rules.
	ListLoginRules(ctx context.Context, in *ListLoginRulesRequest, opts ...grpc.CallOption) (*ListLoginRulesResponse, error)
	// DeleteLoginRule deletes an existing login rule.
	DeleteLoginRule(ctx context.Context, in *DeleteLoginRuleRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
	// TestLoginRule evaluates login rules against provided user traits
	// to test that the output matches expectations prior to them being enforced and
	// potentially locking out users.
	TestLoginRule(ctx context.Context, in *TestLoginRuleRequest, opts ...grpc.CallOption) (*TestLoginRuleResponse, error)
}

LoginRuleServiceClient is the client API for LoginRuleService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

type LoginRuleServiceServer

type LoginRuleServiceServer interface {
	// CreateLoginRule creates a login rule if one with the same name does not
	// already exist, else it returns an error.
	CreateLoginRule(context.Context, *CreateLoginRuleRequest) (*LoginRule, error)
	// UpsertLoginRule creates a login rule if one with the same name does not
	// already exist, else it replaces the existing login rule.
	UpsertLoginRule(context.Context, *UpsertLoginRuleRequest) (*LoginRule, error)
	// GetLoginRule retrieves a login rule described by the given request.
	GetLoginRule(context.Context, *GetLoginRuleRequest) (*LoginRule, error)
	// ListLoginRules lists all login rules.
	ListLoginRules(context.Context, *ListLoginRulesRequest) (*ListLoginRulesResponse, error)
	// DeleteLoginRule deletes an existing login rule.
	DeleteLoginRule(context.Context, *DeleteLoginRuleRequest) (*emptypb.Empty, error)
	// TestLoginRule evaluates login rules against provided user traits
	// to test that the output matches expectations prior to them being enforced and
	// potentially locking out users.
	TestLoginRule(context.Context, *TestLoginRuleRequest) (*TestLoginRuleResponse, error)
	// contains filtered or unexported methods
}

LoginRuleServiceServer is the server API for LoginRuleService service. All implementations must embed UnimplementedLoginRuleServiceServer for forward compatibility

type TestLoginRuleRequest

type TestLoginRuleRequest struct {

	// LoginRules is the list of the rules to evaluate.
	LoginRules []*LoginRule `protobuf:"bytes,1,rep,name=login_rules,json=loginRules,proto3" json:"login_rules,omitempty"`
	// Traits are the user traits to test the login rule against.
	Traits map[string]*wrappers.StringValues `` /* 153-byte string literal not displayed */
	// LoadFromCluster indicates if existing login rules should be included
	// when evaluating rules.
	LoadFromCluster bool `protobuf:"varint,3,opt,name=load_from_cluster,json=loadFromCluster,proto3" json:"load_from_cluster,omitempty"`
	// contains filtered or unexported fields
}

TestLoginRuleRequest is a request to test a login rule against traits.

func (*TestLoginRuleRequest) Descriptor deprecated

func (*TestLoginRuleRequest) Descriptor() ([]byte, []int)

Deprecated: Use TestLoginRuleRequest.ProtoReflect.Descriptor instead.

func (*TestLoginRuleRequest) GetLoadFromCluster

func (x *TestLoginRuleRequest) GetLoadFromCluster() bool

func (*TestLoginRuleRequest) GetLoginRules

func (x *TestLoginRuleRequest) GetLoginRules() []*LoginRule

func (*TestLoginRuleRequest) GetTraits

func (x *TestLoginRuleRequest) GetTraits() map[string]*wrappers.StringValues

func (*TestLoginRuleRequest) ProtoMessage

func (*TestLoginRuleRequest) ProtoMessage()

func (*TestLoginRuleRequest) ProtoReflect

func (x *TestLoginRuleRequest) ProtoReflect() protoreflect.Message

func (*TestLoginRuleRequest) Reset

func (x *TestLoginRuleRequest) Reset()

func (*TestLoginRuleRequest) String

func (x *TestLoginRuleRequest) String() string

type TestLoginRuleResponse

type TestLoginRuleResponse struct {

	// Traits contain the output from evaluating the login rules.
	Traits map[string]*wrappers.StringValues `` /* 153-byte string literal not displayed */
	// contains filtered or unexported fields
}

TestLoginRuleResponse is a response to a login rule test.

func (*TestLoginRuleResponse) Descriptor deprecated

func (*TestLoginRuleResponse) Descriptor() ([]byte, []int)

Deprecated: Use TestLoginRuleResponse.ProtoReflect.Descriptor instead.

func (*TestLoginRuleResponse) GetTraits

func (x *TestLoginRuleResponse) GetTraits() map[string]*wrappers.StringValues

func (*TestLoginRuleResponse) ProtoMessage

func (*TestLoginRuleResponse) ProtoMessage()

func (*TestLoginRuleResponse) ProtoReflect

func (x *TestLoginRuleResponse) ProtoReflect() protoreflect.Message

func (*TestLoginRuleResponse) Reset

func (x *TestLoginRuleResponse) Reset()

func (*TestLoginRuleResponse) String

func (x *TestLoginRuleResponse) String() string

type UnimplementedLoginRuleServiceServer

type UnimplementedLoginRuleServiceServer struct {
}

UnimplementedLoginRuleServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedLoginRuleServiceServer) CreateLoginRule

func (UnimplementedLoginRuleServiceServer) DeleteLoginRule

func (UnimplementedLoginRuleServiceServer) GetLoginRule

func (UnimplementedLoginRuleServiceServer) ListLoginRules

func (UnimplementedLoginRuleServiceServer) TestLoginRule

func (UnimplementedLoginRuleServiceServer) UpsertLoginRule

type UnsafeLoginRuleServiceServer

type UnsafeLoginRuleServiceServer interface {
	// contains filtered or unexported methods
}

UnsafeLoginRuleServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to LoginRuleServiceServer will result in compilation errors.

type UpsertLoginRuleRequest

type UpsertLoginRuleRequest struct {

	// LoginRule is the login rule to be created.
	LoginRule *LoginRule `protobuf:"bytes,1,opt,name=login_rule,json=loginRule,proto3" json:"login_rule,omitempty"`
	// contains filtered or unexported fields
}

UpsertLoginRuleRequest is a request to upsert a login rule.

func (*UpsertLoginRuleRequest) Descriptor deprecated

func (*UpsertLoginRuleRequest) Descriptor() ([]byte, []int)

Deprecated: Use UpsertLoginRuleRequest.ProtoReflect.Descriptor instead.

func (*UpsertLoginRuleRequest) GetLoginRule

func (x *UpsertLoginRuleRequest) GetLoginRule() *LoginRule

func (*UpsertLoginRuleRequest) ProtoMessage

func (*UpsertLoginRuleRequest) ProtoMessage()

func (*UpsertLoginRuleRequest) ProtoReflect

func (x *UpsertLoginRuleRequest) ProtoReflect() protoreflect.Message

func (*UpsertLoginRuleRequest) Reset

func (x *UpsertLoginRuleRequest) Reset()

func (*UpsertLoginRuleRequest) String

func (x *UpsertLoginRuleRequest) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL