Skip to content

feat(audit): readable host-scoped Audit log tab + audit message/resource filters (Phase 2b)#619

Merged
remyluslosius merged 1 commit into
mainfrom
feat/host-audit-tab
Jun 20, 2026
Merged

feat(audit): readable host-scoped Audit log tab + audit message/resource filters (Phase 2b)#619
remyluslosius merged 1 commit into
mainfrom
feat/host-audit-tab

Conversation

@remyluslosius

Copy link
Copy Markdown
Contributor

Phase 2b of the activity readability initiative — completes the deferred host-detail tabs (decision #2: keep the Audit log tab, make it a real per-host audit view).

Backend (api-audit-events-query v1.2.0 — C-07/AC-12)

  • GET /api/v1/audit/events now returns a server-rendered readable message ("<actor> <predicate>", e.g. "alice@example.com created a host"), built by activity.FormatAudit — exported so the audit-events endpoint and the activity feed's audit leg render audit the same way (one formatter, no duplicate map). New action codes never surface as raw dotted enums.
  • Exposes actor_label and accepts resource_type + resource_id query filters for a single resource's audit trail.

Frontend (frontend-host-detail v1.8.0 — AC-44)

  • The host-detail Audit log tab goes live (HostAuditLogTab): the host-scoped forensic trail via /audit/events?resource_type=host&resource_id=X, rendered with the readable message, paginated, gated on audit:read. Removed from the stub registry.
  • Both deferred host tabs are now live (Activity in feat(host-detail): live Activity tab (host-scoped feed) (Phase 2a) #618, Audit log here).

Why this shape

This de-risks Phase 3 (the settings audit log inherits the same readable message field for free), and keeps audit a first-class compliance surface per your commitment.

Verified live on owas-tst01: "Someone completed host discovery", "Someone mounted a filesystem" — readable, host-scoped (Someone is the graceful actor fallback when actor_label is empty on system-emitted events).

Full frontend suite (321) + backend audit suite + specter (111, structural 100%) green. Ran specter coverage --strictness annotation pre-push.

…e/resource filters (Phase 2b)

api-audit-events-query v1.2.0 (C-07, AC-12) + frontend-host-detail v1.8.0
(AC-44). Phase 2b of the activity readability initiative.

Backend: GET /api/v1/audit/events now returns a server-rendered readable
'message' ('<actor> <predicate>', e.g. 'alice@example.com created a host'),
built by the shared activity.FormatAudit (exported from internal/activity so
the audit-events endpoint and the activity feed's audit leg render audit the
SAME way — no duplicate map). It also exposes actor_label and accepts
resource_type + resource_id query filters for a single resource's trail.

Frontend: the host-detail Audit log tab goes live (HostAuditLogTab) — the
host-scoped forensic trail via /audit/events?resource_type=host&resource_id=X,
rendered with the readable message, gated on audit:read. Removed from the
stub registry. Both deferred host tabs (Activity in 2a, Audit log here) are
now live.

This is decision #2 from the Phase 2 discussion (keep the Audit log tab, make
it a real per-host audit view) and de-risks Phase 3 (the settings audit log
gets the same readable message field for free).

Verified live: owas-tst01 Audit log shows 'Someone completed host discovery',
'Someone mounted a filesystem' — readable, host-scoped. Full frontend suite
(321) + backend audit suite + specter (111, structural 100%) green.
@remyluslosius remyluslosius merged commit b4076db into main Jun 20, 2026
13 checks passed
@remyluslosius remyluslosius deleted the feat/host-audit-tab branch June 20, 2026 20:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant