Repository navigation
audit
Pre-Alpha. This page describes behavior that may change.
Ze keeps a local structured audit log for operator actions that change state or fail authentication. The log is append-only from the operator's point of view: there is a query command, but no command to delete or truncate records.
The audit trail covers config commit, discard, download and upload, daemon reload, and failed authentication across SSH, web, REST, gRPC, MCP, CLI, and system surfaces.
| Action | Surfaces |
|---|---|
config-commit |
SSH/CLI config editor, web config editor, REST config sessions, gRPC config sessions |
config-discard |
SSH/CLI config editor, web config editor (the Discard button, the web terminal and the CLI bar, discard <path> included), REST config sessions, gRPC config sessions. A rollback in the SSH editor or the web terminal also writes one |
config-download |
web GET /config/download
|
config-upload |
web POST /config/upload, once the uploaded config is applied |
daemon-reload |
SIGHUP, and request reload through the daemon on any surface |
data-key-change |
delete data key and update data key through the daemon on any surface, which ze data rm and ze data write also send while ze runs |
data-config-import |
update data config through the daemon on any surface, which ze data import also sends while ze runs. The detail holds the name and the placeholder in place of the content |
auth-fail |
SSH, web, REST, gRPC, MCP |
Each entry carries timestamp, actor, remote-addr, surface, action, detail, and outcome fields. The detail field carries the config diff for commit and discard records when Ze has one.
A daemon command declares its audit action when it registers, and the dispatcher records the declared action of the command it ran. It records an entry only when the command succeeds: a refused or failed command records nothing. Its detail is the command line as typed, with every credential value and the value after content replaced by <redacted>, so a key's bytes never reach the log.
A discard record's detail lists only the changes that discard dropped. discard <path> keeps your changes outside that path, so they are not in its record; they appear in the commit record that later applies them. One exception: the SSH editor's diff lines carry no path, so when two places hold the same pending line and discard <path> drops one of them, the SSH record can also name the line you kept. The web records are exact.
A discard with nothing pending still writes a record, with an empty detail, on every surface, so the trail shows every discard an operator ran. A rollback record's detail is the rollback itself (the command in the web terminal, rollback <backup> in the SSH editor), a download record's is the file name, and an upload record's is uploaded configuration.
Secrets never reach a record. A command that assigns a leaf the schema marks as secret is masked before it is written to an audit record, to command accounting, to the dispatcher's refusal message, or to the CLI session transcript on disk: the whole value becomes /* SECRET-DATA */, quoted words included. A set whose path the schema cannot resolve is masked in full after set, so an unknown path cannot leak a value either. Only the recorded copy changes; the command itself runs with the original arguments.
A value refusal does not echo a credential either: when a daemon command refuses the value after a credential keyword (a password, or the base64 content of a data command), the refusal quotes the placeholder and its fix line writes the placeholder in place of that token.
When Ze starts from a real config file, the audit log is disk-backed and stored next to that file as <config-base>.audit.jsonl, one JSON object per line. The records survive a restart, so the evidence stays available.
For stdin configs (ze -) and web-only test mode, Ze uses memory-only storage. The in-memory query cache keeps the newest records up to a retention limit set in code. The default is 10,000 entries, with accepted bounds from 100 to 100,000.
Each record rewrites the file. When a write fails (a full disk, a directory ze cannot write), the action still goes ahead and the record stays in memory. show doctor reports doctor-audit-record-failed with the file, the error, the time and how many writes failed, whichever surface wrote. The next write that lands rewrites the file with every record still held, and the finding clears.
Use show audit from the daemon CLI, or ze show audit from the shell. The response is structured data with entries and count. Filters can be combined.
| Filter | Argument | Meaning |
|---|---|---|
action |
action name | Restrict to one action, for example config-commit. |
actor |
username | Restrict to one actor. |
surface |
surface name | Restrict to one surface, for example web. |
since |
RFC 3339 timestamp | Only entries at or after this time. |
until |
RFC 3339 timestamp | Only entries before this time. |
count |
number | Limit the number of returned entries. |
ze show audit
ze show audit action config-commit
ze show audit actor alice
ze show audit surface web count 20
ze show audit since 2026-05-24T10:00:00Z until 2026-05-24T11:00:00Z
Time filters use RFC 3339 timestamps.
Adapted from main/docs/guide/audit.md.
Unreviewed draft. This wiki was authored in bulk and has not been reviewed. File corrections on the issue tracker.
- Install
- Docker
- netlab
- Appliance
- Quick Start
- Use Ze with an AI agent
- ExaBGP Migration
- CLI Tour
- Web UI Tour
- Overview
- YANG Model
- Editor Workflow
- Archive and Rollback
- Backup and Restore
- System
- Interfaces
- VRRP
- BFD
- FIB
- OSPF
- IS-IS
- MPLS / LDP / RSVP-TE
- RSVP-TE
- SRv6
- Static Routes
- Policy Routing
- Firewall
- Traffic Control
- Class of Service
- L2TP/PPP
- PPPoE
- VPP Data Plane
- RPKI
- IPsec VPN
- Path MTU
- TACACS+ AAA
- RADIUS AAA
- AS112 DNS
- DNS
- Authorization
- Fleet
- BGP
- Starting and Stopping
- Show Commands
- Monitoring
- Telemetry
- Flow Export
- DDoS Mitigation
- Anomaly Detection
- Health Checks
- Audit Trail
- Production Diagnostics
- Logging
- Operational Reports
- Healthcheck
- Self-Update
- Zero-Touch Provisioning
- MRT Analysis
- Upgrade and Restart
- Storage
- Policy
- Core
- Resilience
- Validation
- Link State
- Capabilities
- Address Families
- Protocol
- Subsystems
- Infrastructure
- Route Server at an IXP
- Transit Edge with RPKI
- Public Looking Glass
- ExaBGP Migration Walkthrough
- FlowSpec Injection
- Chaos-Tested Peering
- AS Path Topology