Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ActionString ¶
ActionString converts an Action to its audit log string.
Types ¶
type AuditEntry ¶
type AuditEntry struct {
Timestamp string `json:"timestamp"`
Server string `json:"server"`
Tool string `json:"tool"`
Args map[string]any `json:"args,omitempty"`
Action string `json:"action"` // "allowed", "denied", "warned"
PolicyName string `json:"policy_name,omitempty"`
Message string `json:"message,omitempty"`
}
AuditEntry represents a single audit log record.
type AuditLogger ¶
type AuditLogger struct {
// contains filtered or unexported fields
}
AuditLogger writes JSONL audit logs.
func NewAuditLogger ¶
func NewAuditLogger(path string, redact []string) *AuditLogger
NewAuditLogger creates an audit logger that writes to the given path.
func (*AuditLogger) Log ¶
func (a *AuditLogger) Log(entry AuditEntry) error
Log writes an audit entry to the log file.
type Evaluator ¶
type Evaluator struct {
// contains filtered or unexported fields
}
Evaluator evaluates security policies for a given server.
func NewEvaluator ¶
func NewEvaluator(serverName string, global *config.SecurityConfig, server *config.ServerSecurity) *Evaluator
NewEvaluator creates an Evaluator from global and per-server security config.
Click to show internal directories.
Click to hide internal directories.