Skip to content

armgit / Pulse

Public Imported from GitHub
0

Real-time monitoring dashboard for Proxmox VE, PBS, Docker, Kubernetes, TrueNAS and vSphere. Self-hosted, with alerts for failed backups, full disks, unhealthy containers and offline nodes.

Fix rootless qualification packet staging

rcourtman63d1aca4c0a5
diff --git a/docs/release-control/v6/internal/subsystems/agent-lifecycle.md b/docs/release-control/v6/internal/subsystems/agent-lifecycle.md
index 54f2c52713..28cea8f357 100644
--- a/docs/release-control/v6/internal/subsystems/agent-lifecycle.md
+++ b/docs/release-control/v6/internal/subsystems/agent-lifecycle.md
@@ -7308,7 +7308,10 @@ action sessions. Unsupported platforms continue to fail closed on migration.
for collector-owned rootless Docker and Podman proof. It does not extend or
reinterpret the schema-v7 systemd receipt. The wrapper confines destructive
runtime setup to disposable nested Ubuntu/systemd hosts with no mounted host
-daemon socket, exercises each runtime in an isolated state root, and emits the
+daemon socket. Qualification artifacts stay out of image layers: the image
+must pre-create their root-owned, mode-`0700` destination before the wrapper
+injects the exact packet into a stopped disposable container. The wrapper
+exercises each runtime in an isolated state root and emits the
standalone `secure-runtime-rootless-v1` receipt only after exact socket
ownership, daemon rootless attestation, installer pinning, direct telemetry,
same-family typed-helper fallback, recovery without collector restart,
diff --git a/docs/release-control/v6/internal/subsystems/deployment-installability.md b/docs/release-control/v6/internal/subsystems/deployment-installability.md
index c363bf0374..b816515a9c 100644
--- a/docs/release-control/v6/internal/subsystems/deployment-installability.md
+++ b/docs/release-control/v6/internal/subsystems/deployment-installability.md
@@ -259,6 +259,9 @@ the immutable schema-v7 systemd packet. The opt-in
`scripts/run-secure-runtime-rootless-qualification.sh` wrapper creates fresh,
network-isolated Ubuntu/systemd hosts for real rootless Docker and Podman,
never mounts a host daemon socket, and records each host identity separately.
+The exact qualification packet remains outside the image layers; the image
+must pre-create its root-owned, mode-`0700` packet destination before the
+wrapper injects artifacts into each stopped disposable container.
Its standalone `secure-runtime-rootless-v1` receipt must bind the exact
qualification, collector, helper, installer, source-manifest, socket,
fresh-install, legacy-migration, restart, fallback, recovery, ambiguity,
diff --git a/scripts/installtests/secure_runtime_rootless_qualification_test.go b/scripts/installtests/secure_runtime_rootless_qualification_test.go
index a1a4089d8d..d4c0b11562 100644
--- a/scripts/installtests/secure_runtime_rootless_qualification_test.go
+++ b/scripts/installtests/secure_runtime_rootless_qualification_test.go
@@ -1362,6 +1362,7 @@ func TestRootlessQualificationGuardAndWrapperInvariants(t *testing.T) {
`run_runtime docker`, `run_runtime podman`, `PULSE_ROOTLESS_RUNTIME=${runtime_name}`, `--privileged`,
`pulse-secure-runtime-rootless-qualification`, `qualification result != \"passed\"`,
`openssl pkeyutl -sign -rawin -inkey`, `qualification output directory must have exact mode 0700`,
+ `install -d -m 0700 /opt/pulse/packet`,
`302a300506032b6570032100`, `len(spki) != len(prefix) + 32`,
} {
if !strings.Contains(script, required) {
@@ -1381,6 +1382,11 @@ func TestRootlessQualificationGuardAndWrapperInvariants(t *testing.T) {
if createIndex < 0 || trackIndex < 0 || trackIndex < createIndex {
t.Fatal("rootless wrapper must track the exact container ID only after docker create succeeds")
}
+ packetDirectoryIndex := strings.Index(script, `install -d -m 0700 /opt/pulse/packet`)
+ packetCopyIndex := strings.Index(script, `docker cp "${PACKET_DIR}/." "${container_id}:/opt/pulse/packet"`)
+ if packetDirectoryIndex < 0 || packetCopyIndex < 0 || packetCopyIndex < packetDirectoryIndex {
+ t.Fatal("rootless wrapper must create the private packet destination in the image before artifact injection")
+ }
}
func runRootlessQualificationWithFakeDocker(t *testing.T, mode string) (string, string, error) {
diff --git a/scripts/run-secure-runtime-rootless-qualification.sh b/scripts/run-secure-runtime-rootless-qualification.sh
index df56ba8f81..979e1afedf 100755
--- a/scripts/run-secure-runtime-rootless-qualification.sh
+++ b/scripts/run-secure-runtime-rootless-qualification.sh
@@ -198,6 +198,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
ln -sf /dev/null /etc/systemd/system/docker.socket && \
ln -sf /dev/null /etc/systemd/system/podman.service && \
ln -sf /dev/null /etc/systemd/system/podman.socket && \
+ install -d -m 0700 /opt/pulse/packet && \
printf '%s\n' disposable-v1 >/etc/pulse-secure-runtime-rootless-qualification && \
rm -f /etc/machine-id && touch /etc/machine-id && \
systemctl set-default multi-user.target