From 95c5f632142cfc46ccc4e1f08dd2a555cb756d02 Mon Sep 17 00:00:00 2001 From: Matthew Grossman Date: Tue, 17 Nov 2026 21:07:00 -0800 Subject: [PATCH 1/9] test(support): add container state, copy, log, and volume helpers to container-engine Signed-off-by: Matthew Grossman --- tests/support/container-engine/Cargo.toml | 2 +- tests/support/container-engine/src/lib.rs | 113 +++++++++++++++++++++- 2 files changed, 113 insertions(+), 2 deletions(-) diff --git a/tests/support/container-engine/Cargo.toml b/tests/support/container-engine/Cargo.toml index 739e0986ca..30207dd07a 100644 --- a/tests/support/container-engine/Cargo.toml +++ b/tests/support/container-engine/Cargo.toml @@ -14,4 +14,4 @@ publish = false [dependencies] openshell-testkit = { path = "../../testkit/testkit" } tempfile = "3" -tokio = { version = "1.43", features = ["process"] } +tokio = { version = "1.43", features = ["process", "time"] } diff --git a/tests/support/container-engine/src/lib.rs b/tests/support/container-engine/src/lib.rs index 7d47f2d33f..e66d10ed8e 100644 --- a/tests/support/container-engine/src/lib.rs +++ b/tests/support/container-engine/src/lib.rs @@ -19,6 +19,7 @@ //! it. A missing variable fails the test; it never skips it. use std::path::Path; +use std::time::{Duration, Instant}; use testkit::{Context, Error, Result, ResultExt as _}; use tokio::process::Command; @@ -26,6 +27,8 @@ use tokio::process::Command; pub const ENGINE_ENV: &str = "OPENSHELL_TEST_CONTAINER_ENGINE"; /// The label the Docker and Podman drivers put on a sandbox's containers. pub const SANDBOX_NAME_LABEL: &str = "openshell.ai/sandbox-name"; +/// The label with the ID of the sandbox a container belongs to. +pub const SANDBOX_ID_LABEL: &str = "openshell.ai/sandbox-id"; /// The label that tells a sandbox's workload (`sandbox`) and `supervisor` /// containers apart. pub const ISOLATION_ROLE_LABEL: &str = "openshell.ai/isolation-role"; @@ -146,9 +149,110 @@ impl Engine { .await } + /// The IDs of every container, running or not, that the driver labeled + /// with sandbox ID `sandbox_id`. Sandbox IDs are unique, so this finds + /// only the containers of the sandbox the test created. + pub async fn containers_for_sandbox_id(&self, sandbox_id: &str) -> Result> { + let ids = self + .output([ + "ps", + "--all", + "--quiet", + "--filter", + &format!("label={SANDBOX_ID_LABEL}={sandbox_id}"), + ]) + .await?; + Ok(ids.split_whitespace().map(str::to_string).collect()) + } + + /// Whether container `id` is running. + pub async fn is_running(&self, id: &str) -> Result { + match self + .inspect_container(id, "{{.State.Running}}") + .await? + .as_str() + { + "true" => Ok(true), + "false" => Ok(false), + other => Err(Error::msg(format!( + "container {id} has running state {other:?}; expected true or false" + ))), + } + } + + /// Wait until container `id` is running (`running`) or stopped. + pub async fn wait_running(&self, id: &str, running: bool, timeout: Duration) -> Result { + let deadline = Instant::now() + timeout; + loop { + let last = match self.is_running(id).await { + Ok(now) if now == running => return Ok(()), + Ok(now) => format!("running={now}"), + Err(err) => err.to_string(), + }; + testkit::ensure!( + Instant::now() < deadline, + "container {id} did not reach running={running} within {timeout:?}; last state: {last}" + ); + tokio::time::sleep(Duration::from_millis(500)).await; + } + } + + /// Copy file `path` out of container `id` and return its contents. + pub async fn copy_from(&self, id: &str, path: &str) -> Result> { + let dir = tempfile::tempdir().context("create copy destination")?; + let destination = dir.path().join("copied"); + self.output(["cp", &format!("{id}:{path}"), utf8(&destination)?]) + .await?; + std::fs::read(&destination).context(format!("read {path} copied from container {id}")) + } + + /// The standard output and standard error container `id` has logged so + /// far, kept apart. + pub async fn logs(&self, id: &str) -> Result { + let output = self.run(["logs", id]).await?; + Ok(ContainerLogs { + stdout: String::from_utf8_lossy(&output.stdout).into_owned(), + stderr: String::from_utf8_lossy(&output.stderr).into_owned(), + }) + } + + /// Create volume `openshell-test--` with `labels` and + /// remove it when the test ends. Sandboxes created after it that mount it + /// are deleted first, because cleanup runs last registered first. + pub async fn create_test_volume( + &self, + cx: &Context, + name: &str, + labels: &[(&str, &str)], + ) -> Result { + let volume = format!("openshell-test-{name}-{}", cx.run_id()); + let mut args = vec!["volume".to_string(), "create".to_string()]; + for (key, value) in labels { + args.extend(["--label".to_string(), format!("{key}={value}")]); + } + args.push(volume.clone()); + self.output(args).await?; + let (engine, created) = (self.clone(), volume.clone()); + cx.on_cleanup(format!("remove volume {volume}"), async move || { + engine.output(["volume", "rm", &created]).await.map(drop) + }); + Ok(volume) + } + /// Run the engine with `args` and return its trimmed standard output. /// A non-zero exit is an error that includes the engine's output. pub async fn output(&self, args: I) -> Result + where + I: IntoIterator, + S: AsRef, + { + let output = self.run(args).await?; + Ok(String::from_utf8_lossy(&output.stdout).trim().to_string()) + } + + /// Run the engine with `args`. A non-zero exit is an error that includes + /// the engine's output. + async fn run(&self, args: I) -> Result where I: IntoIterator, S: AsRef, @@ -178,10 +282,17 @@ impl Engine { String::from_utf8_lossy(&output.stdout), String::from_utf8_lossy(&output.stderr) ); - Ok(String::from_utf8_lossy(&output.stdout).trim().to_string()) + Ok(output) } } +/// What a container logged, by stream. +#[derive(Clone, Debug, Default)] +pub struct ContainerLogs { + pub stdout: String, + pub stderr: String, +} + fn utf8(path: &Path) -> Result<&str> { path.to_str() .ok_or_else(|| Error::msg(format!("{} is not UTF-8", path.display()))) From 464ecf08e70c7576502569a6a65d5c8713cc2c51 Mon Sep 17 00:00:00 2001 From: Matthew Grossman Date: Tue, 17 Nov 2026 21:09:04 -0800 Subject: [PATCH 2/9] test(drivers/podman): port stop-is-terminal and ephemeral container cleanup Signed-off-by: Matthew Grossman --- tests/suites/drivers/podman/Cargo.lock | 2 + tests/suites/drivers/podman/Cargo.toml | 4 +- .../suites/drivers/podman/tests/lifecycle.rs | 148 ++++++++++++++++++ 3 files changed, 153 insertions(+), 1 deletion(-) create mode 100644 tests/suites/drivers/podman/tests/lifecycle.rs diff --git a/tests/suites/drivers/podman/Cargo.lock b/tests/suites/drivers/podman/Cargo.lock index e62158799b..9e4edf3a29 100644 --- a/tests/suites/drivers/podman/Cargo.lock +++ b/tests/suites/drivers/podman/Cargo.lock @@ -2446,9 +2446,11 @@ checksum = "19f132c84eca552bf34cab8ec81f1c1dcc229b811638f9d283dceabe58c5569e" name = "podman" version = "0.0.0" dependencies = [ + "base64 0.22.1", "container-engine-support", "openshell-testkit", "podman-support", + "serde_json", ] [[package]] diff --git a/tests/suites/drivers/podman/Cargo.toml b/tests/suites/drivers/podman/Cargo.toml index 02c0304a1c..cdf6c86639 100644 --- a/tests/suites/drivers/podman/Cargo.toml +++ b/tests/suites/drivers/podman/Cargo.toml @@ -4,7 +4,7 @@ # Each driver suite is its own workspace, with its own lockfile. [package] name = "podman" -description = "Drivers suite: Podman driver behavior, such as user namespaces" +description = "Drivers suite: Podman driver behavior, such as user namespaces and container lifecycle" version = "0.0.0" edition = "2024" rust-version = "1.94" @@ -13,8 +13,10 @@ repository = "https://github.com/NVIDIA/OpenShell" publish = false [dependencies] +base64 = "0.22" container-engine-support = { path = "../../../support/container-engine" } openshell-testkit = { path = "../../../testkit/testkit" } podman-support = { path = "../../../support/podman" } +serde_json = "1" [workspace] diff --git a/tests/suites/drivers/podman/tests/lifecycle.rs b/tests/suites/drivers/podman/tests/lifecycle.rs new file mode 100644 index 0000000000..89a21ddcb0 --- /dev/null +++ b/tests/suites/drivers/podman/tests/lifecycle.rs @@ -0,0 +1,148 @@ +// SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +// SPDX-License-Identifier: Apache-2.0 + +//! Podman driver sandbox lifecycle: what the driver does with its containers +//! when a sandbox's main process stops or an ephemeral sandbox finishes. + +use std::time::{Duration, SystemTime, UNIX_EPOCH}; + +use base64::Engine as _; +use container_engine_support::Engine; +use testkit::sdk::SandboxPhase; +use testkit::{Context, Error, ResultExt as _}; + +/// Where the driver mounts the sandbox's bootstrap JWT. +const TOKEN_PATH: &str = "/etc/openshell/auth/sandbox.jwt"; +/// How long the gateway may take to report a stopped workload as Error. +const ERROR_TIMEOUT: Duration = Duration::from_secs(30); +/// How long the driver may take to remove an ephemeral sandbox's containers. +const CLEANUP_TIMEOUT: Duration = Duration::from_secs(90); + +/// Stopping a sandbox's workload container is terminal: the driver doesn't +/// relaunch the main process and the sandbox ends in Error. Before the stop, +/// the workload can't read its bootstrap JWT, and the supervisor's copy is +/// unexpired. +#[testkit::test] +async fn stopped_workload_container_is_terminal(cx: &mut Context) -> testkit::Result { + cx.expect_compute_driver("podman").await?; + let engine = Engine::from_env()?; + let sandbox = cx + .sandbox("st") + .command(["sleep", "infinity"]) + .create_ready() + .await?; + + let workload = engine.container_for_role(sandbox.name(), "sandbox").await?; + engine + .output([ + "exec", + &workload, + "/bin/sh", + "-c", + &format!("test ! -r {TOKEN_PATH}"), + ]) + .await + .context("the sandbox workload must not be able to read its bootstrap JWT")?; + + let supervisor = engine + .container_for_role(sandbox.name(), "supervisor") + .await?; + let token = engine.copy_from(&supervisor, TOKEN_PATH).await?; + require_unexpired(&String::from_utf8_lossy(&token))?; + + engine.output(["stop", &workload]).await?; + engine + .wait_running(&workload, false, Duration::from_mins(1)) + .await?; + sandbox + .wait_phase(SandboxPhase::Error, ERROR_TIMEOUT) + .await + .context("a stopped main process makes the sandbox terminal")?; + Ok(()) +} + +/// A detached `--no-keep` sandbox's containers are removed once its main +/// command exits, whether it succeeds or fails. Conformance checks that the +/// gateway forgets the sandbox; this checks the driver's containers. +#[testkit::test] +async fn ephemeral_sandbox_containers_are_removed_after_main_exits( + cx: &mut Context, +) -> testkit::Result { + cx.expect_compute_driver("podman").await?; + let engine = Engine::from_env()?; + let mut sandboxes = Vec::new(); + for (suffix, code) in [("ez", 0), ("ef", 17)] { + let builder = cx.cli_sandbox(suffix); + let release_path = format!("/sandbox/.ephemeral-release-{}", builder.name()); + let script = + format!("while [ ! -e '{release_path}' ]; do sleep 0.1; done; sleep 1; exit {code}"); + let sandbox = builder + .args(["--no-keep"]) + .command(["sh", "-c", &script]) + .create() + .await?; + sandboxes.push((sandbox, release_path, code)); + } + + for (sandbox, release_path, _) in &sandboxes { + sandbox.wait_ready().await?; + testkit::ensure!( + !engine + .containers_for_sandbox_id(sandbox.id()) + .await? + .is_empty(), + "no containers found for sandbox {} ({})", + sandbox.name(), + sandbox.id() + ); + sandbox + .exec(["touch", release_path.as_str()]) + .await? + .success()?; + } + for (sandbox, _, code) in &sandboxes { + testkit::poll_until( + &format!("containers of sandbox {} to be removed", sandbox.name()), + CLEANUP_TIMEOUT, + Duration::from_millis(500), + async || { + let left = engine.containers_for_sandbox_id(sandbox.id()).await?; + Ok(if left.is_empty() { + testkit::Poll::Ready(()) + } else { + testkit::Poll::Pending(format!("containers {left:?}")) + }) + }, + ) + .await + .context(format!("ephemeral sandbox exited {code}"))?; + } + Ok(()) +} + +/// Fail unless `token`'s `exp` claim is in the future. Sandbox tokens use +/// `exp = 0` when no TTL is configured. +fn require_unexpired(token: &str) -> testkit::Result { + let payload = token + .trim() + .split('.') + .nth(1) + .ok_or_else(|| Error::msg("the sandbox JWT has no payload segment"))?; + let payload = base64::engine::general_purpose::URL_SAFE_NO_PAD + .decode(payload) + .map_err(|err| Error::msg(format!("decode the sandbox JWT payload: {err}")))?; + let claims: serde_json::Value = + serde_json::from_slice(&payload).context("parse the sandbox JWT claims")?; + let exp = claims["exp"] + .as_u64() + .ok_or_else(|| Error::msg(format!("the sandbox JWT has no integer exp: {claims}")))?; + let now = SystemTime::now() + .duration_since(UNIX_EPOCH) + .map_err(|err| Error::msg(format!("read the clock: {err}")))? + .as_secs(); + testkit::ensure!( + exp == 0 || exp > now, + "the supervisor's bootstrap JWT expired: exp={exp}, now={now}" + ); + Ok(()) +} From 544b2d0f9680233ad84aa494b7487ad10ebe3c3b Mon Sep 17 00:00:00 2001 From: Matthew Grossman Date: Tue, 17 Nov 2026 21:10:49 -0800 Subject: [PATCH 3/9] test(drivers/docker): add a Docker driver suite with stop-is-terminal and ephemeral cleanup Signed-off-by: Matthew Grossman --- .github/workflows/branch-checks.yml | 2 + .github/workflows/branch-e2e.yml | 8 +- .github/workflows/e2e-suites.yml | 5 +- .github/workflows/rust-cache.yml | 2 +- CI.md | 10 +- TESTING.md | 9 +- tasks/rust.toml | 3 + .../scripts/check_cargo_lockfile_alignment.py | 1 + tests/suites/conformance/src/lifecycle.rs | 8 +- tests/suites/drivers/docker/Cargo.lock | 4649 +++++++++++++++++ tests/suites/drivers/docker/Cargo.toml | 19 + .../suites/drivers/docker/tests/lifecycle.rs | 113 + 12 files changed, 4814 insertions(+), 15 deletions(-) create mode 100644 tests/suites/drivers/docker/Cargo.lock create mode 100644 tests/suites/drivers/docker/Cargo.toml create mode 100644 tests/suites/drivers/docker/tests/lifecycle.rs diff --git a/.github/workflows/branch-checks.yml b/.github/workflows/branch-checks.yml index 613793092b..80573e3871 100644 --- a/.github/workflows/branch-checks.yml +++ b/.github/workflows/branch-checks.yml @@ -294,6 +294,7 @@ jobs: cargo fmt --manifest-path tests/tmachine/Cargo.toml --all -- --check cargo fmt --manifest-path tests/runner/Cargo.toml --all -- --check cargo fmt --manifest-path tests/suites/conformance/Cargo.toml --all -- --check + cargo fmt --manifest-path tests/suites/drivers/docker/Cargo.toml --all -- --check cargo fmt --manifest-path tests/suites/drivers/podman/Cargo.toml --all -- --check cargo fmt --manifest-path tests/suites/features/Cargo.toml --all -- --check cargo fmt --manifest-path tests/support/Cargo.toml --all -- --check @@ -359,6 +360,7 @@ jobs: cargo clippy --locked --manifest-path tests/tmachine/Cargo.toml --all-targets -- -D warnings cargo clippy --locked --manifest-path tests/runner/Cargo.toml --all-targets -- -D warnings cargo clippy --locked --manifest-path tests/suites/conformance/Cargo.toml --workspace --all-targets -- -D warnings + cargo clippy --locked --manifest-path tests/suites/drivers/docker/Cargo.toml --workspace --all-targets -- -D warnings cargo clippy --locked --manifest-path tests/suites/drivers/podman/Cargo.toml --workspace --all-targets -- -D warnings cargo clippy --locked --manifest-path tests/suites/features/Cargo.toml --workspace --all-targets -- -D warnings cargo clippy --locked --manifest-path tests/support/Cargo.toml --all-targets -- -D warnings diff --git a/.github/workflows/branch-e2e.yml b/.github/workflows/branch-e2e.yml index 71e193beac..1c311c18b7 100644 --- a/.github/workflows/branch-e2e.yml +++ b/.github/workflows/branch-e2e.yml @@ -247,7 +247,7 @@ jobs: set -euo pipefail # Retry dependency preparation, then build once. nix build --no-link .#openshell-test-runner || nix build --no-link .#openshell-test-runner - for family in features drivers/podman; do + for family in features drivers/docker drivers/podman; do nix run .#openshell-test-runner -- build \ --family "$family" --out "artifacts/e2e-bundles/${family//\//-}" done @@ -257,6 +257,12 @@ jobs: path: artifacts/e2e-bundles/features retention-days: 5 if-no-files-found: error + - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 + with: + name: openshell-e2e-bundle-drivers-docker-x86_64-unknown-linux-musl + path: artifacts/e2e-bundles/drivers-docker + retention-days: 5 + if-no-files-found: error - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 with: name: openshell-e2e-bundle-drivers-podman-x86_64-unknown-linux-musl diff --git a/.github/workflows/e2e-suites.yml b/.github/workflows/e2e-suites.yml index c51f6ae520..3ad553fea1 100644 --- a/.github/workflows/e2e-suites.yml +++ b/.github/workflows/e2e-suites.yml @@ -10,8 +10,8 @@ # results. With `prebuilt`, the rows run what the caller built once for the # run instead: conformance rows the static `openshell-conformance`, the other # rows their family's test bundle. The `family` input selects the rows of one -# family, including the workspaces under it (drivers selects drivers/podman); -# leave it empty to run every row. +# family, including the workspaces under it (drivers selects drivers/docker +# and drivers/podman); leave it empty to run every row. name: E2E Suites @@ -106,6 +106,7 @@ jobs: {"environment":"ubuntu-docker-rootful","installer":"deb","family":"features","package":"connect-ssh-supervision","gateway":"openshell","runner":"ubuntu-24.04"}, {"environment":"fedora-podman-rootful-keycloak","installer":"rpm","family":"features","package":"keycloak-provider-refresh","gateway":"openshell","runner":"ubuntu-24.04"}, {"environment":"fedora-podman-rootless-keycloak","installer":"rpm","family":"features","package":"keycloak-provider-refresh","gateway":"openshell","runner":"ubuntu-24.04"}, + {"environment":"ubuntu-docker-rootful","installer":"deb","family":"drivers/docker","gateway":"openshell","runner":"ubuntu-24.04"}, {"environment":"fedora-podman-rootful-userns-default","installer":"rpm","family":"drivers/podman","gateway":"openshell","runner":"ubuntu-24.04"}, {"environment":"fedora-podman-rootful-userns-auto","installer":"rpm","family":"drivers/podman","gateway":"openshell","runner":"ubuntu-24.04"}, {"environment":"fedora-podman-rootful-userns-keep-id","installer":"rpm","family":"drivers/podman","gateway":"openshell","runner":"ubuntu-24.04"}, diff --git a/.github/workflows/rust-cache.yml b/.github/workflows/rust-cache.yml index dcf7c8027d..a1c6434756 100644 --- a/.github/workflows/rust-cache.yml +++ b/.github/workflows/rust-cache.yml @@ -96,7 +96,7 @@ jobs: run: | set -euo pipefail nix build --no-link .#openshell-test-runner || nix build --no-link .#openshell-test-runner - for family in features drivers/podman; do + for family in features drivers/docker drivers/podman; do nix run .#openshell-test-runner -- build \ --family "$family" --out "$RUNNER_TEMP/e2e-bundles/${family//\//-}" done diff --git a/CI.md b/CI.md index 200a8b6785..813595c671 100644 --- a/CI.md +++ b/CI.md @@ -176,11 +176,11 @@ selected. DEB and RPM packages build only when integration qualification is sele the DEB on Ubuntu with Docker and installs the CLI and gateway RPMs on Fedora with rootful and rootless Podman. These lanes run conformance using the matching runtime images. Release Dev, Release, and Pre-release use the same package installers. -The feature suites (`tests/suites/features`) and the Podman driver suite -(`tests/suites/drivers/podman`) run the same way, on the package installers; the -driver suite's environments merge their Podman settings into the packaged -gateway's configuration (see `TESTING.md`). The `e2e-podman` lane runs on the -RPM installer as well. The driver suite and `e2e-podman` run +The feature suites (`tests/suites/features`) and the Docker and Podman driver +suites (`tests/suites/drivers/{docker,podman}`) run the same way, on the package +installers; the Podman driver suite's environments merge their Podman settings +into the packaged gateway's configuration (see `TESTING.md`). The `e2e-podman` +lane runs on the RPM installer as well. The driver suites and `e2e-podman` run only in `Branch E2E Checks`. The manual Integration Tests workflow runs the remaining tmachine testsuites, such as `e2e-podman`, and downloads the packages selected by its matrix. diff --git a/TESTING.md b/TESTING.md index df4cfe16f5..2a2dd99d67 100644 --- a/TESTING.md +++ b/TESTING.md @@ -576,9 +576,12 @@ Driver suites live in `tests/suites/drivers/`, with the package named after the driver. Each driver suite is its own workspace with its own lockfile, so a change to one driver's tests or dependencies doesn't touch another's. Add a new one to the `rust:format`, `rust:format:check` and `rust:lint` tasks, the -matching lines in `branch-checks.yml`, and `ALIGNED_WORKSPACES`. The Podman -driver suite (`tests/suites/drivers/podman`) compares OpenShell and direct -Podman user-namespace mappings. +matching lines in `branch-checks.yml`, `ALIGNED_WORKSPACES`, and the bundle +builds in `branch-e2e.yml` and `rust-cache.yml`. The Docker and Podman driver +suites (`tests/suites/drivers/{docker,podman}`) check what the driver does with +a sandbox's containers when its workload stops or an ephemeral sandbox +finishes. The Podman suite also compares OpenShell and direct Podman +user-namespace mappings. Each `fedora-podman-{rootful,rootless}-userns-` environment configures the gateway with one mode (`default`, `auto`, `keep-id` or `private`) and works with every installer; CI runs it with `rpm`: diff --git a/tasks/rust.toml b/tasks/rust.toml index c995e74f8e..bf485db8cc 100644 --- a/tasks/rust.toml +++ b/tasks/rust.toml @@ -40,6 +40,7 @@ run = [ "cargo clippy --manifest-path tests/tmachine/Cargo.toml --all-targets -- -D warnings", "cargo clippy --manifest-path tests/runner/Cargo.toml --all-targets -- -D warnings", "cargo clippy --manifest-path tests/suites/conformance/Cargo.toml --workspace --all-targets -- -D warnings", + "cargo clippy --manifest-path tests/suites/drivers/docker/Cargo.toml --workspace --all-targets -- -D warnings", "cargo clippy --manifest-path tests/suites/drivers/podman/Cargo.toml --workspace --all-targets -- -D warnings", "cargo clippy --manifest-path tests/suites/features/Cargo.toml --workspace --all-targets -- -D warnings", "cargo clippy --manifest-path tests/support/Cargo.toml --all-targets -- -D warnings", @@ -59,6 +60,7 @@ run = [ "cargo fmt --manifest-path tests/tmachine/Cargo.toml --all", "cargo fmt --manifest-path tests/runner/Cargo.toml --all", "cargo fmt --manifest-path tests/suites/conformance/Cargo.toml --all", + "cargo fmt --manifest-path tests/suites/drivers/docker/Cargo.toml --all", "cargo fmt --manifest-path tests/suites/drivers/podman/Cargo.toml --all", "cargo fmt --manifest-path tests/suites/features/Cargo.toml --all", "cargo fmt --manifest-path tests/support/Cargo.toml --all", @@ -77,6 +79,7 @@ run = [ "cargo fmt --manifest-path tests/tmachine/Cargo.toml --all -- --check", "cargo fmt --manifest-path tests/runner/Cargo.toml --all -- --check", "cargo fmt --manifest-path tests/suites/conformance/Cargo.toml --all -- --check", + "cargo fmt --manifest-path tests/suites/drivers/docker/Cargo.toml --all -- --check", "cargo fmt --manifest-path tests/suites/drivers/podman/Cargo.toml --all -- --check", "cargo fmt --manifest-path tests/suites/features/Cargo.toml --all -- --check", "cargo fmt --manifest-path tests/support/Cargo.toml --all -- --check", diff --git a/tasks/scripts/check_cargo_lockfile_alignment.py b/tasks/scripts/check_cargo_lockfile_alignment.py index b442c3b5c1..dc0755af5a 100644 --- a/tasks/scripts/check_cargo_lockfile_alignment.py +++ b/tasks/scripts/check_cargo_lockfile_alignment.py @@ -38,6 +38,7 @@ "tests/support", "tests/testkit", "tests/suites/conformance", + "tests/suites/drivers/docker", "tests/suites/drivers/podman", "tests/suites/features", ) diff --git a/tests/suites/conformance/src/lifecycle.rs b/tests/suites/conformance/src/lifecycle.rs index 71854d2b52..9510c9365f 100644 --- a/tests/suites/conformance/src/lifecycle.rs +++ b/tests/suites/conformance/src/lifecycle.rs @@ -395,9 +395,11 @@ const EPHEMERAL_CLEANUP_TIMEOUT: Duration = Duration::from_secs(60); /// command exits, whether the command succeeds or fails. /// /// This checks only what the gateway shows: get and list stop returning the -/// sandbox. Conformance can't see driver resources, so the check that the -/// driver removed its containers, pods or VM state stays in the legacy -/// `e2e/rust/tests/ephemeral_cleanup.rs` until the driver suites replace it. +/// sandbox. Conformance can't see driver resources: the Docker and Podman +/// driver suites (`tests/suites/drivers/{docker,podman}`) check that the +/// driver removed its containers, and the legacy +/// `e2e/rust/tests/ephemeral_cleanup.rs` still checks Kubernetes pods and VM +/// state. #[testkit::test] async fn detached_no_keep_sandbox_is_removed_after_main_exits(cx: &mut Context) -> testkit::Result { let mut sandboxes = Vec::new(); diff --git a/tests/suites/drivers/docker/Cargo.lock b/tests/suites/drivers/docker/Cargo.lock new file mode 100644 index 0000000000..115767c16f --- /dev/null +++ b/tests/suites/drivers/docker/Cargo.lock @@ -0,0 +1,4649 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "addr2line" +version = "0.25.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b5d307320b3181d6d7954e663bd7c774a838b8220fe0593c86d9fb09f498b4b" +dependencies = [ + "gimli", +] + +[[package]] +name = "adler2" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa" + +[[package]] +name = "ahash" +version = "0.8.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a15f179cd60c4584b8a8c596927aadc462e27f2ca70c04e0071964a73ba7a75" +dependencies = [ + "cfg-if", + "getrandom 0.3.4", + "once_cell", + "version_check", + "zerocopy", +] + +[[package]] +name = "aho-corasick" +version = "1.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ddd31a130427c27518df266943a5308ed92d4b226cc639f5a8f1002816174301" +dependencies = [ + "memchr", +] + +[[package]] +name = "allocator-api2" +version = "0.2.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923" + +[[package]] +name = "android_system_properties" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" +dependencies = [ + "libc", +] + +[[package]] +name = "anstream" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "824a212faf96e9acacdbd09febd34438f8f711fb84e09a8916013cd7815ca28d" +dependencies = [ + "anstyle", + "anstyle-parse", + "anstyle-query", + "anstyle-wincon", + "colorchoice", + "is_terminal_polyfill", + "utf8parse", +] + +[[package]] +name = "anstyle" +version = "1.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "940b3a0ca603d1eade50a4846a2afffd5ef57a9feac2c0e2ec2e14f9ead76000" + +[[package]] +name = "anstyle-parse" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52ce7f38b242319f7cabaa6813055467063ecdc9d355bbb4ce0c68908cd8130e" +dependencies = [ + "utf8parse", +] + +[[package]] +name = "anstyle-query" +version = "1.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "40c48f72fd53cd289104fc64099abca73db4166ad86ea0b4341abe65af83dadc" +dependencies = [ + "windows-sys 0.61.2", +] + +[[package]] +name = "anstyle-wincon" +version = "3.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "291e6a250ff86cd4a820112fb8898808a366d8f9f58ce16d1f538353ad55747d" +dependencies = [ + "anstyle", + "once_cell_polyfill", + "windows-sys 0.61.2", +] + +[[package]] +name = "anyhow" +version = "1.0.104" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "330a5ed07fa54e4702c9d6c4174f74427fc0ef6e214bbd677ae50a5099946470" + +[[package]] +name = "asn1-rs" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b7f43a50ac4fdca5df8e885c21b835997f0a1cdee65494a6847694a98652d9d8" +dependencies = [ + "asn1-rs-derive", + "asn1-rs-impl", + "displaydoc", + "nom", + "num-traits", + "rusticata-macros", + "thiserror 2.0.20", + "time", +] + +[[package]] +name = "asn1-rs-derive" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3109e49b1e4909e9db6515a30c633684d68cdeaa252f215214cb4fa1a5bfee2c" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.117", + "synstructure", +] + +[[package]] +name = "asn1-rs-impl" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b18050c2cd6fe86c3a76584ef5e0baf286d038cda203eb6223df2cc413565f7" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.117", +] + +[[package]] +name = "async-broadcast" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "435a87a52755b8f27fcf321ac4f04b2802e337c8c4872923137471ec39c37532" +dependencies = [ + "event-listener", + "event-listener-strategy", + "futures-core", + "pin-project-lite", +] + +[[package]] +name = "async-stream" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b5a71a6f37880a80d1d7f19efd781e4b5de42c88f0722cc13bcb6cc2cfe8476" +dependencies = [ + "async-stream-impl", + "futures-core", + "pin-project-lite", +] + +[[package]] +name = "async-stream-impl" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7c24de15d275a1ecfd47a380fb4d5ec9bfe0933f309ed5e705b775596a3574d" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.117", +] + +[[package]] +name = "async-trait" +version = "0.1.89" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9035ad2d096bed7955a320ee7e2230574d28fd3c3a0f186cbea1ff3c7eed5dbb" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.117", +] + +[[package]] +name = "atoi" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f28d99ec8bfea296261ca1af174f24225171fea9664ba9003cbebee704810528" +dependencies = [ + "num-traits", +] + +[[package]] +name = "atomic-waker" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" + +[[package]] +name = "autocfg" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" + +[[package]] +name = "aws-lc-rs" +version = "1.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce2b2dcc879c3bae0d371e77c99f2238400ef24ec001394befa67b6e543add9e" +dependencies = [ + "aws-lc-sys", + "untrusted 0.7.1", + "zeroize", +] + +[[package]] +name = "aws-lc-sys" +version = "0.44.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f09fae7be8bb3174e05c6afdb34199e6dc0c7c04ba9fa237b1967adfbde27483" +dependencies = [ + "cc", + "cmake", + "dunce", + "fs_extra", + "pkg-config", +] + +[[package]] +name = "axum" +version = "0.8.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "31b698c5f9a010f6573133b09e0de5408834d0c82f8d7475a89fc1867a71cd90" +dependencies = [ + "axum-core", + "bytes", + "futures-util", + "http", + "http-body", + "http-body-util", + "itoa", + "matchit", + "memchr", + "mime", + "percent-encoding", + "pin-project-lite", + "serde_core", + "sync_wrapper", + "tower", + "tower-layer", + "tower-service", +] + +[[package]] +name = "axum-core" +version = "0.5.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08c78f31d7b1291f7ee735c1c6780ccde7785daae9a9206026862dab7d8792d1" +dependencies = [ + "bytes", + "futures-core", + "http", + "http-body", + "http-body-util", + "mime", + "pin-project-lite", + "sync_wrapper", + "tower-layer", + "tower-service", +] + +[[package]] +name = "backon" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cffb0e931875b666fc4fcb20fee52e9bbd1ef836fd9e9e04ec21555f9f85f7ef" +dependencies = [ + "fastrand", + "gloo-timers", + "tokio", +] + +[[package]] +name = "backtrace" +version = "0.3.76" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb531853791a215d7c62a30daf0dde835f381ab5de4589cfe7c649d2cbe92bd6" +dependencies = [ + "addr2line", + "cfg-if", + "libc", + "miniz_oxide", + "object", + "rustc-demangle", + "windows-link", +] + +[[package]] +name = "backtrace-ext" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "537beee3be4a18fb023b570f80e3ae28003db9167a751266b259926e25539d50" +dependencies = [ + "backtrace", +] + +[[package]] +name = "base64" +version = "0.22.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" + +[[package]] +name = "base64" +version = "0.23.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac07cdecf99051d9a5238b80f35af32cdeba5b336e55d957b318b50137e18da5" + +[[package]] +name = "bit-vec" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b71798fca2c1fe1086445a7258a4bc81e6e49dcd24c8d0dd9a1e57395b603f51" +dependencies = [ + "serde", +] + +[[package]] +name = "bitflags" +version = "2.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ded4057c258ba199e2d26386d3af3780957ecaee6c4ef4041c6b4b8b97c0b06" +dependencies = [ + "serde_core", +] + +[[package]] +name = "block-buffer" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" +dependencies = [ + "generic-array", +] + +[[package]] +name = "block-buffer" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cdd35008169921d80bc60d3d0ab416eecb028c4cd653352907921d95084790be" +dependencies = [ + "hybrid-array", +] + +[[package]] +name = "bumpalo" +version = "3.20.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d20789868f4b01b2f2caec9f5c4e0213b41e3e5702a50157d699ae31ced2fcb" + +[[package]] +name = "byteorder" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" + +[[package]] +name = "bytes" +version = "1.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc652a48c352aef3ea3aed32080501cf3ef6ed5da78602a020c991775b0aff04" + +[[package]] +name = "cc" +version = "1.2.60" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43c5703da9466b66a946814e1adf53ea2c90f10063b86290cc9eb67ce3478a20" +dependencies = [ + "find-msvc-tools", + "jobserver", + "libc", + "shlex", +] + +[[package]] +name = "cfg-if" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801" + +[[package]] +name = "cfg_aliases" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" + +[[package]] +name = "chacha20" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "65c35e4b699c7e15ccbe7ee35c005e4fc0a278d22238a2857e6ce2dadeda1b06" +dependencies = [ + "cfg-if", + "cpufeatures 0.3.0", + "rand_core 0.10.1", +] + +[[package]] +name = "chrono" +version = "0.4.45" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1aa79e62e7697b8e29b513a68abacf485adcd1fe8284a4316c5ae868e6633327" +dependencies = [ + "iana-time-zone", + "js-sys", + "num-traits", + "serde", + "wasm-bindgen", + "windows-link", +] + +[[package]] +name = "clap" +version = "4.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ddb117e43bbf7dacf0a4190fef4d345b9bad68dfc649cb349e7d17d28428e51" +dependencies = [ + "clap_builder", + "clap_derive", +] + +[[package]] +name = "clap_builder" +version = "4.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "714a53001bf66416adb0e2ef5ac857140e7dc3a0c48fb28b2f10762fc4b5069f" +dependencies = [ + "anstream", + "anstyle", + "clap_lex", + "strsim", +] + +[[package]] +name = "clap_derive" +version = "4.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2ce8604710f6733aa641a2b3731eaa1e8b3d9973d5e3565da11800813f997a9" +dependencies = [ + "heck", + "proc-macro2", + "quote", + "syn 2.0.117", +] + +[[package]] +name = "clap_lex" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8d4a3bb8b1e0c1050499d1815f5ab16d04f0959b233085fb31653fbfc9d98f9" + +[[package]] +name = "cmake" +version = "0.1.58" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0f78a02292a74a88ac736019ab962ece0bc380e3f977bf72e376c5d78ff0678" +dependencies = [ + "cc", +] + +[[package]] +name = "cmov" +version = "0.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c9ea0ac24bc397ab3c98583a3c9ba74fa56b09a4449bbe172b9b1ddb016027a" + +[[package]] +name = "colorchoice" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d07550c9036bf2ae0c684c4297d503f838287c83c53686d05370d0e139ae570" + +[[package]] +name = "combine" +version = "4.6.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba5a308b75df32fe02788e748662718f03fde005016435c444eea572398219fd" +dependencies = [ + "bytes", + "memchr", +] + +[[package]] +name = "concurrent-queue" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ca0197aee26d1ae37445ee532fefce43251d24cc7c166799f4d46817f1d3973" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "container-engine-support" +version = "0.0.0" +dependencies = [ + "openshell-testkit", + "tempfile", + "tokio", +] + +[[package]] +name = "core-foundation" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2a6cd9ae233e7f62ba4e9353e81a88df7fc8a5987b8d445b4d90c879bd156f6" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "core-foundation-sys" +version = "0.8.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" + +[[package]] +name = "cpufeatures" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280" +dependencies = [ + "libc", +] + +[[package]] +name = "cpufeatures" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b2a41393f66f16b0823bb79094d54ac5fbd34ab292ddafb9a0456ac9f87d201" +dependencies = [ + "libc", +] + +[[package]] +name = "crc" +version = "3.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5eb8a2a1cd12ab0d987a5d5e825195d372001a4094a0376319d5a0ad71c1ba0d" +dependencies = [ + "crc-catalog", +] + +[[package]] +name = "crc-catalog" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19d374276b40fb8bbdee95aef7c7fa6b5316ec764510eb64b8dd0e2ed0d7e7f5" + +[[package]] +name = "critical-section" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "790eea4361631c5e7d22598ecd5723ff611904e3344ce8720784c93e3d83d40b" + +[[package]] +name = "crossbeam-queue" +version = "0.3.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f58bbc28f91df819d0aa2a2c00cd19754769c2fad90579b3592b1c9ba7a3115" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-utils" +version = "0.8.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" + +[[package]] +name = "crypto-common" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78c8292055d1c1df0cce5d180393dc8cce0abec0a7102adb6c7b1eef6016d60a" +dependencies = [ + "generic-array", + "typenum", +] + +[[package]] +name = "crypto-common" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce6e4c961d6cd6c9a86db418387425e8bdeaf05b3c8bc1411e6dca4c252f1453" +dependencies = [ + "hybrid-array", +] + +[[package]] +name = "ctutils" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe3e9d21d39e6f39ff46e03d5b621424f88ee23d8a1672c6bfc9ccc7f2da4f6a" +dependencies = [ + "cmov", +] + +[[package]] +name = "darling" +version = "0.20.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc7f46116c46ff9ab3eb1597a45688b6715c6e628b5c133e288e709a29bcb4ee" +dependencies = [ + "darling_core", + "darling_macro", +] + +[[package]] +name = "darling_core" +version = "0.20.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d00b9596d185e565c2207a0b01f8bd1a135483d02d9b7b0a54b11da8d53412e" +dependencies = [ + "fnv", + "ident_case", + "proc-macro2", + "quote", + "strsim", + "syn 2.0.117", +] + +[[package]] +name = "darling_macro" +version = "0.20.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc34b93ccb385b40dc71c6fceac4b2ad23662c7eeb248cf10d529b7e055b6ead" +dependencies = [ + "darling_core", + "quote", + "syn 2.0.117", +] + +[[package]] +name = "data-encoding" +version = "2.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d7a1e2f27636f116493b8b860f5546edb47c8d8f8ea73e1d2a20be88e28d1fea" + +[[package]] +name = "der-parser" +version = "10.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07da5016415d5a3c4dd39b11ed26f915f52fc4e0dc197d87908bc916e51bc1a6" +dependencies = [ + "asn1-rs", + "displaydoc", + "nom", + "num-bigint", + "num-traits", + "rusticata-macros", +] + +[[package]] +name = "deranged" +version = "0.5.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7cd812cc2bc1d69d4764bd80df88b4317eaef9e773c75226407d9bc0876b211c" +dependencies = [ + "powerfmt", +] + +[[package]] +name = "digest" +version = "0.10.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" +dependencies = [ + "block-buffer 0.10.4", + "crypto-common 0.1.7", +] + +[[package]] +name = "digest" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4850db49bf08e663084f7fb5c87d202ef91a3907271aff24a94eb97ff039153c" +dependencies = [ + "block-buffer 0.12.0", + "crypto-common 0.2.2", + "ctutils", +] + +[[package]] +name = "displaydoc" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.117", +] + +[[package]] +name = "docker" +version = "0.0.0" +dependencies = [ + "container-engine-support", + "openshell-testkit", +] + +[[package]] +name = "dotenvy" +version = "0.15.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1aaf95b3e5c8f23aa320147307562d361db0ae0d51242340f558153b4eb2439b" + +[[package]] +name = "dunce" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92773504d58c093f6de2459af4af33faa518c13451eb8f2b5698ed3d36e7c813" + +[[package]] +name = "dyn-clone" +version = "1.0.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d0881ea181b1df73ff77ffaaf9c7544ecc11e82fba9b5f27b262a3c73a332555" + +[[package]] +name = "educe" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d7bc049e1bd8cdeb31b68bbd586a9464ecf9f3944af3958a7a9d0f8b9799417" +dependencies = [ + "enum-ordinalize", + "proc-macro2", + "quote", + "syn 2.0.117", +] + +[[package]] +name = "either" +version = "1.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719" +dependencies = [ + "serde", +] + +[[package]] +name = "enum-ordinalize" +version = "4.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "89dd01549b09589510cf0647475075d12071456586d70f5c75c98ae2a5537677" +dependencies = [ + "enum-ordinalize-derive", +] + +[[package]] +name = "enum-ordinalize-derive" +version = "4.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a65863d15a4ce2888bd2f0f543cc963d3879c3a022c8ee43f6141d479a3ac815" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.5", +] + +[[package]] +name = "equivalent" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" + +[[package]] +name = "errno" +version = "0.3.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" +dependencies = [ + "libc", + "windows-sys 0.61.2", +] + +[[package]] +name = "escape8259" +version = "0.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f1f0d310082fd5de539d4f41601182241147498444a7695c520288a0cdbead6" + +[[package]] +name = "etcetera" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "de48cc4d1c1d97a20fd819def54b890cadde72ed3ad0c614822a0a433361be96" +dependencies = [ + "cfg-if", + "windows-sys 0.61.2", +] + +[[package]] +name = "event-listener" +version = "5.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e13b66accf52311f30a0db42147dadea9850cb48cd070028831ae5f5d4b856ab" +dependencies = [ + "concurrent-queue", + "parking", + "pin-project-lite", +] + +[[package]] +name = "event-listener-strategy" +version = "0.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8be9f3dfaaffdae2972880079a491a1a8bb7cbed0b8dd7a347f668b4150a3b93" +dependencies = [ + "event-listener", + "pin-project-lite", +] + +[[package]] +name = "fastrand" +version = "2.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f1f227452a390804cdb637b74a86990f2a7d7ba4b7d5693aac9b4dd6defd8d6" + +[[package]] +name = "find-msvc-tools" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5baebc0774151f905a1a2cc41989300b1e6fbb29aff0ceffa1064fdd3088d582" + +[[package]] +name = "fixedbitset" +version = "0.5.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d674e81391d1e1ab681a28d99df07927c6d4aa5b027d7da16ba32d1d21ecd99" + +[[package]] +name = "flume" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e139bc46ca777eb5efaf62df0ab8cc5fd400866427e56c68b22e414e53bd3be" +dependencies = [ + "futures-core", + "futures-sink", + "spin", +] + +[[package]] +name = "fnv" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" + +[[package]] +name = "foldhash" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2" + +[[package]] +name = "foldhash" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77ce24cb58228fbb8aa041425bb1050850ac19177686ea6e0f41a70416f56fdb" + +[[package]] +name = "form_urlencoded" +version = "1.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb4cb245038516f5f85277875cdaa4f7d2c9a0fa0468de06ed190163b1581fcf" +dependencies = [ + "percent-encoding", +] + +[[package]] +name = "fs_extra" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42703706b716c37f96a77aea830392ad231f44c9e9a67872fa5548707e11b11c" + +[[package]] +name = "futures" +version = "0.3.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b147ee9d1f6d097cef9ce628cd2ee62288d963e16fb287bd9286455b241382d" +dependencies = [ + "futures-channel", + "futures-core", + "futures-executor", + "futures-io", + "futures-sink", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-channel" +version = "0.3.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07bbe89c50d7a535e539b8c17bc0b49bdb77747034daa8087407d655f3f7cc1d" +dependencies = [ + "futures-core", + "futures-sink", +] + +[[package]] +name = "futures-core" +version = "0.3.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e3450815272ef58cec6d564423f6e755e25379b217b0bc688e295ba24df6b1d" + +[[package]] +name = "futures-executor" +version = "0.3.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baf29c38818342a3b26b5b923639e7b1f4a61fc5e76102d4b1981c6dc7a7579d" +dependencies = [ + "futures-core", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-intrusive" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d930c203dd0b6ff06e0201a4a2fe9149b43c684fd4420555b26d21b1a02956f" +dependencies = [ + "futures-core", + "lock_api", + "parking_lot", +] + +[[package]] +name = "futures-io" +version = "0.3.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cecba35d7ad927e23624b22ad55235f2239cfa44fd10428eecbeba6d6a717718" + +[[package]] +name = "futures-macro" +version = "0.3.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e835b70203e41293343137df5c0664546da5745f82ec9b84d40be8336958447b" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.117", +] + +[[package]] +name = "futures-sink" +version = "0.3.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c39754e157331b013978ec91992bde1ac089843443c49cbc7f46150b0fad0893" + +[[package]] +name = "futures-task" +version = "0.3.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "037711b3d59c33004d3856fbdc83b99d4ff37a24768fa1be9ce3538a1cde4393" + +[[package]] +name = "futures-util" +version = "0.3.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "389ca41296e6190b48053de0321d02a77f32f8a5d2461dd38762c0593805c6d6" +dependencies = [ + "futures-channel", + "futures-core", + "futures-io", + "futures-macro", + "futures-sink", + "futures-task", + "memchr", + "pin-project-lite", + "slab", +] + +[[package]] +name = "generic-array" +version = "0.14.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" +dependencies = [ + "typenum", + "version_check", +] + +[[package]] +name = "getrandom" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff2abc00be7fca6ebc474524697ae276ad847ad0a6b3faa4bcb027e9a4614ad0" +dependencies = [ + "cfg-if", + "js-sys", + "libc", + "wasi", + "wasm-bindgen", +] + +[[package]] +name = "getrandom" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd" +dependencies = [ + "cfg-if", + "libc", + "r-efi 5.3.0", + "wasip2", +] + +[[package]] +name = "getrandom" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0de51e6874e94e7bf76d726fc5d13ba782deca734ff60d5bb2fb2607c7406555" +dependencies = [ + "cfg-if", + "libc", + "r-efi 6.0.0", + "rand_core 0.10.1", + "wasip2", + "wasip3", +] + +[[package]] +name = "gimli" +version = "0.32.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e629b9b98ef3dd8afe6ca2bd0f89306cec16d43d907889945bc5d6687f2f13c7" + +[[package]] +name = "glob" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0cc23270f6e1808e30a928bdc84dea0b9b4136a8bc82338574f23baf47bbd280" + +[[package]] +name = "gloo-timers" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbb143cf96099802033e0d4f4963b19fd2e0b728bcf076cd9cf7f6634f092994" +dependencies = [ + "futures-channel", + "futures-core", + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "h2" +version = "0.4.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef8e5e5a340588f4452631496976cf8636d4a7ecf600239fdc27615d2530bc16" +dependencies = [ + "atomic-waker", + "bytes", + "fnv", + "futures-core", + "futures-sink", + "http", + "indexmap", + "slab", + "tokio", + "tokio-util", + "tracing", +] + +[[package]] +name = "hashbrown" +version = "0.15.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9229cfe53dfd69f0609a49f65461bd93001ea1ef889cd5529dd176593f5338a1" +dependencies = [ + "allocator-api2", + "equivalent", + "foldhash 0.1.5", +] + +[[package]] +name = "hashbrown" +version = "0.16.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "841d1cc9bed7f9236f321df977030373f4a4163ae1a7dbfe1a51a2c1a51d9100" +dependencies = [ + "allocator-api2", + "equivalent", + "foldhash 0.2.0", +] + +[[package]] +name = "hashbrown" +version = "0.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4f467dd6dccf739c208452f8014c75c18bb8301b050ad1cfb27153803edb0f51" + +[[package]] +name = "hashlink" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "824e001ac4f3012dd16a264bec811403a67ca9deb6c102fc5049b32c4574b35f" +dependencies = [ + "hashbrown 0.16.1", +] + +[[package]] +name = "headers" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b3314d5adb5d94bcdf56771f2e50dbbc80bb4bdf88967526706205ac9eff24eb" +dependencies = [ + "base64 0.22.1", + "bytes", + "headers-core", + "http", + "httpdate", + "mime", + "sha1 0.10.6", +] + +[[package]] +name = "headers-core" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "54b4a22553d4242c49fddb9ba998a99962b5cc6f22cb5a3482bec22522403ce4" +dependencies = [ + "http", +] + +[[package]] +name = "heck" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" + +[[package]] +name = "hex" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" + +[[package]] +name = "hickory-proto" +version = "0.26.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e2da0694c15b44c6f68a6b05e0233617008c54080e31d6eb848d858a9c5b38d" +dependencies = [ + "data-encoding", + "idna", + "ipnet", + "jni", + "once_cell", + "rand 0.10.2", + "ring", + "thiserror 2.0.20", + "tinyvec", + "tracing", + "url", +] + +[[package]] +name = "hkdf" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4aaa26c720c68b866f2c96ef5c1264b3e6f473fe5d4ce61cd44bbe913e553018" +dependencies = [ + "hmac", +] + +[[package]] +name = "hmac" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6303bc9732ae41b04cb554b844a762b4115a61bfaa81e3e83050991eeb56863f" +dependencies = [ + "digest 0.11.2", +] + +[[package]] +name = "home" +version = "0.5.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc627f471c528ff0c4a49e1d5e60450c8f6461dd6d10ba9dcd3a61d3dff7728d" +dependencies = [ + "windows-sys 0.61.2", +] + +[[package]] +name = "hostname" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "617aaa3557aef3810a6369d0a99fac8a080891b68bd9f9812a1eeda0c0730cbd" +dependencies = [ + "cfg-if", + "libc", + "windows-link", +] + +[[package]] +name = "http" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3ba2a386d7f85a81f119ad7498ebe444d2e22c2af0b86b069416ace48b3311a" +dependencies = [ + "bytes", + "itoa", +] + +[[package]] +name = "http-body" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" +dependencies = [ + "bytes", + "http", +] + +[[package]] +name = "http-body-util" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b021d93e26becf5dc7e1b75b1bed1fd93124b374ceb73f43d4d4eafec896a64a" +dependencies = [ + "bytes", + "futures-core", + "http", + "http-body", + "pin-project-lite", +] + +[[package]] +name = "httparse" +version = "1.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87" + +[[package]] +name = "httpdate" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" + +[[package]] +name = "hybrid-array" +version = "0.4.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "707114b52a152fa7bdb290cd7cd5912d9467273b6d74e21b8d81aca1f8533f6b" +dependencies = [ + "typenum", +] + +[[package]] +name = "hyper" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6299f016b246a94207e63da54dbe807655bf9e00044f73ded42c3ac5305fbcca" +dependencies = [ + "atomic-waker", + "bytes", + "futures-channel", + "futures-core", + "h2", + "http", + "http-body", + "httparse", + "httpdate", + "itoa", + "pin-project-lite", + "smallvec", + "tokio", + "want", +] + +[[package]] +name = "hyper-http-proxy" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd1d471ea2f65ba45eddb1d6ab7d58ac2671d2d4ac14da5c6516ae1d97e1327a" +dependencies = [ + "bytes", + "futures-util", + "headers", + "http", + "hyper", + "hyper-rustls", + "hyper-util", + "pin-project-lite", + "tokio", + "tokio-rustls", + "tower-service", +] + +[[package]] +name = "hyper-rustls" +version = "0.27.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33ca68d021ef39cf6463ab54c1d0f5daf03377b70561305bb89a8f83aab66e0f" +dependencies = [ + "http", + "hyper", + "hyper-util", + "log", + "rustls", + "rustls-native-certs", + "tokio", + "tokio-rustls", + "tower-service", +] + +[[package]] +name = "hyper-timeout" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b90d566bffbce6a75bd8b09a05aa8c2cb1fabb6cb348f8840c9e4c90a0d83b0" +dependencies = [ + "hyper", + "hyper-util", + "pin-project-lite", + "tokio", + "tower-service", +] + +[[package]] +name = "hyper-util" +version = "0.1.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96547c2556ec9d12fb1578c4eaf448b04993e7fb79cbaad930a656880a6bdfa0" +dependencies = [ + "base64 0.22.1", + "bytes", + "futures-channel", + "futures-util", + "http", + "http-body", + "hyper", + "ipnet", + "libc", + "percent-encoding", + "pin-project-lite", + "socket2", + "tokio", + "tower-service", + "tracing", +] + +[[package]] +name = "iana-time-zone" +version = "0.1.65" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e31bc9ad994ba00e440a8aa5c9ef0ec67d5cb5e5cb0cc7f8b744a35b389cc470" +dependencies = [ + "android_system_properties", + "core-foundation-sys", + "iana-time-zone-haiku", + "js-sys", + "log", + "wasm-bindgen", + "windows-core", +] + +[[package]] +name = "iana-time-zone-haiku" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" +dependencies = [ + "cc", +] + +[[package]] +name = "icu_collections" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2984d1cd16c883d7935b9e07e44071dca8d917fd52ecc02c04d5fa0b5a3f191c" +dependencies = [ + "displaydoc", + "potential_utf", + "utf8_iter", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_locale_core" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92219b62b3e2b4d88ac5119f8904c10f8f61bf7e95b640d25ba3075e6cac2c29" +dependencies = [ + "displaydoc", + "litemap", + "tinystr", + "writeable", + "zerovec", +] + +[[package]] +name = "icu_normalizer" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c56e5ee99d6e3d33bd91c5d85458b6005a22140021cc324cea84dd0e72cff3b4" +dependencies = [ + "icu_collections", + "icu_normalizer_data", + "icu_properties", + "icu_provider", + "smallvec", + "zerovec", +] + +[[package]] +name = "icu_normalizer_data" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da3be0ae77ea334f4da67c12f149704f19f81d1adf7c51cf482943e84a2bad38" + +[[package]] +name = "icu_properties" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bee3b67d0ea5c2cca5003417989af8996f8604e34fb9ddf96208a033901e70de" +dependencies = [ + "icu_collections", + "icu_locale_core", + "icu_properties_data", + "icu_provider", + "zerotrie", + "zerovec", +] + +[[package]] +name = "icu_properties_data" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e2bbb201e0c04f7b4b3e14382af113e17ba4f63e2c9d2ee626b720cbce54a14" + +[[package]] +name = "icu_provider" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "139c4cf31c8b5f33d7e199446eff9c1e02decfc2f0eec2c8d71f65befa45b421" +dependencies = [ + "displaydoc", + "icu_locale_core", + "writeable", + "yoke", + "zerofrom", + "zerotrie", + "zerovec", +] + +[[package]] +name = "id-arena" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d3067d79b975e8844ca9eb072e16b31c3c1c36928edf9c6789548c524d0d954" + +[[package]] +name = "ident_case" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" + +[[package]] +name = "idna" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b0875f23caa03898994f6ddc501886a45c7d3d62d04d2d90788d47be1b1e4de" +dependencies = [ + "idna_adapter", + "smallvec", + "utf8_iter", +] + +[[package]] +name = "idna_adapter" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3acae9609540aa318d1bc588455225fb2085b9ed0c4f6bd0d9d5bcd86f1a0344" +dependencies = [ + "icu_normalizer", + "icu_properties", +] + +[[package]] +name = "indexmap" +version = "2.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d466e9454f08e4a911e14806c24e16fba1b4c121d1ea474396f396069cf949d9" +dependencies = [ + "equivalent", + "hashbrown 0.17.0", + "serde", + "serde_core", +] + +[[package]] +name = "ipnet" +version = "2.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d98f6fed1fde3f8c21bc40a1abb88dd75e67924f9cffc3ef95607bad8017f8e2" + +[[package]] +name = "iri-string" +version = "0.7.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "25e659a4bb38e810ebc252e53b5814ff908a8c58c2a9ce2fae1bbec24cbf4e20" +dependencies = [ + "memchr", + "serde", +] + +[[package]] +name = "is_ci" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7655c9839580ee829dfacba1d1278c2b7883e50a277ff7541299489d6bdfdc45" + +[[package]] +name = "is_terminal_polyfill" +version = "1.70.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a6cb138bb79a146c1bd460005623e142ef0181e3d0219cb493e02f7d08a35695" + +[[package]] +name = "itertools" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b192c782037fadd9cfa75548310488aabdbf3d2da73885b31bd0abd03351285" +dependencies = [ + "either", +] + +[[package]] +name = "itoa" +version = "1.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682" + +[[package]] +name = "jni" +version = "0.22.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5efd9a482cf3a427f00d6b35f14332adc7902ce91efb778580e180ff90fa3498" +dependencies = [ + "cfg-if", + "combine", + "jni-macros", + "jni-sys", + "log", + "simd_cesu8", + "thiserror 2.0.20", + "walkdir", + "windows-link", +] + +[[package]] +name = "jni-macros" +version = "0.22.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a00109accc170f0bdb141fed3e393c565b6f5e072365c3bd58f5b062591560a3" +dependencies = [ + "proc-macro2", + "quote", + "rustc_version", + "simd_cesu8", + "syn 2.0.117", +] + +[[package]] +name = "jni-sys" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6377a88cb3910bee9b0fa88d4f42e1d2da8e79915598f65fb0c7ee14c878af2" +dependencies = [ + "jni-sys-macros", +] + +[[package]] +name = "jni-sys-macros" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38c0b942f458fe50cdac086d2f946512305e5631e720728f2a61aabcd47a6264" +dependencies = [ + "quote", + "syn 2.0.117", +] + +[[package]] +name = "jobserver" +version = "0.1.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9afb3de4395d6b3e67a780b6de64b51c978ecf11cb9a462c66be7d4ca9039d33" +dependencies = [ + "getrandom 0.3.4", + "libc", +] + +[[package]] +name = "js-sys" +version = "0.3.105" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce57d20d1ea864ce2ac172ab472d409214f4fd359f0b2a2775abdf522e2af99e" +dependencies = [ + "cfg-if", + "futures-util", + "wasm-bindgen", +] + +[[package]] +name = "json-patch" +version = "4.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7421438de105a0827e44fadd05377727847d717c80ce29a229f85fd04c427b72" +dependencies = [ + "jsonptr", + "serde", + "serde_json", + "thiserror 2.0.20", +] + +[[package]] +name = "jsonpath-rust" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c00ae348f9f8fd2d09f82a98ca381c60df9e0820d8d79fce43e649b4dc3128b" +dependencies = [ + "pest", + "pest_derive", + "regex", + "serde_json", + "thiserror 2.0.20", +] + +[[package]] +name = "jsonptr" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a5a3cc660ba5d72bce0b3bb295bf20847ccbb40fd423f3f05b61273672e561fe" +dependencies = [ + "serde", + "serde_json", +] + +[[package]] +name = "jsonwebtoken" +version = "10.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0529410abe238729a60b108898784df8984c87f6054c9c4fcacc47e4803c1ce1" +dependencies = [ + "aws-lc-rs", + "base64 0.22.1", + "getrandom 0.2.17", + "js-sys", + "pem 3.0.6", + "serde", + "serde_json", + "signature", + "simple_asn1", +] + +[[package]] +name = "k8s-openapi" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c75b990324f09bef15e791606b7b7a296d02fc88a344f6eba9390970a870ad5" +dependencies = [ + "base64 0.22.1", + "chrono", + "serde", + "serde-value", + "serde_json", +] + +[[package]] +name = "kube" +version = "0.99.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a4eb20010536b48abe97fec37d23d43069bcbe9686adcf9932202327bc5ca6e" +dependencies = [ + "k8s-openapi", + "kube-client", + "kube-core", + "kube-derive", + "kube-runtime", +] + +[[package]] +name = "kube-client" +version = "0.99.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7fc2ed952042df20d15ac2fe9614d0ec14b6118eab89633985d4b36e688dccf1" +dependencies = [ + "base64 0.22.1", + "bytes", + "chrono", + "either", + "futures", + "home", + "http", + "http-body", + "http-body-util", + "hyper", + "hyper-http-proxy", + "hyper-rustls", + "hyper-timeout", + "hyper-util", + "jsonpath-rust", + "k8s-openapi", + "kube-core", + "pem 3.0.6", + "rustls", + "secrecy", + "serde", + "serde_json", + "serde_yaml", + "thiserror 2.0.20", + "tokio", + "tokio-util", + "tower", + "tower-http", + "tracing", +] + +[[package]] +name = "kube-core" +version = "0.99.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff0d0793db58e70ca6d689489183816cb3aa481673e7433dc618cf7e8007c675" +dependencies = [ + "chrono", + "form_urlencoded", + "http", + "json-patch", + "k8s-openapi", + "schemars", + "serde", + "serde-value", + "serde_json", + "thiserror 2.0.20", +] + +[[package]] +name = "kube-derive" +version = "0.99.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c562f58dc9f7ca5feac8a6ee5850ca221edd6f04ce0dd2ee873202a88cd494c9" +dependencies = [ + "darling", + "proc-macro2", + "quote", + "serde", + "serde_json", + "syn 2.0.117", +] + +[[package]] +name = "kube-runtime" +version = "0.99.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88f34cfab9b4bd8633062e0e85edb81df23cb09f159f2e31c60b069ae826ffdc" +dependencies = [ + "ahash", + "async-broadcast", + "async-stream", + "async-trait", + "backon", + "educe", + "futures", + "hashbrown 0.15.5", + "hostname", + "json-patch", + "k8s-openapi", + "kube-client", + "parking_lot", + "pin-project", + "serde", + "serde_json", + "thiserror 2.0.20", + "tokio", + "tokio-util", + "tracing", +] + +[[package]] +name = "lazy_static" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" + +[[package]] +name = "leb128fmt" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09edd9e8b54e49e587e4f6295a7d29c3ea94d469cb40ab8ca70b288248a81db2" + +[[package]] +name = "libc" +version = "0.2.189" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3eaf3ede3fee6db1a4c2ee091bf8a8b4dccdc6d17f656fb07896ee72867612f2" + +[[package]] +name = "libm" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6d2cec3eae94f9f509c767b45932f1ada8350c4bdb85af2fcab4a3c14807981" + +[[package]] +name = "libsqlite3-sys" +version = "0.30.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e99fb7a497b1e3339bc746195567ed8d3e24945ecd636e3619d20b9de9e9149" +dependencies = [ + "cc", + "pkg-config", + "vcpkg", +] + +[[package]] +name = "libtest-mimic" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "14e6ba06f0ade6e504aff834d7c34298e5155c6baca353cc6a4aaff2f9fd7f33" +dependencies = [ + "anstream", + "anstyle", + "clap", + "escape8259", +] + +[[package]] +name = "linkme" +version = "0.3.37" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3045e122bd98aef8ec3ad58ce84f0791f64e70163d1a02710af4aa11a4d54cc5" +dependencies = [ + "linkme-impl", +] + +[[package]] +name = "linkme-impl" +version = "0.3.37" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77060ebe535362c3da75682cd17b0431017b6e7c5661e714fc69a7ad017d1301" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.5", +] + +[[package]] +name = "linux-raw-sys" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a66949e030da00e8c7d4434b251670a91556f4144941d37452769c25d58a53" + +[[package]] +name = "litemap" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92daf443525c4cce67b150400bc2316076100ce0b3686209eb8cf3c31612e6f0" + +[[package]] +name = "lock_api" +version = "0.4.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "224399e74b87b5f3557511d98dff8b14089b3dadafcab6bb93eab67d3aace965" +dependencies = [ + "scopeguard", +] + +[[package]] +name = "log" +version = "0.4.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f9f8bd3e56ce4dfc153cf470fffbfa98c7620958b312ca5c3a4b8d5181fd13c6" + +[[package]] +name = "matchit" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "47e1ffaa40ddd1f3ed91f717a33c8c0ee23fff369e3aa8772b9605cc1d22f4c3" + +[[package]] +name = "md-5" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69b6441f590336821bb897fb28fc622898ccceb1d6cea3fde5ea86b090c4de98" +dependencies = [ + "cfg-if", + "digest 0.11.2", +] + +[[package]] +name = "memchr" +version = "2.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8ca58f447f06ed17d5fc4043ce1b10dd205e060fb3ce5b979b8ed8e59ff3f79" + +[[package]] +name = "miette" +version = "7.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f98efec8807c63c752b5bd61f862c165c115b0a35685bdcfd9238c7aeb592b7" +dependencies = [ + "backtrace", + "backtrace-ext", + "cfg-if", + "miette-derive", + "owo-colors", + "supports-color", + "supports-hyperlinks", + "supports-unicode", + "terminal_size", + "textwrap", + "unicode-width 0.1.14", +] + +[[package]] +name = "miette-derive" +version = "7.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db5b29714e950dbb20d5e6f74f9dcec4edbcc1067bb7f8ed198c097b8c1a818b" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.117", +] + +[[package]] +name = "mime" +version = "0.3.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" + +[[package]] +name = "minimal-lexical" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" + +[[package]] +name = "miniz_oxide" +version = "0.8.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fa76a2c86f704bdb222d66965fb3d63269ce38518b83cb0575fca855ebb6316" +dependencies = [ + "adler2", +] + +[[package]] +name = "mio" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50b7e5b27aa02a74bac8c3f23f448f8d87ff11f92d3aac1a6ed369ee08cc56c1" +dependencies = [ + "libc", + "wasi", + "windows-sys 0.61.2", +] + +[[package]] +name = "multimap" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d87ecb2933e8aeadb3e3a02b828fed80a7528047e68b4f424523a0981a3a084" + +[[package]] +name = "newtype-uuid" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fa56da58097c7ae893c4097bb6d91bb5f7fa330053e07e033349db4d5f83ba8" +dependencies = [ + "uuid", +] + +[[package]] +name = "nix" +version = "0.29.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "71e2746dc3a24dd78b3cfcb7be93368c6de9963d30f43a6a73998a9cf4b17b46" +dependencies = [ + "bitflags", + "cfg-if", + "cfg_aliases", + "libc", +] + +[[package]] +name = "nom" +version = "7.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" +dependencies = [ + "memchr", + "minimal-lexical", +] + +[[package]] +name = "noyalib" +version = "0.0.53" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "962838abbd8dd2cd3844d2208dc502458bba6985f8bf1dc21761b30260fcbd7f" +dependencies = [ + "hashbrown 0.17.0", + "indexmap", + "libm", + "memchr", + "rustc-hash", + "serde_core", + "smallvec", +] + +[[package]] +name = "num-bigint" +version = "0.4.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c89e69e7e0f03bea5ef08013795c25018e101932225a656383bd384495ecc367" +dependencies = [ + "num-integer", + "num-traits", +] + +[[package]] +name = "num-conv" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6673768db2d862beb9b39a78fdcb1a69439615d5794a1be50caa9bc92c81967" + +[[package]] +name = "num-integer" +version = "0.1.46" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" +dependencies = [ + "num-traits", +] + +[[package]] +name = "num-traits" +version = "0.2.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" +dependencies = [ + "autocfg", +] + +[[package]] +name = "oauth2" +version = "5.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51e219e79014df21a225b1860a479e2dcd7cbd9130f4defd4bd0e191ea31d67d" +dependencies = [ + "base64 0.22.1", + "chrono", + "getrandom 0.2.17", + "http", + "rand 0.8.6", + "reqwest", + "serde", + "serde_json", + "serde_path_to_error", + "sha2 0.10.9", + "thiserror 1.0.69", + "url", +] + +[[package]] +name = "object" +version = "0.37.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff76201f031d8863c38aa7f905eca4f53abbfa15f609db4277d44cd8938f33fe" +dependencies = [ + "memchr", +] + +[[package]] +name = "oid-registry" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "12f40cff3dde1b6087cc5d5f5d4d65712f34016a03ed60e9c08dcc392736b5b7" +dependencies = [ + "asn1-rs", +] + +[[package]] +name = "once_cell" +version = "1.21.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50" +dependencies = [ + "critical-section", + "portable-atomic", +] + +[[package]] +name = "once_cell_polyfill" +version = "1.70.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "384b8ab6d37215f3c5301a95a4accb5d64aa607f1fcb26a11b5303878451b4fe" + +[[package]] +name = "openshell-bootstrap" +version = "0.0.0" +dependencies = [ + "bytes", + "miette", + "openshell-core", + "openshell-crypto", + "rcgen", + "serde", + "serde_json", + "tempfile", + "tokio", + "tracing", +] + +[[package]] +name = "openshell-core" +version = "0.0.0" +dependencies = [ + "async-trait", + "base64 0.22.1", + "chrono", + "glob", + "ipnet", + "libc", + "miette", + "nix", + "openshell-crypto", + "openshell-extension-core", + "openshell-policy-schema", + "prost", + "prost-types", + "protoc-bin-vendored", + "reqwest", + "rustix", + "rustls", + "serde", + "serde_json", + "sha2 0.10.9", + "thiserror 2.0.20", + "tokio", + "tokio-stream", + "tonic", + "tonic-prost", + "tonic-prost-build", + "tonic-types", + "tracing", + "url", + "uuid", +] + +[[package]] +name = "openshell-crypto" +version = "0.0.0" +dependencies = [ + "aws-lc-rs", + "jsonwebtoken", + "kube", + "pem 3.0.6", + "rcgen", + "rustls", + "serde", + "sqlx", + "thiserror 2.0.20", + "tonic", + "x509-parser", +] + +[[package]] +name = "openshell-extension-core" +version = "0.0.0" +dependencies = [ + "hyper-util", + "serde", + "thiserror 2.0.20", + "tokio", + "tonic", + "tower", +] + +[[package]] +name = "openshell-policy" +version = "0.0.0" +dependencies = [ + "hickory-proto", + "miette", + "openshell-core", + "openshell-policy-schema", + "prost-types", + "serde", + "serde_json", +] + +[[package]] +name = "openshell-policy-schema" +version = "0.0.0" +dependencies = [ + "miette", + "noyalib", + "serde", + "serde_json", + "serde_path_to_error", + "thiserror 2.0.20", +] + +[[package]] +name = "openshell-sdk" +version = "0.0.0" +dependencies = [ + "async-stream", + "async-trait", + "futures", + "hyper", + "hyper-util", + "miette", + "oauth2", + "openshell-core", + "openshell-crypto", + "reqwest", + "rustls", + "serde", + "thiserror 2.0.20", + "tokio", + "tokio-rustls", + "tokio-tungstenite", + "tonic", + "tower", + "tracing", +] + +[[package]] +name = "openshell-testkit" +version = "0.0.0" +dependencies = [ + "clap", + "futures", + "libc", + "libtest-mimic", + "linkme", + "noyalib", + "openshell-bootstrap", + "openshell-core", + "openshell-policy", + "openshell-sdk", + "openshell-testkit-macros", + "prost-types", + "quick-junit", + "rand 0.9.4", + "serde", + "serde_json", + "tempfile", + "tokio", + "tonic", +] + +[[package]] +name = "openshell-testkit-macros" +version = "0.0.0" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.117", +] + +[[package]] +name = "openssl-probe" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c87def4c32ab89d880effc9e097653c8da5d6ef28e6b539d313baaacfbafcbe" + +[[package]] +name = "ordered-float" +version = "2.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68f19d67e5a2795c94e73e0bb1cc1a7edeb2e28efd39e2e1c9b7a40c1108b11c" +dependencies = [ + "num-traits", +] + +[[package]] +name = "owo-colors" +version = "4.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d211803b9b6b570f68772237e415a029d5a50c65d382910b879fb19d3271f94d" + +[[package]] +name = "parking" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f38d5652c16fde515bb1ecef450ab0f6a219d619a7274976324d5e377f7dceba" + +[[package]] +name = "parking_lot" +version = "0.12.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93857453250e3077bd71ff98b6a65ea6621a19bb0f559a85248955ac12c45a1a" +dependencies = [ + "lock_api", + "parking_lot_core", +] + +[[package]] +name = "parking_lot_core" +version = "0.9.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2621685985a2ebf1c516881c026032ac7deafcda1a2c9b7850dc81e3dfcb64c1" +dependencies = [ + "cfg-if", + "libc", + "redox_syscall", + "smallvec", + "windows-link", +] + +[[package]] +name = "pem" +version = "3.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d30c53c26bc5b31a98cd02d20f25a7c8567146caf63ed593a9d87b2775291be" +dependencies = [ + "base64 0.22.1", + "serde_core", +] + +[[package]] +name = "pem" +version = "4.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d354a98a3d1251555de99e8fdd8afda05573c31b82f59063a7b0a29b5527f120" +dependencies = [ + "base64 0.23.1", + "serde_core", +] + +[[package]] +name = "percent-encoding" +version = "2.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" + +[[package]] +name = "pest" +version = "2.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e0848c601009d37dfa3430c4666e147e49cdcf1b92ecd3e63657d8a5f19da662" +dependencies = [ + "memchr", + "ucd-trie", +] + +[[package]] +name = "pest_derive" +version = "2.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11f486f1ea21e6c10ed15d5a7c77165d0ee443402f0780849d1768e7d9d6fe77" +dependencies = [ + "pest", + "pest_generator", +] + +[[package]] +name = "pest_generator" +version = "2.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8040c4647b13b210a963c1ed407c1ff4fdfa01c31d6d2a098218702e6664f94f" +dependencies = [ + "pest", + "pest_meta", + "proc-macro2", + "quote", + "syn 2.0.117", +] + +[[package]] +name = "pest_meta" +version = "2.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "89815c69d36021a140146f26659a81d6c2afa33d216d736dd4be5381a7362220" +dependencies = [ + "pest", + "sha2 0.10.9", +] + +[[package]] +name = "petgraph" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8701b58ea97060d5e5b155d383a69952a60943f0e6dfe30b04c287beb0b27455" +dependencies = [ + "fixedbitset", + "hashbrown 0.15.5", + "indexmap", +] + +[[package]] +name = "pin-project" +version = "1.1.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1749c7ed4bcaf4c3d0a3efc28538844fb29bcdd7d2b67b2be7e20ba861ff517" +dependencies = [ + "pin-project-internal", +] + +[[package]] +name = "pin-project-internal" +version = "1.1.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9b20ed30f105399776b9c883e68e536ef602a16ae6f596d2c473591d6ad64c6" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.117", +] + +[[package]] +name = "pin-project-lite" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a89322df9ebe1c1578d689c92318e070967d1042b512afbe49518723f4e6d5cd" + +[[package]] +name = "pkg-config" +version = "0.3.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19f132c84eca552bf34cab8ec81f1c1dcc229b811638f9d283dceabe58c5569e" + +[[package]] +name = "portable-atomic" +version = "1.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c33a9471896f1c69cecef8d20cbe2f7accd12527ce60845ff44c153bb2a21b49" + +[[package]] +name = "potential_utf" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0103b1cef7ec0cf76490e969665504990193874ea05c85ff9bab8b911d0a0564" +dependencies = [ + "zerovec", +] + +[[package]] +name = "powerfmt" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" + +[[package]] +name = "ppv-lite86" +version = "0.2.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85eae3c4ed2f50dcfe72643da4befc30deadb458a9b590d720cde2f2b1e97da9" +dependencies = [ + "zerocopy", +] + +[[package]] +name = "prettyplease" +version = "0.2.37" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "479ca8adacdd7ce8f1fb39ce9ecccbfe93a3f1344b3d0d97f20bc0196208f62b" +dependencies = [ + "proc-macro2", + "syn 2.0.117", +] + +[[package]] +name = "proc-macro2" +version = "1.0.106" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8fd00f0bb2e90d81d1044c2b32617f68fcb9fa3bb7640c23e9c748e53fb30934" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "prost" +version = "0.14.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2ea70524a2f82d518bce41317d0fae74151505651af45faf1ffbd6fd33f0568" +dependencies = [ + "bytes", + "prost-derive", +] + +[[package]] +name = "prost-build" +version = "0.14.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "343d3bd7056eda839b03204e68deff7d1b13aba7af2b2fd16890697274262ee7" +dependencies = [ + "heck", + "itertools", + "log", + "multimap", + "petgraph", + "prettyplease", + "prost", + "prost-types", + "pulldown-cmark", + "pulldown-cmark-to-cmark", + "regex", + "syn 2.0.117", + "tempfile", +] + +[[package]] +name = "prost-derive" +version = "0.14.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "27c6023962132f4b30eb4c172c91ce92d933da334c59c23cddee82358ddafb0b" +dependencies = [ + "anyhow", + "itertools", + "proc-macro2", + "quote", + "syn 2.0.117", +] + +[[package]] +name = "prost-types" +version = "0.14.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8991c4cbdb8bc5b11f0b074ffe286c30e523de90fee5ba8132f1399f23cb3dd7" +dependencies = [ + "prost", +] + +[[package]] +name = "protoc-bin-vendored" +version = "3.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d1c381df33c98266b5f08186583660090a4ffa0889e76c7e9a5e175f645a67fa" +dependencies = [ + "protoc-bin-vendored-linux-aarch_64", + "protoc-bin-vendored-linux-ppcle_64", + "protoc-bin-vendored-linux-s390_64", + "protoc-bin-vendored-linux-x86_32", + "protoc-bin-vendored-linux-x86_64", + "protoc-bin-vendored-macos-aarch_64", + "protoc-bin-vendored-macos-x86_64", + "protoc-bin-vendored-win32", +] + +[[package]] +name = "protoc-bin-vendored-linux-aarch_64" +version = "3.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c350df4d49b5b9e3ca79f7e646fde2377b199e13cfa87320308397e1f37e1a4c" + +[[package]] +name = "protoc-bin-vendored-linux-ppcle_64" +version = "3.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a55a63e6c7244f19b5c6393f025017eb5d793fd5467823a099740a7a4222440c" + +[[package]] +name = "protoc-bin-vendored-linux-s390_64" +version = "3.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1dba5565db4288e935d5330a07c264a4ee8e4a5b4a4e6f4e83fad824cc32f3b0" + +[[package]] +name = "protoc-bin-vendored-linux-x86_32" +version = "3.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8854774b24ee28b7868cd71dccaae8e02a2365e67a4a87a6cd11ee6cdbdf9cf5" + +[[package]] +name = "protoc-bin-vendored-linux-x86_64" +version = "3.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b38b07546580df720fa464ce124c4b03630a6fb83e05c336fea2a241df7e5d78" + +[[package]] +name = "protoc-bin-vendored-macos-aarch_64" +version = "3.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "89278a9926ce312e51f1d999fee8825d324d603213344a9a706daa009f1d8092" + +[[package]] +name = "protoc-bin-vendored-macos-x86_64" +version = "3.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81745feda7ccfb9471d7a4de888f0652e806d5795b61480605d4943176299756" + +[[package]] +name = "protoc-bin-vendored-win32" +version = "3.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95067976aca6421a523e491fce939a3e65249bac4b977adee0ee9771568e8aa3" + +[[package]] +name = "pulldown-cmark" +version = "0.13.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3db2be46835f013dd3f4fa7f5f7402c537787b54ebb6fe2b94bbdd7e2669bb7b" +dependencies = [ + "bitflags", + "memchr", + "unicase", +] + +[[package]] +name = "pulldown-cmark-to-cmark" +version = "22.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50793def1b900256624a709439404384204a5dc3a6ec580281bfaac35e882e90" +dependencies = [ + "pulldown-cmark", +] + +[[package]] +name = "quick-junit" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bae23b8e1a59a90f7bf98caa2f4c8c2eedf6df011c6c88ed633e85a87c84526e" +dependencies = [ + "chrono", + "indexmap", + "newtype-uuid", + "quick-xml", + "strip-ansi-escapes", + "thiserror 2.0.20", + "uuid", +] + +[[package]] +name = "quick-xml" +version = "0.41.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e660451e55124f798a69a5af3f49ccfbefbd41910eefd25caf2393e1f3473ec1" +dependencies = [ + "memchr", +] + +[[package]] +name = "quote" +version = "1.0.45" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41f2619966050689382d2b44f664f4bc593e129785a36d6ee376ddf37259b924" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "r-efi" +version = "5.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f" + +[[package]] +name = "r-efi" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf" + +[[package]] +name = "rand" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ca0ecfa931c29007047d1bc58e623ab12e5590e8c7cc53200d5202b69266d8a" +dependencies = [ + "libc", + "rand_chacha 0.3.1", + "rand_core 0.6.4", +] + +[[package]] +name = "rand" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44c5af06bb1b7d3216d91932aed5265164bf384dc89cd6ba05cf59a35f5f76ea" +dependencies = [ + "rand_chacha 0.9.0", + "rand_core 0.9.5", +] + +[[package]] +name = "rand" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7f5fa3a058cd35567ef9bfa5e75732bee0f9e4c55fa90477bef2dfcdbc4be80" +dependencies = [ + "chacha20", + "getrandom 0.4.2", + "rand_core 0.10.1", +] + +[[package]] +name = "rand_chacha" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" +dependencies = [ + "ppv-lite86", + "rand_core 0.6.4", +] + +[[package]] +name = "rand_chacha" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3022b5f1df60f26e1ffddd6c66e8aa15de382ae63b3a0c1bfc0e4d3e3f325cb" +dependencies = [ + "ppv-lite86", + "rand_core 0.9.5", +] + +[[package]] +name = "rand_core" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +dependencies = [ + "getrandom 0.2.17", +] + +[[package]] +name = "rand_core" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76afc826de14238e6e8c374ddcc1fa19e374fd8dd986b0d2af0d02377261d83c" +dependencies = [ + "getrandom 0.3.4", +] + +[[package]] +name = "rand_core" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "63b8176103e19a2643978565ca18b50549f6101881c443590420e4dc998a3c69" + +[[package]] +name = "rcgen" +version = "0.14.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8774e05a7d0de114588e6a28fe7e71694b82614ed569d86d8b389dfbc98b8ad8" +dependencies = [ + "aws-lc-rs", + "pem 4.0.0", + "rustls-pki-types", + "time", + "x509-parser", + "yasna", +] + +[[package]] +name = "redox_syscall" +version = "0.5.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed2bf2547551a7053d6fdfafda3f938979645c44812fbfcda098faae3f1a362d" +dependencies = [ + "bitflags", +] + +[[package]] +name = "regex" +version = "1.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e10754a14b9137dd7b1e3e5b0493cc9171fdd105e0ab477f51b72e7f3ac0e276" +dependencies = [ + "aho-corasick", + "memchr", + "regex-automata", + "regex-syntax", +] + +[[package]] +name = "regex-automata" +version = "0.4.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad8553b9b26413251cbf30e620595c7a41b3887f03da04579c0e6b0d6a06b4b2" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax", +] + +[[package]] +name = "regex-syntax" +version = "0.8.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc897dd8d9e8bd1ed8cdad82b5966c3e0ecae09fb1907d58efaa013543185d0a" + +[[package]] +name = "reqwest" +version = "0.12.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eddd3ca559203180a307f12d114c268abf583f59b03cb906fd0b3ff8646c1147" +dependencies = [ + "base64 0.22.1", + "bytes", + "futures-channel", + "futures-core", + "futures-util", + "http", + "http-body", + "http-body-util", + "hyper", + "hyper-rustls", + "hyper-util", + "js-sys", + "log", + "percent-encoding", + "pin-project-lite", + "rustls", + "rustls-native-certs", + "rustls-pki-types", + "serde", + "serde_json", + "serde_urlencoded", + "sync_wrapper", + "tokio", + "tokio-rustls", + "tower", + "tower-http", + "tower-service", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", +] + +[[package]] +name = "ring" +version = "0.17.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4689e6c2294d81e88dc6261c768b63bc4fcdb852be6d1352498b114f61383b7" +dependencies = [ + "cc", + "cfg-if", + "getrandom 0.2.17", + "libc", + "untrusted 0.9.0", + "windows-sys 0.52.0", +] + +[[package]] +name = "rustc-demangle" +version = "0.1.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b50b8869d9fc858ce7266cce0194bd74df58b9d0e3f6df3a9fc8eb470d95c09d" + +[[package]] +name = "rustc-hash" +version = "2.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94300abf3f1ae2e2b8ffb7b58043de3d399c73fa6f4b73826402a5c457614dbe" + +[[package]] +name = "rustc_version" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" +dependencies = [ + "semver", +] + +[[package]] +name = "rusticata-macros" +version = "4.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "faf0c4a6ece9950b9abdb62b1cfcf2a68b3b67a10ba445b3bb85be2a293d0632" +dependencies = [ + "nom", +] + +[[package]] +name = "rustix" +version = "1.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5e76742e5294153d4dde1207dbec5bdd81eef6fabdc0d2118babadabfd858aa" +dependencies = [ + "bitflags", + "errno", + "libc", + "linux-raw-sys", + "windows-sys 0.61.2", +] + +[[package]] +name = "rustls" +version = "0.23.46" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "48e13bd8c0e9365c43cfa5c9e8f9ad49d3c8444926c9aac819e0e4dc503c8fdf" +dependencies = [ + "aws-lc-rs", + "log", + "once_cell", + "rustls-pki-types", + "rustls-webpki", + "subtle", + "zeroize", +] + +[[package]] +name = "rustls-native-certs" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "612460d5f7bea540c490b2b6395d8e34a953e52b491accd6c86c8164c5932a63" +dependencies = [ + "openssl-probe", + "rustls-pki-types", + "schannel", + "security-framework", +] + +[[package]] +name = "rustls-pki-types" +version = "1.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be040f8b0a225e40375822a563fa9524378b9d63112f53e19ffff34df5d33fdd" +dependencies = [ + "zeroize", +] + +[[package]] +name = "rustls-webpki" +version = "0.103.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4443b1b6d39d7c663139942cc4558262562d2c84123bb6282ef177009ca8b281" +dependencies = [ + "aws-lc-rs", + "ring", + "rustls-pki-types", + "untrusted 0.9.0", +] + +[[package]] +name = "rustversion" +version = "1.0.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d" + +[[package]] +name = "ryu" +version = "1.0.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9774ba4a74de5f7b1c1451ed6cd5285a32eddb5cccb8cc655a4e50009e06477f" + +[[package]] +name = "same-file" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" +dependencies = [ + "winapi-util", +] + +[[package]] +name = "schannel" +version = "0.1.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91c1b7e4904c873ef0710c1f407dde2e6287de2bebc1bbbf7d430bb7cbffd939" +dependencies = [ + "windows-sys 0.61.2", +] + +[[package]] +name = "schemars" +version = "0.8.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3fbf2ae1b8bc8e02df939598064d22402220cd5bbcca1c76f7d6a310974d5615" +dependencies = [ + "dyn-clone", + "schemars_derive", + "serde", + "serde_json", +] + +[[package]] +name = "schemars_derive" +version = "0.8.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32e265784ad618884abaea0600a9adf15393368d840e0222d101a072f3f7534d" +dependencies = [ + "proc-macro2", + "quote", + "serde_derive_internals", + "syn 2.0.117", +] + +[[package]] +name = "scopeguard" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" + +[[package]] +name = "secrecy" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e891af845473308773346dc847b2c23ee78fe442e0472ac50e22a18a93d3ae5a" +dependencies = [ + "zeroize", +] + +[[package]] +name = "security-framework" +version = "3.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b7f4bc775c73d9a02cde8bf7b2ec4c9d12743edf609006c7facc23998404cd1d" +dependencies = [ + "bitflags", + "core-foundation", + "core-foundation-sys", + "libc", + "security-framework-sys", +] + +[[package]] +name = "security-framework-sys" +version = "2.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ce2691df843ecc5d231c0b14ece2acc3efb62c0a398c7e1d875f3983ce020e3" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "semver" +version = "1.0.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a7852d02fc848982e0c167ef163aaff9cd91dc640ba85e263cb1ce46fae51cd" + +[[package]] +name = "serde" +version = "1.0.229" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4148590afebada386688f18773da617792bf2ef03ffc1e4cbd2b1d45b023e0ba" +dependencies = [ + "serde_core", + "serde_derive", +] + +[[package]] +name = "serde-value" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3a1a3341211875ef120e117ea7fd5228530ae7e7036a779fdc9117be6b3282c" +dependencies = [ + "ordered-float", + "serde", +] + +[[package]] +name = "serde_core" +version = "1.0.229" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67dca2c9c51e58a4791a4b1ed58308b39c64224d349a935ab5039aa360942a48" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.229" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7a5d71263a5a7d47b41f6b3f06ba276f10cc18b0931f1799f710578e2309348" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.5", +] + +[[package]] +name = "serde_derive_internals" +version = "0.29.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "18d26a20a969b9e3fdf2fc2d9f21eda6c40e2de84c9408bb5d3b05d499aae711" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.117", +] + +[[package]] +name = "serde_json" +version = "1.0.149" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83fc039473c5595ace860d8c4fafa220ff474b3fc6bfdb4293327f1a37e94d86" +dependencies = [ + "itoa", + "memchr", + "serde", + "serde_core", + "zmij", +] + +[[package]] +name = "serde_path_to_error" +version = "0.1.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "10a9ff822e371bb5403e391ecd83e182e0e77ba7f6fe0160b795797109d1b457" +dependencies = [ + "itoa", + "serde", + "serde_core", +] + +[[package]] +name = "serde_urlencoded" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" +dependencies = [ + "form_urlencoded", + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "serde_yaml" +version = "0.9.34+deprecated" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a8b1a1a2ebf674015cc02edccce75287f1a0130d394307b36743c2f5d504b47" +dependencies = [ + "indexmap", + "itoa", + "ryu", + "serde", + "unsafe-libyaml", +] + +[[package]] +name = "sha1" +version = "0.10.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" +dependencies = [ + "cfg-if", + "cpufeatures 0.2.17", + "digest 0.10.7", +] + +[[package]] +name = "sha1" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aacc4cc499359472b4abe1bf11d0b12e688af9a805fa5e3016f9a386dc2d0214" +dependencies = [ + "cfg-if", + "cpufeatures 0.3.0", + "digest 0.11.2", +] + +[[package]] +name = "sha2" +version = "0.10.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283" +dependencies = [ + "cfg-if", + "cpufeatures 0.2.17", + "digest 0.10.7", +] + +[[package]] +name = "sha2" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "446ba717509524cb3f22f17ecc096f10f4822d76ab5c0b9822c5f9c284e825f4" +dependencies = [ + "cfg-if", + "cpufeatures 0.3.0", + "digest 0.11.2", +] + +[[package]] +name = "shlex" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" + +[[package]] +name = "signal-hook-registry" +version = "1.4.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4db69cba1110affc0e9f7bcd48bbf87b3f4fc7c61fc9155afd4c469eb3d6c1b" +dependencies = [ + "errno", + "libc", +] + +[[package]] +name = "signature" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" +dependencies = [ + "rand_core 0.6.4", +] + +[[package]] +name = "simd_cesu8" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11031e251abf8611c80f460e19dbdeb54a66db918e49c65a7065b46ac7aec520" +dependencies = [ + "rustc_version", + "simdutf8", +] + +[[package]] +name = "simdutf8" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3a9fe34e3e7a50316060351f37187a3f546bce95496156754b601a5fa71b76e" + +[[package]] +name = "simple_asn1" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d585997b0ac10be3c5ee635f1bab02d512760d14b7c468801ac8a01d9ae5f1d" +dependencies = [ + "num-bigint", + "num-traits", + "thiserror 2.0.20", + "time", +] + +[[package]] +name = "slab" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c790de23124f9ab44544d7ac05d60440adc586479ce501c1d6d7da3cd8c9cf5" + +[[package]] +name = "smallvec" +version = "1.15.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" +dependencies = [ + "serde", +] + +[[package]] +name = "socket2" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a766e1110788c36f4fa1c2b71b387a7815aa65f88ce0229841826633d93723e" +dependencies = [ + "libc", + "windows-sys 0.61.2", +] + +[[package]] +name = "spin" +version = "0.9.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3763264f6b73151db08c50ff20d7d8a0b8796e021cdea7ceedad07b80155fa0e" +dependencies = [ + "lock_api", +] + +[[package]] +name = "sqlx" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "378620ccc25c62c89d8be1c819e76a88d59bdcc3304733330788948e619bfd71" +dependencies = [ + "sqlx-core", + "sqlx-macros", + "sqlx-mysql", + "sqlx-postgres", + "sqlx-sqlite", +] + +[[package]] +name = "sqlx-core" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05b44e85bf579a8eeb4ceaa77a3a523baf2bf0e9bac7e40f405d537b5d2d5ccb" +dependencies = [ + "base64 0.22.1", + "bytes", + "cfg-if", + "crc", + "crossbeam-queue", + "either", + "event-listener", + "futures-core", + "futures-intrusive", + "futures-io", + "futures-util", + "hashbrown 0.16.1", + "hashlink", + "indexmap", + "log", + "memchr", + "percent-encoding", + "rustls", + "serde", + "serde_json", + "sha2 0.10.9", + "smallvec", + "thiserror 2.0.20", + "tokio", + "tokio-stream", + "tracing", + "url", + "webpki-roots", +] + +[[package]] +name = "sqlx-macros" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd2b84f2bc39a5705ef27ec785a11c934a41bbd4a24941e257927cddc26b60bf" +dependencies = [ + "proc-macro2", + "quote", + "sqlx-core", + "sqlx-macros-core", + "syn 2.0.117", +] + +[[package]] +name = "sqlx-macros-core" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb8d96de5fdc85a5c4ec813432b523ec637e80ba98f046555f75f7908ddac7c3" +dependencies = [ + "cfg-if", + "dotenvy", + "either", + "heck", + "hex", + "proc-macro2", + "quote", + "serde", + "serde_json", + "sha2 0.10.9", + "sqlx-core", + "sqlx-postgres", + "sqlx-sqlite", + "syn 2.0.117", + "thiserror 2.0.20", + "tokio", + "url", +] + +[[package]] +name = "sqlx-mysql" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90b8020fe17c5f2c245bfa2505d7ef59c5604839527c740266ad2214acebea27" +dependencies = [ + "bitflags", + "byteorder", + "bytes", + "crc", + "digest 0.11.2", + "dotenvy", + "either", + "futures-core", + "futures-util", + "generic-array", + "log", + "percent-encoding", + "serde", + "sha1 0.11.0", + "sha2 0.11.0", + "sqlx-core", + "thiserror 2.0.20", + "tracing", +] + +[[package]] +name = "sqlx-postgres" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87a2bdd6e83f6b3ea525ca9fee568030508b58355a43d0b2c1674d5f79dcd65e" +dependencies = [ + "atoi", + "base64 0.22.1", + "bitflags", + "byteorder", + "crc", + "dotenvy", + "etcetera", + "futures-channel", + "futures-core", + "futures-util", + "hex", + "hkdf", + "hmac", + "itoa", + "log", + "md-5", + "memchr", + "rand 0.10.2", + "serde", + "serde_json", + "sha2 0.11.0", + "smallvec", + "sqlx-core", + "stringprep", + "thiserror 2.0.20", + "tracing", + "whoami", +] + +[[package]] +name = "sqlx-sqlite" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "488e99c397a62007e4229aec669a179816339afc6d2620ca6fa420dbee2e982c" +dependencies = [ + "atoi", + "flume", + "form_urlencoded", + "futures-channel", + "futures-core", + "futures-executor", + "futures-intrusive", + "futures-util", + "libsqlite3-sys", + "log", + "percent-encoding", + "serde", + "sqlx-core", + "thiserror 2.0.20", + "tracing", + "url", +] + +[[package]] +name = "stable_deref_trait" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596" + +[[package]] +name = "stringprep" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b4df3d392d81bd458a8a621b8bffbd2302a12ffe288a9d931670948749463b1" +dependencies = [ + "unicode-bidi", + "unicode-normalization", + "unicode-properties", +] + +[[package]] +name = "strip-ansi-escapes" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a8f8038e7e7969abb3f1b7c2a811225e9296da208539e0f79c5251d6cac0025" +dependencies = [ + "vte", +] + +[[package]] +name = "strsim" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" + +[[package]] +name = "subtle" +version = "2.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" + +[[package]] +name = "supports-color" +version = "3.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c64fc7232dd8d2e4ac5ce4ef302b1d81e0b80d055b9d77c7c4f51f6aa4c867d6" +dependencies = [ + "is_ci", +] + +[[package]] +name = "supports-hyperlinks" +version = "3.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e396b6523b11ccb83120b115a0b7366de372751aa6edf19844dfb13a6af97e91" + +[[package]] +name = "supports-unicode" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b7401a30af6cb5818bb64852270bb722533397edcfc7344954a38f420819ece2" + +[[package]] +name = "syn" +version = "2.0.117" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e665b8803e7b1d2a727f4023456bbbbe74da67099c585258af0ad9c5013b9b99" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "syn" +version = "3.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "12df2e0110f65b775f769bb17ef989067a1d931b2eb822bd4346631eeada89f9" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "sync_wrapper" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0bf256ce5efdfa370213c1dabab5935a12e49f2c58d15e9eac2870d3b4f27263" +dependencies = [ + "futures-core", +] + +[[package]] +name = "synstructure" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.117", +] + +[[package]] +name = "tempfile" +version = "3.27.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32497e9a4c7b38532efcdebeef879707aa9f794296a4f0244f6f69e9bc8574bd" +dependencies = [ + "fastrand", + "getrandom 0.4.2", + "once_cell", + "rustix", + "windows-sys 0.61.2", +] + +[[package]] +name = "terminal_size" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "230a1b821ccbd75b185820a1f1ff7b14d21da1e442e22c0863ea5f08771a8874" +dependencies = [ + "rustix", + "windows-sys 0.61.2", +] + +[[package]] +name = "textwrap" +version = "0.16.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c13547615a44dc9c452a8a534638acdf07120d4b6847c8178705da06306a3057" +dependencies = [ + "unicode-linebreak", + "unicode-width 0.2.2", +] + +[[package]] +name = "thiserror" +version = "1.0.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" +dependencies = [ + "thiserror-impl 1.0.69", +] + +[[package]] +name = "thiserror" +version = "2.0.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec86235f5fcc2a73650310756d2ac5b138a5780bbbdfae3eeccec992c435ba4f" +dependencies = [ + "thiserror-impl 2.0.20", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.117", +] + +[[package]] +name = "thiserror-impl" +version = "2.0.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc04cd3e1236dd4a98afca4569f2deb3f120e5422a4023be2cb683f8486292af" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.5", +] + +[[package]] +name = "time" +version = "0.3.47" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "743bd48c283afc0388f9b8827b976905fb217ad9e647fae3a379a9283c4def2c" +dependencies = [ + "deranged", + "itoa", + "num-conv", + "powerfmt", + "serde_core", + "time-core", + "time-macros", +] + +[[package]] +name = "time-core" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7694e1cfe791f8d31026952abf09c69ca6f6fa4e1a1229e18988f06a04a12dca" + +[[package]] +name = "time-macros" +version = "0.2.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e70e4c5a0e0a8a4823ad65dfe1a6930e4f4d756dcd9dd7939022b5e8c501215" +dependencies = [ + "num-conv", + "time-core", +] + +[[package]] +name = "tinystr" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8323304221c2a851516f22236c5722a72eaa19749016521d6dff0824447d96d" +dependencies = [ + "displaydoc", + "zerovec", +] + +[[package]] +name = "tinyvec" +version = "1.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e61e67053d25a4e82c844e8424039d9745781b3fc4f32b8d55ed50f5f667ef3" +dependencies = [ + "tinyvec_macros", +] + +[[package]] +name = "tinyvec_macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" + +[[package]] +name = "tokio" +version = "1.53.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce3335fa71841cda333a58d7615b03901380ecf09d59b3296d21f8bbac0dde4e" +dependencies = [ + "bytes", + "libc", + "mio", + "parking_lot", + "pin-project-lite", + "signal-hook-registry", + "socket2", + "tokio-macros", + "windows-sys 0.61.2", +] + +[[package]] +name = "tokio-macros" +version = "2.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "385a6cb71ab9ab790c5fe8d67f1645e6c450a7ce006a33de03daa956cf70a496" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.117", +] + +[[package]] +name = "tokio-rustls" +version = "0.26.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1729aa945f29d91ba541258c8df89027d5792d85a8841fb65e8bf0f4ede4ef61" +dependencies = [ + "rustls", + "tokio", +] + +[[package]] +name = "tokio-stream" +version = "0.1.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32da49809aab5c3bc678af03902d4ccddea2a87d028d86392a4b1560c6906c70" +dependencies = [ + "futures-core", + "pin-project-lite", + "tokio", +] + +[[package]] +name = "tokio-tungstenite" +version = "0.26.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a9daff607c6d2bf6c16fd681ccb7eecc83e4e2cdc1ca067ffaadfca5de7f084" +dependencies = [ + "futures-util", + "log", + "rustls", + "rustls-native-certs", + "rustls-pki-types", + "tokio", + "tokio-rustls", + "tungstenite", +] + +[[package]] +name = "tokio-util" +version = "0.7.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "494815d09bf52b5548659851081238f0ca39ff638363907596da739561c62c52" +dependencies = [ + "bytes", + "futures-core", + "futures-sink", + "libc", + "pin-project-lite", + "slab", + "tokio", +] + +[[package]] +name = "tonic" +version = "0.14.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac2a5518c70fa84342385732db33fb3f44bc4cc748936eb5833d2df34d6445ef" +dependencies = [ + "async-trait", + "axum", + "base64 0.22.1", + "bytes", + "h2", + "http", + "http-body", + "http-body-util", + "hyper", + "hyper-timeout", + "hyper-util", + "percent-encoding", + "pin-project", + "rustls-native-certs", + "socket2", + "sync_wrapper", + "tokio", + "tokio-rustls", + "tokio-stream", + "tower", + "tower-layer", + "tower-service", + "tracing", +] + +[[package]] +name = "tonic-build" +version = "0.14.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c68f61875ac5293cf72e6c8cf0158086428c82c37229e98c840878f1706b0322" +dependencies = [ + "prettyplease", + "proc-macro2", + "quote", + "syn 2.0.117", +] + +[[package]] +name = "tonic-prost" +version = "0.14.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50849f68853be452acf590cde0b146665b8d507b3b8af17261df47e02c209ea0" +dependencies = [ + "bytes", + "prost", + "tonic", +] + +[[package]] +name = "tonic-prost-build" +version = "0.14.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "654e5643eff75d7f8c99197ce1440ed19a3474eada74c12bbac488b2cafdae27" +dependencies = [ + "prettyplease", + "proc-macro2", + "prost-build", + "prost-types", + "quote", + "syn 2.0.117", + "tempfile", + "tonic-build", +] + +[[package]] +name = "tonic-types" +version = "0.14.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73ab1b02061f83d519bba3caa167f88f261ef05720ab8ebc954ade70de3348e8" +dependencies = [ + "prost", + "prost-types", + "tonic", +] + +[[package]] +name = "tower" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebe5ef63511595f1344e2d5cfa636d973292adc0eec1f0ad45fae9f0851ab1d4" +dependencies = [ + "futures-core", + "futures-util", + "indexmap", + "pin-project-lite", + "slab", + "sync_wrapper", + "tokio", + "tokio-util", + "tower-layer", + "tower-service", + "tracing", +] + +[[package]] +name = "tower-http" +version = "0.6.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4e6559d53cc268e5031cd8429d05415bc4cb4aefc4aa5d6cc35fbf5b924a1f8" +dependencies = [ + "base64 0.22.1", + "bitflags", + "bytes", + "futures-util", + "http", + "http-body", + "iri-string", + "mime", + "pin-project-lite", + "tower", + "tower-layer", + "tower-service", + "tracing", +] + +[[package]] +name = "tower-layer" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e" + +[[package]] +name = "tower-service" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" + +[[package]] +name = "tracing" +version = "0.1.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "63e71662fa4b2a2c3a26f570f037eb95bb1f85397f3cd8076caed2f026a6d100" +dependencies = [ + "log", + "pin-project-lite", + "tracing-attributes", + "tracing-core", +] + +[[package]] +name = "tracing-attributes" +version = "0.1.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7490cfa5ec963746568740651ac6781f701c9c5ea257c58e057f3ba8cf69e8da" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.117", +] + +[[package]] +name = "tracing-core" +version = "0.1.36" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db97caf9d906fbde555dd62fa95ddba9eecfd14cb388e4f491a66d74cd5fb79a" +dependencies = [ + "once_cell", +] + +[[package]] +name = "try-lock" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" + +[[package]] +name = "tungstenite" +version = "0.26.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4793cb5e56680ecbb1d843515b23b6de9a75eb04b66643e256a396d43be33c13" +dependencies = [ + "bytes", + "data-encoding", + "http", + "httparse", + "log", + "rand 0.9.4", + "rustls", + "rustls-pki-types", + "sha1 0.10.6", + "thiserror 2.0.20", + "utf-8", +] + +[[package]] +name = "typenum" +version = "1.20.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6f5e870be6c3b371b77fe0ee0bafb859fa4964b4404c27de1d380043c4dda20" + +[[package]] +name = "ucd-trie" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2896d95c02a80c6d6a5d6e953d479f5ddf2dfdb6a244441010e373ac0fb88971" + +[[package]] +name = "unicase" +version = "2.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dbc4bc3a9f746d862c45cb89d705aa10f187bb96c76001afab07a0d35ce60142" + +[[package]] +name = "unicode-bidi" +version = "0.3.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c1cb5db39152898a79168971543b1cb5020dff7fe43c8dc468b0885f5e29df5" + +[[package]] +name = "unicode-ident" +version = "1.0.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75" + +[[package]] +name = "unicode-linebreak" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b09c83c3c29d37506a3e260c08c03743a6bb66a9cd432c6934ab501a190571f" + +[[package]] +name = "unicode-normalization" +version = "0.1.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5fd4f6878c9cb28d874b009da9e8d183b5abc80117c40bbd187a1fde336be6e8" +dependencies = [ + "tinyvec", +] + +[[package]] +name = "unicode-properties" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7df058c713841ad818f1dc5d3fd88063241cc61f49f5fbea4b951e8cf5a8d71d" + +[[package]] +name = "unicode-width" +version = "0.1.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7dd6e30e90baa6f72411720665d41d89b9a3d039dc45b8faea1ddd07f617f6af" + +[[package]] +name = "unicode-width" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4ac048d71ede7ee76d585517add45da530660ef4390e49b098733c6e897f254" + +[[package]] +name = "unicode-xid" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" + +[[package]] +name = "unsafe-libyaml" +version = "0.2.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "673aac59facbab8a9007c7f6108d11f63b603f7cabff99fabf650fea5c32b861" + +[[package]] +name = "untrusted" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" + +[[package]] +name = "untrusted" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" + +[[package]] +name = "url" +version = "2.5.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff67a8a4397373c3ef660812acab3268222035010ab8680ec4215f38ba3d0eed" +dependencies = [ + "form_urlencoded", + "idna", + "percent-encoding", + "serde", + "serde_derive", +] + +[[package]] +name = "utf-8" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" + +[[package]] +name = "utf8_iter" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" + +[[package]] +name = "utf8parse" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" + +[[package]] +name = "uuid" +version = "1.23.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ddd74a9687298c6858e9b88ec8935ec45d22e8fd5e6394fa1bd4e99a87789c76" +dependencies = [ + "getrandom 0.4.2", + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "vcpkg" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" + +[[package]] +name = "version_check" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" + +[[package]] +name = "vte" +version = "0.14.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "231fdcd7ef3037e8330d8e17e61011a2c244126acc0a982f4040ac3f9f0bc077" +dependencies = [ + "memchr", +] + +[[package]] +name = "walkdir" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" +dependencies = [ + "same-file", + "winapi-util", +] + +[[package]] +name = "want" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" +dependencies = [ + "try-lock", +] + +[[package]] +name = "wasi" +version = "0.11.1+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" + +[[package]] +name = "wasip2" +version = "1.0.3+wasi-0.2.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20064672db26d7cdc89c7798c48a0fdfac8213434a1186e5ef29fd560ae223d6" +dependencies = [ + "wit-bindgen 0.57.1", +] + +[[package]] +name = "wasip3" +version = "0.4.0+wasi-0.3.0-rc-2026-01-06" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5428f8bf88ea5ddc08faddef2ac4a67e390b88186c703ce6dbd955e1c145aca5" +dependencies = [ + "wit-bindgen 0.51.0", +] + +[[package]] +name = "wasm-bindgen" +version = "0.2.128" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aecb87a33d3b0c5e3b7aa46336eaf486cffafbd281b195e4c8b80d50df2351bf" +dependencies = [ + "cfg-if", + "once_cell", + "rustversion", + "wasm-bindgen-macro", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-futures" +version = "0.4.78" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ef4c5d3d2cdf5c54f4231181768f5510842e350db025faf1f7163b1030ed928" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.128" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a690d511e3c1a8b3a55e33511e3c2c00c78415cd23650f32b808627f5696b9ed" +dependencies = [ + "quote", + "wasm-bindgen-macro-support", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.128" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "411e4887f0071ef2d2164a9d5fdf2d20efbef78fccd3a78b0c10a1dc5295e48a" +dependencies = [ + "bumpalo", + "proc-macro2", + "quote", + "syn 3.0.5", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.128" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81941cd78d0c92026c33e5e01312845a4cb1e9af3407f9134b100dd03144103e" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "wasm-encoder" +version = "0.244.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "990065f2fe63003fe337b932cfb5e3b80e0b4d0f5ff650e6985b1048f62c8319" +dependencies = [ + "leb128fmt", + "wasmparser", +] + +[[package]] +name = "wasm-metadata" +version = "0.244.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb0e353e6a2fbdc176932bbaab493762eb1255a7900fe0fea1a2f96c296cc909" +dependencies = [ + "anyhow", + "indexmap", + "wasm-encoder", + "wasmparser", +] + +[[package]] +name = "wasmparser" +version = "0.244.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "47b807c72e1bac69382b3a6fb3dbe8ea4c0ed87ff5629b8685ae6b9a611028fe" +dependencies = [ + "bitflags", + "hashbrown 0.15.5", + "indexmap", + "semver", +] + +[[package]] +name = "web-sys" +version = "0.3.105" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9fbddc4a036f00ec4f18c83445bd3115cb306a91da554919a099d9222fe4a7f8" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "webpki-roots" +version = "1.0.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c1c8e20c8a38fc7d65abfe74eb7280e4aa667e8eec8bc84996d2874810748d9" +dependencies = [ + "rustls-pki-types", +] + +[[package]] +name = "whoami" +version = "2.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "626c4bac6755d76ffc12cb01b2eac751db1996b9e0041de9aa02c8c211ddc82c" + +[[package]] +name = "winapi-util" +version = "0.1.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22" +dependencies = [ + "windows-sys 0.61.2", +] + +[[package]] +name = "windows-core" +version = "0.62.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8e83a14d34d0623b51dce9581199302a221863196a1dde71a7663a4c2be9deb" +dependencies = [ + "windows-implement", + "windows-interface", + "windows-link", + "windows-result", + "windows-strings", +] + +[[package]] +name = "windows-implement" +version = "0.60.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "053e2e040ab57b9dc951b72c264860db7eb3b0200ba345b4e4c3b14f67855ddf" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.117", +] + +[[package]] +name = "windows-interface" +version = "0.59.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f316c4a2570ba26bbec722032c4099d8c8bc095efccdc15688708623367e358" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.117", +] + +[[package]] +name = "windows-link" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" + +[[package]] +name = "windows-result" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7781fa89eaf60850ac3d2da7af8e5242a5ea78d1a11c49bf2910bb5a73853eb5" +dependencies = [ + "windows-link", +] + +[[package]] +name = "windows-strings" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7837d08f69c77cf6b07689544538e017c1bfcf57e34b4c0ff58e6c2cd3b37091" +dependencies = [ + "windows-link", +] + +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets", +] + +[[package]] +name = "windows-sys" +version = "0.61.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc" +dependencies = [ + "windows-link", +] + +[[package]] +name = "windows-targets" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" +dependencies = [ + "windows_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_gnullvm", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" + +[[package]] +name = "windows_i686_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" + +[[package]] +name = "windows_i686_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" + +[[package]] +name = "wit-bindgen" +version = "0.51.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d7249219f66ced02969388cf2bb044a09756a083d0fab1e566056b04d9fbcaa5" +dependencies = [ + "wit-bindgen-rust-macro", +] + +[[package]] +name = "wit-bindgen" +version = "0.57.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ebf944e87a7c253233ad6766e082e3cd714b5d03812acc24c318f549614536e" + +[[package]] +name = "wit-bindgen-core" +version = "0.51.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea61de684c3ea68cb082b7a88508a8b27fcc8b797d738bfc99a82facf1d752dc" +dependencies = [ + "anyhow", + "heck", + "wit-parser", +] + +[[package]] +name = "wit-bindgen-rust" +version = "0.51.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b7c566e0f4b284dd6561c786d9cb0142da491f46a9fbed79ea69cdad5db17f21" +dependencies = [ + "anyhow", + "heck", + "indexmap", + "prettyplease", + "syn 2.0.117", + "wasm-metadata", + "wit-bindgen-core", + "wit-component", +] + +[[package]] +name = "wit-bindgen-rust-macro" +version = "0.51.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c0f9bfd77e6a48eccf51359e3ae77140a7f50b1e2ebfe62422d8afdaffab17a" +dependencies = [ + "anyhow", + "prettyplease", + "proc-macro2", + "quote", + "syn 2.0.117", + "wit-bindgen-core", + "wit-bindgen-rust", +] + +[[package]] +name = "wit-component" +version = "0.244.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d66ea20e9553b30172b5e831994e35fbde2d165325bec84fc43dbf6f4eb9cb2" +dependencies = [ + "anyhow", + "bitflags", + "indexmap", + "log", + "serde", + "serde_derive", + "serde_json", + "wasm-encoder", + "wasm-metadata", + "wasmparser", + "wit-parser", +] + +[[package]] +name = "wit-parser" +version = "0.244.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ecc8ac4bc1dc3381b7f59c34f00b67e18f910c2c0f50015669dde7def656a736" +dependencies = [ + "anyhow", + "id-arena", + "indexmap", + "log", + "semver", + "serde", + "serde_derive", + "serde_json", + "unicode-xid", + "wasmparser", +] + +[[package]] +name = "writeable" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ffae5123b2d3fc086436f8834ae3ab053a283cfac8fe0a0b8eaae044768a4c4" + +[[package]] +name = "x509-parser" +version = "0.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d43b0f71ce057da06bc0851b23ee24f3f86190b07203dd8f567d0b706a185202" +dependencies = [ + "asn1-rs", + "aws-lc-rs", + "data-encoding", + "der-parser", + "lazy_static", + "nom", + "oid-registry", + "rusticata-macros", + "thiserror 2.0.20", + "time", +] + +[[package]] +name = "yasna" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5f6765e852b9b4dc8e2a76843e4d64d1cea8e79bcde0b6901aea8e7c7f08282" +dependencies = [ + "bit-vec", + "time", +] + +[[package]] +name = "yoke" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "abe8c5fda708d9ca3df187cae8bfb9ceda00dd96231bed36e445a1a48e66f9ca" +dependencies = [ + "stable_deref_trait", + "yoke-derive", + "zerofrom", +] + +[[package]] +name = "yoke-derive" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "de844c262c8848816172cef550288e7dc6c7b7814b4ee56b3e1553f275f1858e" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.117", + "synstructure", +] + +[[package]] +name = "zerocopy" +version = "0.8.48" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eed437bf9d6692032087e337407a86f04cd8d6a16a37199ed57949d415bd68e9" +dependencies = [ + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.8.48" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70e3cd084b1788766f53af483dd21f93881ff30d7320490ec3ef7526d203bad4" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.117", +] + +[[package]] +name = "zerofrom" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69faa1f2a1ea75661980b013019ed6687ed0e83d069bc1114e2cc74c6c04c4df" +dependencies = [ + "zerofrom-derive", +] + +[[package]] +name = "zerofrom-derive" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11532158c46691caf0f2593ea8358fed6bbf68a0315e80aae9bd41fbade684a1" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.117", + "synstructure", +] + +[[package]] +name = "zeroize" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e13c156562582aa81c60cb29407084cdb54c4164760106ab78e6c5b0858cf64e" + +[[package]] +name = "zerotrie" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f9152d31db0792fa83f70fb2f83148effb5c1f5b8c7686c3459e361d9bc20bf" +dependencies = [ + "displaydoc", + "yoke", + "zerofrom", +] + +[[package]] +name = "zerovec" +version = "0.11.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90f911cbc359ab6af17377d242225f4d75119aec87ea711a880987b18cd7b239" +dependencies = [ + "yoke", + "zerofrom", + "zerovec-derive", +] + +[[package]] +name = "zerovec-derive" +version = "0.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "625dc425cab0dca6dc3c3319506e6593dcb08a9f387ea3b284dbd52a92c40555" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.117", +] + +[[package]] +name = "zmij" +version = "1.0.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29666d0abbfad1e3dc4dcf6144730dd3a3ab225bbbdac83319345b1b44ccfc1b" diff --git a/tests/suites/drivers/docker/Cargo.toml b/tests/suites/drivers/docker/Cargo.toml new file mode 100644 index 0000000000..ea987322ed --- /dev/null +++ b/tests/suites/drivers/docker/Cargo.toml @@ -0,0 +1,19 @@ +# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +# Each driver suite is its own workspace, with its own lockfile. +[package] +name = "docker" +description = "Drivers suite: Docker driver behavior, such as container lifecycle" +version = "0.0.0" +edition = "2024" +rust-version = "1.94" +license = "Apache-2.0" +repository = "https://github.com/NVIDIA/OpenShell" +publish = false + +[dependencies] +container-engine-support = { path = "../../../support/container-engine" } +openshell-testkit = { path = "../../../testkit/testkit" } + +[workspace] diff --git a/tests/suites/drivers/docker/tests/lifecycle.rs b/tests/suites/drivers/docker/tests/lifecycle.rs new file mode 100644 index 0000000000..8df3eccf3d --- /dev/null +++ b/tests/suites/drivers/docker/tests/lifecycle.rs @@ -0,0 +1,113 @@ +// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +// SPDX-License-Identifier: Apache-2.0 + +//! Docker driver sandbox lifecycle: what the driver does with its containers +//! when a sandbox's main process stops or an ephemeral sandbox finishes. + +use std::time::Duration; + +use container_engine_support::Engine; +use testkit::sdk::SandboxPhase; +use testkit::{Context, ResultExt as _}; + +/// Where the driver mounts the sandbox's bootstrap JWT. +const TOKEN_PATH: &str = "/etc/openshell/auth/sandbox.jwt"; +/// How long the gateway may take to report a stopped workload as Error. +const ERROR_TIMEOUT: Duration = Duration::from_secs(30); +/// How long the driver may take to remove an ephemeral sandbox's containers. +const CLEANUP_TIMEOUT: Duration = Duration::from_secs(90); + +/// Stopping a sandbox's workload container is terminal: the driver doesn't +/// relaunch the main process and the sandbox ends in Error. Before the stop, +/// the workload can't read its bootstrap JWT. +#[testkit::test] +async fn stopped_workload_container_is_terminal(cx: &mut Context) -> testkit::Result { + cx.expect_compute_driver("docker").await?; + let engine = Engine::from_env()?; + let sandbox = cx + .sandbox("st") + .command(["sleep", "infinity"]) + .create_ready() + .await?; + + let workload = engine.container_for_role(sandbox.name(), "sandbox").await?; + engine + .output([ + "exec", + &workload, + "/bin/sh", + "-c", + &format!("test ! -r {TOKEN_PATH}"), + ]) + .await + .context("the sandbox workload must not be able to read its bootstrap JWT")?; + + engine.output(["stop", &workload]).await?; + engine + .wait_running(&workload, false, Duration::from_mins(1)) + .await?; + sandbox + .wait_phase(SandboxPhase::Error, ERROR_TIMEOUT) + .await + .context("a stopped main process makes the sandbox terminal")?; + Ok(()) +} + +/// A detached `--no-keep` sandbox's containers are removed once its main +/// command exits, whether it succeeds or fails. Conformance checks that the +/// gateway forgets the sandbox; this checks the driver's containers. +#[testkit::test] +async fn ephemeral_sandbox_containers_are_removed_after_main_exits( + cx: &mut Context, +) -> testkit::Result { + cx.expect_compute_driver("docker").await?; + let engine = Engine::from_env()?; + let mut sandboxes = Vec::new(); + for (suffix, code) in [("ez", 0), ("ef", 17)] { + let builder = cx.cli_sandbox(suffix); + let release_path = format!("/sandbox/.ephemeral-release-{}", builder.name()); + let script = + format!("while [ ! -e '{release_path}' ]; do sleep 0.1; done; sleep 1; exit {code}"); + let sandbox = builder + .args(["--no-keep"]) + .command(["sh", "-c", &script]) + .create() + .await?; + sandboxes.push((sandbox, release_path, code)); + } + + for (sandbox, release_path, _) in &sandboxes { + sandbox.wait_ready().await?; + testkit::ensure!( + !engine + .containers_for_sandbox_id(sandbox.id()) + .await? + .is_empty(), + "no containers found for sandbox {} ({})", + sandbox.name(), + sandbox.id() + ); + sandbox + .exec(["touch", release_path.as_str()]) + .await? + .success()?; + } + for (sandbox, _, code) in &sandboxes { + testkit::poll_until( + &format!("containers of sandbox {} to be removed", sandbox.name()), + CLEANUP_TIMEOUT, + Duration::from_millis(500), + async || { + let left = engine.containers_for_sandbox_id(sandbox.id()).await?; + Ok(if left.is_empty() { + testkit::Poll::Ready(()) + } else { + testkit::Poll::Pending(format!("containers {left:?}")) + }) + }, + ) + .await + .context(format!("ephemeral sandbox exited {code}"))?; + } + Ok(()) +} From 8dcf96e68a8985e30f059bb2d891af2cfb6fb474 Mon Sep 17 00:00:00 2001 From: Matthew Grossman Date: Tue, 17 Nov 2026 21:20:04 -0800 Subject: [PATCH 4/9] test(testkit): expose gateway info on Context Signed-off-by: Matthew Grossman --- tests/testkit/README.md | 2 ++ tests/testkit/testkit/src/context.rs | 11 ++++++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/tests/testkit/README.md b/tests/testkit/README.md index 0275c0af6f..3166a13be0 100644 --- a/tests/testkit/README.md +++ b/tests/testkit/README.md @@ -84,6 +84,8 @@ fails. A killed test process skips cleanup, so names are unique to the run. - `cx.expect_compute_driver(name)` to fail unless the gateway runs only that compute driver. Driver suites call it first. `cx.compute_driver()` returns the driver's name, for setup that depends on it, such as a driver config. + `cx.gateway_info()` returns the whole gateway info, such as the resource + capabilities the driver reports. - `testkit::base_image()` for the image to create sandboxes from or build on: `OPENSHELL_TEST_BASE_IMAGE`, or OpenShell's default sandbox image. - `testkit::python_image()` for sandboxes that run `python3`, curl, git, or diff --git a/tests/testkit/testkit/src/context.rs b/tests/testkit/testkit/src/context.rs index b9aef45fce..c26ebb9555 100644 --- a/tests/testkit/testkit/src/context.rs +++ b/tests/testkit/testkit/src/context.rs @@ -219,7 +219,13 @@ impl Context { /// tests whose setup depends on it. Fails unless gateway info reports /// exactly one driver, under the same configured and driver name. pub async fn compute_driver(&self) -> Result { - let info = self + single_compute_driver(&self.gateway_info().await?) + } + + /// The gateway's info: its version, compute drivers and their reported + /// capabilities, and negotiated extensions. + pub async fn gateway_info(&self) -> Result { + Ok(self .handles .grpc .client() @@ -227,8 +233,7 @@ impl Context { .get_gateway_info(proto::GetGatewayInfoRequest {}) .await .context("get gateway info")? - .into_inner(); - single_compute_driver(&info) + .into_inner()) } /// Run the cleanup hooks, including deleting the sandboxes the test From 99c7a0b8e804bffc75769e0b7fb07879e9724a27 Mon Sep 17 00:00:00 2001 From: Matthew Grossman Date: Tue, 17 Nov 2026 21:20:12 -0800 Subject: [PATCH 5/9] test(features): port cgroup resource limits to resource-limits on Docker and Podman Signed-off-by: Matthew Grossman --- .github/workflows/e2e-suites.yml | 3 + e2e/rust/Cargo.toml | 5 -- e2e/rust/tests/podman_resource_limits.rs | 89 ------------------- tests/suites/features/Cargo.lock | 7 ++ tests/suites/features/Cargo.toml | 2 +- .../features/resource-limits/Cargo.toml | 15 ++++ .../features/resource-limits/tests/limits.rs | 77 ++++++++++++++++ 7 files changed, 103 insertions(+), 95 deletions(-) delete mode 100644 e2e/rust/tests/podman_resource_limits.rs create mode 100644 tests/suites/features/resource-limits/Cargo.toml create mode 100644 tests/suites/features/resource-limits/tests/limits.rs diff --git a/.github/workflows/e2e-suites.yml b/.github/workflows/e2e-suites.yml index 3ad553fea1..086fc811f7 100644 --- a/.github/workflows/e2e-suites.yml +++ b/.github/workflows/e2e-suites.yml @@ -104,6 +104,9 @@ jobs: {"environment":"ubuntu-k3s","installer":"k3s","family":"features","package":"routable-host-ip","gateway":"tmachine","runner":"ubuntu-24.04"}, {"environment":"ubuntu-k3s","installer":"k3s-ha","family":"features","package":"routable-host-ip","gateway":"tmachine","runner":"ubuntu-24.04"}, {"environment":"ubuntu-docker-rootful","installer":"deb","family":"features","package":"connect-ssh-supervision","gateway":"openshell","runner":"ubuntu-24.04"}, + {"environment":"ubuntu-docker-rootful","installer":"deb","family":"features","package":"resource-limits","gateway":"openshell","runner":"ubuntu-24.04"}, + {"environment":"fedora-podman-rootful","installer":"rpm","family":"features","package":"resource-limits","gateway":"openshell","runner":"ubuntu-24.04"}, + {"environment":"fedora-podman-rootless","installer":"rpm","family":"features","package":"resource-limits","gateway":"openshell","runner":"ubuntu-24.04"}, {"environment":"fedora-podman-rootful-keycloak","installer":"rpm","family":"features","package":"keycloak-provider-refresh","gateway":"openshell","runner":"ubuntu-24.04"}, {"environment":"fedora-podman-rootless-keycloak","installer":"rpm","family":"features","package":"keycloak-provider-refresh","gateway":"openshell","runner":"ubuntu-24.04"}, {"environment":"ubuntu-docker-rootful","installer":"deb","family":"drivers/docker","gateway":"openshell","runner":"ubuntu-24.04"}, diff --git a/e2e/rust/Cargo.toml b/e2e/rust/Cargo.toml index 2827199ea8..ff66b4abea 100644 --- a/e2e/rust/Cargo.toml +++ b/e2e/rust/Cargo.toml @@ -139,11 +139,6 @@ name = "podman_corporate_proxy" path = "tests/podman_corporate_proxy.rs" required-features = ["e2e-podman"] -[[test]] -name = "podman_resource_limits" -path = "tests/podman_resource_limits.rs" -required-features = ["e2e-podman"] - [[test]] name = "provider_refresh_handles" path = "tests/provider_refresh_handles.rs" diff --git a/e2e/rust/tests/podman_resource_limits.rs b/e2e/rust/tests/podman_resource_limits.rs deleted file mode 100644 index 225f77ff8f..0000000000 --- a/e2e/rust/tests/podman_resource_limits.rs +++ /dev/null @@ -1,89 +0,0 @@ -// SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -// SPDX-License-Identifier: Apache-2.0 - -#![cfg(feature = "e2e-podman")] - -//! Podman-specific E2E coverage verifying that declared sandbox CPU/memory -//! resource limits are actually enforced by cgroups inside the workload, not -//! just echoed back by the API/template layer. -//! -//! The conformance `templates` suite already verifies that -//! `sandbox template create --cpu ... --memory ...` is stored and returned -//! correctly, but it never inspects the resulting container's real resource -//! state. This test creates a sandbox with those flags directly and reads the -//! cgroup v2 interface files from inside the sandbox itself, so it exercises -//! the actual enforcement boundary the workload experiences. - -use openshell_e2e::harness::sandbox::SandboxGuard; - -const CGROUP_READ_POLICY: &str = r"version: 1 -filesystem_policy: - include_workdir: true - read_only: [/usr, /lib, /lib64, /proc, /etc, /sys/fs/cgroup] - read_write: [/sandbox, /tmp, /dev/null] -landlock: - compatibility: best_effort -network_policies: {} -"; - -const CPU_REQUEST: &str = "500m"; -const MEMORY_REQUEST: &str = "512Mi"; - -// "500m" (500 millicores) becomes a 50000us quota over Podman's 100000us -// (100ms) CFS period — see -// crates/openshell-driver-podman/src/container.rs's parse_cpu_to_microseconds. -// Verified directly against a real `podman run --cpus=0.5` container, whose -// cpu.max reads "50000 100000". -const EXPECTED_CPU_MAX: &str = "50000 100000"; - -// "512Mi" (mebibytes) becomes exactly 512 * 1024 * 1024 bytes — see -// crates/openshell-driver-podman/src/container.rs's parse_memory_to_bytes. -// Verified directly against a real `podman run --memory=512m` container, -// whose memory.max reads "536870912". -const EXPECTED_MEMORY_MAX: &str = "536870912"; - -#[tokio::test] -async fn sandbox_resource_limits_are_enforced_via_cgroups() { - if std::env::var("OPENSHELL_E2E_DRIVER").as_deref() != Ok("podman") { - eprintln!("Skipping Podman resource-limit test: e2e driver is not podman"); - return; - } - - let policy = tempfile::NamedTempFile::new().expect("create cgroup read policy file"); - std::fs::write(policy.path(), CGROUP_READ_POLICY).expect("write cgroup read policy"); - let policy_path = policy.path().to_str().expect("policy path is UTF-8"); - let mut sandbox = SandboxGuard::create(&[ - "--cpu", - CPU_REQUEST, - "--memory", - MEMORY_REQUEST, - "--policy", - policy_path, - ]) - .await - .expect("sandbox create with resource limits should succeed"); - - let memory_max = sandbox - .exec(&["cat", "/sys/fs/cgroup/memory.max"]) - .await - .expect("read memory.max from sandbox cgroup") - .trim() - .to_string(); - assert_eq!( - memory_max, EXPECTED_MEMORY_MAX, - "sandbox cgroup should enforce the declared {MEMORY_REQUEST} memory limit, got {memory_max}" - ); - - let cpu_max = sandbox - .exec(&["cat", "/sys/fs/cgroup/cpu.max"]) - .await - .expect("read cpu.max from sandbox cgroup") - .trim() - .to_string(); - assert_eq!( - cpu_max, EXPECTED_CPU_MAX, - "sandbox cgroup should enforce the declared {CPU_REQUEST} CPU limit, got {cpu_max}" - ); - - sandbox.cleanup().await; -} diff --git a/tests/suites/features/Cargo.lock b/tests/suites/features/Cargo.lock index dcec7c2a8e..c24552d422 100644 --- a/tests/suites/features/Cargo.lock +++ b/tests/suites/features/Cargo.lock @@ -2914,6 +2914,13 @@ dependencies = [ "web-sys", ] +[[package]] +name = "resource-limits" +version = "0.0.0" +dependencies = [ + "openshell-testkit", +] + [[package]] name = "ring" version = "0.17.14" diff --git a/tests/suites/features/Cargo.toml b/tests/suites/features/Cargo.toml index d404806f50..297254dacd 100644 --- a/tests/suites/features/Cargo.toml +++ b/tests/suites/features/Cargo.toml @@ -3,4 +3,4 @@ [workspace] resolver = "2" -members = ["cdi", "connect-ssh-supervision", "host-gateway", "keycloak-provider-refresh", "kubernetes-updates", "oci-image", "routable-host-ip"] +members = ["cdi", "connect-ssh-supervision", "host-gateway", "keycloak-provider-refresh", "kubernetes-updates", "oci-image", "resource-limits", "routable-host-ip"] diff --git a/tests/suites/features/resource-limits/Cargo.toml b/tests/suites/features/resource-limits/Cargo.toml new file mode 100644 index 0000000000..de5fc716cc --- /dev/null +++ b/tests/suites/features/resource-limits/Cargo.toml @@ -0,0 +1,15 @@ +# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +[package] +name = "resource-limits" +description = "Features suite: a sandbox's CPU and memory limits are enforced by its cgroup" +version = "0.0.0" +edition = "2024" +rust-version = "1.94" +license = "Apache-2.0" +repository = "https://github.com/NVIDIA/OpenShell" +publish = false + +[dependencies] +openshell-testkit = { path = "../../../testkit/testkit" } diff --git a/tests/suites/features/resource-limits/tests/limits.rs b/tests/suites/features/resource-limits/tests/limits.rs new file mode 100644 index 0000000000..6b27ea5b24 --- /dev/null +++ b/tests/suites/features/resource-limits/tests/limits.rs @@ -0,0 +1,77 @@ +// SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +// SPDX-License-Identifier: Apache-2.0 + +//! Declared sandbox CPU and memory limits are enforced by the workload's +//! cgroup, not just stored and returned by the API. +//! +//! Conformance checks that a template stores its resources. It can't check +//! enforcement: not every driver enforces limits, and those that do report it +//! in their gateway info capabilities. This test runs where the driver reports +//! both limits, and reads the cgroup v2 files from inside the sandbox. + +use testkit::{Context, Error}; + +const CGROUP_READ_POLICY: &str = "version: 1 +filesystem_policy: + include_workdir: true + read_only: [/usr, /lib, /lib64, /proc, /etc, /sys/fs/cgroup] + read_write: [/sandbox, /tmp, /dev/null] +landlock: + compatibility: best_effort +network_policies: {} +"; + +const CPU_REQUEST: &str = "500m"; +const MEMORY_REQUEST: &str = "512Mi"; +/// A 50000us quota over a 100000us CFS period, what `--cpus=0.5` gives a +/// container. +const EXPECTED_CPU_MAX: &str = "50000 100000"; +/// 512 * 1024 * 1024 bytes. +const EXPECTED_MEMORY_MAX: &str = "536870912"; + +/// A sandbox created with `--cpu 500m --memory 512Mi` reads those limits from +/// its own `cpu.max` and `memory.max`. +#[testkit::test] +async fn declared_limits_are_enforced_by_the_sandbox_cgroup(cx: &mut Context) -> testkit::Result { + let info = cx.gateway_info().await?; + let resources = info + .compute_drivers + .first() + .and_then(|driver| driver.capabilities.as_ref()) + .and_then(|capabilities| capabilities.resource_capabilities.as_ref()) + .ok_or_else(|| Error::msg("the gateway reports no compute driver resource capabilities"))?; + let cpu = resources + .cpu + .as_ref() + .is_some_and(|cpu| cpu.limit_supported); + let memory = resources + .memory + .as_ref() + .is_some_and(|memory| memory.limit_supported); + testkit::ensure!( + cpu && memory, + "this suite needs a driver that enforces CPU and memory limits; the gateway reports cpu={cpu}, memory={memory}" + ); + + let sandbox = cx + .cli_sandbox("rl") + .args(["--cpu", CPU_REQUEST, "--memory", MEMORY_REQUEST]) + .policy_yaml(CGROUP_READ_POLICY) + .command(["sleep", "infinity"]) + .create_ready() + .await?; + + for (file, expected, request) in [ + ("memory.max", EXPECTED_MEMORY_MAX, MEMORY_REQUEST), + ("cpu.max", EXPECTED_CPU_MAX, CPU_REQUEST), + ] { + let path = format!("/sys/fs/cgroup/{file}"); + let output = sandbox.exec(["cat", path.as_str()]).await?.success()?; + let value = output.stdout.trim(); + testkit::ensure!( + value == expected, + "{path} reads {value:?}; expected {expected:?} for the declared {request} limit" + ); + } + Ok(()) +} From f2515f5984335af35072d94ba09b62843b1307e8 Mon Sep 17 00:00:00 2001 From: Matthew Grossman Date: Tue, 17 Nov 2026 21:20:15 -0800 Subject: [PATCH 6/9] test(features): port supervisor OCSF stderr records to ocsf Signed-off-by: Matthew Grossman --- .github/workflows/e2e-suites.yml | 3 + e2e/rust/tests/ocsf_console.rs | 160 ---------- tests/suites/features/Cargo.lock | 301 +++++++++++++++++- tests/suites/features/Cargo.toml | 2 +- tests/suites/features/ocsf/Cargo.toml | 18 ++ .../suites/features/ocsf/tests/ocsf_stderr.rs | 176 ++++++++++ 6 files changed, 494 insertions(+), 166 deletions(-) delete mode 100644 e2e/rust/tests/ocsf_console.rs create mode 100644 tests/suites/features/ocsf/Cargo.toml create mode 100644 tests/suites/features/ocsf/tests/ocsf_stderr.rs diff --git a/.github/workflows/e2e-suites.yml b/.github/workflows/e2e-suites.yml index 086fc811f7..045a8ce8ad 100644 --- a/.github/workflows/e2e-suites.yml +++ b/.github/workflows/e2e-suites.yml @@ -107,6 +107,9 @@ jobs: {"environment":"ubuntu-docker-rootful","installer":"deb","family":"features","package":"resource-limits","gateway":"openshell","runner":"ubuntu-24.04"}, {"environment":"fedora-podman-rootful","installer":"rpm","family":"features","package":"resource-limits","gateway":"openshell","runner":"ubuntu-24.04"}, {"environment":"fedora-podman-rootless","installer":"rpm","family":"features","package":"resource-limits","gateway":"openshell","runner":"ubuntu-24.04"}, + {"environment":"ubuntu-docker-rootful","installer":"deb","family":"features","package":"ocsf","gateway":"openshell","runner":"ubuntu-24.04"}, + {"environment":"fedora-podman-rootful","installer":"rpm","family":"features","package":"ocsf","gateway":"openshell","runner":"ubuntu-24.04"}, + {"environment":"fedora-podman-rootless","installer":"rpm","family":"features","package":"ocsf","gateway":"openshell","runner":"ubuntu-24.04"}, {"environment":"fedora-podman-rootful-keycloak","installer":"rpm","family":"features","package":"keycloak-provider-refresh","gateway":"openshell","runner":"ubuntu-24.04"}, {"environment":"fedora-podman-rootless-keycloak","installer":"rpm","family":"features","package":"keycloak-provider-refresh","gateway":"openshell","runner":"ubuntu-24.04"}, {"environment":"ubuntu-docker-rootful","installer":"deb","family":"drivers/docker","gateway":"openshell","runner":"ubuntu-24.04"}, diff --git a/e2e/rust/tests/ocsf_console.rs b/e2e/rust/tests/ocsf_console.rs deleted file mode 100644 index fbd2f6318b..0000000000 --- a/e2e/rust/tests/ocsf_console.rs +++ /dev/null @@ -1,160 +0,0 @@ -// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -// SPDX-License-Identifier: Apache-2.0 - -#![cfg(feature = "e2e-docker")] - -//! Full OCSF collection through supervisor stderr, without filesystem access. - -use std::time::Duration; - -use openshell_e2e::harness::binary::openshell_cmd; -use openshell_e2e::harness::sandbox::SandboxGuard; -use serde_json::Value; -use tokio::process::Command; -use tokio::time::{Instant, sleep}; - -async fn cli(args: &[&str]) -> String { - let output = openshell_cmd().args(args).output().await.unwrap(); - assert!( - output.status.success(), - "CLI failed: {}", - String::from_utf8_lossy(&output.stderr) - ); - format!( - "{}{}", - String::from_utf8_lossy(&output.stdout), - String::from_utf8_lossy(&output.stderr) - ) -} - -async fn docker(args: &[&str]) -> (String, String) { - let output = Command::new("docker").args(args).output().await.unwrap(); - assert!( - output.status.success(), - "Docker failed: {}", - String::from_utf8_lossy(&output.stderr) - ); - ( - String::from_utf8_lossy(&output.stdout).into_owned(), - String::from_utf8_lossy(&output.stderr).into_owned(), - ) -} - -fn json_records(stderr: &str) -> Vec { - stderr - .lines() - .filter_map(|line| { - let (_, payload) = line.split_once(" OCSF-JSON ")?; - assert!(!payload.contains('\x1b')); - Some(serde_json::from_str(payload).expect("complete JSON record on one line")) - }) - .collect() -} - -#[tokio::test] -async fn network_events_are_json_on_supervisor_stderr_only() { - let mut sandbox = SandboxGuard::create(&["--from", "nvcr.io/nvidia/base/ubuntu:24.04"]) - .await - .expect("create sandbox"); - let filter = format!("label=openshell.ai/sandbox-name={}", sandbox.name); - let (containers, _) = docker(&[ - "ps", - "-q", - "--filter", - &filter, - "--filter", - "label=openshell.ai/isolation-role=supervisor", - ]) - .await; - let ids: Vec<_> = containers.lines().collect(); - assert_eq!(ids.len(), 1, "expected one supervisor: {containers}"); - let supervisor = ids[0]; - let (workload, _) = docker(&[ - "ps", - "-q", - "--filter", - &filter, - "--filter", - "label=openshell.ai/isolation-role=sandbox", - ]) - .await; - let workload_ids: Vec<_> = workload.lines().collect(); - assert_eq!(workload_ids.len(), 1, "expected one workload: {workload}"); - let (image_uid, _) = docker(&["inspect", "--format", "{{.Image}}", workload_ids[0]]).await; - let (_, before) = docker(&["logs", supervisor]).await; - assert!(json_records(&before).is_empty(), "JSON must be opt-in"); - - cli(&[ - "settings", - "set", - &sandbox.name, - "--key", - "ocsf_json_enabled", - "--value", - "true", - ]) - .await; - let started = Instant::now(); - let records = loop { - cli(&[ - "sandbox", - "exec", - &sandbox.name, - "--timeout", - "10", - "--", - "bash", - "-c", - "echo > /dev/tcp/1.1.1.1/443 || true", - ]) - .await; - let (stdout, stderr) = docker(&["logs", supervisor]).await; - assert!( - !stdout.contains(" OCSF-JSON "), - "audit JSON should be on stderr" - ); - let records = json_records(&stderr); - if records.iter().any(|record| { - record["class_uid"] == 4001 - && record["dst_endpoint"]["port"] == 443 - && record["action"] == "Denied" - }) { - assert!( - stderr.contains(" OCSF NET:OPEN "), - "shorthand remains available" - ); - break records; - } - assert!( - started.elapsed() < Duration::from_secs(40), - "no JSON network denial in stderr: {stderr}" - ); - sleep(Duration::from_secs(1)).await; - }; - for record in records { - assert_eq!(record["metadata"]["version"], "1.8.0"); - assert!( - record["metadata"]["uid"] - .as_str() - .is_some_and(|uid| !uid.is_empty()) - ); - assert_eq!(record["device"]["container"]["name"], sandbox.name); - assert_eq!( - record["device"]["container"]["image"]["uid"], - image_uid.trim() - ); - assert_eq!( - record["device"]["container"]["image"]["name"], - "nvcr.io/nvidia/base/ubuntu:24.04" - ); - } - // Allow the existing best-effort push batch to reach the gateway. - sleep(Duration::from_secs(2)).await; - let gateway_logs = cli(&["logs", &sandbox.name, "--source", "sandbox", "-n", "200"]).await; - assert!(gateway_logs.contains("NET:OPEN")); - assert!( - !gateway_logs.contains("OCSF-JSON"), - "gateway stream must remain unchanged" - ); - sandbox.cleanup().await; -} diff --git a/tests/suites/features/Cargo.lock b/tests/suites/features/Cargo.lock index c24552d422..e5dda99fdb 100644 --- a/tests/suites/features/Cargo.lock +++ b/tests/suites/features/Cargo.lock @@ -26,6 +26,7 @@ dependencies = [ "cfg-if", "getrandom 0.3.4", "once_cell", + "serde", "version_check", "zerocopy", ] @@ -329,6 +330,21 @@ version = "0.23.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ac07cdecf99051d9a5238b80f35af32cdeba5b336e55d957b318b50137e18da5" +[[package]] +name = "bit-set" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08807e080ed7f9d5433fa9b275196cfc35414f66a0c79d864dc51a0d825231a3" +dependencies = [ + "bit-vec 0.8.0", +] + +[[package]] +name = "bit-vec" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e764a1d40d510daf35e07be9eb06e75770908c27d411ee6c92109c9840eaaf7" + [[package]] name = "bit-vec" version = "0.9.1" @@ -365,12 +381,24 @@ dependencies = [ "hybrid-array", ] +[[package]] +name = "borrow-or-share" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc0b364ead1874514c8c2855ab558056ebfeb775653e7ae45ff72f28f8f3166c" + [[package]] name = "bumpalo" version = "3.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5d20789868f4b01b2f2caec9f5c4e0213b41e3e5702a50157d699ae31ced2fcb" +[[package]] +name = "bytecount" +version = "0.6.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "175812e0be2bccb6abe50bb8d566126198344f707e304f45c648fd8f2cc0365e" + [[package]] name = "byteorder" version = "1.5.0" @@ -771,6 +799,15 @@ dependencies = [ "serde", ] +[[package]] +name = "email_address" +version = "0.2.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e079f19b08ca6239f47f8ba8509c11cf3ea30095831f7fed61441475edd8c449" +dependencies = [ + "serde", +] + [[package]] name = "enum-ordinalize" version = "4.4.2" @@ -844,6 +881,17 @@ dependencies = [ "pin-project-lite", ] +[[package]] +name = "fancy-regex" +version = "0.19.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d301f5bf187b3c295fce6468d3875037a0bccc5f6b151c63cac2f85babf21912" +dependencies = [ + "bit-set", + "regex-automata", + "regex-syntax", +] + [[package]] name = "fastrand" version = "2.4.1" @@ -862,6 +910,17 @@ version = "0.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1d674e81391d1e1ab681a28d99df07927c6d4aa5b027d7da16ba32d1d21ecd99" +[[package]] +name = "fluent-uri" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc74ac4d8359ae70623506d512209619e5cf8f347124910440dbc221714b328e" +dependencies = [ + "borrow-or-share", + "ref-cast", + "serde", +] + [[package]] name = "flume" version = "0.12.0" @@ -900,6 +959,16 @@ dependencies = [ "percent-encoding", ] +[[package]] +name = "fraction" +version = "0.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e246562084dde8ebbcc943b261c406ce4f68e5032ec28029a251a47d6a295500" +dependencies = [ + "num", + "num-bigint", +] + [[package]] name = "fs_extra" version = "1.3.0" @@ -1035,9 +1104,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd" dependencies = [ "cfg-if", + "js-sys", "libc", "r-efi 5.3.0", "wasip2", + "wasm-bindgen", ] [[package]] @@ -1124,6 +1195,11 @@ name = "hashbrown" version = "0.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4f467dd6dccf739c208452f8014c75c18bb8301b050ad1cfb27153803edb0f51" +dependencies = [ + "allocator-api2", + "equivalent", + "foldhash 0.2.0", +] [[package]] name = "hashlink" @@ -1692,6 +1768,59 @@ dependencies = [ "serde_json", ] +[[package]] +name = "jsonschema" +version = "0.58.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f622c574a29fb3034a0a90645afee194dfedc75fc124228801b6e77041075bd1" +dependencies = [ + "ahash", + "bytecount", + "data-encoding", + "email_address", + "fancy-regex", + "fraction", + "getrandom 0.3.4", + "itoa", + "jsonschema-regex", + "jsonschema-value", + "num-cmp", + "num-traits", + "percent-encoding", + "referencing", + "regex", + "serde", + "serde_json", + "strum", + "unicode-general-category", + "uuid-simd", +] + +[[package]] +name = "jsonschema-regex" +version = "0.58.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a968fffd387b2ab005bf00c1851f5d26e90df05b6f7ad609ed0d620033cca5e7" +dependencies = [ + "regex-syntax", +] + +[[package]] +name = "jsonschema-value" +version = "0.58.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "39b7670345e5ce87371339d13705dbb9276b7e3e934bbe1efa2c6734a1f65a96" +dependencies = [ + "ahash", + "bytecount", + "fraction", + "getrandom 0.3.4", + "num-cmp", + "num-traits", + "serde_json", + "zmij", +] + [[package]] name = "jsonwebtoken" version = "10.3.0" @@ -1899,18 +2028,18 @@ dependencies = [ [[package]] name = "linkme" -version = "0.3.37" +version = "0.3.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3045e122bd98aef8ec3ad58ce84f0791f64e70163d1a02710af4aa11a4d54cc5" +checksum = "10a4e12fd3f6b22d5bc28beccac0f53bb35db4a897c6ddb709c4a0161f72eb6e" dependencies = [ "linkme-impl", ] [[package]] name = "linkme-impl" -version = "0.3.37" +version = "0.3.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77060ebe535362c3da75682cd17b0431017b6e7c5661e714fc69a7ad017d1301" +checksum = "22cd04c256b1cd686a45898c8fd150c79b801d96a3eb7bae1075f9eb3b4b85c1" dependencies = [ "proc-macro2", "quote", @@ -1966,6 +2095,12 @@ version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f8ca58f447f06ed17d5fc4043ce1b10dd205e060fb3ce5b979b8ed8e59ff3f79" +[[package]] +name = "micromap" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2a86d3146ed3995b5913c414f6664344b9617457320782e64f0bb44afd49d74" + [[package]] name = "miette" version = "7.6.0" @@ -2080,6 +2215,20 @@ dependencies = [ "smallvec", ] +[[package]] +name = "num" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "35bd024e8b2ff75562e5f34e7f4905839deb4b22955ef5e73d2fea1b9813cb23" +dependencies = [ + "num-bigint", + "num-complex", + "num-integer", + "num-iter", + "num-rational", + "num-traits", +] + [[package]] name = "num-bigint" version = "0.4.8" @@ -2090,6 +2239,21 @@ dependencies = [ "num-traits", ] +[[package]] +name = "num-cmp" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "63335b2e2c34fae2fb0aa2cecfd9f0832a1e24b3b32ecec612c3426d46dc8aaa" + +[[package]] +name = "num-complex" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73f88a1307638156682bada9d7604135552957b7818057dcef22705b4d509495" +dependencies = [ + "num-traits", +] + [[package]] name = "num-conv" version = "0.2.1" @@ -2105,6 +2269,28 @@ dependencies = [ "num-traits", ] +[[package]] +name = "num-iter" +version = "0.1.45" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1429034a0490724d0075ebb2bc9e875d6503c3cf69e235a8941aa757d83ef5bf" +dependencies = [ + "autocfg", + "num-integer", + "num-traits", +] + +[[package]] +name = "num-rational" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f83d14da390562dca69fc84082e73e548e1ad308d24accdedd2720017cb37824" +dependencies = [ + "num-bigint", + "num-integer", + "num-traits", +] + [[package]] name = "num-traits" version = "0.2.19" @@ -2152,6 +2338,16 @@ dependencies = [ "tempfile", ] +[[package]] +name = "ocsf" +version = "0.0.0" +dependencies = [ + "container-engine-support", + "openshell-ocsf-validate", + "openshell-testkit", + "serde_json", +] + [[package]] name = "oid-registry" version = "0.8.1" @@ -2258,6 +2454,15 @@ dependencies = [ "tower", ] +[[package]] +name = "openshell-ocsf-validate" +version = "0.0.0" +dependencies = [ + "jsonschema", + "serde_json", + "thiserror 2.0.20", +] + [[package]] name = "openshell-policy" version = "0.0.0" @@ -2369,6 +2574,12 @@ dependencies = [ "num-traits", ] +[[package]] +name = "outref" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a80800c0488c3a21695ea981a54918fbb37abf04f4d0720c453632255e2ff0e" + [[package]] name = "owo-colors" version = "4.3.0" @@ -2846,6 +3057,43 @@ dependencies = [ "bitflags", ] +[[package]] +name = "ref-cast" +version = "1.0.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e440fb4e4b4147295338efb76001ab9e4efc0e5839df2c47fc5ac2381d365c3" +dependencies = [ + "ref-cast-impl", +] + +[[package]] +name = "ref-cast-impl" +version = "1.0.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92ecd8964f8453721699a1ed72037b0db49ce2f5a5138486ee89bed6f67cdf3a" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.5", +] + +[[package]] +name = "referencing" +version = "0.58.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "558f3855529c0a7e78a48e409fa653456e55f1b167eab4109c16a255b7727e3f" +dependencies = [ + "ahash", + "fluent-uri", + "getrandom 0.3.4", + "hashbrown 0.17.0", + "itoa", + "micromap", + "parking_lot", + "percent-encoding", + "serde_json", +] + [[package]] name = "regex" version = "1.12.3" @@ -3568,6 +3816,27 @@ version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" +[[package]] +name = "strum" +version = "0.28.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9628de9b8791db39ceda2b119bbe13134770b56c138ec1d3af810d045c04f9bd" +dependencies = [ + "strum_macros", +] + +[[package]] +name = "strum_macros" +version = "0.28.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab85eea0270ee17587ed4156089e10b9e6880ee688791d45a905f5b1ca36f664" +dependencies = [ + "heck", + "proc-macro2", + "quote", + "syn 2.0.117", +] + [[package]] name = "subtle" version = "2.6.1" @@ -4060,6 +4329,12 @@ version = "0.3.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5c1cb5db39152898a79168971543b1cb5020dff7fe43c8dc468b0885f5e29df5" +[[package]] +name = "unicode-general-category" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b993bddc193ae5bd0d623b49ec06ac3e9312875fdae725a975c51db1cc1677f" + [[package]] name = "unicode-ident" version = "1.0.24" @@ -4165,6 +4440,16 @@ dependencies = [ "wasm-bindgen", ] +[[package]] +name = "uuid-simd" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23b082222b4f6619906941c17eb2297fff4c2fb96cb60164170522942a200bd8" +dependencies = [ + "outref", + "vsimd", +] + [[package]] name = "vcpkg" version = "0.2.15" @@ -4177,6 +4462,12 @@ version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" +[[package]] +name = "vsimd" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c3082ca00d5a5ef149bb8b555a72ae84c9c59f7250f013ac822ac2e49b19c64" + [[package]] name = "vte" version = "0.14.1" @@ -4617,7 +4908,7 @@ version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b5f6765e852b9b4dc8e2a76843e4d64d1cea8e79bcde0b6901aea8e7c7f08282" dependencies = [ - "bit-vec", + "bit-vec 0.9.1", "time", ] diff --git a/tests/suites/features/Cargo.toml b/tests/suites/features/Cargo.toml index 297254dacd..f0eb92e621 100644 --- a/tests/suites/features/Cargo.toml +++ b/tests/suites/features/Cargo.toml @@ -3,4 +3,4 @@ [workspace] resolver = "2" -members = ["cdi", "connect-ssh-supervision", "host-gateway", "keycloak-provider-refresh", "kubernetes-updates", "oci-image", "resource-limits", "routable-host-ip"] +members = ["cdi", "connect-ssh-supervision", "host-gateway", "keycloak-provider-refresh", "kubernetes-updates", "oci-image", "ocsf", "resource-limits", "routable-host-ip"] diff --git a/tests/suites/features/ocsf/Cargo.toml b/tests/suites/features/ocsf/Cargo.toml new file mode 100644 index 0000000000..52ccec9acc --- /dev/null +++ b/tests/suites/features/ocsf/Cargo.toml @@ -0,0 +1,18 @@ +# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +[package] +name = "ocsf" +description = "Features suite: a container supervisor writes opt-in OCSF JSON audit records to its stderr that conform to the OCSF schema" +version = "0.0.0" +edition = "2024" +rust-version = "1.94" +license = "Apache-2.0" +repository = "https://github.com/NVIDIA/OpenShell" +publish = false + +[dependencies] +container-engine-support = { path = "../../../support/container-engine" } +openshell-ocsf-validate = { path = "../../../../crates/openshell-ocsf-validate" } +openshell-testkit = { path = "../../../testkit/testkit" } +serde_json = "1" diff --git a/tests/suites/features/ocsf/tests/ocsf_stderr.rs b/tests/suites/features/ocsf/tests/ocsf_stderr.rs new file mode 100644 index 0000000000..4dd2c63c07 --- /dev/null +++ b/tests/suites/features/ocsf/tests/ocsf_stderr.rs @@ -0,0 +1,176 @@ +// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +// SPDX-License-Identifier: Apache-2.0 + +//! A Docker or Podman supervisor writes OCSF audit records to its container's +//! stderr, so an operator can collect them without reading files in the +//! container. +//! +//! Conformance can't run this: it reads the supervisor container's own output +//! through the gateway's container engine, which only container drivers have. + +use std::time::Duration; + +use container_engine_support::Engine; +use testkit::sdk::raw::proto::setting_value::Value as SettingValue; +use testkit::{Context, Error, Poll, ResultExt as _}; + +const JSON_SETTING: &str = "ocsf_json_enabled"; +const JSON_MARKER: &str = " OCSF-JSON "; +/// A TCP connection to an endpoint the default policy doesn't allow. +const DENIED_CONNECT: &str = "echo > /dev/tcp/1.1.1.1/443 || true"; +/// How long the setting may take to reach the supervisor, which polls for it. +const JSON_TIMEOUT: Duration = Duration::from_secs(40); + +/// OCSF JSON is opt-in. With `ocsf_json_enabled`, the supervisor writes each +/// event as one ` OCSF-JSON ` line on stderr, never stdout, next to the +/// shorthand line. Records conform to the OCSF schema and name the sandbox's +/// container and image. The logs the gateway collects keep only the +/// shorthand. +#[testkit::test] +async fn network_events_are_json_on_supervisor_stderr_only(cx: &mut Context) -> testkit::Result { + let driver = cx.compute_driver().await?; + testkit::ensure!( + matches!(driver.as_str(), "docker" | "podman"), + "this suite needs a Docker or Podman gateway; the gateway uses {driver}" + ); + let engine = Engine::from_env()?; + let image = testkit::base_image(); + let sandbox = cx + .sandbox("oc") + .image(&image) + .command(["sleep", "infinity"]) + .create_ready() + .await?; + let supervisor = engine + .container_for_role(sandbox.name(), "supervisor") + .await?; + let workload = engine.container_for_role(sandbox.name(), "sandbox").await?; + let image_uid = engine.inspect_container(&workload, "{{.Image}}").await?; + + let before = engine.logs(&supervisor).await?; + testkit::ensure!( + json_records(&before.stderr)?.is_empty(), + "the supervisor wrote OCSF JSON before {JSON_SETTING} was set:\n{}", + before.stderr + ); + + sandbox + .set_setting(JSON_SETTING, SettingValue::BoolValue(true)) + .await?; + let (logs, records) = testkit::poll_until( + "a JSON network denial on the supervisor's stderr", + JSON_TIMEOUT, + Duration::from_secs(1), + async || { + sandbox.exec(["bash", "-c", DENIED_CONNECT]).await?; + let logs = engine.logs(&supervisor).await?; + testkit::ensure!( + !logs.stdout.contains(JSON_MARKER), + "the supervisor wrote OCSF JSON to stdout:\n{}", + logs.stdout + ); + let records = json_records(&logs.stderr)?; + Ok(if records.iter().any(is_denied_443) { + Poll::Ready((logs, records)) + } else { + Poll::Pending(format!("stderr:\n{}", logs.stderr)) + }) + }, + ) + .await?; + testkit::ensure!( + logs.stderr.contains(" OCSF NET:OPEN "), + "the shorthand NET:OPEN line is missing from the supervisor's stderr:\n{}", + logs.stderr + ); + + for record in &records { + check_record(record, sandbox.name(), &image, &image_uid) + .context(format!("OCSF record {record}"))?; + } + + let gateway_logs = sandbox + .logs_until("NET:OPEN", |logs| logs.contains("NET:OPEN")) + .await?; + testkit::ensure!( + !gateway_logs.contains("OCSF-JSON"), + "the logs the gateway collects contain OCSF JSON:\n{gateway_logs}" + ); + Ok(()) +} + +/// The JSON records in `stderr`, one per ` OCSF-JSON ` line. Each must be a +/// whole JSON object with no terminal escapes. +fn json_records(stderr: &str) -> testkit::Result> { + stderr + .lines() + .filter_map(|line| line.split_once(JSON_MARKER).map(|(_, payload)| payload)) + .map(|payload| { + testkit::ensure!( + !payload.contains('\x1b'), + "an OCSF JSON line has terminal escapes: {payload:?}" + ); + serde_json::from_str(payload).context(format!("parse OCSF JSON line {payload:?}")) + }) + .collect() +} + +fn is_denied_443(record: &serde_json::Value) -> bool { + record["class_uid"] == 4001 + && record["dst_endpoint"]["port"] == 443 + && record["action"] == "Denied" +} + +fn check_record( + record: &serde_json::Value, + sandbox: &str, + image: &str, + image_uid: &str, +) -> testkit::Result { + testkit::ensure!( + record["metadata"]["version"] == "1.8.0", + "metadata.version is not 1.8.0" + ); + testkit::ensure!( + record["metadata"]["uid"] + .as_str() + .is_some_and(|uid| !uid.is_empty()), + "metadata.uid is empty" + ); + let container = &record["device"]["container"]; + testkit::ensure!( + container["name"] == sandbox, + "device.container.name is not {sandbox}" + ); + testkit::ensure!( + container["image"]["name"] == image, + "device.container.image.name is not {image}" + ); + let uid = container["image"]["uid"] + .as_str() + .ok_or_else(|| Error::msg("device.container.image.uid is missing"))?; + testkit::ensure!( + uid.trim_start_matches("sha256:") == image_uid.trim_start_matches("sha256:"), + "device.container.image.uid is not the workload image {image_uid}" + ); + openshell_ocsf_validate::validate_event(record) + .map_err(|reason| Error::msg(format!("does not conform to the OCSF schema: {reason}"))) +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn json_records_reads_marked_lines_only() { + let stderr = "2026 INFO OCSF NET:OPEN [MED] DENIED\n\ + 2026 INFO OCSF-JSON {\"class_uid\":4001}\n"; + let records = json_records(stderr).unwrap(); + assert_eq!(records, vec![serde_json::json!({"class_uid": 4001})]); + } + + #[test] + fn json_records_rejects_escapes() { + assert!(json_records("x OCSF-JSON \x1b[1m{}\n").is_err()); + } +} From f5303273534af518b69c033635b42250b4a2564a Mon Sep 17 00:00:00 2001 From: Matthew Grossman Date: Tue, 17 Nov 2026 21:32:34 -0800 Subject: [PATCH 7/9] test(features): port driver-config volume and bind mounts to driver-config on Docker and Podman Signed-off-by: Matthew Grossman --- .github/workflows/e2e-suites.yml | 3 + TESTING.md | 8 +- e2e/rust/Cargo.lock | 107 ---- e2e/rust/Cargo.toml | 6 - e2e/rust/e2e-podman.sh | 1 - e2e/rust/tests/driver_config_volume.rs | 539 ------------------ tests/suites/features/Cargo.lock | 10 + tests/suites/features/Cargo.toml | 2 +- .../suites/features/driver-config/Cargo.toml | 18 + .../features/driver-config/tests/mounts.rs | 294 ++++++++++ .../ansible/playbooks/driver-config.yaml | 39 ++ tests/tmachine/artifacts.nix | 4 - tests/tmachine/config.nix | 6 + 13 files changed, 377 insertions(+), 660 deletions(-) delete mode 100644 e2e/rust/tests/driver_config_volume.rs create mode 100644 tests/suites/features/driver-config/Cargo.toml create mode 100644 tests/suites/features/driver-config/tests/mounts.rs create mode 100644 tests/tmachine/ansible/playbooks/driver-config.yaml diff --git a/.github/workflows/e2e-suites.yml b/.github/workflows/e2e-suites.yml index 045a8ce8ad..39cbbfb9c3 100644 --- a/.github/workflows/e2e-suites.yml +++ b/.github/workflows/e2e-suites.yml @@ -90,6 +90,9 @@ jobs: {"environment":"ubuntu-docker-rootful-cdi","installer":"deb","family":"features","package":"cdi","gateway":"openshell","runner":"ubuntu-24.04"}, {"environment":"fedora-podman-rootful-cdi","installer":"rpm","family":"features","package":"cdi","gateway":"openshell","runner":"ubuntu-24.04"}, {"environment":"fedora-podman-rootless-cdi","installer":"rpm","family":"features","package":"cdi","gateway":"openshell","runner":"ubuntu-24.04"}, + {"environment":"ubuntu-docker-rootful-driver-config","installer":"deb","family":"features","package":"driver-config","gateway":"openshell","runner":"ubuntu-24.04"}, + {"environment":"fedora-podman-rootful-driver-config","installer":"rpm","family":"features","package":"driver-config","gateway":"openshell","runner":"ubuntu-24.04"}, + {"environment":"fedora-podman-rootless-driver-config","installer":"rpm","family":"features","package":"driver-config","gateway":"openshell","runner":"ubuntu-24.04"}, {"environment":"ubuntu-docker-rootful-keycloak","installer":"deb","family":"features","package":"keycloak-provider-refresh","gateway":"openshell","runner":"ubuntu-24.04"}, {"environment":"ubuntu-docker-rootful","installer":"deb","family":"features","package":"oci-image","gateway":"openshell","runner":"ubuntu-24.04"}, {"environment":"fedora-podman-rootful","installer":"rpm","family":"features","package":"oci-image","gateway":"openshell","runner":"ubuntu-24.04"}, diff --git a/TESTING.md b/TESTING.md index 2a2dd99d67..0c7f86da4d 100644 --- a/TESTING.md +++ b/TESTING.md @@ -345,6 +345,11 @@ can run the suite. The expectations characterize the sandbox's behavior today, not a specification, and the `echo-socket` check needs `perl` in the workload image, which the default image has. +The `-driver-config` environments let callers pass driver config with +volume and bind mounts, and turn off resource admission, which blocks bind +mounts. The driver-config suite (`tests/suites/features/driver-config`) runs +there on Docker and Podman. + ### Python E2E (`e2e/python/`) `mise run e2e:python` builds `openshell/e2e-python:dev` from @@ -567,8 +572,7 @@ nix run .#generate-podman-e2e-ci-tests The `e2e-podman` testsuite runs a nextest archive built with the corresponding Rust feature and preloads its Python workload image into the rootless Podman store. The E2E archive excludes binaries that still depend on wrapper-owned -gateway controls, SPIFFE fixtures, the caller driver-config setting, or other -guest setup. `tests/tmachine/artifacts.nix` keeps the follow-up exclusions explicit and uses +gateway controls, SPIFFE fixtures, or other guest setup. `tests/tmachine/artifacts.nix` keeps the follow-up exclusions explicit and uses the same filter for the generated inventory, so excluded binaries cannot appear as false passes or silently re-enter the archive. diff --git a/e2e/rust/Cargo.lock b/e2e/rust/Cargo.lock index 17eb2b5e0c..b68c749916 100644 --- a/e2e/rust/Cargo.lock +++ b/e2e/rust/Cargo.lock @@ -298,49 +298,6 @@ dependencies = [ "hybrid-array", ] -[[package]] -name = "bollard" -version = "0.20.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee04c4c84f1f811b017f2fbb7dd8815c976e7ca98593de9c1e2afad0f636bff4" -dependencies = [ - "base64 0.22.1", - "bollard-stubs", - "bytes", - "futures-core", - "futures-util", - "hex", - "http", - "http-body-util", - "hyper", - "hyper-named-pipe", - "hyper-util", - "hyperlocal", - "log", - "pin-project-lite", - "serde", - "serde_derive", - "serde_json", - "serde_urlencoded", - "thiserror", - "tokio", - "tokio-util", - "tower-service", - "url", - "winapi", -] - -[[package]] -name = "bollard-stubs" -version = "1.52.1-rc.29.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f0a8ca8799131c1837d1282c3f81f31e76ceb0ce426e04a7fe1ccee3287c066" -dependencies = [ - "serde", - "serde_json", - "serde_repr", -] - [[package]] name = "borrow-or-share" version = "0.2.4" @@ -1224,20 +1181,6 @@ dependencies = [ "tower-service", ] -[[package]] -name = "hyper-named-pipe" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fab3637d6b04a8037af8a266fdf6cf92ea957e8c53981a2bf6136572531025bf" -dependencies = [ - "hex", - "hyper", - "hyper-util", - "pin-project-lite", - "tokio", - "tower-service", -] - [[package]] name = "hyper-rustls" version = "0.27.9" @@ -1288,21 +1231,6 @@ dependencies = [ "tracing", ] -[[package]] -name = "hyperlocal" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "986c5ce3b994526b3cd75578e62554abd09f0899d6206de48b3e96ab34ccc8c7" -dependencies = [ - "hex", - "http-body-util", - "hyper", - "hyper-util", - "pin-project-lite", - "tokio", - "tower-service", -] - [[package]] name = "iana-time-zone" version = "0.1.65" @@ -2004,7 +1932,6 @@ name = "openshell-e2e" version = "0.1.0" dependencies = [ "base64 0.22.1", - "bollard", "bytes", "flate2", "futures-util", @@ -2832,18 +2759,6 @@ dependencies = [ "syn 3.0.3", ] -[[package]] -name = "serde_urlencoded" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" -dependencies = [ - "form_urlencoded", - "itoa", - "ryu", - "serde", -] - [[package]] name = "serde_yaml" version = "0.9.34+deprecated" @@ -3845,28 +3760,6 @@ version = "2.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "626c4bac6755d76ffc12cb01b2eac751db1996b9e0041de9aa02c8c211ddc82c" -[[package]] -name = "winapi" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" -dependencies = [ - "winapi-i686-pc-windows-gnu", - "winapi-x86_64-pc-windows-gnu", -] - -[[package]] -name = "winapi-i686-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" - -[[package]] -name = "winapi-x86_64-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" - [[package]] name = "windows-core" version = "0.62.2" diff --git a/e2e/rust/Cargo.toml b/e2e/rust/Cargo.toml index ff66b4abea..9c8b5a1d0e 100644 --- a/e2e/rust/Cargo.toml +++ b/e2e/rust/Cargo.toml @@ -99,11 +99,6 @@ name = "additional_ca" path = "tests/additional_ca.rs" required-features = ["e2e-additional-ca"] -[[test]] -name = "driver_config_volume" -path = "tests/driver_config_volume.rs" -required-features = ["e2e-local-container-driver"] - [[test]] name = "gateway_start" path = "tests/gateway_start.rs" @@ -229,7 +224,6 @@ openshell-crypto = { path = "../../crates/openshell-crypto" } openshell-otel-test-support = { path = "../../crates/openshell-otel-test-support" } opentelemetry-proto = { version = "0.33", default-features = false, features = ["gen-tonic", "trace"] } base64 = "0.22" -bollard = "0.20" bytes = "1" futures-util = "0.3" http-body-util = "0.1" diff --git a/e2e/rust/e2e-podman.sh b/e2e/rust/e2e-podman.sh index 4ec68f9672..de39ddf2cc 100755 --- a/e2e/rust/e2e-podman.sh +++ b/e2e/rust/e2e-podman.sh @@ -23,7 +23,6 @@ source "${ROOT}/e2e/support/conformance.sh" # stabilized and can be added here. PODMAN_CI_TESTS=( ephemeral_cleanup - driver_config_volume edge_tunnel_e2e host_gateway_alias local_driver_token_restart diff --git a/e2e/rust/tests/driver_config_volume.rs b/e2e/rust/tests/driver_config_volume.rs deleted file mode 100644 index bcef6a429c..0000000000 --- a/e2e/rust/tests/driver_config_volume.rs +++ /dev/null @@ -1,539 +0,0 @@ -// SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -// SPDX-License-Identifier: Apache-2.0 - -#![cfg(feature = "e2e-local-container-driver")] - -use std::fs; -use std::io::Write; -use std::os::unix::fs::PermissionsExt; -use std::path::{Path, PathBuf}; -use std::sync::atomic::{AtomicU64, Ordering}; -use std::time::{SystemTime, UNIX_EPOCH}; - -use bollard::Docker; -use bollard::models::{ContainerCreateBody, HostConfig, Mount, MountTypeEnum, VolumeCreateRequest}; -use bollard::query_parameters::{ - CreateContainerOptionsBuilder, CreateImageOptionsBuilder, LogsOptions, RemoveContainerOptions, - RemoveVolumeOptionsBuilder, StartContainerOptions, WaitContainerOptions, -}; -use futures_util::TryStreamExt; -#[cfg(feature = "e2e-docker")] -use openshell_e2e::harness::container::ImageGuard; -use openshell_e2e::harness::container::e2e_driver; -use openshell_e2e::harness::sandbox::SandboxGuard; -use serde_json::{Map, Value}; - -const TEST_IMAGE: &str = "nvcr.io/nvidia/base/ubuntu:24.04"; -const VOLUME_TARGET: &str = "/sandbox/e2e-volume"; -const BIND_TARGET: &str = "/sandbox/e2e-bind"; -#[cfg(feature = "e2e-docker")] -const OCI_VOLUME_TARGET: &str = "/workspace/project/e2e-volume"; -#[cfg(feature = "e2e-docker")] -const OCI_USER_DOCKERFILE: &str = r#"FROM public.ecr.aws/docker/library/python:3.13-slim - -RUN apt-get update && apt-get install -y --no-install-recommends iproute2 \ - && rm -rf /var/lib/apt/lists/* - -WORKDIR /workspace/project -RUN chown 2234:2235 . -USER 2234:2235 -CMD ["sleep", "infinity"] -"#; - -static NEXT_VOLUME_ID: AtomicU64 = AtomicU64::new(0); - -struct VolumeGuard { - docker: Docker, - name: String, -} - -impl VolumeGuard { - async fn create(driver: &str) -> Result { - let name = unique_volume_name(driver); - let docker = connect_container_api(driver).await?; - docker - .create_volume(VolumeCreateRequest { - name: Some(name.clone()), - ..Default::default() - }) - .await - .map_err(|err| format!("create {driver} volume {name}: {err}"))?; - Ok(Self { docker, name }) - } -} - -impl Drop for VolumeGuard { - fn drop(&mut self) { - let docker = self.docker.clone(); - let name = self.name.clone(); - tokio::spawn(async move { - let _ = docker - .remove_volume( - &name, - Some(RemoveVolumeOptionsBuilder::new().force(true).build()), - ) - .await; - }); - } -} - -#[tokio::test] -async fn sandbox_mounts_existing_driver_config_volume() { - let driver = e2e_driver().expect("OPENSHELL_E2E_DRIVER must be set by the e2e wrapper"); - assert!( - matches!(driver.as_str(), "docker" | "podman"), - "driver_config volume e2e requires docker or podman, got {driver}" - ); - - let volume = VolumeGuard::create(&driver) - .await - .expect("create named test volume"); - - seed_volume(&volume).await.expect("seed named test volume"); - - let driver_config = format!( - r#"{{"{driver}":{{"mounts":[{{"type":"volume","source":"{}","target":"{VOLUME_TARGET}","read_only":false}}]}}}}"#, - volume.name - ); - let mut sandbox = SandboxGuard::create(&[ - "--driver-config-json", - &driver_config, - "--", - "sh", - "-lc", - "set -eu; test \"$(cat /sandbox/e2e-volume/input.txt)\" = host-volume-ok; printf sandbox-volume-ok > /sandbox/e2e-volume/output.txt; cat /sandbox/e2e-volume/output.txt", - ]) - .await - .expect("sandbox create with driver-config volume"); - - assert!( - sandbox.create_output.contains("sandbox-volume-ok"), - "sandbox should read and write the mounted volume:\n{}", - sandbox.create_output - ); - - sandbox.cleanup().await; - verify_volume(&volume) - .await - .expect("verify sandbox wrote to named test volume"); -} - -#[tokio::test] -#[cfg(feature = "e2e-docker")] -async fn oci_workspace_preparation_skips_nested_volume_ownership() { - let driver = e2e_driver().expect("OPENSHELL_E2E_DRIVER must be set by the e2e wrapper"); - assert!( - driver == "docker", - "OCI workspace mount e2e requires docker, got {driver}" - ); - - let volume = VolumeGuard::create(&driver) - .await - .expect("create named test volume"); - seed_volume(&volume).await.expect("seed named test volume"); - - let image_context = tempfile::tempdir().expect("create OCI image context"); - let dockerfile = image_context.path().join("Dockerfile"); - fs::write(&dockerfile, OCI_USER_DOCKERFILE).expect("write OCI image Dockerfile"); - let image = ImageGuard::build( - &format!("{driver}-oci-user"), - &dockerfile, - image_context.path(), - ) - .expect("build OCI-user image with selected container engine"); - - let driver_config = format!( - r#"{{"{driver}":{{"mounts":[{{"type":"volume","source":"{}","target":"{OCI_VOLUME_TARGET}","read_only":false}}]}}}}"#, - volume.name - ); - let mut sandbox = SandboxGuard::create_keep_with_args( - &[ - "--from", - image.tag(), - "--driver-config-json", - &driver_config, - "--no-tty", - ], - &[ - "sh", - "-lc", - "set -eu; test \"$(id -u):$(id -g)\" = 2234:2235; \ - test \"$(pwd -P)\" = /workspace/project; test \"$HOME\" = /workspace/project; \ - test \"$(stat -c %u:%g /workspace/project/e2e-volume/input.txt)\" = 0:0; \ - touch direct-write; echo Ready; sleep infinity", - ], - "Ready", - ) - .await - .expect("create OCI-user sandbox with nested volume"); - - let ssh_output = sandbox - .exec(&[ - "sh", - "-lc", - "set -eu; test \"$(pwd -P)\" = /workspace/project; \ - test \"$HOME\" = /workspace/project; \ - test \"$(stat -c %u:%g /workspace/project/e2e-volume/input.txt)\" = 0:0; \ - touch ssh-write; echo nested-mount-owner-ok", - ]) - .await - .expect("SSH child should preserve nested volume ownership"); - assert!( - ssh_output.contains("nested-mount-owner-ok"), - "expected nested mount ownership marker:\n{ssh_output}" - ); - - sandbox.cleanup().await; - verify_volume_ownership(&volume) - .await - .expect("nested volume ownership should remain unchanged"); -} - -#[tokio::test] -async fn sandbox_mounts_enabled_driver_config_bind() { - let driver = e2e_driver().expect("OPENSHELL_E2E_DRIVER must be set by the e2e wrapper"); - assert!( - matches!(driver.as_str(), "docker" | "podman"), - "driver_config bind e2e requires docker or podman, got {driver}" - ); - - let cwd = std::env::current_dir().expect("resolve current dir"); - let host_dir = tempfile::Builder::new() - .prefix("openshell-e2e-driver-config-bind-") - .tempdir_in(cwd) - .expect("create bind mount host dir"); - fs::set_permissions(host_dir.path(), fs::Permissions::from_mode(0o777)) - .expect("make bind mount host dir writable by sandbox user"); - let input_path = host_dir.path().join("input.txt"); - fs::write(&input_path, "host-bind-ok").expect("seed bind mount host dir"); - fs::set_permissions(&input_path, fs::Permissions::from_mode(0o666)) - .expect("make bind mount input readable by sandbox user"); - - let bind_source = bind_mount_source_path(&driver, host_dir.path()); - let bind_mount = serde_json::json!({ - "type": "bind", - "source": bind_source, - "target": BIND_TARGET, - "read_only": false, - "selinux_label": "private" - }); - let driver_config = driver_config_mount_json(&driver, &bind_mount); - // Host bind mounts are explicitly unsafe: this test validates driver mount - // wiring, not Landlock enforcement over Docker Desktop's fakeowner mounts. - let policy = write_bind_mount_policy().expect("write bind mount policy"); - let policy_path = policy.path().to_str().expect("policy path must be utf-8"); - let mut sandbox = SandboxGuard::create(&[ - "--policy", - policy_path, - "--driver-config-json", - &driver_config, - "--", - "sh", - "-lc", - "set -eu; test \"$(cat /sandbox/e2e-bind/input.txt)\" = host-bind-ok; printf sandbox-bind-ok > /sandbox/e2e-bind/output.txt; cat /sandbox/e2e-bind/output.txt", - ]) - .await - .expect("sandbox create with driver-config bind mount"); - - assert!( - sandbox.create_output.contains("sandbox-bind-ok"), - "sandbox should read and write the bind mount:\n{}", - sandbox.create_output - ); - - sandbox.cleanup().await; - let output = fs::read_to_string(host_dir.path().join("output.txt")) - .expect("read sandbox output from bind mount host dir"); - assert_eq!(output, "sandbox-bind-ok"); -} - -fn write_bind_mount_policy() -> Result { - let mut file = - tempfile::NamedTempFile::new().map_err(|err| format!("create bind policy: {err}"))?; - file.write_all( - br#"version: 1 - -filesystem_policy: - include_workdir: false - read_only: - - "/bin" - - "/dev" - - "/etc" - - "/lib" - - "/proc" - - "/usr" - read_write: - - "/sandbox/e2e-bind" - - "/tmp" - -landlock: - compatibility: best_effort - -process: - run_as_user: sandbox - run_as_group: sandbox -"#, - ) - .map_err(|err| format!("write bind policy: {err}"))?; - Ok(file) -} - -async fn seed_volume(volume: &VolumeGuard) -> Result<(), String> { - run_volume_container( - volume, - "seed", - false, - "set -eu; chmod 0777 /vol; printf host-volume-ok > /vol/input.txt", - ) - .await?; - Ok(()) -} - -async fn verify_volume(volume: &VolumeGuard) -> Result<(), String> { - let output = run_volume_container( - volume, - "verify", - true, - "set -eu; test \"$(cat /vol/input.txt)\" = host-volume-ok; test \"$(cat /vol/output.txt)\" = sandbox-volume-ok; echo volume-ok", - ) - .await?; - if !output.contains("volume-ok") { - return Err(format!( - "volume verification did not print expected marker:\n{output}" - )); - } - Ok(()) -} - -#[cfg(feature = "e2e-docker")] -async fn verify_volume_ownership(volume: &VolumeGuard) -> Result<(), String> { - let output = run_volume_container( - volume, - "verify-owner", - true, - "set -eu; test \"$(stat -c %u:%g /vol/input.txt)\" = 0:0; echo owner-ok", - ) - .await?; - if !output.contains("owner-ok") { - return Err(format!( - "volume ownership verification did not print expected marker:\n{output}" - )); - } - Ok(()) -} - -async fn run_volume_container( - volume: &VolumeGuard, - purpose: &str, - read_only: bool, - script: &str, -) -> Result { - ensure_test_image(&volume.docker).await?; - - let container_name = format!("{}-{purpose}", volume.name); - let create_options = CreateContainerOptionsBuilder::new() - .name(&container_name) - .build(); - let host_config = HostConfig { - mounts: Some(vec![Mount { - target: Some("/vol".to_string()), - source: Some(volume.name.clone()), - typ: Some(MountTypeEnum::VOLUME), - read_only: Some(read_only), - ..Default::default() - }]), - ..Default::default() - }; - volume - .docker - .create_container( - Some(create_options), - ContainerCreateBody { - image: Some(TEST_IMAGE.to_string()), - user: Some("0:0".to_string()), - entrypoint: Some(vec!["sh".to_string()]), - cmd: Some(vec!["-lc".to_string(), script.to_string()]), - attach_stdout: Some(true), - attach_stderr: Some(true), - host_config: Some(host_config), - ..Default::default() - }, - ) - .await - .map_err(|err| format!("create helper container {container_name}: {err}"))?; - - let result = run_created_container(volume, &container_name).await; - let remove_result = volume - .docker - .remove_container(&container_name, None::) - .await; - - match (result, remove_result) { - (Ok(output), Ok(())) => Ok(output), - (Ok(_), Err(err)) => Err(format!("remove helper container {container_name}: {err}")), - (Err(err), Ok(())) => Err(err), - (Err(err), Err(remove_err)) => Err(format!( - "{err}\nremove helper container {container_name}: {remove_err}" - )), - } -} - -async fn ensure_test_image(docker: &Docker) -> Result<(), String> { - if docker.inspect_image(TEST_IMAGE).await.is_ok() { - return Ok(()); - } - - let pull_events = docker - .create_image( - Some( - CreateImageOptionsBuilder::new() - .from_image(TEST_IMAGE) - .build(), - ), - None, - None, - ) - .try_collect::>() - .await - .map_err(|err| format!("pull helper image {TEST_IMAGE}: {err}"))?; - - let pull_errors = pull_events - .iter() - .filter_map(|event| { - event - .error_detail - .as_ref() - .and_then(|detail| detail.message.as_deref()) - }) - .collect::>(); - if pull_errors.is_empty() { - return Ok(()); - } - - Err(format!( - "pull helper image {TEST_IMAGE} failed:\n{}", - pull_errors.join("\n") - )) -} - -async fn run_created_container( - volume: &VolumeGuard, - container_name: &str, -) -> Result { - volume - .docker - .start_container(container_name, None::) - .await - .map_err(|err| format!("start helper container {container_name}: {err}"))?; - - let wait_result = volume - .docker - .wait_container(container_name, None::) - .try_collect::>() - .await; - let logs = volume - .docker - .logs( - container_name, - Some(LogsOptions { - stdout: true, - stderr: true, - tail: "all".to_string(), - ..Default::default() - }), - ) - .try_collect::>() - .await - .map(|chunks| { - chunks - .into_iter() - .map(|chunk| chunk.to_string()) - .collect::() - }); - - match (wait_result, logs) { - (Ok(_), Ok(output)) => Ok(output), - (Ok(_), Err(err)) => Err(format!( - "read helper container {container_name} logs: {err}" - )), - (Err(err), Ok(output)) => Err(format!( - "helper container {container_name} failed: {err}\n{output}" - )), - (Err(err), Err(log_err)) => Err(format!( - "helper container {container_name} failed: {err}\nread logs failed: {log_err}" - )), - } -} - -async fn connect_container_api(driver: &str) -> Result { - let docker = match driver { - "docker" => Docker::connect_with_local_defaults() - .map_err(|err| format!("connect to Docker API: {err}"))?, - "podman" => { - let socket = podman_socket_path()?; - let socket_display = socket.display().to_string(); - Docker::connect_with_unix( - socket - .to_str() - .ok_or_else(|| format!("podman socket path is not UTF-8: {socket_display}"))?, - 120, - bollard::API_DEFAULT_VERSION, - ) - .map_err(|err| format!("connect to Podman Docker-compatible API: {err}"))? - } - other => return Err(format!("unsupported e2e driver for volume API: {other}")), - }; - docker - .ping() - .await - .map_err(|err| format!("ping {driver} Docker-compatible API: {err}"))?; - Ok(docker) -} - -fn podman_socket_path() -> Result { - let path = std::env::var_os("OPENSHELL_PODMAN_SOCKET").ok_or_else(|| { - "OPENSHELL_PODMAN_SOCKET must be set by e2e/with-podman-gateway.sh".to_string() - })?; - Ok(PathBuf::from(path)) -} - -fn unique_volume_name(driver: &str) -> String { - let nanos = SystemTime::now() - .duration_since(UNIX_EPOCH) - .expect("system clock should be after Unix epoch") - .as_nanos(); - let sequence = NEXT_VOLUME_ID.fetch_add(1, Ordering::Relaxed); - format!( - "openshell-e2e-driver-config-volume-{driver}-{}-{nanos}-{sequence}", - std::process::id() - ) -} - -fn driver_config_mount_json(driver: &str, mount: &Value) -> String { - let mut root = Map::new(); - root.insert( - driver.to_string(), - serde_json::json!({ - "mounts": [mount] - }), - ); - Value::Object(root).to_string() -} - -fn bind_mount_source_path(driver: &str, path: &Path) -> PathBuf { - if driver == "docker" { - github_actions_host_work_path(path).unwrap_or_else(|| path.to_path_buf()) - } else { - path.to_path_buf() - } -} - -fn github_actions_host_work_path(path: &Path) -> Option { - if std::env::var("GITHUB_ACTIONS").ok().as_deref() != Some("true") { - return None; - } - - let relative = path.strip_prefix("/__w").ok()?; - let mapped = Path::new("/home/runner/_work").join(relative); - mapped.exists().then_some(mapped) -} diff --git a/tests/suites/features/Cargo.lock b/tests/suites/features/Cargo.lock index e5dda99fdb..98179ace85 100644 --- a/tests/suites/features/Cargo.lock +++ b/tests/suites/features/Cargo.lock @@ -766,6 +766,16 @@ version = "0.15.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1aaf95b3e5c8f23aa320147307562d361db0ae0d51242340f558153b4eb2439b" +[[package]] +name = "driver-config" +version = "0.0.0" +dependencies = [ + "container-engine-support", + "openshell-testkit", + "serde_json", + "tempfile", +] + [[package]] name = "dunce" version = "1.0.5" diff --git a/tests/suites/features/Cargo.toml b/tests/suites/features/Cargo.toml index f0eb92e621..7cac701180 100644 --- a/tests/suites/features/Cargo.toml +++ b/tests/suites/features/Cargo.toml @@ -3,4 +3,4 @@ [workspace] resolver = "2" -members = ["cdi", "connect-ssh-supervision", "host-gateway", "keycloak-provider-refresh", "kubernetes-updates", "oci-image", "ocsf", "resource-limits", "routable-host-ip"] +members = ["cdi", "connect-ssh-supervision", "driver-config", "host-gateway", "keycloak-provider-refresh", "kubernetes-updates", "oci-image", "ocsf", "resource-limits", "routable-host-ip"] diff --git a/tests/suites/features/driver-config/Cargo.toml b/tests/suites/features/driver-config/Cargo.toml new file mode 100644 index 0000000000..c6dcea67a4 --- /dev/null +++ b/tests/suites/features/driver-config/Cargo.toml @@ -0,0 +1,18 @@ +# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +[package] +name = "driver-config" +description = "Features suite: Docker and Podman sandboxes mount the volumes and bind mounts a caller's driver config names" +version = "0.0.0" +edition = "2024" +rust-version = "1.94" +license = "Apache-2.0" +repository = "https://github.com/NVIDIA/OpenShell" +publish = false + +[dependencies] +container-engine-support = { path = "../../../support/container-engine" } +openshell-testkit = { path = "../../../testkit/testkit" } +serde_json = "1" +tempfile = "3" diff --git a/tests/suites/features/driver-config/tests/mounts.rs b/tests/suites/features/driver-config/tests/mounts.rs new file mode 100644 index 0000000000..37fc72b017 --- /dev/null +++ b/tests/suites/features/driver-config/tests/mounts.rs @@ -0,0 +1,294 @@ +// SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +// SPDX-License-Identifier: Apache-2.0 + +//! Docker and Podman sandboxes mount the engine volumes and host directories a +//! caller names in `--driver-config-json`. +//! +//! The gateway must allow caller driver config and bind mounts, and resource +//! admission must be off, because bind mounts can't carry approval labels. The +//! tmachine `-driver-config` environments configure that. The tests +//! still label their volumes for the sandbox's workspace, so the volume tests +//! also pass with admission on. + +use std::os::unix::fs::PermissionsExt as _; +use std::path::Path; + +use container_engine_support::Engine; +use testkit::{Context, Error, Result, ResultExt as _}; + +const VOLUME_TARGET: &str = "/sandbox/e2e-volume"; +const OCI_VOLUME_TARGET: &str = "/workspace/project/e2e-volume"; +const BIND_TARGET: &str = "/sandbox/e2e-bind"; + +/// An image whose `USER` has no passwd entry and owns its `WORKDIR`, so the +/// driver prepares a workspace with a volume nested inside it. +const OCI_USER_CONTAINERFILE: &str = "WORKDIR /workspace/project +RUN chown 2234:2235 . +USER 2234:2235 +CMD [\"sleep\", \"infinity\"] +"; + +/// The bind test checks the driver's mount wiring, not Landlock over host +/// bind mounts, so the sandbox user may write the mount and `/tmp`. It runs +/// as the `sandbox` user, which the Python image has. +const BIND_POLICY: &str = "version: 1 + +filesystem_policy: + include_workdir: false + read_only: [/bin, /dev, /etc, /lib, /proc, /usr] + read_write: [/sandbox/e2e-bind, /tmp] + +landlock: + compatibility: best_effort + +process: + run_as_user: sandbox + run_as_group: sandbox +"; + +/// A sandbox's main command reads a file seeded in an existing volume and +/// writes one the host then reads. +#[testkit::test] +async fn sandbox_mounts_existing_driver_config_volume(cx: &mut Context) -> testkit::Result { + let driver = container_driver(cx).await?; + let engine = Engine::from_env()?; + let volume = create_seeded_volume(cx, &engine, "dcv").await?; + + let builder = cx.cli_sandbox("dcv"); + let name = builder.name().to_string(); + let output = builder + .args([ + "--driver-config-json", + &mount_config(&driver, "volume", &volume, VOLUME_TARGET).to_string(), + ]) + .command([ + "sh", + "-lc", + &format!( + "set -eu; test \"$(cat {VOLUME_TARGET}/input.txt)\" = host-volume-ok; \ + printf sandbox-volume-ok > {VOLUME_TARGET}/output.txt; \ + cat {VOLUME_TARGET}/output.txt" + ), + ]) + .run() + .await? + .success() + .context("sandbox reads and writes the mounted volume")?; + testkit::ensure!( + output.stdout.contains("sandbox-volume-ok"), + "the sandbox did not print its write to the volume:\n{}", + output.stdout + ); + + cx.adopt(&name).await?.delete().await?; + run_on_volume( + &engine, + &volume, + "test \"$(cat /vol/input.txt)\" = host-volume-ok; \ + test \"$(cat /vol/output.txt)\" = sandbox-volume-ok", + ) + .await + .context("the volume keeps the sandbox's write") +} + +/// A volume mounted inside the workspace of an image with a numeric `USER` +/// keeps its ownership: the driver prepares the workspace for that user +/// without changing the ownership of the nested mount. The main process and +/// `sandbox exec` children both run as the image user in the workspace. +#[testkit::test] +async fn oci_workspace_preparation_skips_nested_volume_ownership( + cx: &mut Context, +) -> testkit::Result { + let driver = container_driver(cx).await?; + let engine = Engine::from_env()?; + let volume = create_seeded_volume(cx, &engine, "dco").await?; + let image = engine + .build_test_image( + cx, + "driver-config-oci-user", + &format!("FROM {}\n{OCI_USER_CONTAINERFILE}", testkit::base_image()), + ) + .await?; + + let checks = format!( + "test \"$(id -u):$(id -g)\" = 2234:2235; \ + test \"$(pwd -P)\" = /workspace/project; test \"$HOME\" = /workspace/project; \ + test \"$(stat -c %u:%g {OCI_VOLUME_TARGET}/input.txt)\" = 0:0;" + ); + let main = format!( + "(set -eu; {checks} touch direct-write) >/tmp/dc-main.log 2>&1; \ + echo $? >/tmp/dc-main.status; exec sleep infinity" + ); + let sandbox = cx + .cli_sandbox("dco") + .image(&image.tag) + .args([ + "--driver-config-json", + &mount_config(&driver, "volume", &volume, OCI_VOLUME_TARGET).to_string(), + ]) + .command(["sh", "-c", &main]) + .create() + .await + .context("sandbox starts from the OCI-user image with a nested volume")?; + + let script = format!( + "set -eu; i=0; \ + while [ ! -f /tmp/dc-main.status ]; do \ + i=$((i + 1)); [ \"$i\" -le 60 ] || {{ echo main process checks did not finish >&2; exit 1; }}; \ + sleep 1; \ + done; \ + if [ \"$(cat /tmp/dc-main.status)\" != 0 ]; then \ + echo main process checks failed: >&2; cat /tmp/dc-main.log >&2; exit 1; \ + fi; \ + test -f direct-write; {checks} touch exec-write" + ); + sandbox.wait_ready().await?; + sandbox + .exec(["sh", "-c", &script]) + .await? + .success() + .context("main process and exec children keep the nested volume's ownership")?; + + sandbox.delete().await?; + run_on_volume( + &engine, + &volume, + "test \"$(stat -c %u:%g /vol/input.txt)\" = 0:0", + ) + .await + .context("the nested volume's ownership is unchanged") +} + +/// With bind mounts enabled, a sandbox's main command reads a file in a host +/// directory and writes one the host then reads. +#[testkit::test] +async fn sandbox_mounts_enabled_driver_config_bind(cx: &mut Context) -> testkit::Result { + let driver = container_driver(cx).await?; + // Under the home directory, which the gateway's engine can reach: the + // test user runs a rootless gateway, and a rootful engine reads any path. + let home = std::env::var_os("HOME").ok_or_else(|| Error::msg("HOME is not set"))?; + let host_dir = tempfile::Builder::new() + .prefix("openshell-test-driver-config-bind-") + .tempdir_in(home) + .context("create the bind mount directory")?; + set_mode(host_dir.path(), 0o777)?; + let input = host_dir.path().join("input.txt"); + std::fs::write(&input, "host-bind-ok").context("seed the bind mount directory")?; + set_mode(&input, 0o666)?; + + let source = host_dir + .path() + .to_str() + .ok_or_else(|| Error::msg("the bind mount directory is not UTF-8"))?; + let mut config = mount_config(&driver, "bind", source, BIND_TARGET); + config[&driver]["mounts"][0]["selinux_label"] = "private".into(); + + let builder = cx.cli_sandbox("dcb"); + let name = builder.name().to_string(); + let output = builder + .image(testkit::python_image()) + .policy_yaml(BIND_POLICY) + .args(["--driver-config-json", &config.to_string()]) + .command([ + "sh", + "-lc", + &format!( + "set -eu; test \"$(cat {BIND_TARGET}/input.txt)\" = host-bind-ok; \ + printf sandbox-bind-ok > {BIND_TARGET}/output.txt; \ + cat {BIND_TARGET}/output.txt" + ), + ]) + .run() + .await? + .success() + .context("sandbox reads and writes the bind mount")?; + testkit::ensure!( + output.stdout.contains("sandbox-bind-ok"), + "the sandbox did not print its write to the bind mount:\n{}", + output.stdout + ); + + cx.adopt(&name).await?.delete().await?; + let written = std::fs::read_to_string(host_dir.path().join("output.txt")) + .context("read the sandbox's write from the bind mount directory")?; + testkit::ensure!( + written == "sandbox-bind-ok", + "the bind mount directory has output {written:?}; expected sandbox-bind-ok" + ); + Ok(()) +} + +/// The gateway's compute driver, which must be Docker or Podman. +async fn container_driver(cx: &Context) -> Result { + let driver = cx.compute_driver().await?; + testkit::ensure!( + matches!(driver.as_str(), "docker" | "podman"), + "this suite needs a Docker or Podman gateway; the gateway uses {driver}" + ); + Ok(driver) +} + +/// A driver config with one writable mount of `kind` from `source` at +/// `target`. +fn mount_config(driver: &str, kind: &str, source: &str, target: &str) -> serde_json::Value { + serde_json::json!({ + driver: { + "mounts": [{ + "type": kind, + "source": source, + "target": target, + "read_only": false, + }] + } + }) +} + +/// Create a volume the sandbox's workspace may attach, with a world-writable +/// root and `input.txt` owned by root. +async fn create_seeded_volume(cx: &Context, engine: &Engine, name: &str) -> Result { + let workspace = cx.cli_handle().gateway().workspace.clone(); + let volume = engine + .create_test_volume( + cx, + name, + &[ + ("openshell.ai/sandbox-attachable", "true"), + ("openshell.ai/sandbox-attachable-workspace", &workspace), + ], + ) + .await?; + run_on_volume( + engine, + &volume, + "chmod 0777 /vol; printf host-volume-ok > /vol/input.txt", + ) + .await + .context(format!("seed volume {volume}"))?; + Ok(volume) +} + +/// Run `script` as root in a container from the base image, with `volume` at +/// `/vol`. +async fn run_on_volume(engine: &Engine, volume: &str, script: &str) -> Result { + engine + .output([ + "run", + "--rm", + "--user", + "0:0", + "--volume", + &format!("{volume}:/vol"), + "--entrypoint", + "sh", + &testkit::base_image(), + "-c", + &format!("set -eu; {script}"), + ]) + .await + .map(drop) +} + +fn set_mode(path: &Path, mode: u32) -> Result { + std::fs::set_permissions(path, std::fs::Permissions::from_mode(mode)) + .context(format!("set mode {mode:o} on {}", path.display())) +} diff --git a/tests/tmachine/ansible/playbooks/driver-config.yaml b/tests/tmachine/ansible/playbooks/driver-config.yaml new file mode 100644 index 0000000000..59d29cc416 --- /dev/null +++ b/tests/tmachine/ansible/playbooks/driver-config.yaml @@ -0,0 +1,39 @@ +# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +# Let callers pass driver config with volume and bind mounts. Resource admission +# blocks bind mounts, which can't carry approval labels, so this disables it, as +# the legacy e2e gateways did. Every installer merges +# /etc/openshell-test/gateway-overrides.toml into the gateway's configuration +# (see openshell_gateway/tasks/merge-settings.yaml). +--- +- name: Caller driver config for tests + hosts: all + gather_facts: false + tasks: + - name: Wait for SSH + ansible.builtin.wait_for_connection: + + - name: Create the test settings directory + become: true + ansible.builtin.file: + path: /etc/openshell-test + state: directory + owner: root + group: root + mode: "0755" + + - name: Allow caller driver config and bind mounts + become: true + ansible.builtin.copy: + dest: /etc/openshell-test/gateway-overrides.toml + content: | + [openshell.drivers.{{ environment_driver }}] + allow_driver_config = true + enable_bind_mounts = true + + [openshell.drivers.{{ environment_driver }}.resource_admission] + enabled = false + owner: root + group: root + mode: "0644" diff --git a/tests/tmachine/artifacts.nix b/tests/tmachine/artifacts.nix index 4c4d009596..50f8f8a74e 100644 --- a/tests/tmachine/artifacts.nix +++ b/tests/tmachine/artifacts.nix @@ -87,10 +87,6 @@ let # wrapper-based Podman lane (`mise run e2e:podman:ci`), so they are covered # there until tmachine provides what they need. podmanE2eFollowUpBinaries = [ - # Needs the caller driver-config settings (`allow_driver_config`, - # `enable_bind_mounts`), which the tmachine gateway does not enable. Wrapper - # lane. - "driver_config_volume" # The next three self-skip without wrapper-owned gateway metadata (restart # and configuration control), so exclude them rather than report false # passes. Wrapper lane. diff --git a/tests/tmachine/config.nix b/tests/tmachine/config.nix index 5a41618bf4..90221385ab 100644 --- a/tests/tmachine/config.nix +++ b/tests/tmachine/config.nix @@ -112,6 +112,12 @@ let bases = dockerBases ++ podmanBases; setup.playbooks = [ "ansible/playbooks/cdi.yaml" ]; }; + # Caller driver config with volume and bind mounts, for the driver-config + # suite. + driver-config = { + bases = dockerBases ++ podmanBases; + setup.playbooks = [ "ansible/playbooks/driver-config.yaml" ]; + }; }; featureEnvironments = pkgs.lib.concatMap ( feature: map (base: withSetup base feature features.${feature}.setup) features.${feature}.bases From 5de6d981451b6b9516c62e2d6beaabbac1aded14 Mon Sep 17 00:00:00 2001 From: Matthew Grossman Date: Tue, 17 Nov 2026 22:28:49 -0800 Subject: [PATCH 8/9] test(features): port HTTP response EOF and stop/start reachability to host-gateway The EOF check runs its three responses in one sandbox and reads the close through the shared http_raw client. The stop/start check is the restart half of podman_host_gateway, which stays in e2e/rust until its DNS relay check is decided. Signed-off-by: Matthew Grossman --- e2e/rust/tests/host_gateway_alias.rs | 72 ------------------- .../host-gateway/tests/host_gateway.rs | 55 +++++++++++++- .../host-gateway/tests/response_eof.rs | 66 +++++++++++++++++ 3 files changed, 120 insertions(+), 73 deletions(-) create mode 100644 tests/suites/features/host-gateway/tests/response_eof.rs diff --git a/e2e/rust/tests/host_gateway_alias.rs b/e2e/rust/tests/host_gateway_alias.rs index 98f6ec8159..2f5647356b 100644 --- a/e2e/rust/tests/host_gateway_alias.rs +++ b/e2e/rust/tests/host_gateway_alias.rs @@ -155,75 +155,3 @@ async fn sandbox_reaches_host_openshell_internal_via_host_gateway_alias() { guard.create_output ); } - -#[tokio::test] -async fn sandbox_receives_eof_after_closing_http_response() { - for response in [ - "HTTP/1.0 200 OK\r\nContent-Length: 3\r\n\r\nOK\n", - "HTTP/1.1 200 OK\r\nConnection: close\r\nContent-Length: 3\r\n\r\nOK\n", - "HTTP/1.1 200 OK\r\nConnection: close\r\nTransfer-Encoding: chunked\r\n\r\n3\r\nOK\n\r\n0\r\n\r\n", - ] { - let listener = TcpListener::bind(("0.0.0.0", 0)).await.unwrap(); - let port = listener.local_addr().unwrap().port(); - let server = HostServer { - port, - task: tokio::spawn(async move { - let (mut stream, _) = listener.accept().await.unwrap(); - stream.set_nodelay(true).expect("disable Nagle on fixture"); - let mut request = Vec::new(); - while !request.ends_with(b"\r\n\r\n") { - request.push(stream.read_u8().await.unwrap()); - assert!(request.len() < 4096); - } - stream.write_all(response.as_bytes()).await.unwrap(); - stream.shutdown().await.unwrap(); - }), - }; - let policy = write_policy(server.port).unwrap(); - let command = format!( - r#"set -eu -exec 3<>/dev/tcp/host.openshell.internal/{port} -printf 'GET / HTTP/1.1\r\nHost: host.openshell.internal:{port}\r\n\r\n' >&3 -while true; do - line= - if IFS= read -r -t 5 line <&3; then - printf '%s\n' "$line" - else - status=$? - [ "$status" -eq 1 ] || {{ echo EOF_TIMEOUT; exit 1; }} - [ -z "$line" ] || printf '%s\n' "$line" - break - fi -done -printf 'RESPONSE_EOF\n' -"#, - ); - let mut sandbox = SandboxGuard::create(&[ - "--policy", - policy.path().to_str().unwrap(), - "--no-auto-providers", - "--", - "/usr/bin/bash", - "-c", - &command, - ]) - .await - .expect("closing response must finish without a client timeout"); - assert!( - sandbox.create_output.lines().any(|line| line == "OK"), - "{}", - sandbox.create_output - ); - assert!( - sandbox.create_output.contains("RESPONSE_EOF"), - "{}", - sandbox.create_output - ); - assert!( - !sandbox.create_output.contains("EOF_TIMEOUT"), - "{}", - sandbox.create_output - ); - sandbox.cleanup().await; - } -} diff --git a/tests/suites/features/host-gateway/tests/host_gateway.rs b/tests/suites/features/host-gateway/tests/host_gateway.rs index f77a3e378a..40d98e1bf6 100644 --- a/tests/suites/features/host-gateway/tests/host_gateway.rs +++ b/tests/suites/features/host-gateway/tests/host_gateway.rs @@ -9,11 +9,13 @@ //! with [`sandbox_clients_support::http`], from a sandbox created from the //! Python test image ([`testkit::python_image`]). +use std::time::Duration; + use host_server_support::{HttpRecorder, TEST_HOST}; use sandbox_clients_support::{Request, http}; use testkit::policy; use testkit::sdk::raw::proto; -use testkit::{Context, PYTHON_BINARIES, ResultExt as _}; +use testkit::{Context, PYTHON_BINARIES, Poll, ResultExt as _, Sandbox}; /// A sandbox from the Python test image resolves `host.openshell.internal` /// and gets a response from a server the test runs on the host. The default @@ -54,6 +56,57 @@ async fn python_sandbox_reaches_host_server(cx: &mut Context) -> testkit::Result Ok(()) } +/// `host.openshell.internal` still reaches the host after the sandbox is +/// stopped and started, when the driver recreates its containers or pod. +#[testkit::test] +async fn host_server_reachable_after_stop_start(cx: &mut Context) -> testkit::Result { + let marker = format!("host-gateway-restart-{}", cx.run_id()); + let server = HttpRecorder::start(marker.clone()).await?; + let sandbox = cx + .sandbox("hgss") + .image(testkit::python_image()) + .command(["sleep", "infinity"]) + .policy(policy(server.port)) + .create_ready() + .await?; + + expect_reachable(&sandbox, server.port, &marker) + .await + .context("before the restart")?; + sandbox.stop().await?; + sandbox.start().await?; + expect_reachable(&sandbox, server.port, &marker) + .await + .context("after the restart") +} + +/// Request a page from the host server until the reply has `marker`, for up +/// to 40 seconds, as the legacy test retried. +async fn expect_reachable(sandbox: &Sandbox, port: u16, marker: &str) -> testkit::Result { + testkit::poll_until( + &format!("the host server on port {port} from {}", sandbox.name()), + Duration::from_secs(40), + Duration::from_secs(1), + async || { + Ok( + match http(sandbox, TEST_HOST, port, &Request::get("/")).await { + Ok(reply) + if reply + .response + .as_ref() + .is_some_and(|response| response.body_text().contains(marker)) => + { + Poll::Ready(()) + } + Ok(reply) => Poll::Pending(format!("{reply:?}")), + Err(error) => Poll::Pending(format!("{error:#}")), + }, + ) + }, + ) + .await +} + /// A sandbox policy that allows the image's Python to connect to /// `host.openshell.internal` on `port`. It allows [`PYTHON_BINARIES`], the /// real paths behind `python3` in `testkit::python_image()` images, because a diff --git a/tests/suites/features/host-gateway/tests/response_eof.rs b/tests/suites/features/host-gateway/tests/response_eof.rs new file mode 100644 index 0000000000..3c35b2d4b8 --- /dev/null +++ b/tests/suites/features/host-gateway/tests/response_eof.rs @@ -0,0 +1,66 @@ +// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +// SPDX-License-Identifier: Apache-2.0 + +//! A sandbox client sees the connection close when a host server closes it +//! after an HTTP response, whatever framing the response uses. + +use host_server_support::{TEST_HOST, TcpServer}; +use sandbox_clients_support::{ReadEnd, http_raw}; +use testkit::policy; +use testkit::{Context, PYTHON_BINARIES, ResultExt as _}; + +/// Responses the server sends, then closes the connection. Each ends the +/// response a different way: an HTTP/1.0 body length, `Connection: close` +/// with a body length, and `Connection: close` with a chunked body. +const RESPONSES: [&str; 3] = [ + "HTTP/1.0 200 OK\r\nContent-Length: 3\r\n\r\nOK\n", + "HTTP/1.1 200 OK\r\nConnection: close\r\nContent-Length: 3\r\n\r\nOK\n", + "HTTP/1.1 200 OK\r\nConnection: close\r\nTransfer-Encoding: chunked\r\n\r\n3\r\nOK\n\r\n0\r\n\r\n", +]; + +/// The client sends a request that doesn't ask the server to close, so only +/// the server's close ends the read. A client that goes idle instead got the +/// response but not the close. +#[testkit::test] +async fn sandbox_receives_eof_after_closing_http_response(cx: &mut Context) -> testkit::Result { + let mut servers = Vec::new(); + let mut allowed = policy::base(); + for response in RESPONSES { + let server = TcpServer::reply_when_idle(response).await?; + policy::allow( + &mut allowed, + "host_server", + TEST_HOST, + server.port, + PYTHON_BINARIES, + ); + servers.push((response, server)); + } + + let sandbox = cx + .sandbox("eof") + .image(testkit::python_image()) + .command(["sleep", "infinity"]) + .policy(allowed) + .create_ready() + .await?; + + for (response, server) in &servers { + let request = format!( + "GET / HTTP/1.1\r\nHost: {TEST_HOST}:{}\r\n\r\n", + server.port + ); + let reply = http_raw(&sandbox, TEST_HOST, server.port, request.as_bytes()) + .await + .context(format!("request {response:?} from the host server"))?; + testkit::ensure!( + reply.received_text().lines().any(|line| line == "OK"), + "the client did not get the body of {response:?}: {reply:?}" + ); + testkit::ensure!( + reply.read_end == Some(ReadEnd::Closed), + "the client did not see the server close after {response:?}: {reply:?}" + ); + } + Ok(()) +} From 4c8dfc90fcea6c08424b864ca41b7bfd2fbc2858 Mon Sep 17 00:00:00 2001 From: Matthew Grossman Date: Tue, 17 Nov 2026 22:30:52 -0800 Subject: [PATCH 9/9] test(features): check OCSF network, HTTP and SSH activity classes in ocsf Merges the class, attribution and schema checks of ocsf_jsonl_conformance into the stderr test. The sandbox denies a TCP connect and an L7 POST to an in-process host server, and the exec sessions add SSH Activity. ocsf_jsonl_conformance stays in e2e/rust for its /var/log file-sink check until that drop is decided. Signed-off-by: Matthew Grossman --- tests/suites/features/Cargo.lock | 2 + tests/suites/features/ocsf/Cargo.toml | 4 +- .../suites/features/ocsf/tests/ocsf_stderr.rs | 72 ++++++++++++++----- 3 files changed, 61 insertions(+), 17 deletions(-) diff --git a/tests/suites/features/Cargo.lock b/tests/suites/features/Cargo.lock index cca16e9cbf..40c4e12843 100644 --- a/tests/suites/features/Cargo.lock +++ b/tests/suites/features/Cargo.lock @@ -2354,8 +2354,10 @@ name = "ocsf" version = "0.0.0" dependencies = [ "container-engine-support", + "host-server-support", "openshell-ocsf-validate", "openshell-testkit", + "sandbox-clients-support", "serde_json", ] diff --git a/tests/suites/features/ocsf/Cargo.toml b/tests/suites/features/ocsf/Cargo.toml index 52ccec9acc..793e05c6de 100644 --- a/tests/suites/features/ocsf/Cargo.toml +++ b/tests/suites/features/ocsf/Cargo.toml @@ -3,7 +3,7 @@ [package] name = "ocsf" -description = "Features suite: a container supervisor writes opt-in OCSF JSON audit records to its stderr that conform to the OCSF schema" +description = "Features suite: a container supervisor writes opt-in OCSF JSON audit records to its stderr that conform to the OCSF schema and cover network, HTTP and SSH activity" version = "0.0.0" edition = "2024" rust-version = "1.94" @@ -13,6 +13,8 @@ publish = false [dependencies] container-engine-support = { path = "../../../support/container-engine" } +host-server-support = { path = "../../../support/host-server" } openshell-ocsf-validate = { path = "../../../../crates/openshell-ocsf-validate" } openshell-testkit = { path = "../../../testkit/testkit" } +sandbox-clients-support = { path = "../../../support/sandbox-clients" } serde_json = "1" diff --git a/tests/suites/features/ocsf/tests/ocsf_stderr.rs b/tests/suites/features/ocsf/tests/ocsf_stderr.rs index 4dd2c63c07..4b0c1d33f6 100644 --- a/tests/suites/features/ocsf/tests/ocsf_stderr.rs +++ b/tests/suites/features/ocsf/tests/ocsf_stderr.rs @@ -11,21 +11,30 @@ use std::time::Duration; use container_engine_support::Engine; +use host_server_support::{HttpRecorder, TEST_HOST}; +use sandbox_clients_support::{Request, connect, http}; +use testkit::policy::{self, Access, Endpoint as _}; use testkit::sdk::raw::proto::setting_value::Value as SettingValue; -use testkit::{Context, Error, Poll, ResultExt as _}; +use testkit::{Context, Error, PYTHON_BINARIES, Poll, ResultExt as _}; const JSON_SETTING: &str = "ocsf_json_enabled"; const JSON_MARKER: &str = " OCSF-JSON "; -/// A TCP connection to an endpoint the default policy doesn't allow. -const DENIED_CONNECT: &str = "echo > /dev/tcp/1.1.1.1/443 || true"; +/// An endpoint the policy doesn't allow, for a Network Activity denial. +const DENIED_HOST: &str = "1.1.1.1"; +const DENIED_PORT: u16 = 443; +/// Classes the traffic must produce: Network Activity for the denied +/// connect, HTTP Activity for the denied POST, and SSH Activity for the exec +/// sessions that run the clients. +const REQUIRED_CLASSES: [u64; 3] = [4001, 4002, 4007]; /// How long the setting may take to reach the supervisor, which polls for it. const JSON_TIMEOUT: Duration = Duration::from_secs(40); /// OCSF JSON is opt-in. With `ocsf_json_enabled`, the supervisor writes each /// event as one ` OCSF-JSON ` line on stderr, never stdout, next to the -/// shorthand line. Records conform to the OCSF schema and name the sandbox's -/// container and image. The logs the gateway collects keep only the -/// shorthand. +/// shorthand line. Denied TCP, a POST the L7 policy denies, and the exec +/// sessions produce Network, HTTP and SSH Activity records. Every record +/// conforms to the OCSF schema and names the sandbox's container and image. +/// The logs the gateway collects keep only the shorthand. #[testkit::test] async fn network_events_are_json_on_supervisor_stderr_only(cx: &mut Context) -> testkit::Result { let driver = cx.compute_driver().await?; @@ -34,11 +43,23 @@ async fn network_events_are_json_on_supervisor_stderr_only(cx: &mut Context) -> "this suite needs a Docker or Podman gateway; the gateway uses {driver}" ); let engine = Engine::from_env()?; - let image = testkit::base_image(); + let server = HttpRecorder::start("ocsf").await?; + // Python reaches the server, but only to read: the POST is an L7 denial. + let mut allowed = policy::base(); + policy::allow( + &mut allowed, + "server", + TEST_HOST, + server.port, + PYTHON_BINARIES, + ) + .rest(Access::ReadOnly); + let image = testkit::python_image(); let sandbox = cx .sandbox("oc") .image(&image) .command(["sleep", "infinity"]) + .policy(allowed) .create_ready() .await?; let supervisor = engine @@ -57,12 +78,18 @@ async fn network_events_are_json_on_supervisor_stderr_only(cx: &mut Context) -> sandbox .set_setting(JSON_SETTING, SettingValue::BoolValue(true)) .await?; + let post = Request::new("POST", "/allowed").body("x"); let (logs, records) = testkit::poll_until( - "a JSON network denial on the supervisor's stderr", + "JSON Network, HTTP and SSH Activity on the supervisor's stderr", JSON_TIMEOUT, Duration::from_secs(1), async || { - sandbox.exec(["bash", "-c", DENIED_CONNECT]).await?; + connect(&sandbox, DENIED_HOST, DENIED_PORT).await?; + let denied = http(&sandbox, TEST_HOST, server.port, &post).await?; + testkit::ensure!( + denied.status() == Some(403), + "the L7 policy did not deny the POST: {denied:?}" + ); let logs = engine.logs(&supervisor).await?; testkit::ensure!( !logs.stdout.contains(JSON_MARKER), @@ -70,11 +97,20 @@ async fn network_events_are_json_on_supervisor_stderr_only(cx: &mut Context) -> logs.stdout ); let records = json_records(&logs.stderr)?; - Ok(if records.iter().any(is_denied_443) { - Poll::Ready((logs, records)) - } else { - Poll::Pending(format!("stderr:\n{}", logs.stderr)) - }) + let missing: Vec = REQUIRED_CLASSES + .into_iter() + .filter(|class| !records.iter().any(|record| record["class_uid"] == *class)) + .collect(); + Ok( + if missing.is_empty() && records.iter().any(is_denied_connect) { + Poll::Ready((logs, records)) + } else { + Poll::Pending(format!( + "missing classes {missing:?}; stderr:\n{}", + logs.stderr + )) + }, + ) }, ) .await?; @@ -115,9 +151,9 @@ fn json_records(stderr: &str) -> testkit::Result> { .collect() } -fn is_denied_443(record: &serde_json::Value) -> bool { +fn is_denied_connect(record: &serde_json::Value) -> bool { record["class_uid"] == 4001 - && record["dst_endpoint"]["port"] == 443 + && record["dst_endpoint"]["port"] == DENIED_PORT && record["action"] == "Denied" } @@ -137,6 +173,10 @@ fn check_record( .is_some_and(|uid| !uid.is_empty()), "metadata.uid is empty" ); + testkit::ensure!( + record.get("container").is_none(), + "the container is at the top level, not under device" + ); let container = &record["device"]["container"]; testkit::ensure!( container["name"] == sandbox,