Expand description
Structured security event logging following OWASP Logging Vocabulary.
All security events are emitted with target: "security" so operators can
route them separately via RUST_LOG=security=info or a dedicated tracing
Layer with per-layer filtering.
§Example
use hyperi_rustlib::logger::security::{SecurityEvent, SecurityOutcome, auth_failure};
use std::net::{IpAddr, Ipv4Addr};
// Builder pattern for full control
SecurityEvent::new("auth.failure", "bearer_validate", SecurityOutcome::Failure)
.actor("svc-collector")
.source_ip(IpAddr::V4(Ipv4Addr::new(10, 0, 0, 1)))
.reason("expired_token")
.emit();
// Convenience function for common cases
auth_failure("bearer_validate", "expired_token", Some(IpAddr::V4(Ipv4Addr::new(10, 0, 0, 1))));Structs§
- Security
Event - Standard security event types following OWASP Logging Vocabulary.
Enums§
- Security
Outcome - Outcome of a security event.
Functions§
- access_
denied - Log an access denial.
- auth_
failure - Log an authentication failure.
- auth_
success - Log an authentication success.
- config_
changed - Log a configuration change.
- data_
quality_ alert - Log a data quality event — validation rejection rate threshold exceeded.
- input_
validation_ failure - Log an input validation failure (potential attack indicator per OWASP).
- rate_
limit_ triggered - Log a rate limit trigger.
- record_
dlq - Log a data quality event — record routed to DLQ.
- tls_
event - Log a TLS/certificate event.
- token_
rotated - Log a token rotation event.