A locked-down modern Windows layout, new security and system checks, and safer settings and roles
This release introduces an opt-in modern Windows file layout that separates and locks down the agent's writable state, adds a batch of Windows security and system checks, and hardens two areas of the WEB/settings surface. Default installs are unaffected until you opt in to the new layout.
Highlights
- Modern, locked-down Windows file layout (opt-in). Configuration, the fleet identity, and writable state can now live in a dedicated
%ProgramData%folder that is restricted toSYSTEMandAdministrators, instead of sitting under Program Files. Switch withnscp settings --migrate-layout modern(or the MSILAYOUTproperty); the classic layout remains the default and is untouched. - Writable state and a fleet folder are first-class. A
${fleet-folder}token and dedicated writable-state directories keep fleet/enrollment material and mutable state out of the package/program directories, with local overrides now visible in diagnostics. On Linux packages the writable state directories are created and migrated automatically. - New CheckSecurity checks.
check_activation(Windows licensing state),check_file_security(file owner / DACL hardening), andcheck_firewall_rules(assert on individual firewall rules). - New CheckSystem checks.
check_w32time(Windows Time service health) andcheck_printjobs(per-job print detail), plus reporting the printer device behind each queue. - Sensitive settings values are redacted on read. The REST settings read endpoints and the
nscp settings --list/--showCLI now return***for keys registered sensitive, matching thediffendpoint. Reported by @yagust. - The
legacyWEB permission is flagged and no longer seeded by default. It unlocks deprecated query-dispatch endpoints that can run any registered command; fresh installs no longer create the role and aSECURITYwarning is logged for any role that grants it. Reported by @yagust. - A documented upgrade path. New Upgrading and Security notices docs pages collect per-version operator actions and security-relevant changes in one place (#1410).
Detailed changes
Modern Windows file layout
The agent can now run in a "modern" layout where its configuration, fleet identity, and writable state live in a dedicated, ACL-restricted %ProgramData% folder rather than under %ProgramFiles%. The layout is recorded in boot.ini and resolved through a single shared path-token table used by both the service and the bundled clients, so ${shared-path}, ${log-path}, ${fleet-folder} and friends resolve consistently everywhere.
Migration is available both from the CLI (nscp settings --migrate-layout modern, with --dry-run) and from the MSI (via a LAYOUT property). The migration is defensive: it refuses to move into a populated destination on the first switch, locks the destination down before writing any secret into it, moves across volumes rather than failing, and keeps shipped program content out of the redirected shared path.
| Change | Effect |
|---|---|
--migrate-layout modern / legacy
| Move an existing install between layouts (dry-run supported). |
MSI LAYOUT property
| Install/upgrade directly into a chosen layout. |
${fleet-folder} token
| Addresses the fleet/enrollment folder in the active layout. |
| Locked-down shared folder | Restricted to SYSTEM + Administrators; ownership taken, not just the DACL.
|
New and updated checks
- CheckSecurity:
check_activation,check_file_security(owner + DACL hardening), andcheck_firewall_rules(individual rules). Corrected threecheck_file_securityverdict paths and keptexpect=assertions visible through a firewall filter. - CheckSystem:
check_w32timefor the Windows Time service,check_printjobsfor per-job print detail, and the printer device is now reported behind each queue. Duration keywords keep their-1sentinel andlast_sync_ageis treated as a duration. - CheckDocker: survives containers removed mid-check and counts image disk correctly.
- CheckMySQL:
plugin-dir/socket/defaults-fileare settings-only.
Security & hardening
- Settings redaction (reported by @yagust): values for keys registered sensitive are returned as
***on the settings read paths (RESTGET /api/v2/settings/...and/descriptions, and the--list/--showCLI), matching thediffendpoint. Internal reads a module makes of its own configuration are unaffected. This is defense-in-depth, not an authorization boundary — the plaintext still lives innsclient.ini. The web admin edit dialog now writes only changed fields so the mask cannot overwrite a stored secret. - Legacy WEB permission (reported by @yagust): the
legacygrant unlocks the deprecated/query.pband/query/{name}endpoints, which dispatch through the same command registry as/api/v2/queries. The built-inlegacyrole is no longer seeded on fresh installs, any role whose grant includes thelegacytoken now logs aSECURITYwarning at startup (and fromnscp web add-role/add-user), and the capability is documented in the securing guide.
Installer & packaging fixes
- Repaired a self-initialised member and a clobbered
boot.ini; stopped stamping[layout]into everyboot.ini. - Remove the fleet identity on uninstall of a modern install; restore the config backup into the layout's shared folder; honour
boot.ini's[paths]shared-path. - Linux packages create and migrate writable-state directories and keep them out of the package directory;
adopt_ownerhandles root-written enrollment material and is symlink-safe.
Documentation
- New Upgrading page collecting per-release operator actions (closes #1410), and a Security notices page tracking advisories and hardening changes.
- Documented the Windows and Linux file layouts and the MSI
LAYOUTproperty.
Upgrade notes
- The modern layout is opt-in; the default install is unaffected. Switch deliberately with
nscp settings --migrate-layout modern(try--dry-runfirst) or the MSILAYOUTproperty. Run the CLI migration from an elevated prompt — the destination is locked toSYSTEM/Administrators. - 🔒 Sensitive settings values now read back as
***. Tooling that read a secret out ofGET /api/v2/settings/...will now receive***for keys registered sensitive. No configuration change is required. - 🔒 The
legacyWEB role is no longer seeded on fresh installs and any role granting thelegacypermission logs aSECURITYwarning. Existing installs keep their role and are unaffected; only grantlegacyto trusted legacy systems. - Linux writable-state migration is automatic. Packages create and migrate the writable state directories on upgrade; no action required.
Full Changelog: 0.16.1...0.16.2