#433: audit verb registry — one source of truth, a self-growing dropdown #441
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "audit-verbs-433"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #433. Built to the researched design (GitLab's audit-event-type registry + Keycloak's serverinfo-fed filter, with build-time enforcement neither has).
audit.Verbs— canonical, append-only vocabulary: 52 verbs in 9 groups (files, trash, locks, shares, spaces, legal holds, encryption, peering, seats & licence). Replaces the prose comment as the source of truth.verbs_test.go, witnessed compile-red): walks the repo, fails the build when any emitted verb — literalAction:fields plus the known dynamic families — is unregistered, or when an Action is built from an unexempted non-literal. It caught real drift twice during its own build: the peering runtime family (peer-auth/send/deliver/…), thenauto-purgeandkey-drainwired in main.go — all absent from the manual inventory (and my own scout). The "auto-purge is never emitted" theory from the research phase was wrong; the scanner corrected it.Info()carries the registry through the existing/api/v1/admin/audit/info; the query page builds grouped optgroups from it (9 i18n group labels ×4 locales). The hardcoded seven-option list is gone; the dropdown is version-correct by construction and preserves the current selection across refills.CHANGELOG v0.6.135.
The scanner's first run caught what the manual scout missed: the four Audit callbacks wired in cmd/cairnd/main.go carry the peering package's runtime verbs (peer-auth, peer-send, peer-deliver families). Add the .audit(" carrier so those literals are scanned at source, and exempt the main.go plumbing that forwards them.