feat(settings): hub auth-policy panel — T4/T5 security parity in the GUI
Some checks failed
Security / Security check (push) Failing after 1s

Settings → Security now shows the hub's effective auth policy via the
new read-only AuthStatus RPC: active token validator (static / jwt-rs256
with issuer, audience, JWKS source), anonymous-access warning, per-token
cards with scope grants, env-var presence and rate limits, plus a
localized admin-denied story for non-admin tokens. Live-reloads on
endpoint change.

Also fixes a batch of fai→chain rename leftovers this panel's
verification uncovered: hub_auth_token.dart and registry_token.dart
read/wrote ~/.fai/ while the hub reads ~/.chain/ (stored registry
tokens never reached the hub), today_story_loader + tools/today used
~/.fai/today, chain_log legacy ~/.fai/logs migration removed per the
no-legacy-recognisers decision, and UI strings still advertised the
retired .fai bundle extension.

Includes 5 widget tests for the panel, an integration-test screenshot
harness (auth_policy_shots_test.dart, guide-shots style), and DE+EN
l10n. flutter analyze clean, 58 tests green.

Signed-off-by: flemming-it <stefan.a.flemming@googlemail.com>
This commit is contained in:
flemming-it 2026-07-15 03:19:33 +02:00
parent c6da5025ce
commit efaa089454
18 changed files with 1208 additions and 74 deletions

View file

@ -2,7 +2,7 @@
# tools/today/accept.sh <proposal-path>
#
# Validates the chosen candidate, then atomically swaps it in as
# ~/.fai/today/active.yaml. Studio reads that file at startup.
# ~/.chain/today/active.yaml. Studio reads that file at startup.
set -euo pipefail
if [ "${1:-}" = "" ]; then
@ -45,7 +45,7 @@ fi
# Atomic move via copy-then-rename so Studio never reads a torn
# half-written file even if it polls during the swap.
dst="$HOME/.fai/today/active.yaml"
dst="$HOME/.chain/today/active.yaml"
mkdir -p "$(dirname "$dst")"
tmp="$(mktemp "${dst}.XXXXXX")"
cp "$src" "$tmp"