Audit logging becomes a runtime admin setting — enable after deployment, persists via state-in-backend #186
Labels
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: Cordy/Cairn#186
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Dogfood note (Nikola, following #173): audit logging should be enableable after initial deployment, from the admin panel like other settings, and persist through deployments/updates.
This is design-consistent, not an exception. The v0.6 config/state line says: config = how to find and unlock your data; state = everything else, living with the data. The audit switch is instance policy — exactly the class
peeringEnabledis in — so it belongs in the settings store, which since v0.6 lives encrypted in the backend and survives any redeploy by construction. The audit directory (audit.path, filesystem layout) stays config, likepeering.stagingDir.Implementation, mirroring the #134 peering pattern:
audit.enabled— the decorator is always in the stack.Appendis gated on a runtime closure reading the settings store (auditEnabled), so flipping the toggle takes effect without a restart and a disabled logger writes nothing.auditEnabled; the admin Settings dialog gains the toggle (next to retention/auto-purge, where the audit button already lives), i18n ×4.audit.enabled: truein the config acts as the initial value on first boot (adopted into settings once), so existing declarative deployments keep working; after that the runtime setting is authoritative. Precedence stated in the config comment.Also resolves the open question on #173 (whether to edit the dogfood config secret): with this, no secret edit needed — the toggle does it.
Triage: autonomous (next build). Same pattern as peering-enable (#123) and the v0.6.15 quota settings: add
auditEnabledto the settings store, have the audit sink read it live so the audit admin panel appears/disappears without a restart, add a Settings toggle; persists via state-in-backend. Configaudit.enabledstays the seed/default. First step: settings field +main.gowiring + Settings toggle + feature-detect on the frontend.