0.21.0 #1528
mickem
announced in
Announcements
0.21.0
#1528
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
NSClient Fleet launches: central management for your agents, plus checks that only read what you allow
0.21.0 is the agent release that goes with the first release of NSClient
Fleet, a new, separate product: one server that holds the configuration for
a whole estate of NSClient++ agents, hands each host the part that applies to
it, and shows you what every host is actually running. Agents enroll
themselves and report what they are, so the server builds the inventory
instead of consuming one; groups select hosts by those reported tags, and
bundles of configuration and scripts attach to groups. This release brings
the agent side to feature parity with the server: encrypted bundles the server
cannot read, a way to leave a fleet, and an
nscp testprompt that survives aconfiguration push. Fleet is entirely optional; NSClient++ works exactly as it
always has without it.
The other theme is reading less.
check_logfile,check_files,check_wmi,check_pdh,check_registry_*andcheck_eventlogread whatever theirargument names, with the agent's privileges, which is a general read primitive
wherever a caller may choose the argument. Each of them now has an access mode
and an allow list, off by default. Two WEB roles complete the picture:
restrictedruns the checks you define but passes no arguments, andmetricsscrapes and does nothing else. And thenscp testprompt got around of usability work: aligned listings, a
descthat shows defaults andwhat an alias runs, filter keyword lists, single-quoted paths and
case-insensitive completion.
✨ Highlights
inventory from what they report, and delivers configuration and scripts per
host as signed bundles, pulled by the agent over mTLS with no inbound port.
Read the launch announcement
and the Fleet documentation; this
release is the agent side of it.
check_logfile,check_files,check_single_file,check_disk_write,check_wmi,check_pdh,check_registry_key,check_registry_valueandcheck_eventlogeach gained a mode setting and an allow list. The default,any, is exactly the previous behaviour;predefinedlimits a caller to thenames you configured;
allowedmatches an allow list. Nothing changes onupgrade. (feature: add access control gates for data-reading checks #1516)
restrictedholdsqueries.execute.noargs, the REST equivalent of NRPE'sallow arguments = false: it runs the checks the agent defines and refusesany query-string parameter.
metricsreads the two metrics endpoints andnothing else. The bundled
monitoringrole finally holds the grant themetrics endpoints actually check, so a monitoring user is no longer answered
403 there. (feature: add queries.execute.noargs grant for argument-less query execution #1517, feature: add metrics role and fix monitoring role grants #1520)
is opened by the agent with a key you hand it out of band, at enrollment
(
nscp enroll --bundle-key,FLEET_BUNDLE_KEYon the MSI) or later. The keyand the optional "sealed bundles only" posture live in the enrollment
manifest, never in the settings store, so the server cannot plant or switch
them. (Fleet: encrypted bundles, unenroll, and an nscp test prompt that survives a config push #1521)
nscp enroll --unenrollleaves the fleet. It removes the include,the identity and keys, and the fleet directory, and reports each step.
(Fleet: encrypted bundles, unenroll, and an nscp test prompt that survives a config push #1521)
nscp testno longer crashes after a fleet configuration push. Asettings reload replaced the object the prompt's completion held a pointer
to; the next completion refresh dereferenced freed memory. The crash file the
agent writes now names the faulting module instead of printing a pointer.
(Fleet: encrypted bundles, unenroll, and an nscp test prompt that survives a config push #1521)
nscp testprompt. Padded tables instead of tabs in everylisting,
descwith parameter defaults, the bare-call command line and whatan alias runs, a
keywordsverb listing a check's filter keywords,aliasas a shorter
aliases, Tab completion that correctsload checktoload Check…, single quotes that take paths literally,execthat passes--optionsto a module, and asettingsdump that lists only what isconfigured with passwords masked. (nscp test prompt: aligned listings, richer desc, keywords, alias, case-insensitive completion, single quotes #1522)
path written with the other separator walking out of an allowed directory,
a link the path resolver skipped, and a reload window during which every
gate stood open. Ship the release with those in, not the first cut.
nscp.exeunder%WINDIR%\Installer, the WinGet manifests carry themetadata the upstream validator wants again, and the Debian source package
drops a Unicode-licensed file so it passes Lintian. (Replace Unicode-licensed ConvertUTF with DFSG-free implementation #1518)
🔍 Detailed changes
🚀 NSClient Fleet
Until now a large estate of agents was configured either by pointing each one
at an ini file on a web server or by pushing settings over the REST API from
whatever orchestration you already run. Both still work. Neither keeps track
of the estate: the only inventory is the one you maintain by hand.
Fleet turns that around. A host enrolls with a one-time token, a few MSI
properties or one
nscp enrollcommand, and appears in the inventory with itsOS, version, drives and detected roles as tags the agent reported. Groups
select hosts by tag, bundles of INI fragments and scripts attach to groups,
and each host pulls the bundles that apply to it, verifies their signatures,
renders them into a
fleet.iniits ownnsclient.iniincludes, and reportsback what it applied. The server never pushes and never needs a port opened on
a monitored host. Status is derived from what hosts report: in sync, out of
sync, offline, lost, and whether local settings outrank what the server sends.
It is one static binary and a SQLite file, on Linux or Windows or as a
container, in its own repository.
To learn more, start with the
launch announcement,
then the Fleet documentation for running
it in Docker, installing it on Linux or Windows, and the deployment reference.
The agent-side walkthrough is
Central management with NSClient Fleet.
What this release adds on the agent side is below.
🛡️ Restricting what a check may read
The checks in the table take an argument that decides what data is read,
and the agent reads it with its own privileges. Where callers choose the
argument, NRPE with
allow arguments = trueor a REST user not on therestrictedrole, an unrestrictedfile=is a general file-read primitive.Each module gained a mode setting and an allow list:
check_logfile[/settings/logfile]file accessallowed filescheck_wmi[/settings/wmi]query accessallowed classes,allowed namespacescheck_pdh[/settings/system/windows]counter accessallowed counterscheck_files,check_single_file,check_disk_write[/settings/disk]file accessallowed filescheck_registry_key,check_registry_value[/settings/system/windows]registry accessallowed registry keyscheck_eventlog[/settings/eventlog]log accessallowed logsThe modes are
any(the default, and what every earlier release did),predefined(the secure option: only names you configured in the module's ownsections, such as
[/settings/logfile/files]or the counters already in[/settings/system/windows/counters]) andallowed(only what matches thelist; experimental, since it has to parse what the caller sent). Registry and
event-log entries are hierarchical and match whole name segments. Configured
names resolve in every mode, so you can name your checks first and tighten
the mode afterwards.
Once a mode is set, some arguments tighten with it: a
check_wminamespace=may no longer leave
root\cimv2unlessallowed namespacessays so and itstarget=must name a configured target,check_registry_*refusescomputer=, andcheck_eventlog's default channels go through the gate likeany other. Review of the gates before release closed a path written with the
other separator walking out of an allowed directory, a symbolic link the path
resolver did not follow, a NUL byte, a remote host in the path, and a window
during a settings reload in which every gate stood open;
allowedmode judgesa WMI query by its class rather than its text. Alongside this,
check_fileson Windows no longer follows file symbolic links, as the Linux scanner never
did, and
*and?in a path allow list no longer cross a directoryseparator (
C:/logs/**.logfor the subtree). SeeRestricting what a check may read.
🔒 WEBServer — roles that cannot be widened
restrictedholdsqueries.execute.noargsinstead ofqueries.execute: thecaller may run the checks the agent defines, and a request carrying any
query-string parameter is refused with
403 Arguments are not allowed for this user. Neither grant implies the other. Give such a caller the checks thatneed arguments as aliases, so the arguments live in your configuration:
Every query parameter counts, including a session token passed the legacy way
as
?TOKEN=, so a restricted client authenticates with a header.metricsis for a Prometheus scraper:metrics.listandopenmetrics.list,no
queries.execute. The bundledmonitoringrole grantedmetrics.get, aprivilege nothing checks, so a monitoring user got 403 on both metrics
endpoints; it now grants the two real ones. Roles already written to
nsclient.iniare never rewritten, so an existingmonitoringline keeps itsinert grant until you update it or assign
metricsinstead.🔐 Fleet — encrypted bundles and unenrolling
A bundle the operator seals in the fleet server's browser (
format: enc-v1)used to be refused by the agent as an unreadable archive. The agent now opens
it. The envelope is AES-256-GCM with the bundle's name and version bound in as
additional data, so a server that re-labels an old sealed bundle gets a
refusal; the published checksum and signature cover the envelope, so download
verification is unchanged and decryption is a step after it. The plaintext
exists on disk only while it is unpacked; the cache keeps the envelope.
The key reaches the host out of band, never from the server:
nscp enroll --bundle-key <key>(repeatable while rotating), orFLEET_BUNDLE_KEY=<key>on the MSInscp enroll --update-bundle-keys --bundle-key <key>, or re-run the MSI with onlyFLEET_BUNDLE_KEYnscp enroll --require-encrypted-bundles, orFLEET_REQUIRE_ENCRYPTED_BUNDLES=1Both the keys and the requirement are stored in the enrollment manifest
beside the host's private key, not in
nsclient.ini: the fleet-managedconfiguration is an include of the settings store, so anything kept there
could be planted by the very server the bundles are sealed against. A bundle
sealed with a key the host lacks is refused and the state report names the
missing key's fingerprint, which is what the server shows on its key page.
nscp enroll --unenrollremoves the[/includes] fleetentry, the manifestand the fleet directory, in that order, and says what it removed; a service
restart stops the sync. It is a local act, so remove the host on the server as
well. Enrollment also resolves the manifest path from
[/settings/fleet]state fileon every path now; a host that sets that key used to enroll intoa file the service never read. See
Central management with NSClient Fleet,
new in this release as a guide. (#1519, #1521)
🖥️ The
nscp testpromptA fleet configuration push, or any settings reload, killed the prompt: the
reload re-entered the module and replaced the client object the completion
hooks held a raw pointer to. Fixed, and the crash record the agent writes now
names the faulting module (it printed a pointer). On top of that:
queries,aliases,list,pluginslistreally lists both kindsdesc <query>show-default), and for an alias the command it runs plus that command's parameterskeywords <query>aliasaliasessettingsexec <module> --optnscp <module> --optsends them, instead of--optbeing taken for the commandload check<Tab>CheckDisk,CheckSystem, …'C:\Program Files\x'"..."keeps its backslash escapes, andfilter=core='total'typed bare still reaches the check as writtenA PDH enumeration race seen through
exec CheckSystem --listinside theprompt is fixed as well: when the counter list grows between the sizing call
and the fetch, the agent grows the buffer and retries instead of reporting
PDH_MORE_DATAas a failure. (#1522)🐛 Bug fixes
check_logfile files=works: the comma-separated form was parsed beforethe check read its arguments and had been ignored since it was added; it is
one list with
file=now, and every name goes throughfile access.check_installed_softwareon Debian and Ubuntu takes install dates fromdpkg-query(db-fsys:Last-Modified, dpkg 1.19.3 or later) instead ofdpkg's internal database, and returns UNKNOWN when a package's file list
cannot be read for a reason other than a missing file. (fix(CheckSystemUnix): take the dpkg install date from dpkg-query #1485)
nscp testfallback on Linux appended a tab and...to every line ofmulti-line output; it now prints the record as written, as Windows did.
=padding in the middle is refusedwith a message that says so, and the MSI names the property that is
actually missing when only
FLEET_REQUIRE_ENCRYPTED_BUNDLESis given on anunenrolled host.
📦 Packaging
nscp.exeitself, so WindowsInstaller extracted an isolated 8 MB copy of the agent into
%WINDIR%\Installeron every install. It is a real icon now.the published moniker,
ReleaseNotes,Documentations, locale, scope andinstaller switches again, date a manually re-published manifest by its
release rather than the day the workflow ran, and keep the useful part of
the release notes instead of cutting a table in half.
ConvertUTF, whose licence is not DFSG-free; the Debian source packagepasses Lintian again. (Replace Unicode-licensed ConvertUTF with DFSG-free implementation #1518)
any, no useris assigned to the new WEB roles, and roles already written to
nsclient.iniare not rewritten. Set a mode, or update amonitoringroleline, only when you want the new behaviour.
check_fileson Windows skips file symbolic links. If you relied onthem being counted, point the check at the link targets. Path allow-list
wildcards no longer cross directory separators; use
**for a subtree.check_logfilewith bothfile=andfiles=reads the union fromthis release on. Nothing to do unless you relied on
files=being dropped.check_installed_softwareon a dpkg older than 1.19.3 leavesinstall_dateunset, so an expression on it no longer matches there.starts serving sealed bundles; a host without it refuses them and names the
missing key's fingerprint in its state report. There is no key escrow on
the server.
Security notices for this release:
Access modes for the checks whose argument decides what is read,
WEB: a metrics role, and a corrected metrics grant on the monitoring role,
Fleet: encrypted bundles are opened by the agent, not the server and
Sensitive settings are redacted in the nscp test settings dump.
The full list of behaviour changes is on the
upgrading page.
Full Changelog: 0.20.0...0.21.0
This discussion was created from the release 0.21.0.
All reactions