Files
homelab-frontend/internal
rockandpoimen e20e3f7be3
CI / CI (push) Successful in 3m39s
feat(audit): log successful JWT auth with subject, acting_party, roles (#21)
Add audit trail for authenticated API requests.

## Changes
- Add `auth ok` info log after JWT validation passes
- Export `ClaimString`/`ClaimStringSlice` from identity package
- Log fields: subject, acting_party, roles/permissions, path, method

## Log format
```json
{"level":"info","message":"auth ok","extra":{"subject":"2213aa...","acting_party":"portfolio-agent","roles":"llm:inference,memory:read","path":"/v1/chat/completions","method":"POST"}}
```

## Why
Gateway only logged auth failures — no audit trail for who accessed LLM endpoints. Required for cluster access auditing.

Complements existing X-Forwarded-User header injection (already complete).

---------

Co-authored-by: poimen <[email protected]>
Reviewed-on: #21
2026-09-09 22:38:01 +00:00
..