Version Control & Compliance Audit • v0.13.0

GitOps Configuration & Etckeeper /etc Audit Trail

Bring software engineering rigor to network security. Every Axonwall policy transaction across the 12 canonical /etc/axonwall/*.yaml domain files is recorded in an immutable Git revision repository (/var/lib/axonwall/gitops), paired with full host /etc configuration versioning via integrated Etckeeper.

Git-Backed Declarative State Management

The complete desired state of your Axonwall appliance is authored across 12 canonical YAML domain files in /etc/axonwall/*.yaml (plus optional /etc/axonwall/conf.d/*.yaml drop-ins) and compiled into /etc/axonwall/state.json. Behind the scenes, axonwalld maintains a dedicated local Git repository at /var/lib/axonwall/gitops tracking every confirmed bundle:

Non-Repudiation

Every commit records the logged-in administrator or API actor identity, timestamp, and human-readable commit message.

Cryptographic Integrity

Git SHA-1/SHA-256 tree hashes prevent silent tampering, satisfying strict compliance standards (SOC 2, PCI-DSS, ISO 27001).

Automated History

Confirmed changes from the Web Console, Neovim TUI (axonwall-config), REST API, or axonwallctl apply commit automatically.

Unified Diff Inspection

Before applying changes (axonwallctl diff or <C-d> inside axonwall-config) or rolling back to an earlier revision, administrators can inspect exact YAML deltas in a unified diff viewer:

git diff HEAD~1 (/var/lib/axonwall/gitops)
diff
--- a/firewall.yaml
+++ b/firewall.yaml
@@ -18,6 +18,13 @@ rules:
+  - id: rule_dmz_https
+    enabled: true
+    interface: wan
+    action: pass
+    protocol: tcp
+    destinationPort: "443"
+    description: Allow inbound HTTPS to DMZ cluster

1-Click Rollback Lifecycle

If a recent policy change causes unexpected business disruption, rolling back takes a single click in the Web Console or a single command (sudo axonwallctl rollback [revision]):

ROLLBACK EXECUTION FLOW:

1. Administrator selects desired historical commit SHA from /var/lib/axonwall/gitops.

2. Axonwall restores /etc/axonwall/*.yaml and /etc/axonwall/state.json at that revision.

3. Kernel ruleset is pre-flight validated (nft -c) and applied atomically via axonwalld.

4. Commit-Confirm watchdog timer arms (60–120s). Once confirmed, the rollback revision becomes HEAD.

Etckeeper Host /etc Configuration Versioning

While /var/lib/axonwall/gitops versions Axonwall's declarative YAML intent, enterprise compliance audits also require tracking every low-level daemon file rendered across /etc (such as /etc/keepalived/, /etc/unbound/, /etc/ssh/sshd_config, /etc/pam.d/, and APT package postinst changes). Axonwall natively integrates Etckeeper with first-class daemon APIs and a dedicated Web Console workspace at /system/etckeeper:

Automatic Bundle-Apply & APT Hooks

When autoCommitOnApply: true is enabled, axonwalld automatically triggers an Etckeeper Git commit across /etc after every confirmed configuration bundle apply, alongside standard daily cron and APT pre/post-install hooks.

Secret Exclusion (.gitignore) & Diff Viewer

Manage /etc/.gitignore rules directly in the UI (ensuring sensitive key material like /etc/axonwall/agent.token or shadow hashes remain excluded as configured), create manual commit snapshots before maintenance windows, browse full commit history, and inspect colorized unified diffs per commit.

axonwalld Etckeeper Agent Socket Endpoints (/run/axonwall/agent-api.sock)
bash
# Check Etckeeper Git repo initialization state, dirty file count, and config:
sudo curl -s --unix-socket /run/axonwall/agent-api.sock \
  -H "X-Axonwall-Agent-Token: $(sudo cat /etc/axonwall/agent.token)" \
  http://localhost/v1/system/etckeeper/status | jq .

# Full Etckeeper lifecycle endpoints exposed by axonwalld:
# GET  /v1/system/etckeeper/status   -> Repo status, VCS backend, dirty files, autoCommitOnApply
# POST /v1/system/etckeeper/init     -> Initialize /etc Git repository via 'etckeeper init'
# POST /v1/system/etckeeper/config   -> Update etckeeper.conf, autoCommitOnApply & /etc/.gitignore
# POST /v1/system/etckeeper/commit   -> Create manual snapshot commit with operator message
# GET  /v1/system/etckeeper/history  -> List /etc Git commit log (SHA, author, timestamp, subject)
# GET  /v1/system/etckeeper/diff     -> Unified diff for a specific commit (?commit=<sha>)
Web Console Revisions & Etckeeper
View Axonwall GitOps revisions at System > Configuration & Revisions (/system), and manage host-wide /etc commits, .gitignore rules, and diffs at /system/etckeeper.