fix(workspace): LAN exposure via host firewall — the Supabase CLI forces 0.0.0.0, so PostgreSQL / Studio / raw Mailpit close by UFW rules on the LAN interface; gateway reduced to Mailpit behind basic auth on 54325
Owner run: the CLI prints 'All services bind to 0.0.0.0' and ignored the rootless daemon's default address; the gateway could not share 54321/54324 with 0.0.0.0 listeners. Now: Kong serves the API directly; the DEV gateway serves only Mailpit with basic auth on <DEV host>:54325; ENVIRONMENTS.md §3 gives the exact UFW rules (interface-scoped deny on 54322-54324, two cases by current UFW state), rollback and impact; dev:net-check proves the allowed surfaces from a distinct Docker network (5/5 OK) and prints the refusal checks to run from another device, since a rootless container's traffic to the host is delivered locally and cannot see the LAN firewall. LRN-053 corrects LRN-052.
This commit is contained in:
1 parent
a8edd59059
commit
e633169a00
11 files changed
+143
-111
No files matched your search
@@ -76,7 +76,7 @@ below runs from the repository root and delegates to the packages.
|
||||
# Development (DEV origin = this machine's LAN address, scripts/dev-env.sh; tests run from other devices)
|
||||
pnpm dev # Vite on http://<FAUNOSTEO_DEV_HOST>:5173 wired to the local stack (needs pnpm db:start)
|
||||
pnpm dev:offline # the local tool without backend
|
||||
pnpm dev:gateway # LAN entry: API :54321 + Mailpit :54324 (basic auth) on FAUNOSTEO_DEV_HOST; dev:gateway:stop
|
||||
pnpm dev:gateway # Mailpit behind basic auth on FAUNOSTEO_DEV_HOST:54325; dev:gateway:stop
|
||||
pnpm dev:net-check # allowed / refused probes from a distinct Docker network
|
||||
|
||||
# Production build (typecheck + vite build)
|
||||
@@ -445,11 +445,10 @@ Database (Supabase)
|
||||
(app, Supabase API, Mailpit, Studio) is addressed by the DEV origin (`scripts/dev-env.sh`, `FAUNOSTEO_DEV_HOST`),
|
||||
never by `127.0.0.1` / `localhost`, never hard-coded in a source. The Supabase CLI runs only through
|
||||
`scripts/supabase.sh` (`pnpm db:*`, `pnpm supabase`): config.toml reads the origin with `env()`.
|
||||
- Exposure (least privilege, `pnpm dev:net-check`): the rootless daemon binds published ports on loopback
|
||||
(`~/.config/docker/daemon.json` `{"ip":"127.0.0.1"}`); the DEV gateway (`pnpm dev:gateway`, nginx,
|
||||
`faunosteo_dev_gateway`) re-publishes only the API (54321) and Mailpit behind basic auth (54324) on the LAN
|
||||
address; Vite 5173 on all interfaces; Studio 54323 and PostgreSQL 54322 loopback only (SSH tunnel for
|
||||
Studio); the worker publishes no port. Nothing is exposed to the Internet; no production infrastructure
|
||||
- Exposure (least privilege, `pnpm dev:net-check`): LAN gets Vite 5173, the Supabase API 54321 and Mailpit
|
||||
behind basic auth through the DEV gateway (`pnpm dev:gateway`, nginx, `faunosteo_dev_gateway`, 54325). The CLI
|
||||
forces 0.0.0.0 on 54322 PostgreSQL, 54323 Studio, 54324 raw Mailpit: closed on the LAN interface by host UFW
|
||||
rules (owner action, ENVIRONMENTS.md §3.2); SSH tunnel for Studio; the worker publishes no port. Nothing is exposed to the Internet; no production infrastructure
|
||||
is touched from this repository. Rust is built natively; Docker runs services, the worker, sandbox tests and images.
|
||||
|
||||
### Files and Storage (migration 20261013100000, docs/development/STORAGE.md)
|
||||
|
||||
Reference in new issue
Block a user