siem

package
v1.10.21 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2026 License: AGPL-3.0 Imports: 13 Imported by: 0

Documentation

Overview

Package siem streams the audit log to external SIEM sinks at-least-once, gated on the siem_stream entitlement and entirely off the request path. Durability comes from a per-target cursor: the cursor advances only on a successful ship, so an outage or restart never drops events.

Index

Constants

View Source
const Flag = "siem_stream"

Flag is the entitlement that unlocks SIEM streaming.

Variables

This section is empty.

Functions

This section is empty.

Types

type EntitlementChecker

type EntitlementChecker interface{ Has(flag string) bool }

EntitlementChecker is satisfied by enterprise.EE; kept minimal so this package does not import the enterprise seam.

type Sink

type Sink interface {
	Ship(events []models.AuditLog) error
}

Sink ships a batch of audit events to an external system. Returning an error leaves the cursor un-advanced so the batch is retried next tick.

type Streamer

type Streamer struct {
	// contains filtered or unexported fields
}

Streamer ships audit events to all enabled SIEM targets.

func (*Streamer) Enabled

func (s *Streamer) Enabled() bool

Enabled reports whether streaming is licensed.

func (*Streamer) Test

func (s *Streamer) Test(cfg *models.SIEMConfig, event models.AuditLog) error

Test ships a single synthetic event to verify a target's connectivity.

func (*Streamer) Tick

func (s *Streamer) Tick(ctx context.Context) error

Tick ships any new audit events to every enabled target. Safe to call on a schedule and on an eventbus nudge; it is a no-op when streaming is not entitled. One target's failure never affects another.

Jump to

Keyboard shortcuts

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