feat(admin): advisory ASN/VPN enrichment of client IPs (BUNYIP-437) #466
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/BUNYIP-437-ip-enrichment-consumer"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Slice 2 of BUNYIP-437: the bunyip consumer of the
dunite-ipenrichcrate merged in dunite PR #34. Gives admins ASN / VPN context on a client IP as an advisory signal.Manifest
The dunite pins move from
302af65toae62c27(the merge that addeddunite-ipenrich). That rev's parent is exactly302af65, so it is a clean superset: no other dunite crate changed, and the member-scopedcargo updatetouched only the dunite packages (148 other deps unchanged).dunite-ipenrichis added tobunyip-domain.Wiring (mirrors the geoip path)
IP2PROXY_DB_PATH->Config.ip2proxy_db_path, pointing at an offline IP2Proxy PX.BIN.bunyip-apiopens it into an optionalIpEnrichService; unset or unreadable leaves itNoneand the feature reports nothing (never blocks a request).services::ip_enrichre-exports the shared crate as a stable seam.GET /v1/admin/ip-enrichment?ip=<addr>(AdminUser-guarded) returns ASN, owning organization, ISP, the classified network category and VPN/proxy likelihood labels, a one-bitis_anonymizing, the raw proxy type, VPN provider, threat, and an always-trueadvisorymarker. It isNone-tolerant: a missing dataset, a private/reserved address, or an unknown address all return no data (mapped client-side toOk(None)); only a malformed IP is a client error. This is the ticket's "narrow interface (address in, enrichment out)".Admin surface
The IP-bans page renders an Address intel panel when opened for a specific address (the
?ip=look-up / ban link that feedback and autoban already produce). It shows the ASN/org/proxy fields, a network-category badge and a VPN/proxy badge, and is explicitly advisory:This satisfies the "advisory signal shown to admins, never an automatic classification" AC. Screenshot of the three panel states (VPN, data-centre, no-data) below.
Tests
is_anonymizing, always-advisory; a data-centre address is not anonymizing.Verification
just check-containergreen: fmt, clippy-D warnings, and 179 workspace tests in the pinnedrust-builder-glibc:v1.0.1-rust1.94-trixieimage. A screenshot render confirmed the three panel states. The tracked Tailwind stylesheet needed no rebuild (every utility the panel uses was already present).Follow-ups (out of scope here)
TRUSTED_PROXY_CIDRverification (config item, tracked separately per the investigation).🤖 Generated with Claude Code
https://claude.ai/code/session_018TXaT3P192nDsZzbzHETb9