docs: full refresh per DOCSPLAN (auth subsystem, backends model, access classes, sudo table, state-model mechanics) + 3 stale docstrings
This commit is contained in:
@@ -7,7 +7,7 @@ A zone-based firewall appliance with a built-in SSL reverse proxy. Combines fire
|
||||
- Debian 13 (trixie) target platform
|
||||
- Python 3.13+, Flask 3.x web UI
|
||||
- firewalld (nftables backend), dnsmasq, nginx, WireGuard
|
||||
- acme.sh for ACME certificates (ZeroSSL)
|
||||
- acme.sh for ACME certificates (CA is config-driven; code default Let's Encrypt)
|
||||
|
||||
---
|
||||
|
||||
@@ -42,9 +42,9 @@ bash scripts/install.sh
|
||||
| Flag | Env Var | Required | Description |
|
||||
|---|---|---|---|
|
||||
| -- | `MGMT_DOMAIN` | No | Public domain for the management WebUI (auto-detected as `hostname.local`) |
|
||||
| `--mgmt-pass` | `MGMT_PASS` | Yes | HTTP basic auth password for the WebUI |
|
||||
| `--mgmt-pass` | `MGMT_PASS` | Yes | SQLite DB password for the initial `admin` user (full `rw` on all subsystems) — not an nginx htpasswd |
|
||||
| `--mgmt-user` | `MGMT_USER` | No | WebUI username (defaults to `admin`) |
|
||||
| `--acme-email` | `ACME_EMAIL` | Yes | ACME registration email (ZeroSSL by default) |
|
||||
| `--acme-email` | `ACME_EMAIL` | Yes | ACME registration email (CA is config-driven; code default Let's Encrypt) |
|
||||
| `--user, -u` | `USER_NAME` | No | System user for service (default: `vacuum-wall`) |
|
||||
| `--path, -p` | `INSTALL_DIR` | No | Install directory (default: repo root) |
|
||||
| `--dev` | -- | No | Auto-detect repo owner as service user, skip safety warning |
|
||||
@@ -99,7 +99,7 @@ All `lib/` modules share `lib.common` utilities (`run`, `run_proc`, `load_json`,
|
||||
.venv/bin/python -m pytest tests/ -v
|
||||
```
|
||||
|
||||
Tests mock all subprocess calls (firewalld, acme.sh, WireGuard, nginx, dnsmasq) — no system services required. 192 tests across 5 test modules.
|
||||
Tests mock all subprocess calls (firewalld, acme.sh, WireGuard, nginx, dnsmasq) — no system services required. 28 Python test files (pytest) + 9 JS test files (jsdom/node harness).
|
||||
|
||||
### Documentation MCP Server
|
||||
|
||||
@@ -115,17 +115,23 @@ Then run with Claude Code or Opencode to activate it. It automatically checks li
|
||||
### Architecture
|
||||
|
||||
```
|
||||
Client ──→ nginx (SSL + basic auth) ──→ Flask (127.0.0.1:9090)
|
||||
Flask ──→ lib/*.py ──→ sudo <cmd> ──→ system service
|
||||
Client ──→ nginx (TLS; basic auth on basic-authed proxy domains only) ──→ Flask (127.0.0.1:9090)
|
||||
Flask ──→ daemon/client.py (Unix socket) ──→ vacuum-walld ──→ handlers ──→ sudo
|
||||
```
|
||||
|
||||
| Blueprint | URL prefix | Backend module |
|
||||
|---|---|---|
|
||||
| `webui/api/firewall` | `/api/firewall/` | `lib.firewall` |
|
||||
| `webui/api/dhcp` | `/api/dhcp/` | `lib.dnsmasq` |
|
||||
| `webui/api/proxy` | `/api/proxy/` | `lib.nginx` |
|
||||
| `webui/api/certs` | `/api/certs/` | `lib.acme` |
|
||||
| `webui/api/wireguard` | `/api/wireguard/` | `lib.wireguard` |
|
||||
Blueprints are thin proxies — privileged handlers live in `daemon/handlers/*.py`.
|
||||
|
||||
| Blueprint | URL prefix | Handler | lib module |
|
||||
|---|---|---|---|
|
||||
| `webui/api/firewall` | `/api/firewall/` | `daemon/handlers/firewall` | `lib.firewall` |
|
||||
| `webui/api/dhcp` | `/api/dhcp/` | `daemon/handlers/dnsmasq` | `lib.dnsmasq` |
|
||||
| `webui/api/proxy` | `/api/proxy/` | `daemon/handlers/nginx` | `lib.nginx` |
|
||||
| `webui/api/certs` | `/api/certs/` | `daemon/handlers/acme` | `lib.acme` |
|
||||
| `webui/api/wireguard` | `/api/wireguard/` | `daemon/handlers/wireguard` | `lib.wireguard` |
|
||||
| `webui/api/network` | `/api/network/` | `daemon/handlers/network` | `lib.network` |
|
||||
| `webui/api/logs` | `/api/logs/` | `daemon/handlers/logs` | — |
|
||||
| `webui/api/status` | `/api/status/` | `daemon/handlers/status` | — |
|
||||
| `webui/api/auth` | `/api/auth/` | `daemon/handlers/auth` | `lib.auth` / `lib.auth_users` |
|
||||
|
||||
See [docs/architecture.md](docs/architecture.md) for detailed request flow, zone model, and shared utility patterns.
|
||||
|
||||
@@ -139,3 +145,5 @@ See [docs/architecture.md](docs/architecture.md) for detailed request flow, zone
|
||||
- [API Reference](docs/api.md) — REST API endpoints
|
||||
- [Security Model](docs/security.md) — Privilege model and sudo whitelist
|
||||
- [Configuration](docs/config.md) — Declarative config file formats and locations
|
||||
- [State Model](docs/state-model.md) — Per-subsystem state schema and real-time push mechanics
|
||||
- [Frontend (hoover)](docs/hoover.md) — Custom reactive SPA framework API reference
|
||||
|
||||
Reference in New Issue
Block a user