Expand description
Threat intelligence for Light WAF: cluster-wide IP reputation, in two halves.
- Read:
ReputationModuleis a detection module that runs at the connection phase, looks up the client IP in awaf_state_redis::ReputationStoreand adds a severity to the request’s cumulative anomaly score (Malicious/Suspicious;Unknownadds nothing). A store outage reads asUnknown: it neither blocks nor unblocks traffic. - Write:
start_reputation_feedpollsReputationFeedsources (FileFeed,HttpListFeed) and populates the store, with a per-cycle single-writer lock and per-entry TTL so de-listed IPs age out.
Reputation stays out of the core’s API: the core datapath never reads or writes it.
Structs§
- Feed
Config - Runtime tunables for the feed driver (wired from
[enterprise.reputation.feed]). - File
Feed - A
ReputationFeedbacked by a local file (one IP per line). Useful for tests, air-gapped deployments, and lists maintained out-of-band (e.g. rendered by another process). - Http
List Feed - A
ReputationFeedthat GETs a plaintext IP list over HTTPS. The client uses aring-based rustls config (no aws-lc-rs/cmake) — the same crypto provider the core uses — matchingCloudflareDns. - Reputation
Config - How an IP-reputation verdict maps to an anomaly-score severity. No hardcoded points: the
module declares a
Severityand the pipeline resolvesseverity -> pointsvia[waf.severity_scores](so the operator tunes whether reputation alone blocks). - Reputation
Module - A premium
WafModulethat scores a request by the reputation of its client IP.
Enums§
- Feed
Error - Why a feed fetch failed. The driver treats any error as “keep the previous snapshot” (fail-to-no-opinion): a down feed must neither block nor unblock — entries just age out.
Traits§
- Reputation
Feed - A source of IP-reputation entries. Object-safe (async via
async_trait) so the driver can hold aVec<Box<dyn ReputationFeed>>of heterogeneous sources.
Functions§
- start_
reputation_ feed - Spawn the feed driver as a background task. Each
refresh_intervala single node (the lock winner) refreshes therep:<ip>snapshot the reputation module reads.sources,writerandlockare typically all backed by the SAMERedisStore. Returns the task handle (drop to keep it running for the process lifetime).