Audit is off on a fresh instance: first admin and all account management go unrecorded #842

Closed
opened 2026-10-03 16:37:22 +00:00 by Cordy · 3 comments
Owner

Found in the #533 QA pass (2026-10-03). This is QA finding 5.

What happens

  • Audit starts off. A fresh instance boots with audit off ("audit logging available (runtime toggle)"; settings.AuditEnabled defaults to false). The audit directory stayed empty during the whole QA run.
  • What goes unrecorded:
    • the first-run admin creation;
    • every user-create, user-password-reset, admin-promote / admin-demote and user-remove;
    • the #833 share-admin verbs.
  • Recovery is impossible. These actions cannot be reconstructed later.
  • The docs don't say so. docs/handbook/local-accounts.md ("What is audited") lists the verbs without saying audit has to be switched on first. admin-policy.md documents the runtime toggle and the audit.enabled config floor.

Research

  • Nextcloud
    • The admin_audit app is disabled by default.
    • Even when enabled, it writes at INFO while the default log level is WARN, so nothing is captured until the log level is lowered.
    • This is a well-trodden support trap ("Audit log empty", "audit logging app does not work").
    • Lesson: off-by-default plus a second hidden switch gives silent non-compliance.
  • oCIS ships the audit service as a separate service that operators must enable and route.
  • Compliance practice (ISO 27001 A.8.15 logging, and the Swiss/German public-sector audience): security-relevant administrative events (account lifecycle, privilege changes, policy changes) are expected to be logged from day one. Full data-access logging (every read and download) is the part that's legitimately opt-in, for privacy and volume.

Options

  • A. Keep it off; fix the docs and the UX (minimal).
    • Note it in local-accounts.md and in setup.
    • Show an admin bell/Overview hint "Audit is off" on a fresh instance.
  • B. Split audit into two tiers (proposed).
    • Administrative events always on: account lifecycle, roles, settings and policy changes, share-admin, setup and licence events. Small volume, no file-access personal data.
    • The existing toggle continues to control the high-volume access events (read, write, download, share access).
    • Both go into the same sealed log (#823), so nothing is lost when someone later switches access logging on.
  • C. Turn everything on by default. This contradicts the broad-use positioning (a band's file server doesn't want every read logged) and raises the storage and privacy cost.

Plan (assuming B)

  1. An audit verb registry flag admin:true (internal/audit/verbs.go). Logger.Append writes admin verbs regardless of the runtime toggle.
  2. The first-run setup writes setup-complete (the new verb), naming the created admin.
  3. Docs: local-accounts.md, admin-policy.md and deployment.md explain the two tiers. The toggle's help text says it controls access logging.
  4. Tests:
    • with audit off, user-create is recorded but read is not;
    • the setup event is recorded;
    • the verb scanner enforces that every verb declares its tier.

Decision for Nikola

A, B or C. B is recommended.

Refs:

Found in the #533 QA pass (2026-10-03). This is QA finding 5. ## What happens - **Audit starts off.** A fresh instance boots with audit off ("audit logging available (runtime toggle)"; `settings.AuditEnabled` defaults to false). The audit directory stayed empty during the whole QA run. - **What goes unrecorded:** - the first-run admin creation; - every `user-create`, `user-password-reset`, `admin-promote` / `admin-demote` and `user-remove`; - the #833 share-admin verbs. - **Recovery is impossible.** These actions cannot be reconstructed later. - **The docs don't say so.** `docs/handbook/local-accounts.md` ("What is audited") lists the verbs without saying audit has to be switched on first. `admin-policy.md` documents the runtime toggle and the `audit.enabled` config floor. ## Research - **Nextcloud** - The `admin_audit` app is **disabled by default**. - Even when enabled, it writes at INFO while the default log level is WARN, so **nothing is captured** until the log level is lowered. - This is a well-trodden support trap ("Audit log empty", "audit logging app does not work"). - Lesson: off-by-default plus a second hidden switch gives silent non-compliance. - **oCIS** ships the audit service as a separate service that operators must enable and route. - **Compliance practice** (ISO 27001 A.8.15 logging, and the Swiss/German public-sector audience): security-relevant administrative events (account lifecycle, privilege changes, policy changes) are expected to be logged **from day one**. Full data-access logging (every read and download) is the part that's legitimately opt-in, for privacy and volume. ## Options - **A. Keep it off; fix the docs and the UX (minimal).** - Note it in local-accounts.md and in setup. - Show an admin bell/Overview hint "Audit is off" on a fresh instance. - **B. Split audit into two tiers (proposed).** - **Administrative events always on:** account lifecycle, roles, settings and policy changes, share-admin, setup and licence events. Small volume, no file-access personal data. - **The existing toggle** continues to control the high-volume access events (read, write, download, share access). - Both go into the same sealed log (#823), so nothing is lost when someone later switches access logging on. - **C. Turn everything on by default.** This contradicts the broad-use positioning (a band's file server doesn't want every read logged) and raises the storage and privacy cost. ## Plan (assuming B) 1. An audit verb registry flag `admin:true` (internal/audit/verbs.go). `Logger.Append` writes admin verbs regardless of the runtime toggle. 2. The first-run setup writes `setup-complete` (the new verb), naming the created admin. 3. **Docs:** local-accounts.md, admin-policy.md and deployment.md explain the two tiers. The toggle's help text says it controls access logging. 4. **Tests:** - with audit off, `user-create` is recorded but `read` is not; - the setup event is recorded; - the verb scanner enforces that every verb declares its tier. ### Decision for Nikola A, B or C. B is recommended. Refs: - https://docs.nextcloud.com/server/stable/admin_manual/configuration_server/logging_configuration.html - https://help.nextcloud.com/t/audit-log-empty/49642
Author
Owner

Process note (Nikola, 2026-10-03): the "Decision for Nikola" above (option A, B or C) gets asked when this issue is worked on, not before.

Process note (Nikola, 2026-10-03): the "Decision for Nikola" above (option A, B or C) gets asked when this issue is worked on, not before.
Author
Owner

Research: audit defaults elsewhere (2026-10-07)

Product Admin/account events File-access events Notes
Nextcloud Off: admin_audit is an optional app Off Even when enabled, the default log level WARN captures nothing until log.condition is set: a second hidden switch (docs). Classic "audit log empty" support thread.
oCIS Off: the audit service "does not start automatically", and AUDIT_LOG_FILE is empty Off (docs)
Keycloak Off: admin events and user events are only stored after "Save events" is turned on; only errors are logged n/a (Red Hat docs)
Synology DSM System log on Off: the SMB/WebDAV transfer log must be enabled, and then only deletes are logged by default (ManageEngine guide)
GitLab (self-managed) On: audit events for admin, user and group changes are recorded by default Git operations: off, behind a flag (GitLab docs). This is exactly the two-tier split of option B.
Microsoft 365 On for enterprise tenants, 180-day retention On (same log) Off for Business Basic/Standard/Premium and trials, which must enable it by hand (Microsoft Learn)
Google Workspace Always on; admin audit logs can't be disabled On (Google Cloud docs)

Pattern: the self-hosted file servers (Nextcloud, oCIS, Synology) and Keycloak ship with audit off, and their forums are full of "why is my audit log empty" after an incident. The enterprise platforms (GitLab, Microsoft 365 enterprise, Google) record administrative events from day one and treat high-volume data-access logging as optional. Microsoft even had to document that its SMB tiers silently don't audit.

Compliance: ISO 27001:2022 A.8.15 expects privileged-user activity (account creation and deletion, permission changes, configuration changes) to be captured and protected from tampering by the admins themselves (ISMS.online, Sprinto). It doesn't require logging every file read.

Recommendation stays B:

  • Administrative events are always recorded into the sealed log (#823).
  • The existing toggle keeps controlling file-access events.
  • The toggle's help text changes to say it controls access logging.

This matches the enterprise defaults, satisfies A.8.15, and avoids the Nextcloud/Keycloak "empty after the incident" trap, without logging a hobby user's every read.

## Research: audit defaults elsewhere (2026-10-07) | Product | Admin/account events | File-access events | Notes | |---|---|---|---| | **Nextcloud** | Off: `admin_audit` is an optional app | Off | Even when enabled, the default log level WARN captures nothing until `log.condition` is set: a second hidden switch ([docs](https://docs.nextcloud.com/server/stable/admin_manual/configuration_server/logging_configuration.html)). Classic "audit log empty" support thread. | | **oCIS** | Off: the audit service "does not start automatically", and `AUDIT_LOG_FILE` is empty | Off | ([docs](https://doc.owncloud.com/ocis/7.3/deployment/services/s-list/audit.html)) | | **Keycloak** | Off: admin events and user events are only stored after "Save events" is turned on; only errors are logged | n/a | ([Red Hat docs](https://docs.redhat.com/en/documentation/red_hat_build_of_keycloak/24.0/html/server_administration_guide/configuring_auditing_to_track_events)) | | **Synology DSM** | System log on | Off: the SMB/WebDAV transfer log must be enabled, and then only deletes are logged by default | ([ManageEngine guide](https://www.manageengine.com/log-management/help/file-integrity-monitoring/synology-nas-fim-cloud.html)) | | **GitLab (self-managed)** | **On**: audit events for admin, user and group changes are recorded by default | Git operations: off, behind a flag | ([GitLab docs](https://archives.docs.gitlab.com/16.2/ee/administration/audit_events.html)). This is exactly the two-tier split of option B. | | **Microsoft 365** | **On** for enterprise tenants, 180-day retention | On (same log) | **Off** for Business Basic/Standard/Premium and trials, which must enable it by hand ([Microsoft Learn](https://learn.microsoft.com/en-us/purview/audit-log-enable-disable)) | | **Google Workspace** | **Always on**; admin audit logs can't be disabled | On | ([Google Cloud docs](https://docs.cloud.google.com/logging/docs/audit/gsuite-audit-logging)) | **Pattern:** the self-hosted file servers (Nextcloud, oCIS, Synology) and Keycloak ship with audit **off**, and their forums are full of "why is my audit log empty" after an incident. The enterprise platforms (GitLab, Microsoft 365 enterprise, Google) record **administrative** events from day one and treat high-volume **data-access** logging as optional. Microsoft even had to document that its SMB tiers silently don't audit. **Compliance:** ISO 27001:2022 A.8.15 expects privileged-user activity (account creation and deletion, permission changes, configuration changes) to be captured and protected from tampering by the admins themselves ([ISMS.online](https://www.isms.online/iso-27001/annex-a-2022/8-15-logging-2022/), [Sprinto](https://sprinto.com/iso-27001/logging-and-monitoring-policy/)). It doesn't require logging every file read. **Recommendation stays B:** - Administrative events are always recorded into the sealed log (#823). - The existing toggle keeps controlling file-access events. - The toggle's help text changes to say it controls access logging. This matches the enterprise defaults, satisfies A.8.15, and avoids the Nextcloud/Keycloak "empty after the incident" trap, without logging a hobby user's every read.
Author
Owner

Decision (Nikola, 2026-10-07): B, two tiers. Administrative events (accounts, roles, settings, policy, share-admin, setup, licence) are always recorded. The existing toggle controls file-access events, and its help text says so.

**Decision (Nikola, 2026-10-07): B, two tiers.** Administrative events (accounts, roles, settings, policy, share-admin, setup, licence) are always recorded. The existing toggle controls file-access events, and its help text says so.
Cordy closed this issue 2026-10-07 18:33:05 +00:00
Sign in to join this conversation.
No labels
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: Cordy/Cairn#842
No description provided.