v0.6.16: audit logging runtime admin toggle (#186) #204
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "ship-v0.6.16"
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 #186 — audit logging moves from a boot-time config flag to an admin Settings toggle, persisted in the state-backend (same pattern as peering-enable and the v0.6.15 quotas).
Mechanism: the audit
Loggergains a liveenabled()predicate that gatesAppendat its single chokepoint (the audit driver calls it on every op), so no call sites change. The logger is now always constructed and wrapped around the store (previously skipped whenaudit.enabledwas false), so it can start logging the instant it's switched on — no restart. Wired viaauditLog.SetEnabled(func() bool { return settingsStore.Get().AuditEnabled || cfg.Audit.Enabled }).Config
audit.enabledis a floor: a deployment can still mandate audit on (an admin can't switch below it); otherwise it's a pure admin toggle. Historical events stay queryable regardless.UI: an "Enable access audit logging" checkbox in Settings; the audit-log viewer is always available (querying past events).
go vet,go test ./..., node-check, dual-arch build green.