[P3] No enrollment audit log or rate limiting #7

Closed
opened 2026-07-02 16:43:58 +00:00 by a73x · 1 comment
a73x commented 2026-07-02 16:43:58 +00:00 (Migrated from git.a73x.sh)

[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-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
a73x commented 2026-07-03 12:52:47 +00:00 (Migrated from git.a73x.sh)

[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.

[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.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
a73x/eitri#7
No description provided.