# Audit trail and approvals

> The hash-chained activity log, the agent's independent audit trail, the audit watchdog, SIEM export with Wazuh, four-eyes approvals, just-in-time elevation, the break-glass account, and integrity and tamper checks for the server itself.

Source: https://www.berthpanel.app/library/audit-trail-and-approvals/ · Category: security · Updated: 2026-10-30

Prevention is only half of security. You also need to know afterwards who did what, notice misuse while it happens, and make sure no single account, including an administrator's, can quietly do serious damage. This article covers how Berth records activity, how it watches that record, and how it limits standing privileges.

## The activity log

Every change in the panel, from the web interface, the API, the CLI or an AI assistant, is written to the activity log: who, when, from which address, what, and on which object. Administrators find it under *Audit log* in the sidebar. Customers see their own activity under *Activity*.

- **Hash chain.** Each entry includes a hash of the previous one. Changing or removing an old entry breaks the chain from that point on. The page verifies the chain incrementally each time you open it, and the full chain is checked again regularly in the background. **Check fully now** starts a full check yourself. A break is reported as a critical alert.
- **Configuration changes.** *Audit log → Changes* shows each configuration change with a diff, and every step of applying it (`berth admin changes --contains <text>`).
- **Retention.** By default the log is kept indefinitely. Set a retention period between 90 and 3,650 days with `berth admin audit-retention --days 730`. Pruning old entries according to the retention period does not count as a break.
- **Export.** The log can be downloaded as CSV, and it is part of the evidence pack, see [Evidence for audits](https://www.berthpanel.app/library/evidence-for-audits/).

```bash
berth audit list
berth audit verify
```

## The agent's own trail

The activity log lives in the panel's database. An attacker who had taken over the panel could, in theory, rewrite it and recompute the chain. Berth therefore keeps a second record that the panel cannot touch.

The root agent records, on its own, every operation that affects access, data or security, and every operation it refuses. Each entry has the user ID the agent saw on the socket and who the panel said the request was for. Passwords and hashes are never written: for a new mailbox password only the address is recorded. The trail is append-only, written to the system journal as well (so a SIEM agent reads it), and chained with a key the panel never has.

The panel regularly hands the agent an anchor: a fingerprint of the latest entry in the activity log. A regular check as root compares the activity log against those anchors. If entries were rewritten, removed or truncated, even with a recomputed chain, it shows, and a critical alert follows.

See it under *Audit log → Agent trail*:

```bash
berth audit agent --denied             # only refused operations
berth audit agent --class vernietigen  # lezen (read), beveiliging (security), toegang (access), export, vernietigen (destroy)
berth audit agent --follow
sudo berth audit verify --anker        # compare the activity log with the anchors
```

After a deliberate restore of the panel database outside `berth dr restore` (which handles this itself), start a new chain with a reason. The old trail is kept, not erased, and the reason is recorded in the new chain, the journal and the activity log:

```bash
sudo berth audit agent --new-chain --reason "Panel database restored from the backup of 22 October"
```

## The audit watchdog

The watchdog reads the activity log continuously and looks for signs of misuse, such as:

- many failed sign-ins on one login, or from one address across many logins (password spraying);
- an administrator, reseller or auditor signing in from a new country;
- two-step verification switched off or a passkey removed;
- a new API token;
- a new administrator or reseller, or temporary administrator rights;
- an administrator logging in as a customer;
- a sign-in with the break-glass account;
- many deletions by one login in a short time;
- a change to a security setting, such as log forwarding, the firewall, SSO or the watchdog's own rules;
- a broken hash chain, or log lines that could not be forwarded to the SIEM.

Optional rules cover administrative work outside working hours and sign-ins from a new address.

Findings appear under *Audit log → Watchdog* and go to the administrators through their notification channels. Handle each with a note (**Handle…**) or turn it into an incident with one click (**Create incident**), see [NIS2 and incidents](https://www.berthpanel.app/library/nis2-and-incidents/). On the same page you can switch rules on or off, tune them, and set your working hours.

```bash
berth auditwatch list
berth auditwatch ack --id 12 --note "Planned migration, confirmed with the team"
berth auditwatch incident --id 13
```

## Forward to a SIEM

**The activity log over syslog.** Send every entry to your SIEM over UDP, TCP or TLS (RFC 5425), optionally with a client certificate for mutual TLS. Set it on the *Audit log* page or on the server:

```bash
berth admin audit-syslog --target tls://siem.example.nl:6514 \
  --ca-file ca.pem --client-cert client.pem --client-key client.key
```

**Server logs.** The server's own audit events (auditd) and sign-ins on the server itself can be forwarded as well, under *System → Logs → Server log drains*. See [Logs and log drains](https://www.berthpanel.app/library/logs-and-log-drains/).

**Wazuh.** Berth ships Wazuh decoders and rules for both the activity log and the agent trail. Under *Security → SIEM agent* you can **Install** the Wazuh agent from Wazuh's repository, with its signing key pinned by fingerprint, point it at your manager and enrol it with the manager's password, which is not stored. An agent you installed by hand can be adopted with **Adopt**: its connection and enrolment stay, and Berth only adds its own read rules. If the agent stops connecting after a change, Berth puts the previous configuration back.

Wazuh's *active response*, which lets the manager run scripts and firewall rules as root, is off by default and can only be turned on by root on the server. A compromised panel cannot point the agent at a hostile manager and run commands that way.

```bash
berth siem agent install
berth siem agent configure --manager wazuh.example.nl
berth siem agent enroll --password-file -
berth siem agent status
```

On a [Fleet](https://www.berthpanel.app/library/fleet/) panel you can also link your Wazuh manager read-only, so that Wazuh serves as an independent second opinion on every member server.

## Four-eyes approvals

With four-eyes on, a sensitive action becomes a request that a second administrator must approve. It applies to:

- deleting a customer, a domain with its files, or a database;
- restoring a backup, a whole account, parts of it or files over the originals, and deleting a backup;
- removing an IP address from the server and changing the firewall;
- weakening two-step verification, and switching four-eyes off;
- creating an administrator, or resetting another administrator's password or second step.

A new or reset administrator receives a link at their own e-mail address and chooses their own password. The requester never sees it, so nobody can create a second administrator to approve their own requests.

To turn it on, go to *Settings → Access*, card *Four-eyes for sensitive actions*. It needs at least two administrators.

```bash
berth approvals four-eyes on
```

Open requests appear with a counter in the menu and under *Security → Approvals*. Another administrator chooses **Approve and run** or **Reject**. The action then runs in the requester's name. The requester can withdraw a request (**Withdraw**), and a request lapses after 24 hours.

```bash
berth approvals list
berth approvals approve 31
berth approvals reject 32
```

Commands run as root on the server itself are not subject to four-eyes: whoever is root on the machine is the trust anchor of the whole system.

## Auditors and just-in-time elevation

An **auditor** sees everything and changes nothing: settings, logs, the activity log, the access review, certificates, incidents and the evidence pack. Customer content and secrets stay out of reach. Auditors cannot download webspace files, backups, database dumps or customer mail, and secret values show as *(hidden)*. See [Roles and permissions](https://www.berthpanel.app/library/roles-and-permissions/).

```bash
printf '%s\n' "$PASSWORD" | berth admin create --login accountant --role auditor --email accountant@example.nl
```

An auditor who occasionally needs to act can request temporary administrator rights under *Account → Temporary administrator*: choose 1, 2, 4 or 8 hours and give a reason. Another administrator approves it under *Approvals*. The rights end when the time is up, or earlier with **End now** or `berth admin elevation-end --login accountant`. Nobody needs permanent administrator rights for occasional work.

## Break-glass account

A break-glass account is for when normal access fails, for example when your SSO provider is down:

```bash
berth admin break-glass --login emergency --email security@example.nl
```

The long random password is shown once. Print it and keep it in a safe or a sealed envelope. The account does not need a second step, so it still works when exactly that is the problem. In exchange:

- every sign-in is recorded in the activity log and notified to all administrators;
- a session lasts at most an hour;
- API tokens do not work for it.

`--off` turns it back into a normal administrator.

## Integrity and tamper detection

Under *Security → Integrity*, Berth checks the server itself:

- **File baseline.** A fingerprint of the panel's own files and important system files. Changes made outside the panel are reported. Accept them with **Accept as new baseline**, or restore. A Berth program that differs from the signed release is restored with `berth update --force`.
- **Critical packages.** The installed files of critical packages such as sshd, sudo, PAM, systemd and the running kernel are compared with the vendor's signed package of exactly the installed version, fetched through the normal apt or dnf trust chain. A mismatch is a critical alert. Reinstall the package and investigate the server.
- **Rootkit check.** A daily check for signs of a rootkit, with rkhunter or chkrootkit included when they are installed. A false positive can be set aside with a reason. A critical finding can only be dismissed by root on the server, so a compromised panel cannot hide a real rootkit.
- **Tamper detection.** Independent checks look for signs that Berth itself has been tampered with or that its protections are being bypassed.

All of these only alert. They never stop sites or services, so a false positive cannot cause an outage. Findings go to the alert engine, the activity log and `berth doctor`.

```bash
berth integrity check
berth integrity packages
berth integrity tamper
berth security rootkit-check
```

The *Hardening* tab next to it scores the server's configuration (access, network, updates, kernel and system) and shows where to fix each point. See [Security model](https://www.berthpanel.app/library/security-model/).
