dev_arc_aws/backend/src
Samuel James 70f88efdc8
Add mesh prerequisite gate (#33)
* Add mesh prerequisite gate (NetBird verification before app config)

Implements the design in docs/mesh-prerequisite-gate.md per the user's
DECIDE A-D answers: a permanent admin override, B1 (reachable) verification
with host mesh IP shown informationally, members allowed in with a notice
instead of being blocked, and mesh.required defaulting off so the live
production instance is unaffected.

- system_config kv table + getConfig/setConfig helpers
- /api/system/mesh-status, /mesh/verify, /mesh/override, /mesh/required
- AuthContext gains a 'needs-mesh' status (admins only) and exposes
  meshStatus for a member-facing banner
- MeshGate page reuses the integration create+test flow to connect NetBird

* Make mesh verification universal (CIDR check, not NetBird-specific)

Replace the NetBird-adapter-based "reachable" check with a vendor-agnostic
one: the admin supplies the mesh's IP range (CIDR), and verification just
confirms this host has an address inside it. Works identically for
NetBird, WireGuard, ZeroTier, Tailscale, or any other mesh tech, with no
integration record or vendor API call required.

* Add reachability fallback for routed meshes (VPC peering, etc.)

A host can be on the mesh's "side" of a routed network (e.g. a VPC peered
into a NetBird/WireGuard mesh) without holding a local IP in the mesh's
own CIDR. Local-IP-in-CIDR stays the primary check; if it fails, the admin
can supply a known peer/gateway IP on the mesh and we verify by pinging
it instead. Adds iputils to the backend image for the ping binary.

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-06-20 17:30:46 -04:00
..
db Add mesh prerequisite gate (#33) 2026-06-20 17:30:46 -04:00
docker Phase 4: Docker container management (REST CRUD/actions/stats/logs + exec terminal) 2026-06-19 12:28:30 +00:00
integrations Fix Proxmox connection by using undici's fetch instead of Node's global fetch 2026-06-20 10:36:43 +00:00
routes Add mesh prerequisite gate (#33) 2026-06-20 17:30:46 -04:00
ssh Add Docker-over-SSH management and push-agent monitoring (#31) 2026-06-20 16:24:57 -04:00
tunnels Phase 2: SSH tunnels (local/remote/dynamic SOCKS5 port forwarding) 2026-06-19 11:40:59 +00:00
types Phase 5: RDP/VNC/Telnet remote desktop via guacamole-lite + guacd 2026-06-19 15:25:10 +00:00
server.ts Add mesh prerequisite gate (#33) 2026-06-20 17:30:46 -04:00
types.d.ts Add auth Phase 3: multi-user accounts with admin/member roles (#28) 2026-06-20 12:43:24 -04:00