Expand description
hyperlane-plugin-audit
Tamper-evident SHA-256 hash-chained security audit trail plugin for
Hyperlane with bounded ring-buffer storage, pluggable AuditSink hooks,
header redaction, and cryptographic chain verification.
Structs§
- Audit
Config - Configuration for
AuditPlugin. - Audit
Plugin - Compiled tamper-evident audit engine backing
AuditRequestHookandAuditResponseHook. - Audit
Record - Single tamper-evident hash-chained HTTP audit event.
- Audit
Request Hook - Opt-in request middleware capturing entry timestamps for audited requests.
- Audit
Response Hook - Opt-in response middleware emitting hash-chained
AuditRecordevents to the configured sink. - InMemory
Audit Sink - Bounded in-memory ring-buffer
AuditSinksuitable for testing and recent audit queries.
Constants§
- ANONYMOUS_
ACTOR - Fallback actor string when no actor attribute was set on
Context. - ATTR_
AUDIT_ ACTION - Context attribute key storing optional custom action label attached by handlers.
- ATTR_
AUDIT_ ACTOR - Context attribute key storing optional actor/subject identity attached by handlers or auth middleware.
- ATTR_
AUDIT_ START - Context attribute key storing request entry timestamp for audit latency measurement.
- AUDIT_
GENESIS_ HASH - Genesis chain hash preceding the first audit event (64 zero hex digits).
- DEFAULT_
AUDIT_ CAPACITY - Default maximum records retained by [
InMemoryAuditSink]. - DEFAULT_
REQUEST_ ID_ HEADER - Default header name checked for request correlation IDs.
- REDACTED_
VALUE - Placeholder emitted when a sensitive header value is redacted.
Traits§
- Audit
Sink - Pluggable sink receiving tamper-evident
AuditRecordevents.
Functions§
- compute_
record_ hash - Computes the canonical hash-chain digest for an
AuditRecordgiven its fields. - set_
audit_ action - Attaches a semantic action name (for example
"billing.refund") toctx. - set_
audit_ actor - Attaches an authenticated actor identifier to
ctxfor audit trail attribution. - verify_
audit_ chain - Verifies cryptographic hash-chain integrity across an ordered slice of
AuditRecords.