chore(workspace): DEV least-privilege exposure — nginx DEV gateway (API on the LAN, Mailpit behind basic auth), network check from a distinct origin, loopback default for the rootless daemon documented
The Supabase CLI publishes 54321-54324 on every interface with no bind
option. Design: the rootless daemon binds published ports on loopback by
default (~/.config/docker/daemon.json {"ip":"127.0.0.1"}, owner action,
not applied), and the DEV gateway (Compose service dev-gateway, profile
dev, container faunosteo_dev_gateway) re-publishes only the API (Kong) and
Mailpit behind HTTP basic auth on FAUNOSTEO_DEV_HOST; Studio and PostgreSQL
stay loopback (SSH tunnel for Studio). pnpm dev:gateway generates the Mailpit
credentials (gitignored; htpasswd 644 because the rootless container user
cannot read a 600 file, hash only). pnpm dev:net-check probes from a
throwaway container on its own Docker network: app, API health, REST 401,
Mailpit 401/200, PostgreSQL and Studio closed. Gateway proven on alternate
ports (health 200, password login 200, Mailpit 401 / 200).
This commit is contained in:
1 parent
5a12596195
commit
3e48b0d848
11 files changed
+246
-36
No files matched your search
@@ -76,6 +76,8 @@ 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:net-check # allowed / refused probes from a distinct Docker network
|
||||
|
||||
# Production build (typecheck + vite build)
|
||||
pnpm build
|
||||
@@ -443,9 +445,11 @@ 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: 5173 and 54321 are what a remote browser needs; Studio 54323 and Mailpit 54324 are unauthenticated
|
||||
admin tools for the private subnet only; PostgreSQL 54322 should not be reachable from the LAN (firewall =
|
||||
owner decision); the worker publishes no port. Nothing is exposed to the Internet; no production infrastructure
|
||||
- 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
|
||||
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