Repository navigation
Asset Inventory M91
Published documentation mirror. Edit the source through a repository PR. See Project status.
Status: accepted and merged (native scope only); offline native foundation. Operational report transport, collection, discovery, GUI inventory, and independently verified host metadata remain outstanding. The accepted UX5 desktop is unchanged.
The native KnetSentry::AssetInventory library accepts bounded reports only at a
trusted manager-adapter boundary. The adapter must associate the report with the
same established manager-side TLS session that delivered it; it must supply the
current administrator-selected interface labels and capability policy for that
endpoint, manager-assigned receipt time, and the source report sequence. The
library does not consume TLS application frames itself. No new protocol message,
listener, remote operation, manager/agent linkage, or implicit enrollment is
introduced. Future integration must additionally enforce network authorization,
consent, framing, trusted policy provenance and rate limits.
The endpoint ID is opaque and assigned through explicit enrollment. An interface name is not an address, device identity or permission to monitor. The caller must apply the network boundary before network operations. Metadata is an attributed assertion, not independently verified OS or hostname truth. Capability bits describe reported journal, authentication, audit and file-integrity support; they do not mean collection is active. Policy is checked at admission time; inspection does not establish that interface/capability policy is still current. No username, MAC, IP address, credential secret, packet payload or arbitrary free-text field is collected. Hostnames and OS labels are nevertheless sensitive.
-
admitandinspecttake a trusted private registry directory descriptor. Directory must already be effective-UID owned, mode 0700, on a trusted local filesystem with supported locking, atomic rename and fsync; trusted ancestry and mount selection remain caller responsibilities. - The registry and inventory use the same independently reopened directory flock. Current pin lookup occurs while the lock is held across publication or inspection, preventing cooperating rotation/revocation from racing the operation.
- Only a currently authenticated manager-side peer whose pin matches the enrolled endpoint may submit. Recheck proof immediately before publication. Authority denial aborts the session; malformed or stale metadata is rejected.
- Hostname, OS name and OS version use fixed 64-byte NUL-terminated canonical ASCII fields; hostname has no spaces, OS labels may have spaces. Up to eight unique contiguous 15-character interface labels and four known capability bits are supported. Interface names and capabilities must be explicitly permitted.
- Nonzero sequence and manager receipt time are required. Sequence must strictly increase for the current pin, including across sessions and reopen. Sender sequence durability is a future adapter obligation; key rotation permits a fresh sequence. Receipt time is attributed manager time, not an ordering proof.
- One fixed-size, versioned 393-byte record per enrolled ID; the name is generated solely from the opaque ID. The existing registry's 128-record limit bounds the number of legitimately created asset files. A private pin is retained to bind the record to the approval generation; it is never returned by inspection.
- Publication uses exclusive staging and a persistent pending marker, file and directory fsync, atomic rename, then marker removal and directory fsync. Incomplete transaction artifacts block inventory reads/writes until deliberate administrator recovery. The registry itself remains independently usable.
- Reject unsafe permissions, symlinks, hardlinks, incorrect record lengths, versions, identity mismatches and invalid fields. Do not overwrite corrupt records or silently recreate enrollment. No automatic repair is introduced.
- A rotated endpoint's old metadata is unavailable until the new pin submits. A revoked or unknown ID is denied. Revocation does not physically erase the private historical file. Retention/secure disposal policy remains outstanding.
- The trusted local caller can enumerate IDs through the existing enrollment roster, then inspect individually. This is not an atomic multi-asset snapshot; no unprivileged GUI or remote query is exposed. Missing is not zero assets.
The directory and same-UID trust assumptions are those of M4.4; this is not an anti-rollback or tamper-evident store against root or malicious same-UID processes. Actual power-loss fault injection, broader metadata accuracy, current-policy reconciliation, time/sequence recovery, and production data retention remain open.
The mandatory native CTest uses real in-memory mutual TLS and disposable private storage. It checks pre-handshake/agent-side/wrong-ID denial, canonical validation, policy rejection, exact persistence and reopen, cross-session sequence replay, update, shared-lock contention, interrupted publication, unsafe permissions, hardlinks, symlinks, corrupt record refusal, key rotation and revocation. Tests never print host metadata, pins or real inventory. The existing enrollment suite and other regressions remain mandatory.
The source contract is independently checked by scripts/verify_m91_inventory.py.
Full target qualification passed after the corrective follow-up; no existing performance, compiler,
sanitizer, GUI or privilege policy is relaxed. The issue remains open for
operational integration; this increment establishes the native foundation.
Initial Ubuntu 26.04 Analysis configuration succeeded, but compilation stopped
with two fatal clang-analyzer-unix.StdCLibraryFunctions diagnostics. The
analyzer traced a failed directory openat through the shared locking helper
into fstatat and record openat during inspection. No CTests ran.
Both public entry points now check the independently reopened descriptor before
calling the registry readiness helper. A failed reopen returns Unsafe;
admission additionally aborts the TLS session. This preserves the existing
internal storage validation rather than relying on cross-translation-unit
inference. The native test exercises a regular-file descriptor, a closed
nonnegative descriptor and AT_FDCWD with fresh authenticated sessions, checks
that inspection returns no record, admission aborts, and the existing inventory
and transaction-artifact state remain unchanged. The source verifier requires
both guards and the new runtime completion marker. No warning suppression or
change in persistence format, permissions, locking or authorization is made.
Corrected target-host qualification passed: 186 local gates, 604 CTests,
82 structural verifiers and nine hosted checks on bce3cc9; maintainer graphical
review and merge reported.
Source repository · Documentation index · License policy
Documentation mirror — CC-BY-SA-4.0. KnetSentry is not an official KDE project.