User & Security Audit Logs

Modified on Thu, 19 Nov at 7:32 PM

The Audit Log is a dedicated, structured logging mechanism that records security, compliance and governance events in farmerswife. It is completely separated from the legacy log.txt and from general system / debug logs, so it captures only events that matter for external audits.


Users with according permission can download the log on demand from the Desktop client, for any date range, in CSV format.


TABLE OF CONTENTS


1. Overview

The feature is built around five principles:

  • Dedicated kept in its own SQLite database (audit_logs.db3); not mixed with operational logs.
  • Append-only the application only inserts; no modify / delete path is exposed.
  • Permission-driven exporting requires an explicit per-user permission, validated both client- and server-side.
  • Privacy-aware sensitive values like secrets and passwords are stored masked.
  • Asynchronous writes happen in a dedicated thread so the user-facing app stays responsive.

2. Enabling the feature

The audit log is off by default and must be enabled by a Master / Admin user:

  1. Open the Desktop client as a Master / Admin user.
  2. Go to Toolbox → Settings → Server Setup.
  3. Locate the Use Audit Logs checkbox.
  4. Tick the checkbox.

When the toggle is enabled:

  • All supported events from this point on are recorded.

Note: Disabling the toggle stops new writes but never removes existing data, existing rows remain available for export.

Note: Toggling Use Audit Logs at runtime takes effect immediately; no server restart is required.

Note: Toggling this server setting does not override the per-user Can Export Audit Logs permission. A user without the permission cannot export, regardless of the server-wide state.


3. Granting export permission

In addition to enabling the feature server-wide, each user needs an individual permission to be allowed to download the logs.

  1. Go to Object Manager → Users.
  2. Double click to edit the user → Permission Profile → Edit.
  3. Tick Can Export Audit Logs (in the Advanced section).
  4. Save.

Without this permission, the Export Audit Logs button stays disabled in the Toolbox Settings, even if the feature is enabled server-wide — the user will get a Permission Error.


4. Exporting audit logs

  1. Open Toolbox → Settings→ Server Setup.
  2. Click Export Audit Logs.
  3. The export dialog opens with two date pickers: From and To.
  4. Pick the desired range. Both dates default to today.
  5. Click Export.
  6. A Save As dialog opens; the default filename is audit_logs_export.csv.
  7. Choose a destination and click Save.
  8. After the export finishes, a confirmation dialog reports the number of rows exported and the file path.


Behaviour notes:

  • The selected From and To dates are inclusive, evaluated as:
    • From → YYYY-MM-DD 00:00:00
    • To → YYYY-MM-DD 23:59:59
  • The default export is capped at 1000 rows per call. Use a narrower range to retrieve more focused datasets.
  • If no rows match, only the CSV header is written.
  • Cancelling the date dialog (Cancel button or Esc) or the Save dialog aborts the export — nothing is written.
  • The export action is itself audited.

5. CSV format

Each export is a UTF-8 CSV with the following header:

id,user_id,user_name,ip_address,auth_method,log_type,action,target_type,target_id,description,old_value,new_value,result,timestamp,field,target_name
#ColumnDescription
0idUnique identifier of the row (generated at write time).
1user_idInternal id of the acting user, when known.
2user_nameHuman-readable name of the acting user, captured at write time. Denormalised so the row stays meaningful even if the user is later renamed or deleted.
3ip_addressIP address of the acting client.
4auth_methodFor AUTH events: Local Account, OpenID Connect SSO.
5log_typeCategory: AUTH, PRIVILEGED, CONFIG, SERVER, ERROR.
6actionSpecific action: AUTH_LOGIN, AUTH_LOGOUT, CREATED, UPDATED, DELETED, ACTIVATED, DEACTIVATED, EXPORT, EXPORTED, USER_CREATED, DATA_UPDATED, etc.
7target_typeThe entity being affected, e.g. USER, Booking Type, Project, Server Configuration, Audit Log, Object Class.
8target_idId of the entity, when applicable.
9descriptionContext of the event (e.g. failure reason, exported row count).
10old_valuePrevious value, masked (***) for sensitive fields.
11new_valueNew value, masked (***) for sensitive fields.
12resultSUCCESS / FAILED (used for AUTH events) or empty.
13timestampUTC timestamp in DD-MM-YYYY HH:MM:SS format.
14fieldSpecific field that changed inside the entity (e.g. Colour, Time In, Active).
15target_nameHuman-readable name of the entity (e.g. user full name, booking type label).

6. What is logged


6.1 Authentication events (all users)

For every login, logout and failed login attempt:

ActionResultNotes
AUTH_LOGINSUCCESSLocal, OpenID, MS AD.
AUTH_LOGINFAILEDReason captured in description (bad password, expired password, lockout, license-full, web-only, inactive user, SSO error…).
AUTH_LOGOUT(empty)Recorded on graceful logout.


6.2 Privileged user activity (Admin / Master)


Toolbox & Settings (Desktop client)

  • General Toolbox settings (e.g. Tasks Causes Conflicts, Booking Time In/Out, Hour Line Start/Stop, Day Pad, Module Bar, Email Footer Text, MS Azure AD Setup, Toolbox password, Dispatch Limited User Password…).
  • Booking Types (create, update, delete; field changes; custom fields; predefined extras).
  • Task Types (CRUD).
  • Shift Types (CRUD; per-field changes including theme colours and Causes Conflicts).
  • Personnel Event Types (CRUD; Theme Colours, Treat As Work, Causes Conflicts, Allow Offset, Gives TBSR, Export Name).
  • Booking Status (CRUD).
  • Marker / Framework / Binder Types (CRUD).
  • Report Types (create / delete).
  • Booking Mouseover setup.
  • DAYPLAN XML Export, SCE Extra Fields, Personnel Web Visibility.
  • Object Tree Event Text and Hourline Booking Text variables.


Server Setup tabs

TabLogged changes
GeneralMail server / port / username / password (masked); FW server port; HTTP / SSL ports and toggles; File Transfer ports (Listen / Proxy / Min / Max); FTP / PASV ports; WebClient and API ports; Booking prelim colours; Company name / labels / logo; SysAdmin / daily mail / force-from email; Allowed IPs (CRUD); Server password (masked); Crypt key (masked); Force files path; Backup folder.
BookingsBooking customs; booking tasks; MT status; CO custom; MT custom; activity colours.
ProjectsProject customs and rules.
UsersUser group name; server-side user CRUD; LDAP settings (proxy password masked); LDAP profile / user-field maps; Exchange (password masked); MSAD groups CRUD; MSAzureAD groups CRUD; Azure AD field mapping; MSAD authentication (password masked); Expensify policy.
ObjectsGroup name renames (Rooms / Machines / Others / Labs).
ContactsContact customs; titles; categories; Company Relations / Blocked Fields; contact history customs; show object customs; DCP customs.
Media LibraryLibrary CRUD; library locations; library formats; library custom rules / job-order customs; library password (masked); barcode strings; library orders.
FinancialDue dates (CRUD); generic financial settings; invoice template overrides (CRUD + reorder); Outgoing Purchase Orders → Exclude Users From Email.
PlayPlay settings; Auto Share Filenames CRUD; Source Folders / Services / Episode Priority; Output Types CRUD.


6.3 User account / profile management

  • User CRUD (create, deactivate, delete).
  • Permission Profile change.
  • Licence User Type change.
  • Division change.
  • Start / Stop / Punch-Clock dates.
  • Group membership changes.
  • Force Password Change toggle; Prevent Password Expire toggle.
  • Confidential-access user changes.
  • User export to CSV (one USER EXPORT row per exported user).
  • Permission Profiles: create, update (per permission toggled), rename, delete.
  • Web Profile Management: create, update (per field), Group change, delete.


6.4 Object & Configuration changes

  • Object Classes: create / delete / activate / deactivate.
  • Objects (Rooms / Machines / Others / Labs / Groups / Materials / Services / Expenses / Orders / Resources): create / delete / activate / deactivate.
  • Resources from CRM: create / update Active / delete.
  • Booking Types and Personnel Event Types — including custom fields and predefined objects (added / removed).
  • Projects: created and deleted only. Per the spec, project edits, booking-level and dispatch-level changes remain covered by the existing internal History/Trash mechanisms and are intentionally out of scope for this audit log.


6.5 Server-side changes

Changes done in the Server application / cloud setup that are not initiated from the Desktop client are tagged with log_type = SERVER, so they can be told apart from desktop-originated activity.


6.6 Audit-relevant errors

Errors flagged through audit_log:error create rows with log_type = ERROR and a description detailing the condition.


7. Privacy & data protection

  • Sensitive fields are masked at write time. The current masked-field list is: password, token, secret. Both old_value and new_value are stored as ***.
  • Server-side secret changes (mail password, server password, crypt key, LDAP proxy password, Exchange password, MSAD password, library password, Toolbox password, Dispatch limited user password) record *** for both old and new values.
  • The audit log never stores plaintext passwords or tokens.
  • The export feature is itself audit-logged, fulfilling the ISO requirement that export functionality be restricted and auditable.

8. Architecture & storage

  • Storage: SQLite database audit_logs.db3 with table audit_logs (15 columns) and indexes on id (UNIQUE), user_id, log_type, timestamp.
  • Path:<REPORTS_SERVER_LOCAL_DB_STORE_PATH>/audit_logs.db3 if configured, otherwise <SYSTEM_PATH>/audit_logs.db3.
  • Concurrency: writes go through a dedicated worker thread (AUDIT_LOG_THREAD) using thread::send-async, so the server's main thread is never blocked. The thread's SQLite handle has a 5000 ms busy-timeout.
  • Validation: every insert is sanity-checked — a row that does not have exactly 15 columns is refused and logged as an error rather than corrupting the table.
  • Append-only: the application code only ever inserts. There is no UPDATE / DELETE path exposed in the UI or in the server API.
  • Shutdown: on server shutdown the worker thread is told to flush and close the SQLite handle before being released.

9. Out of scope

These items are explicitly not part of this release:

  • Inclusion of audit events in log.txt.
  • Cleanup or refactoring of the existing logging infrastructure.
  • Analytical or reporting dashboards.
  • Booking-level audit logs.
  • Project or booking history redesign.
  • SIEM configuration or ingestion work.
  • Cross-system log correlation.
  • Redesign of permissions or security models.
  • Automated log cleanup / archival / retention policies.
  • Parallel or competing logging systems.
  • Advanced query UI (filtering by log_type, user, etc.) only date-range filtering is exposed in this version.

The CSV schema, however, includes all the columns needed to support filtering, export and SIEM ingestion in a future phase.


10. Sample CSV entries

Examples of the kinds of rows you should expect to see in the export.

Authentication:

"id","u_42","10.24.6.18","Local Account","AUTH","AUTH_LOGIN","SESSION","u_42","","","","SUCCESS","21-01-2026 08:05:00","","John Smith" "id","u_42","10.24.6.18","OpenID Connect SSO","AUTH","AUTH_LOGOUT","SESSION","u_42","","","","","21-01-2026 17:45:00","","John Smith" "id","unknown","192.168.10.34","Local Account","AUTH","AUTH_LOGIN","SESSION","unknown","Bad User Or Password","","","FAILED","21-01-2026 08:09:00","",""

Privileged:

"id","u_admin","","","PRIVILEGED","UPDATED","TL_SETTING","","","OFF","ON","","21-01-2026 09:05:00","Tasks Causes Conflicts","" "id","u_admin","","","PRIVILEGED","CREATED","BOOKING_TYPE","bt_991","","","","","21-01-2026 11:02:00","","Shoot" "id","u_admin","","","PRIVILEGED","UPDATED","BOOKING_TYPE","bt_991","","lightyellow","lightblue","","21-01-2026 11:10:00","Colour","Shoot" "id","u_admin","","","PRIVILEGED","DELETED","BOOKING_TYPE","bt_991","","","","","21-01-2026 11:18:00","","Shoot"

Object Manager:

"id","u_admin","","","PRIVILEGED","CREATED","OBJ_CLASS","oc_12","","","","","21-01-2026 09:25:00","","Online" "id","u_admin","","","PRIVILEGED","UPDATED","OBJ_CLASS","oc_12","","0","1","","21-01-2026 09:40:00","Active","Mastering"

Server-side:

"id","","","","SERVER","UPDATED","GENERAL_SETTING","","","30min","60min","","21-01-2026 13:08:00","SessionTimeout","" "id","","","","SERVER","UPDATED","GENERAL_SETTING","","","12h","24h","","21-01-2026 13:12:00","DefaultTimeFormat",""

Export action (always self-audited):

"id","u_admin","10.0.0.5","","PRIVILEGED","EXPORTED","Audit Log","/Users/admin/Desktop/audit_logs_export.csv","rows=372","","","","21-01-2026 18:00:00","",""

11. FAQ


Q. I exported a wide date range and got fewer rows than I expected. The export is capped at 1000 rows. Use a narrower range to fetch more focused datasets.

Q. Are passwords or tokens ever recorded in the export? No. Sensitive fields are stored masked (***) at write time. Toolbox and server-side password changes are recorded as (changed) / *** so that the fact of the change is auditable but the value is never disclosed.

Q. Can I correlate Entra logins with farmerswife sessions? Yes. Each AUTH_LOGIN / AUTH_LOGOUT row contains the IP and the authentication method, so they can be cross-referenced against Entra sign-in logs.

Q. Is anything cleaned up automatically? No, this not include automated retention or cleanup. The schema is designed to support that in a future phase.


12. Glossary

  • Audit Log  A dedicated, structured log capturing security- and compliance-relevant actions.
  • Privileged User  A user with elevated rights (Master / Admin).
  • Local Account A farmerswife authentication method that does not use SSO.
  • Personal Data Access  Any action performed on user-related personal data (read, edit, export…).
  • Server Application The cloud / server-side configuration layer, separate from the Desktop client.
  • CRUD Create, Read Update, Delete


Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article