auditlogv1

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

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

Go to latest
Published: Dec 20, 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"
	AuditLogService_ExportUnstructuredEvents_FullMethodName        = "/teleport.auditlog.v1.AuditLogService/ExportUnstructuredEvents"
	AuditLogService_GetEventExportChunks_FullMethodName            = "/teleport.auditlog.v1.AuditLogService/GetEventExportChunks"
)

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,
		},
		{
			StreamName:    "ExportUnstructuredEvents",
			Handler:       _AuditLogService_ExportUnstructuredEvents_Handler,
			ServerStreams: true,
		},
		{
			StreamName:    "GetEventExportChunks",
			Handler:       _AuditLogService_GetEventExportChunks_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) (grpc.ServerStreamingClient[EventUnstructured], 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)
	// ExportUnstructuredEvents exports events from a given event chunk returned by GetEventExportChunks. This API prioritizes
	// performance over ordering and filtering, and is intended for bulk export of events.
	ExportUnstructuredEvents(ctx context.Context, in *ExportUnstructuredEventsRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[ExportEventUnstructured], error)
	// GetEventExportChunks returns a stream of event chunks that can be exported via ExportUnstructuredEvents. The returned
	// list isn't ordered and polling for new chunks requires re-consuming the entire stream from the beginning.
	GetEventExportChunks(ctx context.Context, in *GetEventExportChunksRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[EventExportChunk], 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.

AuditLogService provides methods to access audit log.

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, grpc.ServerStreamingServer[EventUnstructured]) 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)
	// ExportUnstructuredEvents exports events from a given event chunk returned by GetEventExportChunks. This API prioritizes
	// performance over ordering and filtering, and is intended for bulk export of events.
	ExportUnstructuredEvents(*ExportUnstructuredEventsRequest, grpc.ServerStreamingServer[ExportEventUnstructured]) error
	// GetEventExportChunks returns a stream of event chunks that can be exported via ExportUnstructuredEvents. The returned
	// list isn't ordered and polling for new chunks requires re-consuming the entire stream from the beginning.
	GetEventExportChunks(*GetEventExportChunksRequest, grpc.ServerStreamingServer[EventExportChunk]) error
	// contains filtered or unexported methods
}

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

AuditLogService provides methods to access audit log.

type AuditLogService_ExportUnstructuredEventsClient

type AuditLogService_ExportUnstructuredEventsClient = grpc.ServerStreamingClient[ExportEventUnstructured]

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

type AuditLogService_ExportUnstructuredEventsServer

type AuditLogService_ExportUnstructuredEventsServer = grpc.ServerStreamingServer[ExportEventUnstructured]

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

type AuditLogService_GetEventExportChunksClient

type AuditLogService_GetEventExportChunksClient = grpc.ServerStreamingClient[EventExportChunk]

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

type AuditLogService_GetEventExportChunksServer

type AuditLogService_GetEventExportChunksServer = grpc.ServerStreamingServer[EventExportChunk]

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

type AuditLogService_StreamUnstructuredSessionEventsClient

type AuditLogService_StreamUnstructuredSessionEventsClient = grpc.ServerStreamingClient[EventUnstructured]

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

type AuditLogService_StreamUnstructuredSessionEventsServer

type AuditLogService_StreamUnstructuredSessionEventsServer = grpc.ServerStreamingServer[EventUnstructured]

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

type EventExportChunk

type EventExportChunk struct {

	// chunk is the chunk to export.
	Chunk string `protobuf:"bytes,1,opt,name=chunk,proto3" json:"chunk,omitempty"`
	// contains filtered or unexported fields
}

EventExportChunk represents a chunk of events to export.

func (*EventExportChunk) Descriptor deprecated

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

Deprecated: Use EventExportChunk.ProtoReflect.Descriptor instead.

func (*EventExportChunk) GetChunk

func (x *EventExportChunk) GetChunk() string

func (*EventExportChunk) ProtoMessage

func (*EventExportChunk) ProtoMessage()

func (*EventExportChunk) ProtoReflect

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

func (*EventExportChunk) Reset

func (x *EventExportChunk) Reset()

func (*EventExportChunk) String

func (x *EventExportChunk) String() string

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 ExportEventUnstructured

type ExportEventUnstructured struct {

	// event is the unstructured representation of the event payload.
	Event *EventUnstructured `protobuf:"bytes,1,opt,name=event,proto3" json:"event,omitempty"`
	// cursor is the cursor to resume the stream after this point.
	Cursor string `protobuf:"bytes,2,opt,name=cursor,proto3" json:"cursor,omitempty"`
	// contains filtered or unexported fields
}

ExportEventUnstructured is the stream item of the ExportUnstructuredEvents method.

func (*ExportEventUnstructured) Descriptor deprecated

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

Deprecated: Use ExportEventUnstructured.ProtoReflect.Descriptor instead.

func (*ExportEventUnstructured) GetCursor

func (x *ExportEventUnstructured) GetCursor() string

func (*ExportEventUnstructured) GetEvent

func (*ExportEventUnstructured) ProtoMessage

func (*ExportEventUnstructured) ProtoMessage()

func (*ExportEventUnstructured) ProtoReflect

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

func (*ExportEventUnstructured) Reset

func (x *ExportEventUnstructured) Reset()

func (*ExportEventUnstructured) String

func (x *ExportEventUnstructured) String() string

type ExportUnstructuredEventsRequest

type ExportUnstructuredEventsRequest struct {

	// date is the target date from which to export events. note that only the UTC date of the
	// timestamp value is used. use of a specific local timestamp may produce confusing results.
	Date *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=date,proto3" json:"date,omitempty"`
	// chunk is the chunk to export events from.
	Chunk string `protobuf:"bytes,2,opt,name=chunk,proto3" json:"chunk,omitempty"`
	// cursor is an optional mechanism to resume interrupted streams for a given chunk.
	Cursor string `protobuf:"bytes,3,opt,name=cursor,proto3" json:"cursor,omitempty"`
	// contains filtered or unexported fields
}

ExportUnstructuredEventsRequest is a request with the needed data to export events.

func (*ExportUnstructuredEventsRequest) Descriptor deprecated

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

Deprecated: Use ExportUnstructuredEventsRequest.ProtoReflect.Descriptor instead.

func (*ExportUnstructuredEventsRequest) GetChunk

func (*ExportUnstructuredEventsRequest) GetCursor

func (x *ExportUnstructuredEventsRequest) GetCursor() string

func (*ExportUnstructuredEventsRequest) GetDate

func (*ExportUnstructuredEventsRequest) ProtoMessage

func (*ExportUnstructuredEventsRequest) ProtoMessage()

func (*ExportUnstructuredEventsRequest) ProtoReflect

func (*ExportUnstructuredEventsRequest) Reset

func (*ExportUnstructuredEventsRequest) String

type GetEventExportChunksRequest

type GetEventExportChunksRequest struct {

	// date is the date for which to list export shards.
	Date *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=date,proto3" json:"date,omitempty"`
	// contains filtered or unexported fields
}

GetEventExportChunksRequest is used to request the next set of event chunks to export.

func (*GetEventExportChunksRequest) Descriptor deprecated

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

Deprecated: Use GetEventExportChunksRequest.ProtoReflect.Descriptor instead.

func (*GetEventExportChunksRequest) GetDate

func (*GetEventExportChunksRequest) ProtoMessage

func (*GetEventExportChunksRequest) ProtoMessage()

func (*GetEventExportChunksRequest) ProtoReflect

func (*GetEventExportChunksRequest) Reset

func (x *GetEventExportChunksRequest) Reset()

func (*GetEventExportChunksRequest) String

func (x *GetEventExportChunksRequest) 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.

NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.

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