Expand description
Layer 8 — Security monitor.
A SecurityMonitor is the vault’s outbound channel for anomaly events:
repeated decryption failures, unusual access patterns, and threshold
breaches. Monitor calls happen on the failure path only; the success path
costs nothing.
Built-in monitors (NoMonitor, LogMonitor, MetricsMonitor,
WebhookMonitor, CompositeMonitor) arrive in Phase 0.8. This module
currently defines the trait surface and the three event-context structs.
Structs§
- Access
Context - Context for a successful access that the monitor flagged as anomalous — unusual caller, unusual frequency, off-hours activity.
- Composite
Monitor SecurityMonitorthat fans every event out to a list of inner monitors.- Failure
Context - Context passed when a decryption attempt fails — wrong key, tampered ciphertext, etc.
- LogMonitor
monitor-tracing SecurityMonitorimplementation that emitstracingevents.- NoMonitor
SecurityMonitorimplementation that discards every event.- Threshold
Context - Context for a configured threshold being crossed (e.g. N failures in M seconds).
Traits§
- Security
Monitor - Outbound channel for anomaly events.