Admin token for config changes, licenses, and 1.0.0 #1

Merged
lucasrguerra merged 3 commits from feat/api-auth-licenca into main 2026-11-03 13:24:58 +00:00
Owner

What

  • Licenses: LICENSE-MIT and LICENSE-APACHE (already declared in Cargo.toml and the image labels, but missing).
  • API: configuration writes require an admin token (XEXEU_ADMIN_TOKEN, or a token generated at startup as a ?token= link, like sabia ui), compared in constant time, plus a same-origin check. Reads are unchanged.
  • Alignment with Acauã/Sabiá: scripts/check.sh, install-hooks.sh, check-ui-i18n.mjs in CI (38 untranslated strings fixed), and the release cli job (linux-aarch64 and linux-x86_64 tarballs with .sha256).
  • Fixes: .env.example was never tracked; the sidebar version was hard-coded as v0.1.0; ROADMAP pointed to the local-only spec.
  • Version: 1.0.0, with CHANGELOG in EN and PT-BR.

Verified

  • scripts/check.sh --full: fmt, clippy, i18n, YAML, compose, tests (including the new e2e cases for 401, 403 and cross-origin), and cargo audit.
  • Browser (headless Chrome): the ?token= link is stored and stripped from the URL; without it, a 401 prompts for the token, then retries, and the delete goes through.
  • package-cli.sh for x86_64: the archive checks against its .sha256 and contains the binary plus both licenses.

🤖 Generated with Claude Code

## What - **Licenses:** `LICENSE-MIT` and `LICENSE-APACHE` (already declared in `Cargo.toml` and the image labels, but missing). - **API:** configuration writes require an admin token (`XEXEU_ADMIN_TOKEN`, or a token generated at startup as a `?token=` link, like `sabia ui`), compared in constant time, plus a same-origin check. Reads are unchanged. - **Alignment with Acauã/Sabiá:** `scripts/check.sh`, `install-hooks.sh`, `check-ui-i18n.mjs` in CI (38 untranslated strings fixed), and the release `cli` job (`linux-aarch64` and `linux-x86_64` tarballs with `.sha256`). - **Fixes:** `.env.example` was never tracked; the sidebar version was hard-coded as `v0.1.0`; ROADMAP pointed to the local-only spec. - **Version:** 1.0.0, with CHANGELOG in EN and PT-BR. ## Verified - `scripts/check.sh --full`: fmt, clippy, i18n, YAML, compose, tests (including the new e2e cases for 401, 403 and cross-origin), and `cargo audit`. - Browser (headless Chrome): the `?token=` link is stored and stripped from the URL; without it, a `401` prompts for the token, then retries, and the delete goes through. - `package-cli.sh` for x86_64: the archive checks against its `.sha256` and contains the binary plus both licenses. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
lucasrguerra added 3 commits 2026-11-03 13:17:35 +00:00
LICENSE-MIT/LICENSE-APACHE were declared but missing. verificar.sh and
instalar-hooks.sh become check.sh and install-hooks.sh, as in Acauã and
Sabiá, and CI now runs the UI translation coverage check, which found 38
untranslated dashboard strings and a duplicated key.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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>
chore(release): 1.0.0
CI / Format and clippy (pull_request) Successful in 33s
CI / Dependency audit (pull_request) Successful in 15s
CI / Tests (Linux) (pull_request) Successful in 1m56s
CI / Docker image (build and smoke test) (pull_request) Successful in 6m10s
7146f4f70f
Releases attach a standalone CLI for linux-aarch64 and linux-x86_64 built
natively (package-cli.sh/release-upload.sh, as in Sabiá). ROADMAP drops the
reference to the local-only spec and README describes the published image
and binaries.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
lucasrguerra merged commit 3b91f77b27 into main 2026-11-03 13:24:58 +00:00
lucasrguerra deleted branch feat/api-auth-licenca 2026-11-03 13:24:58 +00:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: ciberfauna/harpia#1