firegex/backend
Domingo Dirutigliano 2c3316b036
Harden the no-auth reverse-proxy mode
Rename the flag to --unsafe-disable-auth so the risk is visible at the call
site, and close the ways the mode could outlive itself:

- Keep an explicit -P/--startup-psw instead of dropping it. Without a password
  in the database, --no-unsafe-disable-auth brought firegex up in its
  initial-setup state, where anyone able to reach it could choose the password.
- Refuse /api/login, /api/set-password and /api/change-password while
  authentication is disabled: an anonymous caller could otherwise plant a
  credential that kept working once authentication was turned back on.
  run.py config --password still works, writing to the database from the host.
- Print a banner on every start/restart with authentication disabled. The flag
  is persisted in the config file, so a later bare `run.py start` inherits it.
- Report the change in `run.py config --unsafe-disable-auth`, which claimed
  "No configuration changes specified" while persisting it, and stop that
  command from nulling the stored port and host on the way.
- Expose the state as auth_disabled in /api/status and hide the logout button
  and the change-password entry, which were silent no-ops in this mode.

Tests cover both directions of the toggle, the socket.io handler, the password
endpoints and the -P handling.
2026-09-03 01:07:51 +02:00
..
binsrc Merge branch 'dev' into dev-tmp 2026-07-23 13:45:25 +02:00
modules graphics and TLS feature total refactoring 2026-07-23 13:39:01 +02:00
routers Merge branch 'dev' into dev-tmp 2026-07-23 13:45:25 +02:00
utils Harden the no-auth reverse-proxy mode 2026-09-03 01:07:51 +02:00
app.py Harden the no-auth reverse-proxy mode 2026-09-03 01:07:51 +02:00
docker-entrypoint.sh Add transparent TLS proxying and certificate management for NFProxy and NFRegex 2026-07-20 12:25:30 +02:00
README.md README: update 2025-03-09 23:52:34 +01:00
requirements.txt using brotli 1.2 from pypi, fixed tests to py 3.14, removed from experimental pyproxy 2025-11-11 23:30:48 +01:00

Firegex backend

GO BACK

The backend of firegex is written with fastapi. The aim of the backend is to manage all the requests from the react front-end and manage also the proxy processes of the entire firewall. The fastapi webserver is responsable of deploying the react app.

Firegex Working Scheme Schematic example about how firegex manage the filters

Read the documentation of the API going at /api/docs path and see the swagger documentation of the API.

GO BACK