Skip to main content

hyperlane_plugin_audit/
lib.rs

1//! hyperlane-plugin-audit
2//!
3//! Tamper-evident SHA-256 hash-chained security audit trail plugin for
4//! Hyperlane with bounded ring-buffer storage, pluggable [`AuditSink`] hooks,
5//! header redaction, and cryptographic chain verification.
6
7mod r#const;
8mod r#fn;
9mod r#impl;
10mod r#static;
11mod r#struct;
12mod r#trait;
13
14#[cfg(test)]
15#[path = "../tests/mod.rs"]
16mod tests;
17
18pub use {r#const::*, r#fn::*, r#struct::*, r#trait::*};
19
20pub(crate) use r#static::*;
21
22use std::{
23    collections::VecDeque,
24    str::from_utf8,
25    sync::{
26        Arc, Mutex, OnceLock,
27        atomic::{AtomicU64, Ordering},
28    },
29    time::{Instant, SystemTime, UNIX_EPOCH},
30};
31
32use {
33    hyperlane::{AUTHORIZATION, COOKIE, Context, Method, Request, ServerHook, Status, Stream},
34    lombok_macros::*,
35    serde::{Deserialize, Serialize},
36};