mirror of
https://github.com/NVIDIA/OpenShell.git
synced 2026-12-06 04:56:33 +08:00
2b03ec2d43c574ebe8df85426ddb7ceb98fc50c2
2217
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
2b03ec2d43 |
docs(e2e): direct new tests to testkit (#5909)
* test(e2e): add Kubernetes driver testkit suite Signed-off-by: Matthew Grossman <mgrossman@nvidia.com> * test(e2e): run a VM driver testkit suite on the host lane Signed-off-by: Matthew Grossman <mgrossman@nvidia.com> * ci(e2e): freeze new legacy Rust E2E tests Signed-off-by: Matthew Grossman <mgrossman@nvidia.com> * docs(e2e): add a testkit suite quickstart Signed-off-by: Matthew Grossman <mgrossman@nvidia.com> * chore(e2e): align driver suites with main Signed-off-by: Matthew Grossman <mgrossman@nvidia.com> * docs(e2e): retire the legacy Rust suite through contributor guidance Signed-off-by: Matthew Grossman <mgrossman@nvidia.com> --------- Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>v0.1.11-pre.4 v0.1.11 |
||
|
|
54796044fd |
docs(helm): document cert-manager operator mTLS setup (#4633)
* docs(helm): document operator mTLS gateway administration Signed-off-by: Taylor Mutch <taylormutch@gmail.com> * docs(helm): refresh documentation links Signed-off-by: Taylor Mutch <taylormutch@gmail.com> * docs(helm): undo optional link changes Signed-off-by: Taylor Mutch <taylormutch@gmail.com> --------- Signed-off-by: Taylor Mutch <taylormutch@gmail.com> |
||
|
|
09606269d1 |
fix(sandbox): stop logging in-progress nonblocking connects as denied (#5309)
* fix(sandbox): stop logging in-progress nonblocking connects as denied Signed-off-by: Artem Lytvyn <letv1n2007@icloud.com> * test(sandbox): assert in-progress connects are not logged as denied Signed-off-by: Artem Lytvyn <letv1n2007@icloud.com> * fix(sandbox): use SYS_gettid syscall in nonblocking connect test Signed-off-by: Artem Lytvyn <letv1n2007@icloud.com> --------- Signed-off-by: Artem Lytvyn <letv1n2007@icloud.com> |
||
|
|
6fd6b72a8e |
fix(compute): retry watch-driven sandbox updates after CAS conflicts (#5960)
A driver snapshot for an existing sandbox applied through the watch loop pinned the record version it had just read and performed a single CAS. Any concurrent write to the same record between that read and the CAS, such as the supervisor session state written while the sandbox comes up, failed the update with a Conflict, and the watch loop dropped the event with only a warning. Drivers that do not re-emit unchanged sandboxes then kept a stale record until the sandbox changed state again or the reconciliation sweep caught up. Re-enter the full update for a bounded number of attempts on Conflict, so each pass re-reads the record and re-runs the ambiguous-snapshot revalidation; a stale snapshot can no longer overwrite a newer gateway-owned transition such as a concurrent stop. Non-conflict failures still surface immediately, and after the bound the update defers to reconciliation with a warning instead of blocking the sequentially processed watch stream. Closes #5959 Signed-off-by: Emilien Macchi <emacchi@redhat.com> |
||
|
|
967c594c31 |
build(tests): pick up feature suite packages with a workspace glob (#6089)
Signed-off-by: Matthew Grossman <mgrossman@nvidia.com> |
||
|
|
9b93f8db7a |
fix(gator): resume review after process blockers clear (#6086)
Signed-off-by: John Myers <johntmyers@users.noreply.github.com> Co-authored-by: John Myers <johntmyers@users.noreply.github.com> |
||
|
|
7cfda8719d |
test: avoid released ports in connection failure fixtures (#5949)
* test: reserve refusal endpoints across parallel tests Signed-off-by: Taylor Mutch <taylormutch@gmail.com> * test: use deterministic connection failure fixtures Signed-off-by: Taylor Mutch <taylormutch@gmail.com> --------- Signed-off-by: Taylor Mutch <taylormutch@gmail.com> |
||
|
|
4d7dcc5974 |
chore(sdk/typescript)!: remove the @nvidia/openshell-sdk stub (#5974)
@nvidia/openshell-sdk@0.1.10 is published and re-exports @ai-openshell/sdk, so core no longer needs the stub, its publish workflow, or the freeze job. Refs #5480 Signed-off-by: Piotr Mlocek <pmlocek@nvidia.com> |
||
|
|
724f0a02c0 |
fix(binary-identity): resolve clock ticks without rustix auxv init (#6076)
`start_time_ms` called rustix's `clock_ticks_per_second`, whose auxv initialisation panics when the kernel lacks `PR_GET_AUXV` (added in Linux 6.4) and `/proc/self/auxv` cannot be opened as a fallback. Inside the sandbox network broker that is exactly the situation on RHEL 9 nodes (kernel 5.14), so every mediated connect() panicked the notification handler and was answered EIO, breaking all sandbox egress since 0.1.10. Resolve the tick rate with `sysconf(_SC_CLK_TCK)` instead, degrading to the Linux ABI constant (`USER_HZ` = 100) rather than risking a panic, and drop the rustix dependency from the crate. Add a regression test that reproduces the kernel < 6.4 conditions with a seccomp filter answering `PR_GET_AUXV` with ENOSYS and a Landlock ruleset that denies `/proc/self/auxv` while keeping `/proc/stat` readable. Closes #6069 Signed-off-by: Emilien Macchi <emacchi@redhat.com> |
||
|
|
1915ea71e7 |
feat(review): add labeling agent in Claude Managed Agents (#5407)
* feat(review): add managed labeling runtime foundation Signed-off-by: Jim Meyer <jimeyer@nvidia.com> * refactor(review): trim labeling runtime docs and single-source defaults The README links to #5276 for activation prerequisites and to the modules for completion and invocation behavior instead of restating them. Budget and timeout defaults live in one constant each and appear in --help. A shared helper validates item numbers, and one discover command runs both test files. Signed-off-by: Jim Meyer <jimeyer@nvidia.com> * style(review): format, lint-fix, and license labeling runtime scripts Apply ruff format, fix RUF021, B023, and RUF005, and add SPDX headers so the scripts pass python:format:check, python:lint, and license:check. Signed-off-by: Jim Meyer <jimeyer@nvidia.com> * fix(review): tune labeling runtime baseline and failure coverage Signed-off-by: Jim Meyer <jimeyer@nvidia.com> * test(review): scope labeling runtime test task Signed-off-by: Jim Meyer <jimeyer@nvidia.com> * fix(review): interrupt failed classifiers and use supported SDK Signed-off-by: Jim Meyer <jimeyer@nvidia.com> * refactor(review): use SDK directly and document agent layout Signed-off-by: Jim Meyer <jimeyer@nvidia.com> * refactor(review): move labeling tools into labeler agent Signed-off-by: Jim Meyer <jimeyer@nvidia.com> * test(labeler): consolidate directory-based test discovery Signed-off-by: Jim Meyer <jimeyer@nvidia.com> * feat(review): connect the one-item labeling runner Signed-off-by: Jim Meyer <jimeyer@nvidia.com> * fix(review): type-check imports from the labeler agent check_review_readiness.py now imports acceptance from .agents/agents/labeler/bin, so add that directory to ty's search path. Signed-off-by: Jim Meyer <jimeyer@nvidia.com> --------- Signed-off-by: Jim Meyer <jimeyer@nvidia.com> |
||
|
|
cb3e701b5c |
feat(gateway): replace per-driver launcher features with driver-launcher (#6035)
* feat(gateway): replace per-driver launcher features with driver-launcher The Docker, Podman and VM drivers run as separate binaries, so the compute-driver-docker, compute-driver-podman and compute-driver-vm features no longer select any linked code. Remove them and gate the launchers on driver-launcher alone, which in-tree-compute-drivers now enables. Update the feature matrix, the Windows selective test loop and the source-build docs. Closes #5965 Related to #5200, #5384 Signed-off-by: Evan Lezar <elezar@nvidia.com> * docs(gateway): note driver selection with driver-launcher Signed-off-by: Evan Lezar <elezar@nvidia.com> --------- Signed-off-by: Evan Lezar <elezar@nvidia.com> |
||
|
|
ee006bb801 |
fix(deps): update curve25519-dalek for RUSTSEC-2026-0620 (#6078)
Update curve25519-dalek from 5.0.0 to 5.1.0 in the root lockfile. The 5.1.0 release fixes the AVX-512 backend, which could return incorrect results for scalar multiplication on an attacker-chosen point. russh 0.65.2 and ed25519-dalek 3.0.0 accept the patched release without a constraint change. Signed-off-by: Adrien Langou <alangou@nvidia.com>v0.1.11-pre.3 |
||
|
|
659b45f3be |
fix(ci): isolate Trivy fixture severity (#6039)
Signed-off-by: Simon Scatton <sscatton@nvidia.com> |
||
|
|
569c274557 |
refactor(drivers): remove reverse dependencies on the VM and Podman drivers (#6023)
* refactor(drivers): remove reverse dependencies on the VM and Podman drivers Move Podman socket discovery into a new openshell-container-runtime crate for code used only by the desktop drivers, so the VM driver no longer depends on openshell-driver-podman. Move the counting test allocator into openshell-supervisor-network so it no longer depends on openshell-driver-vm. Nothing outside crates/openshell-driver-* and the container-runtime crate now depends on the Docker, Podman or VM driver crates. Signed-off-by: Evan Lezar <elezar@nvidia.com> * docs(supervisor-network): refresh README for the test-only allocator and exclude the container-runtime crate on Windows Signed-off-by: Evan Lezar <elezar@nvidia.com> --------- Signed-off-by: Evan Lezar <elezar@nvidia.com> |
||
|
|
81db9d2c0d |
ci(trivy): remove obsolete bootstrap manifests (#6021)
* ci(trivy): scope false-positive exceptions Signed-off-by: Simon Scatton <sscatton@nvidia.com> (cherry picked from commit b0c42cf766ce9d03b61ab156c9a05845aa2408ef) * ci(trivy): remove obsolete HelmChart manifests Signed-off-by: Simon Scatton <sscatton@nvidia.com> --------- Signed-off-by: Simon Scatton <sscatton@nvidia.com> |
||
|
|
94f58a41e3 |
fix(images): probe supervisor readiness (#6020)
* fix(images): probe supervisor readiness Signed-off-by: Simon Scatton <sscatton@nvidia.com> (cherry picked from commit 0a7d719165026e3b43c67c9ccbf50d70ea8defb2) * docs(images): clarify supervisor health probes Signed-off-by: Simon Scatton <sscatton@nvidia.com> --------- Signed-off-by: Simon Scatton <sscatton@nvidia.com> |
||
|
|
fd184728c9 |
fix(helm): set control plane resource budgets (#6018)
* fix(helm): set control plane resource budgets Signed-off-by: Simon Scatton <sscatton@nvidia.com> * test(helm): align supervisor budget assertions Signed-off-by: Simon Scatton <sscatton@nvidia.com> * docs(helm): explain resource upgrade risks Signed-off-by: Simon Scatton <sscatton@nvidia.com> --------- Signed-off-by: Simon Scatton <sscatton@nvidia.com> |
||
|
|
2cd4f53840 |
fix(ci): scope workflow write permissions (#6033)
Signed-off-by: Simon Scatton <sscatton@nvidia.com>v0.1.11-pre.2 |
||
|
|
e08d7d5f1f |
fix(security): harden supervisor and SSH RBAC (#6014)
* fix(images): default supervisor to non-root Signed-off-by: Simon Scatton <sscatton@nvidia.com> * fix(helm): scope managed SSH policy mutation Signed-off-by: Simon Scatton <sscatton@nvidia.com> * test(helm): detect unscoped policy mutation Signed-off-by: Simon Scatton <sscatton@nvidia.com> --------- Signed-off-by: Simon Scatton <sscatton@nvidia.com> |
||
|
|
7e32110a04 |
chore(deps): update the chrono exception after the Jiff migration (#6030)
Signed-off-by: Adrien Langou <alangou@nvidia.com> |
||
|
|
94a9527f82 |
ci: publish per-commit test inputs to ghcr (#6015)
Downstream repositories reused test inputs from a hand-dispatched Branch E2E run that expired after five days. Publish the tmachine inputs, the conformance program, supervisor, sandbox, VM init and Linux drivers to ghcr.io/ai-openshell/openshell/test-inputs:<sha> from Release Dev and from Branch E2E (any same-repository PR commit or dispatched ref). Release Dev now builds the conformance program through a new reusable workflow. Branch E2E keeps its own build-conformance job unchanged. Signed-off-by: Evan Lezar <elezar@nvidia.com> |
||
|
|
a86f6e867e |
fix(gateway): prevent leaking username in logs (#6012)
* fix(gateway): prevent leaking username in logs Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> * fix(cli): remove unused JWT username helper Signed-off-by: Simon Scatton <sscatton@nvidia.com> --------- Signed-off-by: Simon Scatton <sscatton@nvidia.com> Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> |
||
|
|
793c5f388a |
fix(helm): use a read-only gateway root (#6011)
Signed-off-by: Simon Scatton <sscatton@nvidia.com> |
||
|
|
a138874f2e |
feat(helm): preflight gateway storage on install (#5774)
* feat(helm): preflight gateway storage on install Signed-off-by: Shiju <shiju@nvidia.com> * docs(helm): clarify storage preflight recovery Signed-off-by: Shiju <shiju@nvidia.com> --------- Signed-off-by: Shiju <shiju@nvidia.com> |
||
|
|
03908a0631 |
feat(drivers): launch the VM, Podman and Docker drivers with serve and Configure (#5914)
* test(gateway): install config preflight fixtures by rename Write each fixture script to a temporary file, close it, and rename it into place. A script another test's fork still holds open for writing fails to execute with ETXTBSY. Signed-off-by: Evan Lezar <elezar@nvidia.com> * refactor(vm): move the driver's socket and peer checks into a module Move socket preparation, peer authorization by uid and gateway PID, and the shutdown signal out of main.rs. No behaviour change. Signed-off-by: Evan Lezar <elezar@nvidia.com> * refactor(server): hold a managed driver's process in an enum Wrap the managed driver's child process in DriverChild so a later change can manage a process started another way. No behaviour change. Signed-off-by: Evan Lezar <elezar@nvidia.com> * feat(otel): enable driver trace export after tracing is installed A launched driver logs first and starts OTLP export when the gateway configures it. The deferred layer forwards downcasts to the installed OpenTelemetry layer, so a span's parent trace context still reaches the exporter, which a reloadable slot would drop. Export starts once and a repeat call is a no-op. Signed-off-by: Evan Lezar <elezar@nvidia.com> * feat(drivers): add the driver launch protocol Add proto/driver_launch.proto and the openshell-driver-launch crate. A launched driver serves GetLaunchInfo and Configure and answers UNAVAILABLE on its other services until Configure succeeds once. Configure carries the gateway context (including its bind address), network trust, image overrides, telemetry, and the admission policy the gateway owns. Signed-off-by: Evan Lezar <elezar@nvidia.com> * feat(drivers): add a shared SDK for launched compute drivers Add openshell-driver-sdk with the stdin table reader, the start-up exit codes and stdout report line, the staged network-trust loader, telemetry and admission conversion from Configure, grpc_endpoint checks, the gateway context, and a parent-death guard. Signed-off-by: Evan Lezar <elezar@nvidia.com> * feat(vm): serve the launch protocol and read its table from stdin Add settings_from_table as the single parse and validation point for the vm driver table, a serve command that binds the socket and applies Configure before serving ComputeDriver, and a preflight command. The table holds only what the operator owns: the gateway port and CA come from Configure, the admission policy arrives in Configure, and grpc_endpoint is an optional override checked for syntax and scheme. A setting the table leaves unset still falls back to the driver's environment variable. The argv mode keeps working. Signed-off-by: Evan Lezar <elezar@nvidia.com> * feat(server): expose a launched driver's table, process state, and driver_dir Let a factory read the selected driver's raw merged table, report whether a managed driver process is running or has exited on its own (DriverProcessState and poll_exit), manage a driver started with std, and read driver_dir from [openshell.gateway]. Signed-off-by: Evan Lezar <elezar@nvidia.com> * feat(gateway): launch the VM driver with serve and Configure Add a generic subprocess launcher: it resolves and trust-checks the driver binary, gives each launch its own private socket directory, starts serve with the table on stdin, reads GetLaunchInfo, sends Configure, and reports an unexpected exit. The exit status decides the result and the JSON line only explains it. The VM driver is launched through it, the VM argv builder and OTLP flags are removed, and config preflight runs the driver's preflight command. The gateway owns the admission policy and driver_dir: it strips the admission keys from the forwarded table and reads driver_dir from [openshell.gateway], warning about the old driver-table location. Signed-off-by: Evan Lezar <elezar@nvidia.com> * feat(server): detect drivers with their own table and keep the one that starts Let a registration detect its driver with the operator's merged table instead of an environment probe. A probe returns whether the driver is available, unavailable, has an invalid table, or failed outright. The first available driver's running process is stashed for the factory's build step, so detection never starts a driver it then stops; an unused one is stopped when dropped. An invalid table or unreachable backend falls through to the next candidate, a crash or timeout stops startup, and the no-driver error lists each candidate's reason. Legacy keys are normalized in a copy of the configuration for each candidate. Signed-off-by: Evan Lezar <elezar@nvidia.com> * feat(podman): serve the launch protocol and read its table from stdin Add settings_from_table as the single parse and validation point for the podman driver table, a serve command that checks the Podman socket (honouring socket_path and OPENSHELL_PODMAN_SOCKET) before it binds and applies Configure before serving ComputeDriver, and a preflight command. The table holds only what the operator owns: the gateway port, the CA and the admission policy come from Configure, and grpc_endpoint is an optional override checked for syntax and scheme. The standalone flags still work. Signed-off-by: Evan Lezar <elezar@nvidia.com> * feat(gateway): launch the Podman driver as a subprocess Launch openshell-driver-podman through the shared launcher and stop linking it into the gateway. Auto-detection starts the driver with the operator's table, so a configured socket_path is honoured, and keeps the first driver that binds its socket. An invalid table or unreachable socket falls through to the next candidate; a crash stops startup. A named Podman is started again while its socket is unreachable, as the in-process driver retried. The gateway drops a legacy gateway_port from the table with a warning, so the driver can stay strict. config preflight runs the driver's preflight command. Ship the driver: build it for both Linux targets and macOS, install it in /usr/libexec/openshell through the deb, RPM and Nix packages and the Homebrew formula, publish its release assets, and provision it for the dev gateway task and the managed Podman E2E lanes. Signed-off-by: Evan Lezar <elezar@nvidia.com> * feat(docker): serve the launch protocol and read its table from stdin Add settings_from_table as the single parse and validation point for the docker driver table, a serve command that checks the Docker socket before it binds and applies Configure before serving both ComputeDriver and ComputeDriverConfigurationUpdates, and a preflight command. The table holds only what the operator owns: the CA and the admission policy come from Configure, and grpc_endpoint is an optional override checked for syntax and scheme. The standalone flags still work. Signed-off-by: Evan Lezar <elezar@nvidia.com> * feat(gateway): launch the Docker driver as a subprocess Launch openshell-driver-docker through the shared launcher and stop linking it into the gateway, replacing the in-process Docker driver. The driver's ComputeDriverConfigurationUpdates service is served through the same launched process. Auto-detection starts the driver with the operator's table and keeps the first one that binds its socket, as for Podman, and config preflight runs the driver's preflight command. Move the detect, launch and preflight logic Podman and Docker share into one module. The gateway keeps checking its own bind port and the admission policy. Ship the driver: build it for both Linux targets and macOS, install it in /usr/libexec/openshell through the deb, RPM and Nix packages, in libexec/openshell in the snap, and through the Homebrew formula, publish its release assets, and provision it for the dev gateway task and the Docker E2E lanes. Signed-off-by: Evan Lezar <elezar@nvidia.com> * feat(gateway): ship the Docker and Podman drivers in the gateway image The gateway launches these drivers as subprocesses, so an image that runs the Docker or Podman driver needs their binaries. Stage them beside the gateway, install them under /usr/libexec/openshell, one of the directories the gateway searches, and build them in the image workflow and the local image tasks. Signed-off-by: Evan Lezar <elezar@nvidia.com> * feat(drivers): release a launched driver before it stops A service manager signals every process of the gateway's unit when it stops the unit, so a launched driver received SIGTERM at the same time as the gateway. The driver could stop serving before the gateway had stopped the sandboxes through it, leaving Docker, Podman or VM sandboxes running after the service stopped. Add a Shutdown call to the launch protocol. A driver now defers a stop signal that reaches it from elsewhere until the gateway releases it, its gateway exits, or 30 seconds pass. The gateway stops sandboxes through the driver first, then releases it with Shutdown, waits for it to exit, and falls back to SIGTERM and kill as before. A driver whose gateway is gone now stops through the same path, so it also finishes in-flight calls and flushes telemetry. Signed-off-by: Evan Lezar <elezar@nvidia.com> * feat(gateway): bound a driver's Configure by the image preparation budget Constructing a launched driver can pull its supervisor and runtime images, and that happens inside Configure. A fixed two-minute deadline on the call could end a normal first start on a slow network, where the in-process drivers had no deadline. Use the gateway's image_preparation_timeout_seconds as the Configure deadline, with a floor of two minutes so a very small value cannot make the call fail at once. The launcher applies the value it is given, and the gateway's configuration decides it. Signed-off-by: Evan Lezar <elezar@nvidia.com> * feat(drivers): report a slow backend as unavailable A Podman driver pinged its backend for up to a minute, and a Docker driver for up to 30 seconds, before it bound its socket. The gateway waits 30 seconds for a driver to start and then kills it, so a daemon that answered slowly ended the start with a crash instead of an unavailable backend. The gateway retries an explicitly selected Podman driver only when the backend is unavailable, and tries the next candidate in auto mode only then. Give the ping 20 seconds and report a backend that has not answered as unavailable, with its exit status and reason, so the gateway can retry or move on. Signed-off-by: Evan Lezar <elezar@nvidia.com> --------- Signed-off-by: Evan Lezar <elezar@nvidia.com> |
||
|
|
92a45c1deb |
chore(images): refresh Debian and Ubuntu bases (#6005)
Signed-off-by: Simon Scatton <sscatton@nvidia.com> |
||
|
|
daf45a5b6d |
ci(trivy): report dev image scans and stop prerelease uploads (#4971)
* ci(trivy): report dev image scans and stop prerelease uploads Prerelease scans tagged each image analysis with a per-SHA category on a tag ref, so findings never closed and nothing reached the main alert list. Scan the published :dev images from Release Dev and report them on main. Fixed image references keep each Code Scanning category stable, so every scan replaces the previous one and fixed findings close. The configuration and Helm chart scan rides along under its existing category. Prereleases still run Trivy, but only as an informational check: findings never fail qualification and results are no longer uploaded. Signed-off-by: Simon Scatton <sscatton@nvidia.com> * ci(trivy): scan the dev Helm charts Scan the floating 0.0.0-dev gateway and workspace charts alongside the dev images, so packaged chart findings also track the current dev build on main. Signed-off-by: Simon Scatton <sscatton@nvidia.com> * ci(trivy): rely on Trivy scan defaults in the security scan Signed-off-by: Simon Scatton <sscatton@nvidia.com> --------- Signed-off-by: Simon Scatton <sscatton@nvidia.com> |
||
|
|
7a5a0fe747 |
docs(rfc): propose OpenShell testing strategy (#3460)
* docs(testing): define nix and tmachine target state Signed-off-by: Evan Lezar <elezar@nvidia.com> * docs(testing): clarify current test paths Signed-off-by: Evan Lezar <elezar@nvidia.com> * docs(rfc): propose OpenShell testing strategy Signed-off-by: Evan Lezar <elezar@nvidia.com> * docs(rfc): clarify testing model and suite organisation Signed-off-by: Evan Lezar <elezar@nvidia.com> * docs(rfc): record agreed conformance policies Signed-off-by: Evan Lezar <elezar@nvidia.com> * docs(rfc): condense testing strategy proposal Signed-off-by: Evan Lezar <elezar@nvidia.com> * docs(rfc): clarify testing strategy and execution policy Signed-off-by: Evan Lezar <elezar@nvidia.com> * docs(rfc): clarify polling and test dependencies Signed-off-by: Evan Lezar <elezar@nvidia.com> * docs(rfc): align testing strategy with testkit and tmachine Update RFC 0016 to the current tests/ layout, the testkit and runner execution model, the openshell-conformance program, and the in-progress migration tracked in #5281. Document the #[ignore] process as the only skip mechanism and record open questions. Signed-off-by: Evan Lezar <elezar@nvidia.com> --------- Signed-off-by: Evan Lezar <elezar@nvidia.com> |
||
|
|
dce49a0b88 |
refactor(deps): replace direct Chrono usage with Jiff (#5763)
* test(cli): cover credential expiry edge cases Signed-off-by: Simon Scatton <sscatton@nvidia.com> * refactor(cli): parse credential expiry with jiff Signed-off-by: Simon Scatton <sscatton@nvidia.com> * refactor(ocsf): migrate timestamps to jiff Signed-off-by: Simon Scatton <sscatton@nvidia.com> * refactor(core): migrate telemetry to jiff Signed-off-by: Simon Scatton <sscatton@nvidia.com> * refactor(server): migrate timestamps to jiff Signed-off-by: Simon Scatton <sscatton@nvidia.com> * chore(deps): upgrade jiff to 1.0.1 Signed-off-by: Simon Scatton <sscatton@nvidia.com> * refactor(credentials): use jiff for expiry Signed-off-by: Simon Scatton <sscatton@nvidia.com> --------- Signed-off-by: Simon Scatton <sscatton@nvidia.com> |
||
|
|
b8b6d6fa91 |
fix(deps): update kube-client to 5.2.0 on Rust 1.95 (#6000)
* chore(deps): defer kube-client advisory on Rust 1.94 The fixed 5.2 client needs Rust 1.95. The 4.2 backport loses kubeconfig impersonation headers that the current client forwards. Keep the advisory visible here while OpenShell uses the rustls connector. Signed-off-by: Adrien Langou <alangou@nvidia.com> * fix(deps): update kube-client to 5.2.0 on Rust 1.95 Raise the minimum compiler for the product and the packages that build against it to the Rust version already pinned in CI. Update the exact kube family constraints and regenerate the eleven affected lockfiles. Remove the RUSTSEC-2026-0600 exception now that kube-client enforces the configured cluster CA on the OpenSSL connector. Signed-off-by: Adrien Langou <alangou@nvidia.com> --------- Signed-off-by: Adrien Langou <alangou@nvidia.com>v0.1.11-pre.1 |
||
|
|
9996a59e93 |
feat(cli)!: verify sandbox SSH host keys (#5703)
* feat(cli): verify sandbox SSH host keys The CLI, the TUI, and generated SSH config entries accepted any SSH host key. They now run ssh with StrictHostKeyChecking=yes against a per-sandbox known-hosts file. The ssh-proxy relay reads the host key from the server's key exchange reply, pins it only when its SHA-256 fingerprint equals the one the gateway published, and withholds the reply otherwise. A sandbox with no published fingerprint is refused unless OPENSHELL_SSH_ALLOW_UNVERIFIED_HOST_KEY=1 is set. SSH config entries generated by earlier releases are refused with the command that regenerates them. Signed-off-by: Adrien Langou <alangou@nvidia.com> * refactor(cli): trim SSH host key verification Restore the base shape of the SSH option and proxy-command helpers where the feature does not need a new one, fold duplicate tests into tables, and drop tests that repeat a proof at a more expensive level. No change to what is verified or refused. Signed-off-by: Adrien Langou <alangou@nvidia.com> * fix(cli): keep existing SSH setups working with host key checks Address the compatibility review of the host key verification change. A sandbox with no published fingerprint connects with a warning instead of being refused, so gateways that predate sandbox SSH identities keep working. The OPENSHELL_SSH_ALLOW_UNVERIFIED_HOST_KEY opt-out is no longer needed. SSH config entries and running clients from an earlier release keep working: ssh-proxy relays without a check and warns, since their ssh accepts any host key anyway. A '%' in the config directory is escaped for ssh instead of rejected. Harden the relay gate: an identification line is at most 255 bytes, so the gate and every ssh release hand over to packets at the same byte, and a group exchange reply is accepted only after its group. Signed-off-by: Adrien Langou <alangou@nvidia.com> * feat(cli): let users refuse unverified SSH host keys OPENSHELL_SSH_REQUIRE_HOST_KEY turns the two unverified cases, a sandbox with no published fingerprint and a caller that predates host-key verification, from a warning into a refusal. It is off by default. Signed-off-by: Adrien Langou <alangou@nvidia.com> * fix(cli): name the missing flags in the unverified SSH warning The ssh-proxy warning blamed an older client, which is wrong when someone starts the proxy by hand. It now names the missing flags. Also say why a generated config entry turns connection sharing off: its host alias does not name the gateway, so a shared connection would serve the sandbox of the same name on another gateway without a host key check. Note that the gateway issues only Ed25519 host keys, and document that the fingerprint is read per connection and that unverified connections are allowed by default. Signed-off-by: Adrien Langou <alangou@nvidia.com> * fix(cli): replace SSH config entries that accept any host key Using --editor rewrote only the entry of the sandbox being connected, so the entries an earlier release wrote for other sandboxes kept accepting any host key. It now replaces each of them that is still, line for line, what that release wrote. An entry the user edited is left alone and keeps its warning. The TUI also puts "SSH host key NOT verified" first in its status line after an unverified session, because ssh takes the terminal right after the printed warning. Signed-off-by: Adrien Langou <alangou@nvidia.com> * refactor(cli): return the SSH host key refusal from the relay The relay exited the process from inside its task. It now returns the refusal, and the CLI prints it like any other error. The exit code stays 1 and no byte of the refused key exchange reply reaches ssh. Signed-off-by: Adrien Langou <alangou@nvidia.com> * feat(cli)!: refuse unverified SSH host keys by default An SSH connection whose host key cannot be verified is now refused: a sandbox with no published fingerprint, an SSH config entry an earlier release wrote, or an older client that starts ssh-proxy without --host-key. Set OPENSHELL_SSH_REQUIRE_HOST_KEY=0 to connect with a warning instead. A stale config entry is refused before the gateway is called, and uploads and downloads no longer retry a host key refusal. Signed-off-by: Adrien Langou <alangou@nvidia.com> --------- Signed-off-by: Adrien Langou <alangou@nvidia.com> |
||
|
|
845614aea8 |
fix(ssh): keep session tokens out of OpenSSH process arguments (#5944)
* fix(ssh): hand relay grants to the proxy over private IPC Signed-off-by: Adrien Langou <alangou@nvidia.com> * fix(ssh): preserve gateway selection and drain interrupted handoffs Signed-off-by: Adrien Langou <alangou@nvidia.com> * build(ssh): refresh lockfiles for the SSH handoff dependencies Signed-off-by: Adrien Langou <alangou@nvidia.com> * fix(ssh): distinguish relay admission from failed setup during recovery Signed-off-by: Adrien Langou <alangou@nvidia.com> * fix(ssh): bind uploads and gateway credentials to the selected target Signed-off-by: Adrien Langou <alangou@nvidia.com> * fix(ssh): drain grant cleanup and stop extraction on cancellation Signed-off-by: Adrien Langou <alangou@nvidia.com> * fix(ssh): cancel pending relay admission when the issuer closes Signed-off-by: Adrien Langou <alangou@nvidia.com> * fix(cli): bind credentials to the selected gateway and protect saved SSH URLs Signed-off-by: Adrien Langou <alangou@nvidia.com> * fix(cli): preserve the selected identity on shared gateway endpoints Signed-off-by: Adrien Langou <alangou@nvidia.com> * refactor(ssh): isolate proxy command formatting and verify grant cleanup Signed-off-by: Adrien Langou <alangou@nvidia.com> * feat(ssh): open gateway-authenticated relays for pinned sandbox IDs Signed-off-by: Adrien Langou <alangou@nvidia.com> * test(proto): update the public schema fingerprint for direct SSH TcpForwardInit adds tag 8 to its public target oneof. The durable schema and public/durable overlap retain their existing fingerprints. Signed-off-by: Adrien Langou <alangou@nvidia.com> --------- Signed-off-by: Adrien Langou <alangou@nvidia.com> |
||
|
|
df18dc4ef5 |
ci(e2e): run conformance and policy DNS IPv6 tests on an IPv6-only k3s cluster (#5724)
* fix(tmachine): give guests a unique local IPv6 prefix QEMU user networking defaults to the site-local fec0::/64, which Linux ranks below any global address. On a dual-stack K3s guest the node then sends to IPv6 Services from flannel's address and never gets the reply. Signed-off-by: Matthew Grossman <mgrossman@nvidia.com> * refactor(tmachine): share the K3s cluster reset tasks Signed-off-by: Matthew Grossman <mgrossman@nvidia.com> * feat(tmachine): support IPv6 gateway Services and environment Helm values in the k3s installers Signed-off-by: Matthew Grossman <mgrossman@nvidia.com> * test(tmachine): add an IPv6-first dual-stack k3s environment Signed-off-by: Matthew Grossman <mgrossman@nvidia.com> * ci(e2e): run k3s-ha conformance on the IPv6 k3s environment Signed-off-by: Matthew Grossman <mgrossman@nvidia.com> * refactor(tmachine): simplify the k3s installer's Helm command and gateway address Create an empty environment Helm values file when the environment has none, so the Helm command is a plain list. Name the gateway IP and port before bracketing an IPv6 address. Signed-off-by: Matthew Grossman <mgrossman@nvidia.com> * fix(tmachine): wait for the guest's IPv6 address in the IPv6 k3s setup Signed-off-by: Matthew Grossman <mgrossman@nvidia.com> * docs(testing): describe environment Helm values for k3s installers Signed-off-by: Matthew Grossman <mgrossman@nvidia.com> * refactor(tmachine): slim the IPv6 k3s environment The IPv6 setup now only writes the K3s configuration, so the cluster is created on its first start and needs no reset, and k3s.yaml is unchanged. The k3s installer sets the gateway and supervisor listen addresses to :: when the node's first address is IPv6, instead of reading Helm values the environment wrote. Signed-off-by: Matthew Grossman <mgrossman@nvidia.com> * test(conformance): skip the k3s-ha log-read tests on the IPv6 k3s environment The IPv6 k3s-ha row has the same multi-replica log gap (#5752) as ubuntu-k3s/k3s-ha. Signed-off-by: Matthew Grossman <mgrossman@nvidia.com> * test(host-server): listen on IPv6 as well as IPv4 Signed-off-by: Matthew Grossman <mgrossman@nvidia.com> * test(tmachine): reach the K3s node over IPv6 on an IPv6-first cluster Set host.openshell.internal to the node's first address and enable policy DNS IPv6 egress when it is IPv6. Signed-off-by: Matthew Grossman <mgrossman@nvidia.com> * test(features): check policy DNS AAAA answers on the IPv6 K3s environment Refs #3716 Signed-off-by: Matthew Grossman <mgrossman@nvidia.com> * test(host-server): make the IPv6 listener dual-stack and fall back only without IPv6 Signed-off-by: Matthew Grossman <mgrossman@nvidia.com> * test(features): check the synthetic address survives a policy reload Signed-off-by: Matthew Grossman <mgrossman@nvidia.com> * test(features): trim the policy-dns-ipv6 suite and installer comments Signed-off-by: Matthew Grossman <mgrossman@nvidia.com> * test(tmachine): make the IPv6 K3s environment an IPv6-only cluster Signed-off-by: Matthew Grossman <mgrossman@nvidia.com> --------- Signed-off-by: Matthew Grossman <mgrossman@nvidia.com> |
||
|
|
8a8dd58f50 |
perf(supervisor): look up route owners on demand instead of sending the pool route directory (#5888)
* perf(supervisor): look up route owners on demand instead of sending the pool route directory A pool member's assignment snapshot no longer carries every route in the pool. A member asks the gateway for the owner of a route it does not own (RouteLookup/RouteOwner on the existing Attach stream) only when a sandbox runtime reaches it for that route, so a member's messages scale with its own sandboxes rather than with the pool. Closes #5783 Signed-off-by: divesh <dgude@nvidia.com> * fix(supervisor): keep the route directory field and fit lookups in the runtime hop budget Keep AssignmentSnapshot.route_directory as a deprecated, unsent field so the protobuf stays compatible on this release train. Gateways advertise route_lookups on acceptance and hosts send RouteLookup only to replicas that answer it, so a mixed rollout never ends a stream on an unknown message. Bound a lookup at half the runtime's per-hop timeout so a stalled gateway still leaves time to fall back to the local registration and reply. Signed-off-by: divesh <dgude@nvidia.com> --------- Signed-off-by: divesh <dgude@nvidia.com> |
||
|
|
1a0f0fb669 |
fix(compute): preserve protobuf configuration integers (#5117)
* fix(compute): preserve protobuf configuration integers An integer driver setting such as Kubernetes `tolerationSeconds` can become a fractional JSON number during protobuf decoding and fail typed configuration parsing. This preserves whole-number values through the shared converter and the actual Kubernetes rendering path. Signed-off-by: Shiju <shiju@nvidia.com> * refactor(core): decode protobuf structs into typed configuration Signed-off-by: Shiju <shiju@nvidia.com> --------- Signed-off-by: Shiju <shiju@nvidia.com> |
||
|
|
f9e70500cf |
fix(server): keep unrelated profiles from superseding provider waits (#5977)
* fix(server): keep unrelated profiles from superseding provider waits Signed-off-by: Matthew Grossman <mgrossman@nvidia.com> * test(server): simplify provider profile revision regression Signed-off-by: Matthew Grossman <mgrossman@nvidia.com> * docs(providers): leave wait semantics unchanged Signed-off-by: Matthew Grossman <mgrossman@nvidia.com> --------- Signed-off-by: Matthew Grossman <mgrossman@nvidia.com> |
||
|
|
f16795bc76 |
(fix) Feat/4945 policy change closes everything (#5361)
* test(network): characterise which connections policy reloads should close
Every policy reload advances one sandbox-wide generation, and every pinned
relay closes when it moves, so approving an endpoint for one host drops
every open proxied connection in the sandbox.
Add tests, against the existing relay and engine entry points, for how
established connections should respond to reloads. Each test's doc comment
says whether it describes behaviour the following change alters
("Changed", failing on this commit) or behaviour it must keep
("Unchanged", passing before and after).
Changed: connections stay open when a reload does not affect them:
- raw TCP, HTTP passthrough and inspected (L7) relays, when an endpoint is
approved for another host, an endpoint is inserted before theirs, or a
gateway-delivered policy is restamped with a new policy hash;
- relays without middleware, when middleware is added for another host or
the middleware registry is replaced; a kept-alive passthrough connection
that runs middleware, on its next request after an unrelated reload;
- relays that sleep through several unrelated reloads, or are checked
between any number of them;
- HTTP relays, across provider credential changes they did not take part
in: credentials never injected on the connection, other providers'
rotations and attachments (including through install_prepared), identical
reinstalls, suppression of a credential from child processes, and a
credential first injected after its provider was attached or served
through an aged-out placeholder, and a credential sent through its
canonical or stable-handle placeholder, or through the previous
revision's placeholder while unchanged, when another credential rotates;
- a kept-alive MCP tunnel keeps reporting endpoint status after an
unrelated reload, against the new policy once its inventory is published.
Unchanged: connections still close when a reload does affect them:
revoked endpoints, narrowed L7 rules (YAML and gateway-delivered),
middleware added for their host, changed or made fail-closed, a replaced
registry for connections that run middleware, reloads that revoked or
changed them even if a later reload restored them, a long run of reloads
they slept through, rotated or detached credentials they injected
(including rotations that coalesced, and a rotation behind an unchanged
stable-handle placeholder), a superseded value sent through an older
retained revision, untracked credential handles, a reload between
authorization and relay setup, and plain generation guards.
Endpoint-status results of a kept-alive MCP tunnel are never attributed to
an inventory of a policy it is not running under: not before the reloaded
policy's inventory is published, not to an inventory published ahead of the
runtime, and not after a rules change, which closes the tunnel.
One test records that every reload restamps policy_hash on unchanged
endpoints.
Changed, in the supervisor: revoking provider credentials (an unavailable
environment, bindings that fail validation, or a snapshot for another
revision) publishes a policy generation, so open connections re-check the
credentials they sent. Today revocation publishes nothing, and a
connection authenticated once with a revoked credential, such as an
upgraded WebSocket, stays open.
Unchanged: a revocation that finds nothing left to revoke, as when a
failed refresh repeats on every poll, publishes no generation.
Existing relay tests use Arc<OpaEngine>, which the change requires.
Signed-off-by: mr-miles <miles.waller@gmail.com>
* fix(network): keep connections open across policy reloads that do not affect them
Every policy reload, middleware registry change and provider credential
change advanced one sandbox-wide generation, and every pinned relay closed
when it moved. Approving an endpoint for one host dropped every open
proxied connection in the sandbox.
When the generation moves, a pinned guard now re-checks the connection it
protects and closes only if the answer changed.
Policy: a ConnectionPolicyContract captures what decides how a connection
is relayed: the L4 action and matched policy, the ordered matched
endpoints (policy name and endpoint object, ignoring the endpoint index and
the per-reload policy_hash stamp), the exact-host flag, and the host's
middleware chain plus the registry epoch when that chain is non-empty.
Endpoint configs, which relays also read, are not compared separately:
Rego derives them from the same endpoints, in the same order. The engine records its last 16 published generations, and a
waking connection is re-checked against every generation since its pin,
because the generation watch coalesces reloads. If every contract equals
the one that authorized it, the guard re-pins; any difference, evaluation
error, fail-closed generation, or pin that has left the history makes the
guard permanently stale and the relay closes as before. Per-request Rego
rules read only the matched endpoints, so a tunnel's cloned evaluator stays
valid after a re-pin.
Credentials: the provider credential state owns one version per credential
(static environment key or token-grant provider:credential identity),
recomputed lazily by comparing content whenever its snapshot changes. Each
proxied connection gets a tracked handle and records the version of every
credential it injects, at the two points credential material leaves the
supervisor: SecretResolver handing out a secret, and inject_or_report
adding a grant. HTTP-family relays close only when a credential they
injected changes or is removed, or when they sent a value that was
already superseded. A use counts as current when the value it handed out
is its key's current value, whichever placeholder form named it: provider
revisions are sandbox-wide, so an older revision's placeholder usually
still names the current value.
Untracked handles and unattributable uses close on the next check. Raw TCP
and TLS passthrough relays never inject credentials and carry no pin.
Endpoint status: a tunnel's endpoint config carries the hash of the policy
it was selected from, so an MCP tunnel that re-pinned would have stopped
reporting endpoint status. The revalidator now records the stamped policy
hash of the generation its guard is pinned to, from authorization through
every re-pin, and observations (and token-grant reports) use it. The
inventory check is unchanged, so results are still dropped while the
inventory describes a different policy.
Revocation: the supervisor revokes static provider credentials when a
provider refresh fails, its bindings fail validation, or it delivers the
wrong revision, but it published no generation, so connections that had
sent a revoked credential were never checked. Both revocation paths now
call OpaEngine::publish_credential_change, which publishes a generation of
the unchanged policy (keeping any quarantine), when the revocation changed
any credential, judged by comparing
ProviderCredentialState::installed_credential_versions before and after.
A failed refresh that repeats on every poll therefore wakes connections
once, not every time. Connections that sent the revoked credential close;
the rest re-pin.
A reload between authorization and relay setup still refuses the relay.
OpaEngine::revalidating_generation_guard is the single entry point for
pinning a revalidating guard, and it and with_revalidator are crate-private,
so every guard another crate obtains from the engine is plain: checking it
is a cheap comparison that never evaluates policy or takes the engine lock. The HTTP passthrough middleware path lets the
guard re-pin before comparing raw generation numbers. The policy docs now
describe which changes close a connection.
Signed-off-by: mr-miles <miles.waller@gmail.com>
* test(network): cover connection revalidation and credential versioning
Unit tests for the code the previous commit introduces, which need its new
APIs. Behaviour visible through the relays is covered by the earlier
characterisation tests.
- contracts: unrelated endpoints are ignored; endpoint, L7 rule, binary and
overlapping-policy changes close the connection and keep it closed after
the policy is restored; quarantine always closes; policy_hash restamping
is not a change; denials capture no revalidator; guard clones share one
pin; the wait ignores unrelated reloads;
- middleware: any field of the selected chain changing closes the
connection, an identical chain does not, and only reloads that replace
the registry close connections that run middleware;
- capture: baselines come from the recorded authorizing generation, and a
generation that left the history cannot be captured;
- credential versions: recording of key and version per secret sent,
including SigV4-style lookups; unused credentials; versions shared across
connections and stable across identical reinstalls; a removed and
restored key gets a new version; an older revision records stale only
if its value has since changed; child-env-only installs and revocation
retire credentials; grant versions follow their configuration;
untracked handles and unattributable uses;
- installed credential versions: unchanged by identical reinstalls and by
a revocation with nothing left to revoke; changed by a new value, an
added or removed credential, and a grant configuration change;
- credential change publication: a new generation of the unchanged policy
makes plain guards stale and lets a connection without credentials
re-pin; a quarantine stays in force;
- pinned policy hash: the authorizing generation's from the start, then
that of the generation the guard re-pinned to (not a newer one it has not
checked); none for plain guards or policies without a stamp;
- endpoint configs are exactly the matched endpoints that carry extended
configuration, in the same order, which is why the contract does not
compare them;
- token grants record their identity; passthrough middleware runs on the
next request after an unrelated reload.
Signed-off-by: mr-miles <miles.waller@gmail.com>
* test(network): rewrite the characterisation tests for the new APIs
Test-only. The first commit's tests were written against the APIs that
existed before the change so that they could run, and fail, on their own.
Now that the change has landed:
- authorize test decisions through EgressDecision::policy_input, the input
revalidation re-evaluates;
- check that injecting a credential is recorded on the connection, and
that a connection that never injected one records nothing;
- drop the test module's own ProviderCredentialState import, which the
module now inherits;
- drop the "Changed"/"Unchanged" labels and the descriptions of the old
behaviour from the doc comments.
Signed-off-by: mr-miles <miles.waller@gmail.com>
* test(network): relays set up across an unrelated reload should start
Relay setup pins the policy generation of the L4 decision and refuses the
connection if any reload landed after it, even one that leaves the
connection's contract unchanged. CONNECT answers 403 "policy changed",
raw, passthrough and inspected relays do not start, and the direct
transparent path refuses the connection. The window is short, but every
policy approval lands in it for any connection being set up, and a
retry is the only remedy.
These tests state that a reload between the decision and relay setup is
re-evaluated: the pin follows it when the connection's contract is
unchanged, so the relay starts at the current generation, and an L7 route
hydrated after such a reload is the decision's own route.
The existing test that any reload between authorization and the pin
refuses the relay is replaced by these.
Guard tests that pass today: a reload that changes the connection's
rules, and a quarantine, still refuse relay setup.
Signed-off-by: mr-miles <miles.waller@gmail.com>
* fix(network): re-evaluate a reload that lands during relay setup
Relay setup pinned the generation of the L4 decision strictly, so any
reload between the decision and the pin refused the connection, even one
that left its contract unchanged: CONNECT answered 403 "policy changed",
relays did not start, and the direct transparent path refused the
connection. Every policy approval lands in that window for connections
being set up at the time.
revalidating_generation_guard now re-evaluates the connection against
every generation since the decision, as the guard of an established
connection does, and starts at the current generation if the contract
held. A changed contract, a quarantine, or a decision that cannot be
re-evaluated (a denial, or a generation no longer in the history) still
refuses the connection. An L7 evaluator is cloned from the generation
the pin reached, following any reload between pinning and cloning, and an
L7 route hydrated after the decision is accepted when the guard shows the
contract held up to the route's generation. Relay setup pins before it
validates the route, so that check sees the followed guard.
Signed-off-by: mr-miles <miles.waller@gmail.com>
* refactor(network): split pinning out of direct transparent TCP handling
Move the part of handle_transparent_tcp_connection that pins an allowed
connection, from holding the decision's policy generation to building the
connector from the policy DNS mapping, into pin_transparent_tcp. The
connection handler keeps capture, identity, the policy decision and every
audit emission, so behaviour is unchanged.
The direct path had no tests: the handler needs a netfilter-redirected
socket for the original destination and a procfs process identity. The
pinning step now runs with a supplied decision, and characterisation
tests pin down what it does today: it dials only the mapping's addresses
for the authorized endpoint, re-evaluates a reload after the decision,
and refuses a reload that changes the connection, an observation and an expired
mapping.
Signed-off-by: mr-miles <miles.waller@gmail.com>
* test(network): policy DNS answers should follow the current policy, not its layout
A policy DNS mapping is bound to the policy generation it was published
in, so every reload refuses every kept answer, even when the current
policy still allows the connection. Claude Code (node) keeps the answer
for api.anthropic.com and is refused with transparent_tcp_mapping_denied
when an operator approves another host. Proto conversion also stamps the
hash of the whole policy into every endpoint, so any reload gives every
name a new synthetic address from the never-reused pool.
These tests state that an answer stands for its name: the current policy
decides each connection, a denied port is a proposed policy denial, and
the deciding endpoint's destination rules select from the pinned
addresses. A kept answer survives an unrelated reload, inserting an
endpoint before it in the same policy, a port added to it, narrower
allowed_ips that still contain the resolved address, and an unrelated
reload for the trusted host gateway alias, on the staged and the direct
transparent paths. A name keeps its address on a fresh lookup through
the same changes. A reload never adds an address to a kept answer, and a
kept answer whose addresses the reloaded endpoint forbids is refused by
the destination rules, not because a reload happened.
Guard tests that pass today: a kept observation is still refused once its
name is approved, a control-plane port added to an exact host stays
refused, and the direct path refuses addresses a reloaded endpoint
forbids.
Signed-off-by: mr-miles <miles.waller@gmail.com>
* fix(network): judge policy DNS answers by the current policy, not the one that issued them
A policy DNS mapping recorded a contract per endpoint and port, keyed by
endpoint position, and was bound to the policy generation it was
published in, and its allocation identity hashed the endpoint objects,
including the per-reload policy_hash stamp. Any reload refused every
kept answer and gave every name a new synthetic address, even when the
current policy still allowed the connection.
A synthetic address now stands for one name and address family. Its
record pins the trusted resolver addresses that passed the destination
rules of at least one endpoint eligible for the name, and it is not tied
to a policy generation. Each connection is authorized by the current
policy as before, and the pinned addresses are filtered through that
decision's own destination rules, so an address pinned for another
endpoint of the name, another binary's or a looser one, is not reachable
through a stricter one. A reload can never add a real address to a kept
answer; the TTL still bounds how long it is used, and the name is never
resolved again at connect time.
The direct Linux transparent path now hydrates the decision's
destination plan, with the trusted host gateway policy DNS uses, and
filters the pinned addresses through it; it previously dialed the
addresses pinned for the matched endpoint without the decision's rules.
The port of a connection is decided by the policy alone, so a port added
to an endpoint is usable with a kept answer, and a port the policy does
not allow is a policy denial that the policy advisor sees as a proposal,
like any other denied connection, rather than a mapping refusal.
The allocation identity hash, the per-port endpoint contracts and the
endpoint join between mappings and decisions are removed. The mapping lookup
error the direct path reports for a reload during authorization is
renamed PolicyChanged: the store never returns it.
Signed-off-by: mr-miles <miles.waller@gmail.com>
* test(network): kept policy DNS answers give no access the current policy denies
A kept answer is refused by the policy decision once its host leaves the
policy or the policy is quarantined. One name allowed for two binaries
with different destination rules pins both resolved addresses, and each
connection reaches only the addresses its own endpoint permits, driven
through a real policy DNS answer. The record pins the union of what the
eligible endpoints permit, in resolver order.
Signed-off-by: mr-miles <miles.waller@gmail.com>
* docs(rfc): policy DNS mappings are judged by the current policy
The egress adapter design said a mapping holds an endpoint identifier and
allowed ports and that a reload invalidates mappings whose endpoint
contract changed. A mapping now holds the addresses some eligible
endpoint permitted, each connection is decided by the current policy,
and the deciding endpoint's rules filter the pinned addresses.
Signed-off-by: mr-miles <miles.waller@gmail.com>
* fix(network): refresh a policy DNS mapping that expires during authorization
A transparent connection to a synthetic address looks its mapping up twice:
once to name the destination, refreshing it if it has expired, and again to
pin the addresses after the connection is authorized. The second lookup
read the store directly and never refreshed, so a mapping that was live at
the first lookup but expired while the connection was authorized was
refused with transparent_tcp_mapping_denied, on a host the policy allows.
With a trusted resolver that answers TTL 0, every mapping lives one second,
and authorization includes resolving the connecting binary's identity.
The direct, staged and dispatch paths now pin through
PolicyDnsService::lookup_for_pin, which refreshes an expired mapping the
way the first lookup does and refuses observations. The bare store
accessor and its non-refreshing lookup are test-only, so no connection
path can bypass the refresh.
Refs #4674
Signed-off-by: mr-miles <miles.waller@gmail.com>
* docs(policies): placeholders outlive policy changes and their TTL
The policy DNS paragraph said a placeholder stays the same only while its
endpoint policy is unchanged, and that policy changes invalidate cached
mappings. A placeholder now stands for its hostname for the life of the
sandbox and each connection is judged by the current policy; an expired
mapping is refreshed on connect, and a hostname the policy no longer allows
is denied.
Signed-off-by: mr-miles <miles.waller@gmail.com>
* fix(network): adapt relay tests to current process identity
Signed-off-by: John Myers <9696606+johntmyers@users.noreply.github.com>
* fix(network): preserve MCP observations after idle policy reloads
Signed-off-by: John Myers <9696606+johntmyers@users.noreply.github.com>
* fix(network): preserve credential invalidation across reloads
Signed-off-by: John Myers <9696606+johntmyers@users.noreply.github.com>
* test(network): adapt IPv6 coverage to persistent DNS mappings
Signed-off-by: John Myers <9696606+johntmyers@users.noreply.github.com>
* fix(network): integrate connection revalidation with policy backends
Signed-off-by: John Myers <9696606+johntmyers@users.noreply.github.com>
* fix(network): borrow DNS service in Linux transparent relay
Signed-off-by: John Myers <9696606+johntmyers@users.noreply.github.com>
---------
Signed-off-by: mr-miles <miles.waller@gmail.com>
Signed-off-by: John Myers <9696606+johntmyers@users.noreply.github.com>
Co-authored-by: John Myers <9696606+johntmyers@users.noreply.github.com>
|
||
|
|
d3cf082e2b |
docs: point PR label guidance at REVIEWERS.md (#5403)
Reviewer routing uses the area and topic headings in REVIEWERS.md, not the repository label list. State that in CONTRIBUTING.md and the create-github-pr skill. Signed-off-by: Evan Lezar <elezar@nvidia.com> |
||
|
|
9f7cc51329 |
fix(server): retry ssh session creation on name collision (#5953)
SSH session records draw a random 6-letter name that must be unique per workspace, and records linger for up to two hours, so a busy workspace occasionally makes a freshly drawn name collide on objects_name_uq and the connection fails with a unique-violation error. Persist new SSH sessions through a helper that regenerates the name and retries the insert when it trips the workspace name constraint, so a collision no longer surfaces to the client. Any other error, including a primary-key collision on the token, is still returned to the caller. Closes #5661 Signed-off-by: Emilien Macchi <emacchi@redhat.com> |
||
|
|
07c1b9863b |
fix(sandbox): close SFTP helper streams on normal exit (#5955)
The SFTP runtime helper kept clones of its stdin and stdout socketpair ends so signal() could break the streams on cancel. Nothing released those copies on a normal exit, so the supervisor-side output reader never saw end-of-file, the 30 s remote output drain timed out, and every scp, sftp, or VS Code Remote transfer ended with exit code 74 even though the file had arrived. Release the retained socket copies from the helper's waiter task once the worker finishes, with the same shutdown the cancel path already uses, so the output reaches end-of-file as soon as the helper exits. Add a test that forwards the helper output the way the supervisor does and asserts end-of-file after a normal exit. Closes #5658 Signed-off-by: Emilien Macchi <emacchi@redhat.com> |
||
|
|
1fca4c8b2e |
fix(sandbox): harden managed-children registry and workload launcher (#5209)
Recover the managed-children registry from a poisoned lock in unregister, like its sibling accessors already do, so a PID whose waiter panicked while holding the lock cannot stay registered forever and be skipped by the orphan reaper after the PID is reused. Classify a missing /proc/self/task/<tid>/children file instead of treating every NotFound as a vanished task. When no task in a scan exposes the file (kernel built without CONFIG_PROC_CHILDREN, or restricted procfs), log a warning and emit an OCSF detection finding once per process instead of silently leaving the orphan reaper inert while zombies accumulate. A scan now skips a task directory it cannot read instead of aborting the whole pass, and a run of scans that keeps failing or skipping warns once instead of only logging at debug level. Contain a panicking job on the workload launcher thread, the way the network broker contains handler panics: the panicking job's caller gets a precise error saying the job panicked, the panic is reported, the thread leaves its job loop, and the health flag turns false so every later spawn fails fast instead of hanging on a launcher that still reports healthy. A dead launcher also emits an OCSF detection finding, since no new workload process can start in the sandbox afterwards. Closes #5186 Signed-off-by: Emilien Macchi <emacchi@redhat.com> |
||
|
|
6dcd3a9776 |
test(testkit): share environment and provider helpers across E2E ports (#5780)
* docs(testkit): add the tests/support environment contract table Signed-off-by: Matthew Grossman <mgrossman@nvidia.com> * test(tmachine): add a gateway_overrides role for environment gateway settings Signed-off-by: Matthew Grossman <mgrossman@nvidia.com> * test(testkit): serve TLS from host servers with a test or environment CA Signed-off-by: Matthew Grossman <mgrossman@nvidia.com> * test(testkit): let a host HTTP server listen on a chosen port Signed-off-by: Matthew Grossman <mgrossman@nvidia.com> * test(tmachine): remove the Podman userns overrides block in default mode Signed-off-by: Matthew Grossman <mgrossman@nvidia.com> * test(testkit): reject a mismatched additional CA key at load time Signed-off-by: Matthew Grossman <mgrossman@nvidia.com> * test(tmachine): require a table header in gateway overrides and skip an empty file Signed-off-by: Matthew Grossman <mgrossman@nvidia.com> * test(testkit): harden host server TLS and name environment ports _PORT Add the authority key identifier to server certificates, which strict verifiers such as Python 3.13 require, time out TLS handshakes, report CA load failures as such, and keep test CA files in temporary directories. The contract table now names environment-chosen ports OPENSHELL_TEST_<SERVICE>_PORT, matching HttpRecorder's port option. Signed-off-by: Matthew Grossman <mgrossman@nvidia.com> * docs(testkit): scope host server listeners to IPv4 and name the CA setting The host servers bind 0.0.0.0, so a fixed-port recorder accepts IPv4 but not IPv6 connections. Say so in the environment contract instead of promising every host address. Name the additional CA setting by its full key, openshell.supervisor.network.additional_ca_bundle, so an environment configures the right table. Signed-off-by: Matthew Grossman <mgrossman@nvidia.com> * test(testkit): let create_provider set provider config create_provider and install_provider return a builder that creates the provider when awaited, so tests can chain .config(key, value) for provider create --config. Existing callers are unchanged. Signed-off-by: Matthew Grossman <mgrossman@nvidia.com> * test(testkit): add a typed provider profile builder Signed-off-by: Matthew Grossman <mgrossman@nvidia.com> * test(e2e): use typed profiles in existing provider tests Signed-off-by: Matthew Grossman <mgrossman@nvidia.com> * fix(testkit): reject explicit credential bindings in profiles Signed-off-by: Matthew Grossman <mgrossman@nvidia.com> * chore(testkit): remove duplicate prost-types dev dependency Signed-off-by: Matthew Grossman <mgrossman@nvidia.com> --------- Signed-off-by: Matthew Grossman <mgrossman@nvidia.com> |
||
|
|
db7bced914 |
fix(ci): diff the PR head in the SDK freeze checks (#5951)
The Python and TypeScript SDK freeze checks ran `git diff BASE_SHA...HEAD`, where HEAD is the merge commit that actions/checkout creates for a pull_request event. The recorded pull_request.base.sha does not move when main advances, so on a long-lived PR the diff included every change main made after that base, and the checks failed PRs that never touched the SDKs. Diff against pull_request.head.sha instead. The merge-base of the recorded base and the PR head is the PR's real fork point, so only the PR's own changes are checked. Signed-off-by: Vishwanath Raman <vishwanathr@nvidia.com> |
||
|
|
aa2efd362b |
feat(supervisor): support HTTP/2 on sandbox application routes (#5848)
Signed-off-by: Shiju <shiju@nvidia.com> |
||
|
|
1638e3e306 |
ci: skip branch compatibility reviews (#5947)
Signed-off-by: Simon Scatton <sscatton@nvidia.com> |
||
|
|
527b91f78e |
ci(e2e): pull e2e and upgrade images from Quay (#5896)
* ci(e2e): pull e2e and upgrade images from Quay Released images now publish to quay.io/ai-openshell, and releases from before the move stay on ghcr.io/nvidia/openshell. Pull the upgrade baseline from whichever registry holds that version, and point the external Kubernetes gateway defaults and the TESTING.md example at Quay. Refs #4554 Signed-off-by: Simon Scatton <sscatton@nvidia.com> * ci(e2e): point GPU e2e and qualification docs at the new registries The GPU e2e workflow pulls SHA-tagged CI images, which now live in ghcr.io/ai-openshell/openshell. Qualification summaries are published there too. The TESTING.md tag example now names a release that is on Quay. Refs #4554 Signed-off-by: Simon Scatton <sscatton@nvidia.com> --------- Signed-off-by: Simon Scatton <sscatton@nvidia.com> |
||
|
|
7f399d34a6 |
feat: retry sandbox creates on mutation lock timeouts (#5745)
* feat(core): add mutation-lock timeout predicate and create-retry decision layer Add the shared primitives that let clients retry sandbox creates that lose the gateway mutation lock budget. rpc_error gains the MUTATION_LOCK_TIMEOUT reason constant, an exact-match predicate that also requires UNAVAILABLE (so DATABASE_UNAVAILABLE and other transient failures never select a mutation retry), and rebuild_with_message, which rewrites a status message at the google.rpc.Status envelope level so every error detail, known or unknown, survives message appends. The new create_retry module holds the pure retry policy shared by the SDK and the CLI: a delay floor from the server's RetryInfo (1s when absent), proportional jitter (at most half the delay) derived from an injected per-client seed so a burst that times out together spreads its retries, a wall-clock budget that stops instead of overrunning, and the AlreadyExists disambiguation for named creates: a Deleting holder waits, a Provisioning holder waits only when an earlier attempt of the same call may have left it (HolderProvenance), NotFound resends the create up to three times, and a live holder is terminal. Every wait and retry requires room for one more create attempt, so a spent attempt cap stops instead of polling toward a conflict already determined. Signed-off-by: Emilien Macchi <emacchi@redhat.com> * fix(server): map SSH identity lock timeouts and preserve error details in create compensation A create that loses the SSH identity mutation lock budget returned a bare UNAVAILABLE with no machine-readable reason, so clients could not tell it apart from any other transient failure. Both identity lock acquisitions now route PersistenceError::LockTimeout through persistence_error_to_status, reporting the shared MUTATION_LOCK_TIMEOUT reason and a 1s RetryInfo like the creation guard does; other persistence failures keep the previous bare status. compensate_failed_create rebuilt every status it returns with Status::new, dropping the ErrorInfo and RetryInfo the create failure carried and silently disabling client retry once cleanup appended to the message. Every rebuild branch now goes through the core rebuild_with_message helper, which rewrites the message at the google.rpc.Status envelope level and keeps every error detail. The begin-delete supersession arm now reports the original create failure with the begin-delete outcome appended instead of replacing the status outright, so the retry contract survives that branch too. Signed-off-by: Emilien Macchi <emacchi@redhat.com> * feat(sdk): retry sandbox creates on mutation lock timeouts Add opt-in retrying entry points for all four create surfaces: create_sandbox_with_retry and create_sandbox_from_template_with_retry on both OpenShellClient and WorkspaceScopedClient, backed by one shared loop over the core create-retry policy. SdkError gains mutation_lock_timeout(), an exact-match predicate on the shared reason; retryable() keeps its auth-only contract. Each attempt waits at least the server's RetryInfo delay plus per-call jitter and shares one wall-clock budget (CreateRetryOptions, default 60s) with the AlreadyExists cleanup wait. request_id stays empty on every attempt so mutation replay never surfaces a recorded failure. A named create that hits AlreadyExists polls the holder's phase in the create's workspace: a Deleting holder is waited out, a missing record resends the create up to three times, and a live, recovered, or different-id holder is a terminal conflict. Budget exhaustion surfaces the last error annotated with the attempt count and the original lock-timeout cause, keeping the raw status intact. Signed-off-by: Emilien Macchi <emacchi@redhat.com> * feat(cli): retry sandbox creates on mutation lock timeouts sandbox create now retries while the gateway mutation lock is busy, using the same openshell-core decision layer as the SDK: each attempt waits at least the server's RetryInfo delay plus per-invocation jitter inside one wall-clock budget, and only MUTATION_LOCK_TIMEOUT retries; every other failure may have persisted the create, so it stays terminal. The budget defaults to 60s, follows OPENSHELL_CREATE_RETRY_TIMEOUT, and is set with --create-retry-timeout <SECONDS>; --no-create-retry restores the fail-fast behavior. Progress lines go to stderr only, so structured stdout output stays parseable. A named create that hits AlreadyExists polls the holder's phase in the create's workspace: a Deleting holder is waited out, a missing record resends the create up to three times, and a live or recovered holder stops with the delete-first hint. Budget exhaustion surfaces the last error annotated with the attempt count and the original lock-timeout cause. Signed-off-by: Emilien Macchi <emacchi@redhat.com> * docs: document automatic create retry on mutation lock timeouts Document the create-retry contract end to end: the SDK's opt-in retrying create methods and the mutation_lock_timeout accessor on the api-errors page (with the retry conditions, delay floor, jitter bound, budget, and the AlreadyExists cleanup-wait matrix), the automatic CLI and Rust SDK retry on the high-availability page, the CLI flags and cleanup-wait behavior in the openshell-cli skill, and the retrying entry points in the SDK README. Correct the high-availability page for the SSH identity step now carrying the MUTATION_LOCK_TIMEOUT reason. Closes #5697 Signed-off-by: Emilien Macchi <emacchi@redhat.com> * fix(core): spread create retries by the time the attempt waited A burst that times out together on the gateway's 10s mutation-lock wait retried within half a second, because the jitter window was half the 1s retry delay. Size the window by the failed attempt's wait when that is longer, so those retries spread over about five seconds. Signed-off-by: divesh <dgude@nvidia.com> * test(sdk): box the large create-retry futures in mock tests Signed-off-by: divesh <dgude@nvidia.com> --------- Signed-off-by: Emilien Macchi <emacchi@redhat.com> Signed-off-by: divesh <dgude@nvidia.com> Co-authored-by: divesh <dgude@nvidia.com> |
||
|
|
55df497ad1 |
ci(snap): pin release canary to Ubuntu 24.04 (#5923)
* ci(snap): diagnose user service installation failures Signed-off-by: Taylor Mutch <taylormutch@gmail.com> * ci(snap): pin release canary to Ubuntu 24.04 Signed-off-by: Taylor Mutch <taylormutch@gmail.com> * ci(snap): remove temporary installation diagnostic Signed-off-by: Taylor Mutch <taylormutch@gmail.com> --------- Signed-off-by: Taylor Mutch <taylormutch@gmail.com> |
||
|
|
8ff5b60873 |
fix(credentials): reject ambiguous token endpoints with url 2.5.9 (#5945)
* test(credentials): verify the HTTP target of stored endpoint grants Signed-off-by: Adrien Langou <alangou@nvidia.com> * fix(credentials): refuse ambiguous token paths before updating url Upgrade url to 2.5.9 for RUSTSEC-2026-0592. Require explicit reconfiguration for credential destinations whose path contains a literal caret. Keep the existing HTTP client and compare persisted grants without rewriting them. Signed-off-by: Adrien Langou <alangou@nvidia.com> * fix(credentials): keep legacy profiles repairable and guard OIDC destinations Signed-off-by: Adrien Langou <alangou@nvidia.com> * fix(credentials): validate the effective HTTP request destination Signed-off-by: Adrien Langou <alangou@nvidia.com> --------- Signed-off-by: Adrien Langou <alangou@nvidia.com> |
||
|
|
fea4015690 |
fix(vm): bound OCI bootstrap image extraction (#5943)
* fix(vm): bound OCI bootstrap image extraction Signed-off-by: Adrien Langou <alangou@nvidia.com> * fix(vm): create bootstrap cache entries at publication Signed-off-by: Adrien Langou <alangou@nvidia.com> * fix(vm): account for archive paths and metadata records Signed-off-by: Adrien Langou <alangou@nvidia.com> * fix(vm): reuse one staging tree for bootstrap layers Signed-off-by: Adrien Langou <alangou@nvidia.com> * test(vm): distinguish scratch from driver state in the layer fixture Signed-off-by: Adrien Langou <alangou@nvidia.com> --------- Signed-off-by: Adrien Langou <alangou@nvidia.com> |