Repository navigation
Owner can allow an agent to search the audit log: audit_read, GET /_keyring/audit (154) - #155
Conversation
…eyring/audit (154) Owner decision 2026-11-15: per agent, off by default. The agent's page has Allow audit search / Stop audit access (password; audited as agent_audit_read; saved as "audit_read": true on the role). An allowed role calls GET /_keyring/audit with its token (through a relay: /<role>/_keyring/audit) and the same filters as the Activity page, and gets JSON. Others get 403. One search at a time (429); each search is audited. The search moves from the dashboard to server.SearchAudit, shared by both.
…post-merge review P2) A record is written when its call ends but stamped with its start, so a slow older call written last displaced a newer one. Keep a min-heap by time.
|
Head 06ad466 adds the fix for PR 153's post-merge P2 (Retain newest timestamps rather than last-written records): |
Decision: Findings
Tests Run
Raw runtime output was retained in local Gitmoot state and is not posted here. |
Records are stamped to the second, so round both bounds up to whole seconds: for whole-second t, t >= x and t < y iff t >= ceil(x) and t < ceil(y). The response reports the rounded window.
Decision: Findings
Tests Run
Raw runtime output was retained in local Gitmoot state and is not posted here. |
|
Head 5024f65 fixes F1 (fractional RFC 3339 bounds): records are whole-second, so |
Decision: Findings
Tests Run
Raw runtime output was retained in local Gitmoot state and is not posted here. |
…ng (#155 review f1/f2) AuditWindow returns the bounds as given, fractions included, and the JSON answer echoes them with RFC3339Nano, so a returned window can be replayed. SearchAudit rounds up to whole seconds only for its text comparison.
|
Head d0292cd addresses f1/f2 (precision of the answered window): |
Decision: Findings
Tests Run
Raw runtime output was retained in local Gitmoot state and is not posted here. |
Closes 154. Owner decision 2026-11-15 (interactive question in this seat; recorded at /root/fleet-tools/state/keyring-seat/owner-decision-audit-read-20261115.json): agents may search the audit log when the owner grants it per agent; off by default. Requested by Jarvis 488255.
Change
policy.Role.AuditRead("audit_read": true).agent_audit_readwith role and allowed; saved to access.json and applied).GET /_keyring/auditon the proxy listener, after source and token checks and role expiry: 403 unless AuditRead; GET only; same filters as the Activity page (from/to UTC minute or RFC 3339, service, role, path contains); JSON{from,to,rows,more,limit}. One search at a time (TryLock, else 429) since each reads the whole log. Every search, allowed or not, writes an audit record (noteaudit search).dashboard/activity.gotoserver.SearchAudit/AuditWindow, shared by both; Activity page behaviour unchanged (its test unchanged and passing).Relay:
/<role>/_keyring/auditpasses through unchanged (the relay strips only the role prefix).Evidence
TestAuditSearchOnlyForAllowedAgents: allowed role gets only phobos's 16:39:53 cancel for the minute+path query; a role without the grant gets 403 with no data; POST 405; bad time 400; no token 401; both searches audited.TestAllowAndStopAgentAuditSearch: off by default; wrong password changes nothing; allow savesaudit_read: trueand audits; page offers Stop; stop clears it.