feat(api): require an admin token for configuration changes
Group CRUD decides what the scanner sweeps, yet any client that reached the API could change it. Writes now need XEXEU_ADMIN_TOKEN (or a token generated at startup and printed as a ?token= link, like sabia ui), compared in constant time, and a browser Origin must match Host. The dashboard keeps the token for the tab and asks for it on 401. Reads are unchanged. Also track .env.example: '.env*' in .gitignore had kept it out of the repository, although the README tells operators to copy it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
36eadabc7c
commit
90ece32dac
17 files changed
+369
-28
No files matched your search
+5
-1
@@ -38,7 +38,11 @@ docker compose up -d --build
|
||||
```
|
||||
|
||||
The dashboard comes up at `http://127.0.0.1:8788` by default (`XEXEU_PUBLISH`
|
||||
in `.env` to change the bind address/port).
|
||||
in `.env` to change the bind address/port). To add, edit or remove groups from
|
||||
it, set `XEXEU_ADMIN_TOKEN` in `.env` (`openssl rand -hex 32`) or, leaving it
|
||||
empty, take the one-off link from `docker compose logs xexeu`; inside the
|
||||
container it reads `http://0.0.0.0:8788/?token=…`, so swap the host for the
|
||||
published address.
|
||||
|
||||
## Why `scanner` runs as `uid 0` restricted to `NET_RAW`
|
||||
|
||||
|
||||
Reference in new issue
Block a user