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
@@ -40,6 +40,10 @@ cron, port profile, criticality) without touching `xexeu.toml` by hand —
|
||||
see [`configuration.md`](configuration.md#editing-a-group-from-the-dashboard)
|
||||
for how the change reaches the running `scanner`.
|
||||
|
||||
Changing groups needs the admin token: open the `?token=` link printed by
|
||||
`xexeu serve` (or `docker compose logs xexeu`), or type the token when the
|
||||
dashboard asks for it. It is kept for the browser tab only.
|
||||
|
||||
## Executive report
|
||||
|
||||
<p align="center"><img src="img/relatorio-executivo-pt.png" width="900" alt="Xexéu executive security report cover page: authorized-use and confidentiality badges, title, subtitle, KPI strip and the table of contents"></p>
|
||||
|
||||
Reference in new issue
Block a user