Configuration history

Every observed version of every watched configuration file: redacted on the host, encrypted at rest, with diffs, baselines, drift, variants across hosts and export.

On this page

Status. Tested: storage, sealing and key rotation of contents, versions and their kinds, diffs, baselines, drift, estate variants, export, display redaction, retention and garbage collection, and the writer's checks, in the product's package tests on PostgreSQL, and end to end with a real agent runtime. Not yet run: an estate of thousands of hosts.

Structam keeps every observed version of every watched configuration file, encrypted at rest, with history, diffs, baselines and point-in-time export. It never writes to hosts: there is no configuration push, restore or templating.

What is watched

The agent policy decides (policies): configs.include (Linux default /etc/**; macOS also /Library/Preferences/*.plist; Windows the hosts file and configuration files under ProgramData), configs.exclude, configs.max_file_kb (1 024), text files only, no symlinks followed. At most 16 MiB of content is read per pass; the rest follows on the next.

The agent's built-in deny list always wins: shadow files, SSH host keys, private keys, keystores, VPN and network secrets, the agent's own files (the deny list). A file containing a private key block is never uploaded; it is recorded as withheld with size, mode and owner only. A root-owned local policy on the host can narrow the paths further.

Redaction happens on the host

Before hashing and upload, the agent redacts PEM private key blocks, URL credentials, password=, secret: and token style values, Bearer and Basic credentials and known token shapes, plus the policy's own redact patterns. Redacted secrets never leave the host. The agent also sends an HMAC of the raw bytes, keyed per agent, so the server sees a real change behind an unchanged redacted text without the raw content leaving the host.

Users without configs.content on a host see contents and diffs with a second, display redaction applied (the same rules plus the patterns of every policy that applies). With configs.content they see the stored, agent-redacted content. Raw views and exports are audited (config.view_raw, config.export).

Storage

  • One blob per distinct content across the estate, sealed with AES-256-GCM under a subkey of STRUCTAM_SECRET_KEY. Blobs are keyed by an HMAC of the content's hash, not by the hash, so a copy of the database neither reveals nor confirms contents.
  • Each file has versions numbered from 1, never reused: created, modified, deleted, metadata (mode, owner, group), and rerendered (only the redaction rules changed; no review needed). A touch (modification time or size alone) is not a version.
  • The server hashes every content it receives and drops one that does not match the agent's claim. An agent can only write versions for its own host and only paths its policy allows.

Using it

WhereWhat
Host → Configsthe file tree, each file's history, diffs between any two versions, baseline, export
Config variantsfor a path or glob, the distinct contents across your hosts ("12 hosts share variant A, 2 differ")
Changesconfig.created, config.modified, config.deleted and the other config events, for review
  • Diff: unified, 3 lines of context, up to 20 000 lines a side (larger files get a summary); binary files report "binary files differ". A diff across two hosts needs view on both.
  • Baseline: set per file or for a whole host (changes.review). Drift is current content that differs from the baseline, shown on host and estate pages.
  • Fetch now: Fetch config on an agent (agents.manage and configs.content) asks the agent for one file its policy allows.

Export at a point in time

GET /api/v1/hosts/{id}/configs/export?at=2026-11-30T09:00:00Z

needs configs.content (API tokens also the export scope), is audited, and streams a tar.gz of every file as it was at that time, with a structam-export.json index. Paths, modes and owners come from the agent, so the archive is made safe to extract: member names are percent-encoded where Windows would read a separator or a special name, file modes are masked to 0755 (no setuid, setgid or sticky bit), and members carry no owner. The index keeps each file's real path, mode, owner and group. A file whose version at that time was removed by retention is listed in the index without content.

Retention

STRUCTAM_CONFIG_RETENTION_DAYS (0, the default, keeps everything) removes older versions but always keeps the newest 20 versions of every file, its current version and every baseline. Contents no version refers to any more are collected a day later. After a secret key rotation the blobs are moved to the new key in the background.

Questions the docs do not answer?

Ask the people who build Structam. Installation media and licences come from KazLabs.

Talk to us