[P3] No enrollment audit log or rate limiting #7
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
[claude 2026-07-02] From architecture review (auth). handleCreateEnrollToken / handleEnroll (internal/server/api/api.go) leave no audit trail (who minted, who redeemed, when) and the enroll endpoints have no rate limiting. Add a durable audit record (admin token hash, timestamp, host name/os/arch, token hash) and a simple per-IP sliding-window limit on /api/v1/enroll.
Migrated from git-collab issue
48e691cd60b4f0aa314873a6ce42f4edf8f32241.Original author: a73x dev@a73x.sh.
Close reason: Fixed by patch
bf35805e[claude 2026-07-03] Picking this up. Plan: durable audit_log table (ts, action, detail JSON) written on token mint, enroll success/failure, and host decommission; slog mirror for live tails. Rate limiting: in-memory per-IP token bucket on POST /api/v1/enroll (unauthenticated endpoint) — N burst, slow refill; mint endpoint stays admin-authed (no limiter). TDD via api tests.