Conversation
|
Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. |
|
🌿 Preview your docs: https://nvidia-preview-pr-3370.docs.buildwithfern.com/openshell |
Signed-off-by: Shailendra Singh <shailendras@nvidia.com>
Signed-off-by: Shailendra Singh <shailendras@nvidia.com>
- Introduced `pending_provider_credentials` in `MxcComputeBackend` to manage out-of-band provider credential state. - Added `append_provider_child_env` function to merge provider credentials into the agent environment, ensuring sensitive values are not exposed. - Updated `create_sandbox` method to validate egress requirements for provider credentials. - Implemented `resolve_sandbox_create_runtime_inputs` to prepare driver-specific sandbox creation state, including effective policy and provider credentials. - Modified gRPC handlers to utilize the new provider credential management features. - Updated documentation to clarify the use of provider credentials and their requirements for governed egress. Signed-off-by: Akber Raza <akberr@nvidia.com>
Add an end-to-end Windows MXC scenario for verifying provider credential handling without exposing the raw credential to the sandbox. The scenario confirms that the sandbox receives a revision-scoped GITHUB_TOKEN placeholder, the host CONNECT proxy substitutes the credential only for api.github.com, and use of the same placeholder against github.com is rejected with credential_endpoint_mismatch. Use inbox Windows PowerShell and curl for the probe so the standard Windows build requires no additional test executable. Configure SystemRoot and PATHEXT explicitly through agent_env, which provides the minimum environment needed to locate and execute curl while avoiding implicit inheritance of the gateway environment. Add pc_disable_ui for process-container workloads that require Win32k during startup. Preserve the hardened default and continue denying clipboard access and input injection when UI compatibility is enabled. Collect redacted diagnostic artifacts, check for raw-token leakage, and document the MXC configuration and credential-validation workflow. Tests: - cargo test -p openshell-driver-mxc - Windows PowerShell curl launch with only SystemRoot and PATHEXT Signed-off-by: Akber Raza <akberr@nvidia.com>
- pass effective provider policy and credential state into MXC sandbox creation - inject revision-scoped placeholders into the MXC child environment - resolve provider credentials only through governed host CONNECT proxy requests - add gateway and driver coverage for secret isolation and policy propagation - update MXC documentation and remove obsolete provider-v2 test setup Signed-off-by: Akber Raza <akberr@nvidia.com>
Clarify that the provider credential example uses process_container and does not require the isolation_session DLL or build feature. Signed-off-by: Akber Raza <akberr@nvidia.com>
Mark the credential scenario failed and suppress its ZIP bundle when any result artifact cannot be inspected for raw-token leakage. Signed-off-by: Akber Raza <akberr@nvidia.com>
Detect and redact a raw provider token before the credential probe result can reach console or CI logs. Signed-off-by: Akber Raza <akberr@nvidia.com>
Derive provider layers, credential scopes, and binding records from the same loaded provider snapshot to eliminate cross-read inconsistency. Signed-off-by: Akber Raza <akberr@nvidia.com>
Require workspace authorization before returning sandbox provider environment or credential binding data, while preserving sandbox-principal scope checks and not-found concealment. Signed-off-by: Akber Raza <akberr@nvidia.com>
Fail sandbox creation for expiring static provider credentials because MXC has no live refresh channel, while retaining request-time dynamic token grants and documenting recreation requirements. Signed-off-by: Akber Raza <akberr@nvidia.com>
Clarify that per-sandbox ports provide routing separation rather than peer authentication, place host-local processes in the trusted computing base, and retain M3 as the stronger source-attribution dependency. Signed-off-by: Akber Raza <akberr@nvidia.com>
- preserve native JSON arguments under Windows PowerShell - tolerate existing gateway registrations - reject network executable paths with actionable launch diagnostics - record redacted failure context in result bundles Signed-off-by: Akber Raza <akberr@nvidia.com>
… env keys Address the three blocking findings from the automated review of #3296 (head 550b81a): - Already-expired static provider credentials were silently withheld by the shared resolver before the create-time fail-closed check ran, so an MXC sandbox could be created without the configured credential instead of rejecting the request. Track withheld expired keys separately in ProviderEnvironment so the MXC create-time validator can still reject them. - Provider credential environment keys that collided case-insensitively with each other, or with the reserved TLS trust env vars injected later, were not validated before staging, producing an ambiguous or silently overwritten sandbox environment on Windows. Reject these synchronously at CreateSandbox instead. - The Global Policy Override docs said the global payload only supplies dynamic policy fields, but the implementation replaces the complete effective policy except UI. Corrected the description. Signed-off-by: Prashant S Khodade <pkhodade@nvidia.com>
Signed-off-by: Prekshi Vyas <prekshiv@nvidia.com>
Stack the combined GitLab !98, !105, and !108 port on the provider-credential branch without the later main integration. Preserve prerequisite configuration and protobuf compatibility, and include native Windows validation fixes. Co-authored-by: Prashant S Khodade <pkhodade@nvidia.com> Signed-off-by: Prekshi Vyas <prekshiv@nvidia.com>
Signed-off-by: Prekshi Vyas <prekshiv@nvidia.com>
Signed-off-by: Drew Newberry <anewberry@nvidia.com>
Signed-off-by: Drew Newberry <anewberry@nvidia.com>
Signed-off-by: Drew Newberry <anewberry@nvidia.com>
Signed-off-by: Drew Newberry <anewberry@nvidia.com>
Signed-off-by: Drew Newberry <anewberry@nvidia.com>
drew
force-pushed
the
1737-mxc-rfc12-integration/drew
branch
from
September 17, 2026 00:46
31cdfff to
dc1242f
Compare
…ation/drew Signed-off-by: Drew Newberry <anewberry@nvidia.com> # Conflicts: # crates/openshell-server/src/storage_proto.rs # proto/openshell.proto # sdk/go/proto/openshellv1/openshell.pb.go
Signed-off-by: Drew Newberry <anewberry@nvidia.com>
Signed-off-by: Drew Newberry <anewberry@nvidia.com>
Signed-off-by: Drew Newberry <anewberry@nvidia.com>
Signed-off-by: Drew Newberry <anewberry@nvidia.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Supersedes #3358 with the final RFC 0012 MXC architecture on current
mainafter #2942. The gateway/MXC driver now provisions a hostopenshell-supervisor --role=isolation-backend, which controlsopenshell-sandboxinside a ProcessContainer over the authenticated, generation-bound Sandbox Protocol. The sandbox launches and controls the workload; no custom relay or forwarding bridge remains.Related Issue
Part of #1737.
Supersedes #3358 and incorporates the sandbox-authentication and runtime-boundary work merged in #2942.
Changes
Testing
mise run pre-commitmise run testmise run ciThe remaining unchecked gate requires a Windows host with MXC. Linux compilation cannot validate ProcessContainer reachability, DACL changes made by MXC, traffic fencing, or process-tree teardown under the real runtime.
Checklist
Known constraints
process_container;isolation_sessionis rejected until separately implemented and qualified.Convergence plan
Show the full implementation and qualification plan
PR 3370: converge MXC forwarding on the shared runtime
Objective and recommendation
Preserve MXC workload launch, UI/filesystem enforcement, governed egress,
provider mediation, and dynamic forwarding while reducing the custom relay
protocol introduced by PR #3370. The destination is an external
openshell-supervisorpaired with an MXC implementation of the RFC 0012runtime boundary through a Windows
openshell-sandboxplatform implementation.Go directly to this architecture. Do not build, shrink, or ship an interim
relay/forwarding bridge. Use the existing relay only as a behavior reference and
source of regression scenarios, then remove it during the integrated cutover.
The fastest route is one narrow end-to-end implementation for Windows x64
process_container, the current default backend. Establish admission, identity,and egress enforcement early, reuse the existing protocol and supervisor
services, and expand platform coverage only after that path works. Porting the
old relay under a different executable name does not satisfy this plan.
Implementation was explicitly authorized on PR #3370 and is tracked by #1737.
The remaining plan sections preserve the design rationale, qualification gates,
and follow-up constraints for review.
Implementation status on PR #3370
The branch now implements the selected final topology directly:
openshell-supervisor --role=isolation-backendand launchesopenshell-sandbox --bootstrapas the ProcessContainer entrypoint.TLS/JWT credentials. The sandbox consumes and deletes its bootstrap and TLS
key files before accepting the supervisor.
output, signals, shutdown, provider-environment refresh, and sandbox-local
loopback connections used by standard gateway forwarding.
provider resolution, credential injection, and middleware. MXC permits only
loopback egress and the proxy requires a fresh per-generation authorization
value.
the counterpart when either exits. Host bearer material is stored under an
owner-only Windows DACL.
bypass, provider snapshot side channel, and relay-only examples are removed.
TokenIsAppContainerbefore confirming the boundary;it no longer claims ProcessContainer enforcement solely from staged config.
cross-compilation, pre-commit, the full repository test suite, and aggregate
CI pass. Real-MXC behavioral qualification remains the completion gate that
cannot run from the Linux integration worktree.
The vertical slice intentionally chose authenticated loopback TLS rather than a
new named-pipe protocol because it reuses the existing Sandbox Protocol and MXC
can fence the workload to loopback. This does not make host loopback a security
boundary. The gateway host remains trusted, and per-generation authentication
prevents unauthenticated local traffic from entering the sandbox policy context.
One known limitation remains explicit: the host proxy attributes connections to
the admitted main workload binary because Windows socket-owner identity is not
yet available on this path. Descendants therefore cannot receive distinct
binary-specific network rights. Policies that depend on that distinction must
not be claimed as fully enforced until authoritative Windows attribution is
implemented and qualified.
Evidence and constraints
openshell-supervisor-network::hostfor egress.Moving that proxy into a process does not replace incoming forwarding.
openshell-supervisor --role=network-proxydeliberately excludes gatewayattachment, workload management, backend attachment, and provider resolution.
It is not a replacement for the relay or a complete sandbox supervisor.
handles shutdown, and connects forwarding streams to local target ports.
connection primitives. Reuse those semantics instead of growing a second
public runtime protocol.
established by the existing gateway/relay MSVC build lane. The sandbox has
Linux-specific startup and enforcement, and the supervisor has Unix-oriented
dependencies and bootstrap assumptions. This is platform work, not a flag change.
discussion overstated that limitation. Measure it separately for
process_containerandisolation_session; shared addressing alone does notestablish trustworthy target ownership.
binary identity. Neither is evidence of authoritative per-connection identity
or isolation from unrelated host services.
Sources:
crates/openshell-driver-mxc/{README.md,src/driver.rs,src/relay.rs},crates/openshell-supervisor/{src/main.rs,src/lib.rs,Cargo.toml},crates/openshell-sandbox/src/main.rs,crates/openshell-isolation-interface/src/contract.rs, andarchitecture/plans/pr-3358-rebase-after-2942.md.Phase 1: settle only the prerequisites on the critical path
Run small real-MXC probes before changing production architecture:
workload-to-host, and cross-sandbox connectivity with two live sandboxes.
Start with x64
process_containerand record the exact MXC/Windows versionsand policy settings. Verify service ownership, not merely a successful connect.
openshell-sandboxas the MXC entrypoint, thatthe runtime can launch its workload child with the required restrictions,
and that the driver can terminate the entire tree on failure. No independent
helper launch or multiple-entrypoint design is needed.
files, or logs. Test inherited handles first; consider a named pipe only with
explicit access control, authenticated generation binding, and protection
against endpoint impersonation and handle inheritance into workloads.
interface, and sandbox runtime. Inventory Unix/Linux assumptions and separate
portable protocol code from platform enforcement and process operations.
executable identity, containment, egress fence, lifecycle, and transport.
List unsupported requirements explicitly and verify contract rejection rules.
Deliverable: one selected transport/bootstrap mechanism and a concrete mapping
of required contract operations to Windows primitives. Prefer an existing
authenticated protocol transport if it works securely under MXC. Use inherited
handles for bootstrap where supported; do not commit to a new named-pipe data
transport before checking existing transport reuse. Loopback TLS is a candidate
only if endpoint access and egress fencing remain enforceable.
The first go/no-go gate is trustworthy runtime admission, process identity,
and non-bypassable network mediation. A successful authenticated connection is
insufficient. If these require MXC capabilities we do not have, identify the
specific missing primitive immediately instead of spending time on a proxy-only
approximation. Do not weaken the common admission contract to accelerate launch.
Phase 2: shared RFC 0012 runtime
This is the required final architecture. The gateway supplies authenticated
policy/session services; the MXC driver provisions the two runtime processes
and their containment and bootstrap resources:
The diagram shows logical relationships, not a single direction of traffic.
The supervisor connects to the gateway; requests and events travel both ways.
The driver separately provisions and tears down the host supervisor and the MXC
boundary. It does not become a policy or forwarding hop between these peers.
The host supervisor is a per-sandbox-generation process, outside the workload's
access boundary. The in-boundary runtime must also protect its control handles
and bootstrap keys from workload access; merely placing it inside MXC does not
establish that protection.
Final ownership boundaries
For incoming TCP forwarding, the gateway's standard supervisor path reaches the
runtime's loopback connection primitive and then the workload service. For
outgoing traffic, Windows enforcement must route governed connections through
supervisor policy evaluation and prevent direct bypass. These are separate
flows; implementing incoming forwarding alone does not complete egress mediation.
The gateway supplies supervisor authentication via trusted launch inputs. Only
the host supervisor consumes that identity. The runtime receives its separate
boundary credentials, and the workload receives neither set. Raw provider
credentials and interception CA private keys remain outside the MXC workload
boundary. Bootstrap may pass through driver-owned protected resources, but no
secret-bearing payload belongs in process arguments or general shared files.
Implementation sequence
implementations behind explicit platform interfaces rather than scattering
MXC branches through supervisor session, proxy, and forwarding code.
delivery, handle isolation, and loopback connection operations. Preserve
canonical argv and lifecycle semantics. Define supported exec/TTY behavior;
do not advertise unimplemented operations.
RFC 0012. ETW observations alone are not synchronous authorization evidence.
Resolve any contract gaps before claiming compatibility; if a contract change
is needed, make it explicit and separately reviewed.
boundary protocol where possible. Bind bootstrap credentials to sandbox ID,
runtime generation, and intended peer, with replay rejection and fail-closed
disconnect behavior. Endpoint ACLs supplement authentication.
lifecycle unit. Deliver feat(isolation): implement the RFC 0012 sandbox architecture #2942 supervisor launch authentication only to the
external supervisor and distinct boundary credentials to the runtime.
Update backend registration/descriptor handling where needed; the current
supervisor CLI selects the OpenShell sandbox backend explicitly.
Replace create-scoped credential snapshots only after the common refresh and
revocation path works. Stage only public CA material and intended workload
placeholders inside the boundary.
primitive. Reuse common duplex, cancellation, and half-close handling;
remove the MXC driver forwarding bypass after equivalent tests pass.
capability reporting accordingly. Preserve MXC UI/filesystem enforcement in
provisioning while keeping dynamic policy evaluation in the supervisor.
supervisor and how identity is obtained; a protocol port alone does not
provide Linux seccomp interception or prevent bypass. Reject policies whose
guarantees cannot be enforced on Windows.
driver credential side channel when no supported path needs them. Remove
only MXC-specific host-proxy code proven unused; retain standalone proxy mode.
PR and compatibility sequence
supervisor/runtime crates. Keep Linux behavior covered by existing tests.
runtime, they authenticate and confirm enforcement, the gateway admits the
supervisor session, the runtime launches one command, and exit/stop/delete
reliably clean up the generation. Include a command without a listening port.
protocol operations; validate policy and provider refresh/revocation through
the supervisor. These complete the enforcement work proven feasible in Phase 1.
and update packaging/configuration/docs as part of the same cutover.
Use these as reviewable implementation slices, not separately shipped runtime
architectures. Keep #3370 draft until the final path is qualified; revise its
description around the final implementation rather than presenting it as only
a rebase. Preserve reusable UI mapping, policy tests, and auth work. Fix the
UI-backfill and other surviving findings in their owning components; deleting
the relay does not automatically fix them.
Scope choices that shorten delivery
process_containerfirst. Keepisolation_sessionunsupportedin the converted path until independently qualified; reject selection clearly
instead of falling back to the old relay. Follow with ARM64 qualification.
contract, and boundary messages. Add only the necessary Windows platform code
and transport adaptation; avoid a new public API or generic plugin framework.
distinct backend only if the contract mapping proves that necessary.
interactive TTY features into the first slice. Required backend operations
still have to pass admission and conformance; unsupported optional features
must be reported truthfully.
Carry its failure cases into shared-runtime regression tests, including stalled
readers, half-close, payload logging, and cleanup after errors.
Critical path: enforceable Windows boundary and protected bootstrap → admitted
supervisor/runtime pair → canonical workload lifecycle → forwarding and provider
mediation → real-MXC qualification and legacy removal. Windows compilation can
proceed alongside the initial probes once the platform interfaces are agreed.
For changed
pc_relay_*configuration, either translate old settings withoutchanging their security properties or reject them with an actionable migration
message. Never silently fall back to unprotected direct launch. Restarts create
fresh generations and invalidate old channels and forwarding sessions.
Update the existing architecture overviews, MXC README, gateway-config and
compute-driver references, public/contributor skill guidance, build packaging,
and relevant examples in the corresponding implementation PR. Apply
sync-agent-infrawhen component inventories and workflow coverage change.Validation and completion gates
Contract and regression tests must cover:
request EOF followed by a response, abrupt peer loss, and bounded resource use.
cancellation while opening, writing, or closing a session.
supervisor crashes; failed startup; two complete create/start/stop/delete cycles.
generations: no crossed routing, shutdown, credentials, or stale reconnect.
handles/environment; rejection of wrong peer, sandbox, and generation.
bound provider substitution, refresh/revocation, and accurate
binary identity. Existing Linux runtime behavior must remain unchanged.
Run targeted Rust tests, pre-commit, unit tests, and local CI as required by the
repository. Run relevant sandbox E2E and Windows MSVC build/test lanes. Real MXC
qualification is mandatory for transport reachability, handle protection,
process-tree cleanup, and enforcement; Linux cross-compilation is insufficient.
Qualify supported architectures/backends individually and mark untested ones
unsupported rather than extrapolating a passing result.
The plan completes when the standard supervisor
session and boundary protocol own runtime operations, the required backend
conformance passes, capability claims match observed enforcement, and no bespoke
relay remains in the supported MXC path.
Final removal checks: no
openshell-supervisor-relaydeployment, no MXC JSONlaunch/forward protocol, no driver-owned provider snapshot handoff for the
converted path, no embedded MXC host proxy on that path, and no independent
driver readiness claim that bypasses supervisor/runtime admission. Preserve
driver resource-health reporting and emergency process-tree teardown; those
remain compute-driver responsibilities. If Windows cannot satisfy a required
identity, containment, or transport invariant, record the blocker and revisit
the design explicitly. An interim bridge is outside the selected scope.