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.").