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.

Validate each rootless socket identity

rcourtman60041ad9e60c
diff --git a/docs/release-control/v6/internal/subsystems/agent-lifecycle.md b/docs/release-control/v6/internal/subsystems/agent-lifecycle.md
index 67aa4f0572..d445320679 100644
--- a/docs/release-control/v6/internal/subsystems/agent-lifecycle.md
+++ b/docs/release-control/v6/internal/subsystems/agent-lifecycle.md
@@ -7371,7 +7371,10 @@ exact qualification artifact. It treats rootless and rootful helper
inventories as separate daemon identities, requires direct recovery to restore
the original rootless identity and rich telemetry, and understands that a
collector restart creates a new report stream while daemon restart preserves
-the durable daemon identity. Its classification is local, opt-in,
+the durable daemon identity. Dual-socket ambiguity evidence validates Docker
+and Podman against their respective recorded socket ownership and modes; it
+must not project the selected runtime's permissions onto the other socket.
+Its classification is local, opt-in,
artifact-bound self-attestation only. No receipt exists merely because the
harness is checked in, so rootless Docker and Podman remain live-unqualified
and cannot change the product default.
diff --git a/docs/release-control/v6/internal/subsystems/deployment-installability.md b/docs/release-control/v6/internal/subsystems/deployment-installability.md
index adbc8f6a47..b0febfc25b 100644
--- a/docs/release-control/v6/internal/subsystems/deployment-installability.md
+++ b/docs/release-control/v6/internal/subsystems/deployment-installability.md
@@ -302,6 +302,9 @@ a build failure rather than an attestable omission. Checking in the harness or p
ordinary contract tests is not live qualification. Until a complete
secret-free receipt and attestation are retained, this surface remains
implemented-but-unqualified and cannot change the opt-in safe-profile default.
+When both runtime sockets are present for ambiguity refusal, the validator
+checks each entry against that runtime's own recorded GID and mode while using
+the current disposable host's collector UID and canonical socket path.
Failed runtime tests must retain the disposable systemd journal and container
log before nonce-bound cleanup; absence of a receipt is not a replacement for
the causal failure record.
diff --git a/scripts/release_control/secure_runtime_rootless_attestation_v1.py b/scripts/release_control/secure_runtime_rootless_attestation_v1.py
index c0f8eabc3e..6a2f83447c 100644
--- a/scripts/release_control/secure_runtime_rootless_attestation_v1.py
+++ b/scripts/release_control/secure_runtime_rootless_attestation_v1.py
@@ -536,10 +536,19 @@ def validate_receipt(receipt: Any) -> dict[str, Any]:
docker_stream = validated[0]["scenarios"][REQUIRED_SCENARIOS.index("collector_restart")]["report_stream_id"]
podman_stream = validated[1]["scenarios"][REQUIRED_SCENARIOS.index("collector_restart")]["report_stream_id"]
require(docker_stream != podman_stream, "Docker and Podman report streams must differ")
+ socket_profiles = {current["runtime"]["runtime"]: current["runtime"] for current in validated}
for current in validated:
uid = current["runtime"]["collector_uid"]
expected_live_sockets = [
- {"runtime": runtime, "path": expected_socket_path(runtime, uid), "uid": uid, "gid": current["runtime"]["socket_gid"], "mode": current["runtime"]["socket_mode"], "type": "unix", "symlink": False}
+ {
+ "runtime": runtime,
+ "path": expected_socket_path(runtime, uid),
+ "uid": uid,
+ "gid": socket_profiles[runtime]["socket_gid"],
+ "mode": socket_profiles[runtime]["socket_mode"],
+ "type": "unix",
+ "symlink": False,
+ }
for runtime in REQUIRED_RUNTIMES
]
ambiguity = current["scenarios"][REQUIRED_SCENARIOS.index("dual_socket_ambiguity_refusal")]["evidence"]
diff --git a/scripts/release_control/secure_runtime_rootless_attestation_v1_test.py b/scripts/release_control/secure_runtime_rootless_attestation_v1_test.py
index 2044f63301..6f692e5a75 100644
--- a/scripts/release_control/secure_runtime_rootless_attestation_v1_test.py
+++ b/scripts/release_control/secure_runtime_rootless_attestation_v1_test.py
@@ -70,6 +70,10 @@ class RootlessAttestationV1Test(unittest.TestCase):
return {"runtime": runtime, "path": attester.expected_socket_path(runtime, uid), "uid": uid,
"gid": gid, "mode": mode, "type": "unix", "symlink": False}
+ @staticmethod
+ def socket_permissions(runtime: str) -> tuple[int, str]:
+ return (4100, "0660") if runtime == "docker" else (4200, "0600")
+
def direct(self, runtime: str, pid: int, daemon: str, uid: int, gid: int, mode: str) -> dict:
return {
"collector_pid": pid, "service_pid": pid, "collection_path": "collector-owned-rootless-socket",
@@ -84,7 +88,7 @@ class RootlessAttestationV1Test(unittest.TestCase):
def make_run(self, runtime: str, index: int) -> dict:
uid = 1200 + index * 100
- gid, mode = uid, "0600" if runtime == "docker" else "0660"
+ gid, mode = self.socket_permissions(runtime)
daemon = runtime + "-durable-daemon"
fresh = self.direct(runtime, 4100 + index * 100, daemon, uid, gid, mode)
migration = {**self.direct(runtime, fresh["collector_pid"] + 1, daemon, uid, gid, mode),
@@ -109,7 +113,9 @@ class RootlessAttestationV1Test(unittest.TestCase):
recovery = self.direct(runtime, restart["collector_pid"], daemon, uid, gid, mode)
ambiguity = {
"protected_collector_pid": restart["collector_pid"], "probe_kind": "separate-unpinned-collector",
- "live_sockets": [self.socket(name, uid, gid, mode) for name in attester.REQUIRED_RUNTIMES],
+ "live_sockets": [
+ self.socket(name, uid, *self.socket_permissions(name)) for name in attester.REQUIRED_RUNTIMES
+ ],
"admission_refused": True, "fail_closed": True, "daemon_probe_count": 0,
"container_actions_enabled": False, "collector_restart_count": 0,
}
@@ -258,6 +264,7 @@ class RootlessAttestationV1Test(unittest.TestCase):
lambda r: self.scenario(r, 0, "socket_loss_helper_fallback")["evidence"].update(container_actions_enabled=True),
lambda r: self.scenario(r, 0, "dual_socket_ambiguity_refusal")["evidence"].update(daemon_probe_count=1),
lambda r: self.scenario(r, 0, "dual_socket_ambiguity_refusal")["evidence"]["live_sockets"][0].update(path="/tmp/socket"),
+ lambda r: self.scenario(r, 0, "dual_socket_ambiguity_refusal")["evidence"]["live_sockets"][1].update(gid=9999),
lambda r: self.scenario(r, 0, "daemon_restart")["evidence"].update(full_fields_present=False),
]
for mutation in mutations: