Skip to content

Commit 85df320

Browse files
committed
docs(admin): correct login/logout audit_log claimed_actor field
Codex P2 on the latest review of #674: my line 260 said both login and logout `admin_audit` entries include `claimed_actor`, but `auditLogout` (auth_handler.go:442-449) only emits `action`, `actor`, `remote`, and `status`. `claimed_actor` is login-only because the field exists to distinguish the typed access key from the authenticated one — logout has no claim to verify (the actor comes from the already-validated session cookie). A log pipeline that validated field presence against the previous text would misclassify every successful logout as malformed, exactly the operator-facing bug Codex flagged. Replaced the one-line summary with two concrete sample lines — one for login (with `claimed_actor`), one for logout (without) — and a closing sentence telling parsers that `claimed_actor` is present-only-on-login. Same shape verified against auth_handler.go:432-449. No code changes; doc-only.
1 parent 9010085 commit 85df320

1 file changed

Lines changed: 15 additions & 4 deletions

File tree

docs/admin.md

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -255,10 +255,21 @@ CR and LF in `forwarded_from` are stripped at the entry point — a
255255
hostile follower cannot split a single audit line into two by
256256
smuggling control characters into its node ID.
257257

258-
Login and logout emit their own `admin_audit` lines with
259-
`action=login` / `action=logout` (plus `actor`, `claimed_actor`,
260-
`remote`, `status`) so the JWT's lifetime can be correlated with the
261-
mutations it authorised.
258+
Login and logout emit their own `admin_audit` lines so the JWT's
259+
lifetime can be correlated with the mutations it authorised. The
260+
two shapes differ on a single field — login carries `claimed_actor`
261+
because the access key the operator typed is distinct from the
262+
authenticated `actor` (a successful login proves they match; a
263+
failed login records what was claimed), while logout has no claim
264+
to verify and omits the field:
265+
266+
```
267+
admin_audit action=login actor=AKIA_ADMIN claimed_actor=AKIA_ADMIN remote=10.0.0.7:51234 status=200
268+
admin_audit action=logout actor=AKIA_ADMIN remote=10.0.0.7:51234 status=200
269+
```
270+
271+
Log parsers consuming this shape should treat `claimed_actor` as
272+
present-only-on-login.
262273

263274
## Troubleshooting
264275

0 commit comments

Comments
 (0)