ContainerDeskDocs
Reviews & evidenceView source ↗

🧪 018 — Native SSH foundation checkpoint

Passed on 2026-09-29 on Ubuntu 26.04.1 x86_64 (native GTK/WebKit application on X11). Source: 017 commit 6e2e3e339089ea2d82d599870d572af03c00c753 plus this prompt’s changes. Release executable SHA-256: ad7570f0eaf0453a99004764375e2a6eb4d791d093e3f7e961184a0ba2c16b16.

Environment and disposable topology

Local native app → direct SSH target, or local app → SSH bastion → private DNS alias target. Both servers run Alpine 3.22.5/OpenSSH 10.0p2 in separately owned, read-only containers on an internal bridge. No ports are published. The local Linux host reaches the owned bridge IP for the direct case; only the bastion resolves the private target alias. This tests actual TCP forwarding, not an emulated SSH client or network isolation against the host administrator.

tests/lab/ssh_auth.py --engine builds containerdesk-ssh-lab:018 from the pinned Alpine digest in the Dockerfile. It selects an unused /28 without changing existing networks. Temporary client/server keys, dedicated known_hosts files and an isolated agent are generated under a private temporary directory. Trust entries come from the public keys of the owned servers, not an unauthenticated scan. A deliberately permissive source config tests that the application’s strict overlay wins on both hops. No user key is copied or sent to a container.

A real Docker Engine 28.3.3 runs inside the SSH target, separately from the host daemon. It uses private tmpfs data/exec directories, vfs, the target’s own Unix socket and disabled bridge/iptables/ip6tables/IP-forwarding/masquerade. The container is not privileged and never receives the host Docker socket. The lab user belongs to the image’s Docker group. The daemon is intentionally empty; running nested workloads is not claimed. The existing synthetic API fixtures remain solely for negative capability/format tests and are identified separately in output.

The orchestrator needs local Docker/Python/Cargo; the application and compiled real-Engine test process run with PATH=/nonexistent, using validated absolute /usr/bin/ssh. Neither needs client Docker or jq. The native app receives isolated XDG_DATA_HOME; no normal application preferences are edited. Snap-injected GTK/loader variables are removed only from its test process.

Client tools: OpenSSH 10.2p1 Ubuntu-2ubuntu3.6; Rust/Cargo 1.98.1; Node 24.21.0/npm 11.19.0; Tauri 2.12.0; GTK 3.24.52; WebKitGTK/WebKitWebDriver 2.52.6; external tauri-driver 2.0.4. Remote CLI/Engine: 28.3.3. Compose is absent in this lab and correctly remains optional.

Reproduction and actual results

Build with the repository’s pinned Node/Rust environment. This run installed the external driver under /tmp/containerdesk-018-tools using cargo install tauri-driver --version 2.0.4 --locked --root /tmp/containerdesk-018-tools. Ubuntu’s webkitgtk-webdriver 2.52.6 deb was downloaded with apt-get download and extracted with dpkg-deb -x into that directory; system packages were not changed. Use corresponding absolute driver paths on another client. The external driver uses Tauri’s framework automation support; no automation plugin, testing IPC endpoint or new production dependency was added. See Tauri external WebDriver example and Ubuntu native driver package.

npm run desktop:build
python3 tests/lab/ssh_auth.py --engine \
  --native-driver /tmp/containerdesk-018-tools/bin/tauri-driver \
  --webkit-driver /tmp/containerdesk-018-tools/webkit/usr/bin/WebKitWebDriver
cargo test --manifest-path src-tauri/Cargo.toml --locked
cargo clippy --manifest-path src-tauri/Cargo.toml --locked --all-targets -- -D warnings
cargo fmt --manifest-path src-tauri/Cargo.toml --check
npm run check
npm run test:ui -- tests/ui/host-inventory.spec.ts
python3 codex/scripts/track.py validate
Check actually executed Observed result
Native UI: add/select direct alias, connect read-only, resolve target, show endpoint/daemon/version, disconnect PASS. Actual Engine version 28.3.3 and daemon ID match the provisioner’s separate read-back.
Native UI: same journey via explicit ProxyJump PASS. Private lab@target:22, route jump-known, same real daemon; no Docker/jq on app PATH.
Compiled Rust test: real native SSH + Docker version and ps --all --no-trunc --format '{{json .}}' through both aliases PASS, 1 test/2 routes in 1.71 s. Real successful empty JSONL list; 5 s/16 MiB stdout and 16 KiB stderr bounds. Fresh capability/identity observation before preparing each list. No fixture parser used.
Native UI: unknown key, changed key, absent jump credentials PASS, distinct bounded errors; explicit disconnect.
Native UI: cancel a slow Docker probe, restore executable, explicitly reconnect PASS, disconnect below 3 s despite a remote 30 s sleep; new session reaches Ready with the actual daemon identity.
Live SSH lab matrix and ownership tests PASS, 7 tests in 6.55 s: 15 trust/auth scenarios, session diagnostics, multiplex reuse, independent channel cancellation, unrelated master preservation, long paths, stale-socket fallback, master death/no implicit reconnect and idle expiry. Synthetic API capability cases are additional checks within this set, not real-Engine evidence.
Trust/config hashes, askpass sentinel, cleanup PASS, all hashes unchanged; no test askpass invocation; owned containers/network/agent/key directory removed. Separate Docker label queries after the run returned no lab containers/networks. Image build cache remains.
Deterministic Rust suite PASS, 77 tests; 8 live-lab tests explicitly ignored in the ordinary run.
Clippy/fmt, TypeScript/Biome/IPC, browser inventory regressions PASS; 24 IPC tests and 12 browser checks. Browser checks are not native evidence.
Linux release build PASS, native launch executed against this artifact; no installer or distribution signing claim.

Screenshots were captured from the native WebKit window after real UI actions: direct, ProxyJump. They contain only ephemeral lab identities/addresses. Container list resource screens are the next increment: the bounded list is verified through the native Rust transport harness, not displayed in the 018 UI. This separates the planned UI version/identity journey from the prerequisite list transport check without claiming future resource screens exist.

Combined boundary review

  • ssh/quoting.rs supplies one POSIX encoder for the remote command; typed registry validation protects argument meaning. Local structured execution spawns validated native SSH directly with argv. Hostile quotes, shell substitutions, templates, leading options, NUL and output bounds have deterministic coverage.
  • ssh/auth.rs overlays BatchMode, strict host verification, no trust updates, no password prompts and no agent forwarding. The lab covers unknown/changed keys at the target and bastion, encrypted keys with/without the isolated agent, and missing credentials. Original config/trust hashes remain unchanged. Trusted Match exec/ProxyCommand remain executable user configuration.
  • ssh/runner.rs, multiplex.rs and runtime.rs retain process/resource ownership through cancellation and reaping, use bounded nonqueuing slots/output/deadlines, own private short control sockets and avoid implicit reconnect on dispatched mux channels. Native tests verify independent cancellation, user-master survival, socket removal and idle recovery. Slow remote subprocesses are confined to the disposable target; client cancellation is not a guarantee that an arbitrary remote program stops.
  • ssh/sessions.rs invalidates generations before cleanup and ignores old completions. Inventory ownership also binds stable host ID and selected SSH/Docker options. UI cancel/reconnect plus deterministic stale-result tests cover both paths. There are still no authorized resource/mutation/terminal sessions from this diagnostic-only connection API.
  • Diagnostics send static classifications and whitelisted capability fields; raw SSH stderr, credentials and environment values are absent from persistence and default IPC. Dedicated marker/hash tests cover invisible password/trust changes. The isolated Engine identity is compared independently and is never substituted with the synthetic API’s identity.

Two older lab tests initially failed because they assumed the default socket had no Engine. They now explicitly select the existing stopped-daemon fixture, preserving that negative scenario whether the real Engine is enabled or not. The first WebDriver journey attempted an element before React mounted; the external harness now uses a bounded 5 s element wait. The subsequent complete run passed. These were harness assumptions, not bypassed app failures.

Remaining limits and downstream work

macOS arm64/x86_64, native Wayland, Ubuntu 24.04 baseline and packaged installation remain unexecuted. This checkpoint needs only the available native OS; later platform gates still require real native evidence. The lab proves an empty real daemon, not nested container execution, streaming or mutations (030/038/046).

Existing documented limits remain: system-config relative Include semantics under the private SSH overlay; synchronous metadata on slow filesystems; conservative stale-socket recovery preserving ambiguous resources. The 019 resource dispatcher must avoid retaining the driver’s connection mutex across its idle watcher, bind actual session/daemon identity and reject stale responses. None of those future operations are exposed by this checkpoint.