gradatum-warden
L0 network guard for gradatum: IP CIDR filter, per-IP rate limiting, and loopback bypass.
Status: Alpha (v0.4.x) — public, Apache-2.0. API not yet stable before v1.0. Part of gradatum — memory backbone for AI agents. · github · gradatum.org
Overview
gradatum-warden is a Tower middleware layer mounted on the Axum router in gradatum-server.
It enforces three controls before any handler runs:
- IP allowlist — CIDR-based filter; requests from unlisted ranges are rejected with 403.
- Per-IP rate limiting — configurable requests-per-minute with burst allowance.
- Loopback bypass — requests from
127.0.0.1/::1skip rate limiting entirely, letting internal health checks and metrics scrapers pass through without quota impact.
The warden always calls inner.call(req) for allowed/bypass requests, so the upstream
handler receives the real request body — not a synthetic empty response.
Usage
[]
= "0.4.0"
use ;
let config = WardenConfig ;
let warden = new.expect;
let app = new
.route
.layer;
License
Apache-2.0