Lawliet LAWLIET
Book a demo

42. The do-not-disrupt host baseline and host groups

This guide describes Lawliet 1.5.14.s (the current release). Screens, commands and procedures may change in later versions; the usage guide is updated with each release. Check the version your server runs under Settings > Platform or with ./lawliet version, and see the Releases page for what changed.

Hardening must not break what a host is there to do. The do-not-disrupt baseline records what each host uses - its services, listening ports, installed applications, processes, scheduled tasks and network connections - and protects it: before an enforce, the planner compares what the control changes (its declared effects) with the host's baseline and blocks a change that would stop a protected service, close a protected port or connection, remove a package a protected process needs, or switch off a protocol a protected connection is seen using (41.4).

Path: Hardening > Host baseline (the Host baseline button at the top of the Hardening page). The page is titled "Do-not-disrupt host baseline".

Permissions and four-eyes. The rule: anything that adds protection is one signature; anything that removes protection needs a second administrator (critical action "Execute remediation").

TaskPermissionFour-eyes
See hosts, baselines, items, deviations, inventory, overrides, groups, settingsView hardening-
Approve a baseline, pin an item, add an item, add a deviation to the baseline, ask for an inventory nowRun hardeningno
Create a group, add a group item, a mode of strictRun hardeningno
Unpin an item, delete a hand-added itemRun hardeningyes - "Execute remediation"
Re-learn or Freeze from current (a new baseline version)Run hardeningyes
A mode of warn, off or inherit for a host, group, profile or the siteRun hardeningyes
Delete a group, remove a group itemRun hardeningyes
Change a group's members so that a host loses protection (API)Run hardeningyes
Create an override (API)Run hardeningyes
Revoke an override (API)Run hardeningno
Learning window, deviation alertsRun hardeningno; lowering the collection caps or collecting fewer kinds (API) needs yes

The baseline needs agent 2.1.10.s or later on the host (Linux and Windows). macOS agents report no inventory.


42.1 How a baseline is built#

  1. Inventory. The agent reports the host's inventory: processes (program, SHA-256, user, parent; a command line only as a SHA-256), services, installed packages, listening ports, network flows (per direction, remote address class and port, with the programs), scheduled tasks (program only), and kernel modules or drivers, mounted filesystems and a few network kernel settings where the server asks for them. A full report at start and every 24 hours; changes at most every 5 minutes when something changed.
  2. Learning. The first full inventory starts a learning window (7 days by default). Everything seen in it becomes a baseline item.
  3. Frozen. When the window ends the baseline freezes and waits for review: "Learning finished - waiting for review".
  4. Approved. An administrator reviews and approves it. Only an approved baseline protects
    • and in strict mode, a host whose baseline is not approved holds every hardening step that declares an effect on the host ("no do-not-disrupt baseline yet (learning until <date>)"). Controls that declare no effect are not affected.
Status shownMeaning
No baseline yetNo full inventory from agent 2.1.10.s has arrived
Learning - N days left / N h leftThe learning window is running
Learning finished - waiting for reviewFrozen; press Approve baseline
ApprovedProtects the host

42.2 What the page shows#


42.3 Procedure: review and approve a baseline#

Permission: Run hardening. Four-eyes: no (approval adds protection).

  1. Open Hardening > Host baseline and click a host whose status is "Learning finished - waiting for review".
  2. Open Protected items. Use Search and All kinds (service, port, process, package, task, flow, module, mount, sysctl, protocol) to read the list. Columns: Kind, Item, Detail, Source (observed or manual), Seen now, Protected.
  3. Look at flagged items ("Worth a look before approving"): seen late in learning, ordinary account (runs as an unprivileged user), no package (a program from no installed package). They may be something that should not be on the host at all.
  4. Unpin what should not be protected (see 42.4; four-eyes), and add what the inventory cannot see (42.4).
  5. Press Approve baseline.

What you see: "Baseline approved." The status becomes Approved, and the planner's baseline guard now compares changes with it.

If it fails: 409 "only a frozen baseline (learning finished) can be approved" - wait for the learning window to end, or use Freeze from current (42.6, four-eyes).


42.4 Procedure: pin, unpin, add and delete items#

Risk of unpinning or deleting: hardening may then stop, close or remove that item. Rollback: pin it again or add it again (one signature).


42.5 Modes: strict, warn, off#

The mode decides what the baseline guard does on a host:

ModeEffect
strict (the default)A hardening step that would disrupt a protected item is held (blocked) unless a second administrator signs an override; a host whose baseline is not approved holds every step that declares an effect
warnThe same finding is reported (the planner shows baseline warning) but does not block
offThe baseline is not checked
inheritTake the mode from the next level

Modes are set at four levels; the most specific wins: host -> group -> profile -> site. A host listed (by agent id) in several groups takes the strictest of their modes. A group the host is in only by an asset tag can make its mode stricter, never weaker (a tag is not a way to switch protection off). With no setting anywhere the mode is strict ("strict (built-in)").

Procedure: choose the mode in the host's Mode tile (the list shows "inherit (<mode>, <source>)" for the inherited value), in a group's mode list (42.8), or the site's Default mode in the settings card. Profile-level modes (strict and standard hardening profiles) are set through the API (PUT /api/v1/hardening/baseline/modes with scope_type profile).

Four-eyes: yes for warn, off and inherit; no for strict. Risk: warn and off let hardening disrupt what the baseline protects. Rollback: set strict again (one signature).


42.6 Re-baseline and overrides#

Procedure: re-learn or freeze from current#

When the host's role changes (a new application, a decommissioned service), start a new baseline version. The old version is kept.

Permission: Run hardening. Four-eyes: yes (it can drop protected items).

  1. Type the Reason for a re-baseline (at least 3 characters).
  2. Press Re-learn (a new learning window starts: "New baseline version is learning.") or Freeze from current (the new version is frozen at once from the current inventory: "New baseline version frozen from the current inventory.").
  3. Approve the request in Approvals, execute it, then review and approve the new baseline (42.3).

Risk: in strict mode, every hardening step that declares an effect waits again until the new version is approved. Rollback: none for the version itself; the previous version stays on record, and you can pin or add items again.

Request inventory now asks the agent for a full inventory at its next heartbeat ("Asked the agent for a full inventory at its next heartbeat."). One signature.

Overrides#

An override lets hardening disrupt listed protected items of one host for a few hours, for one control or for every control. The Overrides (N) tab lists the active ones: the item keys, "for <control>" or "for every control", "until <time>", the reason and who asked.

Overrides are made in two ways:

An override expires by itself, within 72 hours at most.


42.7 Deviations, inventory and settings#

Deviations (N): items present on the host but not in its baseline - "Add what is expected so hardening protects it; investigate the rest." Columns Kind, Item, Detail, First seen. Add to baseline adds it (one signature): "Added to the baseline."

Inventory: the host's raw inventory, with Search, the kind list, and gone only to list what disappeared. Columns Kind, Item, Detail, Last seen.

Settings card (top of the page):

SettingValuesNotes
Learning window1, 3, 7 (default), 14 or 30 daysFor new baselines and re-learns
Default modestrict (built-in), strict, warn, offThe site level of 42.5; anything but strict is four-eyes
Raise deviations in the review queueoff (default)When on, new listening ports, new services and new outbound destinations open review items

Collection caps and the kinds collected are changed through PUT /api/v1/hardening/baseline/settings; lowering a cap or collecting fewer kinds is four-eyes (it can freeze learning or hide what hosts use).

If something looks wrong:

What you seeCauseFix
"No baseline yet - It starts with the first full inventory from agent 2.1.10.s or later."The host runs an older agent, or has not sent a full reportUpgrade the agent (10.8); press Request inventory now
"last inventory was truncated"The host has more items of one kind than the capRaise the cap through the settings API, then Request inventory now
Hardening steps held on a new hostStrict mode before approvalApprove the baseline after learning, or set the host to warn (four-eyes)

42.8 Host groups and group-wide items#

A host group is one list shared by three features:

A group made for one of them scopes the others. A group lists hosts by agent id, and can also match hosts by asset tag (for example db). Tag matches count only where a scope widens - more baseline protection, a report covering more hosts - never where a scope relaxes a control: an exception covers only the hosts listed by id when it was requested.

Procedure: create a group and protect an item on all its hosts#

Permission: Run hardening. Four-eyes: no.

  1. Open Hardening > Host baseline and scroll to Group-wide items ("Protected on every host of the group - listed by agent id or carrying one of its asset tags - whether or not the inventory shows them.").
  2. Type a Group name, e.g. DB servers, Agent ids: 3, 7 (find a host's id in Environment > Hosts), and optionally Asset tags: db, backup. Press New group. You see "Group created." (A name already used is refused: "a group with this name exists".)
  3. In the group's box, choose the kind, type the value (for example 9102/tcp for the backup agent's port) and press Add: "Group item added."
  4. Optionally choose the group's mode in its list (anything but strict is four-eyes).

Procedure: remove a group item or delete a group#

Four-eyes: yes for both (every member loses the protection at once).

Changing a group's members or tags is done through the API (PUT /api/v1/hardening/baseline/groups/{group_id} with name, agent_ids, match_tags); it is four-eyes when a host would lose the group's items or join a group with a weaker mode.

Risk: hosts leaving a group lose its protection, and a deleted group no longer scopes reports or new exceptions. Rollback: create the group or item again (one signature).