auditlogv1

package
v0.0.0-...-8cdf69c Latest Latest
Warning

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

Go to latest
Published: May 8, 2024 License: Apache-2.0 Imports: 10 Imported by: 2

Documentation

Index

Constants

View Source
const (
	AuditLogService_StreamUnstructuredSessionEvents_FullMethodName = "/teleport.auditlog.v1.AuditLogService/StreamUnstructuredSessionEvents"
	AuditLogService_GetUnstructuredEvents_FullMethodName           = "/teleport.auditlog.v1.AuditLogService/GetUnstructuredEvents"
)

Variables

View Source
var (
	Order_name = map[int32]string{
		0: "ORDER_DESCENDING_UNSPECIFIED",
		1: "ORDER_ASCENDING",
	}
	Order_value = map[string]int32{
		"ORDER_DESCENDING_UNSPECIFIED": 0,
		"ORDER_ASCENDING":              1,
	}
)

Enum value maps for Order.

View Source
var AuditLogService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "teleport.auditlog.v1.AuditLogService",
	HandlerType: (*AuditLogServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetUnstructuredEvents",
			Handler:    _AuditLogService_GetUnstructuredEvents_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "StreamUnstructuredSessionEvents",
			Handler:       _AuditLogService_StreamUnstructuredSessionEvents_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "teleport/auditlog/v1/auditlog.proto",
}

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

View Source
var File_teleport_auditlog_v1_auditlog_proto protoreflect.FileDescriptor

Functions

func RegisterAuditLogServiceServer

func RegisterAuditLogServiceServer(s grpc.ServiceRegistrar, srv AuditLogServiceServer)

Types

type AuditLogServiceClient

type AuditLogServiceClient interface {
	// StreamUnstructuredSessionEvents streams audit events from a given session recording in an unstructured format.
	// This endpoint is used by the event handler to retrieve the session events as JSON.
	StreamUnstructuredSessionEvents(ctx context.Context, in *StreamUnstructuredSessionEventsRequest, opts ...grpc.CallOption) (AuditLogService_StreamUnstructuredSessionEventsClient, error)
	// GetUnstructuredEvents gets events from the audit log in an unstructured format.
	// This endpoint is used by the event handler to retrieve the events as JSON.
	GetUnstructuredEvents(ctx context.Context, in *GetUnstructuredEventsRequest, opts ...grpc.CallOption) (*EventsUnstructured, error)
}

AuditLogServiceClient is the client API for AuditLogService 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 AuditLogServiceServer

type AuditLogServiceServer interface {
	// StreamUnstructuredSessionEvents streams audit events from a given session recording in an unstructured format.
	// This endpoint is used by the event handler to retrieve the session events as JSON.
	StreamUnstructuredSessionEvents(*StreamUnstructuredSessionEventsRequest, AuditLogService_StreamUnstructuredSessionEventsServer) error
	// GetUnstructuredEvents gets events from the audit log in an unstructured format.
	// This endpoint is used by the event handler to retrieve the events as JSON.
	GetUnstructuredEvents(context.Context, *GetUnstructuredEventsRequest) (*EventsUnstructured, error)
	// contains filtered or unexported methods
}

AuditLogServiceServer is the server API for AuditLogService service. All implementations must embed UnimplementedAuditLogServiceServer for forward compatibility

type AuditLogService_StreamUnstructuredSessionEventsClient

type AuditLogService_StreamUnstructuredSessionEventsClient interface {
	Recv() (*EventUnstructured, error)
	grpc.ClientStream
}

type AuditLogService_StreamUnstructuredSessionEventsServer

type AuditLogService_StreamUnstructuredSessionEventsServer interface {
	Send(*EventUnstructured) error
	grpc.ServerStream
}

type EventUnstructured

type EventUnstructured struct {

	// type is the type of the event.
	Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"`
	// id is the unique ID of the event.
	// If the underlying event defines an ID, it will be used, otherwise
	// it is a SHA256 hash of the event payload.
	Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
	// time is the time when the event was generated.
	Time *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=time,proto3" json:"time,omitempty"`
	// index is the index of the event.
	Index int64 `protobuf:"varint,4,opt,name=index,proto3" json:"index,omitempty"`
	// unstructured is the unstructured representation of the event payload.
	Unstructured *structpb.Struct `protobuf:"bytes,5,opt,name=unstructured,proto3" json:"unstructured,omitempty"`
	// contains filtered or unexported fields
}

EventUnstructured represents a single events.AuditEvent in an unstructured format.

func (*EventUnstructured) Descriptor deprecated

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

Deprecated: Use EventUnstructured.ProtoReflect.Descriptor instead.

func (*EventUnstructured) GetId

func (x *EventUnstructured) GetId() string

func (*EventUnstructured) GetIndex

func (x *EventUnstructured) GetIndex() int64

func (*EventUnstructured) GetTime

func (x *EventUnstructured) GetTime() *timestamppb.Timestamp

func (*EventUnstructured) GetType

func (x *EventUnstructured) GetType() string

func (*EventUnstructured) GetUnstructured

func (x *EventUnstructured) GetUnstructured() *structpb.Struct

func (*EventUnstructured) ProtoMessage

func (*EventUnstructured) ProtoMessage()

func (*EventUnstructured) ProtoReflect

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

func (*EventUnstructured) Reset

func (x *EventUnstructured) Reset()

func (*EventUnstructured) String

func (x *EventUnstructured) String() string

type EventsUnstructured

type EventsUnstructured struct {

	// items is a list of unstructured formatted audit events.
	Items []*EventUnstructured `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"`
	// last_key is the key of the last event if the returned set did not contain all events found i.e limit <
	// actual amount. this is the key clients can supply in another API request to continue fetching
	// events from the previous last position.
	LastKey string `protobuf:"bytes,2,opt,name=last_key,json=lastKey,proto3" json:"last_key,omitempty"`
	// contains filtered or unexported fields
}

EventsUnstructured represents a list of events.AuditEvent in an unstructured format.

func (*EventsUnstructured) Descriptor deprecated

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

Deprecated: Use EventsUnstructured.ProtoReflect.Descriptor instead.

func (*EventsUnstructured) GetItems

func (x *EventsUnstructured) GetItems() []*EventUnstructured

func (*EventsUnstructured) GetLastKey

func (x *EventsUnstructured) GetLastKey() string

func (*EventsUnstructured) ProtoMessage

func (*EventsUnstructured) ProtoMessage()

func (*EventsUnstructured) ProtoReflect

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

func (*EventsUnstructured) Reset

func (x *EventsUnstructured) Reset()

func (*EventsUnstructured) String

func (x *EventsUnstructured) String() string

type GetUnstructuredEventsRequest

type GetUnstructuredEventsRequest struct {

	// namespace, if not set, defaults to 'default'.
	Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"`
	// start_date is the oldest date of returned events.
	StartDate *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=start_date,json=startDate,proto3" json:"start_date,omitempty"`
	// end_date is the newest date of returned events.
	EndDate *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=end_date,json=endDate,proto3" json:"end_date,omitempty"`
	// event_types is optional, if not set, returns all events.
	EventTypes []string `protobuf:"bytes,4,rep,name=event_types,json=eventTypes,proto3" json:"event_types,omitempty"`
	// limit is the maximum amount of events returned.
	Limit int32 `protobuf:"varint,5,opt,name=limit,proto3" json:"limit,omitempty"`
	// start_key is used to resume a query in order to enable pagination.
	// If the previous response had LastKey set then this should be
	// set to its value. Otherwise leave empty.
	StartKey string `protobuf:"bytes,6,opt,name=start_key,json=startKey,proto3" json:"start_key,omitempty"`
	// order specifies an ascending or descending order of events.
	// A value of 0 means a descending order and a value of 1 means an ascending order.
	Order Order `protobuf:"varint,7,opt,name=order,proto3,enum=teleport.auditlog.v1.Order" json:"order,omitempty"`
	// contains filtered or unexported fields
}

GetUnstructuredEventsRequest is a request with the needed data to fetch events.

func (*GetUnstructuredEventsRequest) Descriptor deprecated

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

Deprecated: Use GetUnstructuredEventsRequest.ProtoReflect.Descriptor instead.

func (*GetUnstructuredEventsRequest) GetEndDate

func (*GetUnstructuredEventsRequest) GetEventTypes

func (x *GetUnstructuredEventsRequest) GetEventTypes() []string

func (*GetUnstructuredEventsRequest) GetLimit

func (x *GetUnstructuredEventsRequest) GetLimit() int32

func (*GetUnstructuredEventsRequest) GetNamespace

func (x *GetUnstructuredEventsRequest) GetNamespace() string

func (*GetUnstructuredEventsRequest) GetOrder

func (x *GetUnstructuredEventsRequest) GetOrder() Order

func (*GetUnstructuredEventsRequest) GetStartDate

func (*GetUnstructuredEventsRequest) GetStartKey

func (x *GetUnstructuredEventsRequest) GetStartKey() string

func (*GetUnstructuredEventsRequest) ProtoMessage

func (*GetUnstructuredEventsRequest) ProtoMessage()

func (*GetUnstructuredEventsRequest) ProtoReflect

func (*GetUnstructuredEventsRequest) Reset

func (x *GetUnstructuredEventsRequest) Reset()

func (*GetUnstructuredEventsRequest) String

type Order

type Order int32

Order controls the ordering of objects returned based on the timestamp field.

const (
	Order_ORDER_DESCENDING_UNSPECIFIED Order = 0
	Order_ORDER_ASCENDING              Order = 1
)

func (Order) Descriptor

func (Order) Descriptor() protoreflect.EnumDescriptor

func (Order) Enum

func (x Order) Enum() *Order

func (Order) EnumDescriptor deprecated

func (Order) EnumDescriptor() ([]byte, []int)

Deprecated: Use Order.Descriptor instead.

func (Order) Number

func (x Order) Number() protoreflect.EnumNumber

func (Order) String

func (x Order) String() string

func (Order) Type

func (Order) Type() protoreflect.EnumType

type StreamUnstructuredSessionEventsRequest

type StreamUnstructuredSessionEventsRequest struct {

	// session_id is the ID for a given session in an UUIDv4 format.
	SessionId string `protobuf:"bytes,1,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"`
	// start_index is the index of the event to resume the stream after.
	// A start_index of 0 creates a new stream.
	StartIndex int32 `protobuf:"varint,2,opt,name=start_index,json=startIndex,proto3" json:"start_index,omitempty"`
	// contains filtered or unexported fields
}

StreamUnstructuredSessionEventsRequest is a request containing data needed to fetch a session recording.

func (*StreamUnstructuredSessionEventsRequest) Descriptor deprecated

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

Deprecated: Use StreamUnstructuredSessionEventsRequest.ProtoReflect.Descriptor instead.

func (*StreamUnstructuredSessionEventsRequest) GetSessionId

func (*StreamUnstructuredSessionEventsRequest) GetStartIndex

func (x *StreamUnstructuredSessionEventsRequest) GetStartIndex() int32

func (*StreamUnstructuredSessionEventsRequest) ProtoMessage

func (*StreamUnstructuredSessionEventsRequest) ProtoReflect

func (*StreamUnstructuredSessionEventsRequest) Reset

func (*StreamUnstructuredSessionEventsRequest) String

type UnimplementedAuditLogServiceServer

type UnimplementedAuditLogServiceServer struct {
}

UnimplementedAuditLogServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedAuditLogServiceServer) GetUnstructuredEvents

type UnsafeAuditLogServiceServer

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

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

Jump to

Keyboard shortcuts

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