Documentation ¶
Overview ¶
Package firestoreeventsLog implements Firestore storage backend for Teleport event storage.
firestoreevents package implements the Log storage back-end for the auth server. Originally contributed by https://github.com/joshdurbin
Index ¶
- type EventsConfig
- type Log
- func (l *Log) Close() error
- func (l *Log) EmitAuditEvent(ctx context.Context, in apievents.AuditEvent) error
- func (l *Log) SearchEvents(ctx context.Context, req events.SearchEventsRequest) ([]apievents.AuditEvent, string, error)
- func (l *Log) SearchSessionEvents(ctx context.Context, req events.SearchSessionEventsRequest) ([]apievents.AuditEvent, string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EventsConfig ¶
type EventsConfig struct { firestorebk.Config // RetentionPeriod is a default retention period for events RetentionPeriod time.Duration // Clock is a clock interface, used in tests Clock clockwork.Clock // UIDGenerator is unique ID generator UIDGenerator utils.UID }
Config structure represents Firestore configuration as appears in `storage` section of Teleport YAML
func (*EventsConfig) SetFromParams ¶
func (cfg *EventsConfig) SetFromParams(params backend.Params) error
SetFromParams establishes values on an EventsConfig from the supplied params
func (*EventsConfig) SetFromURL ¶
func (cfg *EventsConfig) SetFromURL(url *url.URL) error
SetFromURL establishes values on an EventsConfig from the supplied URI
type Log ¶
type Log struct { // Entry is a log entry *log.Entry // Config is a backend configuration EventsConfig // contains filtered or unexported fields }
Log is a firestore-db backed storage of events
func New ¶
func New(cfg EventsConfig) (*Log, error)
New returns new instance of Firestore backend. It's an implementation of backend API's NewFunc
func (*Log) EmitAuditEvent ¶
EmitAuditEvent emits audit event
func (*Log) SearchEvents ¶
func (l *Log) SearchEvents(ctx context.Context, req events.SearchEventsRequest) ([]apievents.AuditEvent, string, error)
SearchEvents is a flexible way to find events.
Event types to filter can be specified and pagination is handled by an iterator key that allows a query to be resumed.
The only mandatory requirement is a date range (UTC).
This function may never return more than 1 MiB of event data.
func (*Log) SearchSessionEvents ¶
func (l *Log) SearchSessionEvents(ctx context.Context, req events.SearchSessionEventsRequest) ([]apievents.AuditEvent, string, error)
SearchSessionEvents returns session related events only. This is used to find completed sessions.