nas-burnin/app
Brandon Walter 71eac9cba0
Some checks are pending
Security scan / pip-audit (push) Waiting to run
Security scan / bandit (push) Waiting to run
Security scan / gitleaks (push) Waiting to run
Security scan / mypy (push) Waiting to run
feat: loopback auth bypass for autonomous monitor (1.0.0-56)
The autonomous burn-in monitor can't hit /api/v1/burnin/start
without a session cookie. Provisioning one externally is fragile.
Add a targeted loopback bypass: requests from 127.0.0.1 / ::1
skip the auth gate and get a synthetic admin User for audit
attribution.

Why it's safe:
- The only way to reach the app from 127.0.0.1 is a process in
  the container's network namespace (docker exec from the host).
  Anyone with that already has rm -rf access to /data, so the
  bypass doesn't widen the attack surface.
- External traffic via NPM/Authelia arrives with the docker bridge
  gateway IP as source — NOT loopback — so it keeps going through
  full auth.
- request.client.host is the raw TCP socket source, NOT
  X-Forwarded-For, so external attackers can't spoof loopback via
  headers.

The new auth.LoopbackUser() is a tiny factory (id=0, is_admin=True,
username="monitor"). Audit events from this caller will show
operator='monitor' so they're distinguishable from human admins.

Staged in source; lands at next rebuild. Authorized by user
("It's a blank NAS machine. I don't care about any drive getting
wiped out.").
2026-05-12 07:52:20 -07:00
..
burnin fix: throttle ALL drain-loop DB calls + drop progress noise from log (1.0.0-54) 2026-05-11 22:07:39 -07:00
routes feat: prominent failure-reason block + heuristic in drawer (1.0.0-50) 2026-05-09 12:06:11 -07:00
static feat: job-level Est. completion in drawer header (1.0.0-53) 2026-05-10 22:45:04 -07:00
templates fix: drop redundant stage suffix from Burn-In failed chip 2026-05-09 12:33:26 -07:00
__init__.py Initial commit — TrueNAS Burn-In Dashboard v0.5.0 2026-02-24 00:08:29 -05:00
auth.py feat: loopback auth bypass for autonomous monitor (1.0.0-56) 2026-05-12 07:52:20 -07:00
auth_cli.py infra: rename truenas-burnin → nas-burnin (1.0.0-41) 2026-05-04 07:16:02 -07:00
config.py feat: loopback auth bypass for autonomous monitor (1.0.0-56) 2026-05-12 07:52:20 -07:00
database.py feat: phase caption + bad-block badge + per-pattern history (1.0.0-47) 2026-05-08 23:23:02 -07:00
logging_config.py Initial commit — TrueNAS Burn-In Dashboard v0.5.0 2026-02-24 00:08:29 -05:00
mailer.py fix: annotate to mypy-clean + promote to gating (1.0.0-40) 2026-05-03 21:21:55 -07:00
main.py feat: loopback auth bypass for autonomous monitor (1.0.0-56) 2026-05-12 07:52:20 -07:00
models.py feat: pool-membership lock + cancellation hardening + smart_health refresh + tunables (1.0.0-13 -> 1.0.0-21) 2026-05-02 09:25:56 -04:00
notifier.py Stage 7: SSH architecture, SMART attribute monitoring, drive reset, and polish 2026-02-24 08:09:30 -05:00
poller.py fix: address Codex audit findings (1.0.0-28) 2026-05-02 18:48:16 -04:00
renderer.py Stage 7: SSH architecture, SMART attribute monitoring, drive reset, and polish 2026-02-24 08:09:30 -05:00
retention.py fix: annotate to mypy-clean + promote to gating (1.0.0-40) 2026-05-03 21:21:55 -07:00
settings_store.py fix: annotate to mypy-clean + promote to gating (1.0.0-40) 2026-05-03 21:21:55 -07:00
ssh_client.py fix: live pool re-check before start_job + drop dead run_badblocks (1.0.0-29) 2026-05-02 21:29:11 -04:00
terminal.py chore: re-sync deployed work that pre-dates this session 2026-05-02 09:24:42 -04:00
truenas.py chore: dev-experience + mypy noise cleanup 2026-05-03 21:11:23 -07:00