Skip to content

feat(network): support additional destination CAs - #3292

Draft
jhjaggars wants to merge 4 commits into
NVIDIA:mainfrom
jhjaggars:feat/network-supervisor-additional-ca
Draft

feat(network): support additional destination CAs#3292
jhjaggars wants to merge 4 commits into
NVIDIA:mainfrom
jhjaggars:feat/network-supervisor-additional-ca

Conversation

@jhjaggars

@jhjaggars jhjaggars commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

Summary

Add a global network-supervisor configuration for additional destination CA certificates so sandbox egress can trust private PKI without replacing default roots or changing gateway control-plane trust. Deliver the normalized trust bundle consistently through Docker, Podman, Kubernetes combined/sidecar, and VM compute paths.

Related Issue

No linked accepted issue (process discrepancy): this feature was implemented and published as a draft by direct user request. An accepted issue is still required before this PR is marked ready or merged.

Changes

  • Add [openshell.supervisor.network].additional_ca_cert_paths with strict, bounded startup validation, canonicalization, redacted metadata, and fail-closed capability-based driver handling.
  • Keep effective-config preflight side-effect-free; stage gateway-owned trust material only after the selected driver passes compatibility checks.
  • Extend the shared network supervisor with additive rustls and child-process trust while preserving user TLS variables in direct mode and keeping proxy CA and gateway mTLS trust separate.
  • Stage the normalized bundle through read-only Docker/Podman mounts, Kubernetes managed ConfigMaps with ownership/admission validation and topology-aware placement, and VM overlays.
  • Restrict Kubernetes ConfigMap get/patch RBAC to the deterministic gateway-owned name; retain the unavoidable namespace-scoped create permission.
  • Enforce one deployable, bounded trust-bundle limit across gateway, Kubernetes, VM, and supervisor consumers.
  • Add shared cross-driver additional-CA e2e coverage for private/public trust, hostname enforcement, invalid staged material, callback isolation, and removal/restart behavior.
  • Update gateway reference, architecture, RFC, Helm, compute-driver, and cluster-debugging documentation.

Testing

  • mise run pre-commit passes
  • mise run test passes
  • Unit and process-level tests added/updated
  • E2E tests added/updated and all feature combinations compile
  • Rootless Podman manual verification against a private-PKI GitLab endpoint: TLS failed without the additional CA and succeeded with it while default public trust remained enabled
  • Helm lint, render, 156 unit tests, and docs checks pass
  • Docker, Kubernetes combined/sidecar, and VM E2E runtime lanes (configured for CI; not run locally)

Checklist

  • Follows Conventional Commits
  • Commits are signed off (DCO)
  • Architecture docs updated (if applicable)

…nd /dev/tty Landlock

Three exec fixes and one Landlock fix:

- scripts/bin/openshell: replace hardcoded shasum with a portable _sha256
  helper that prefers sha256sum (Linux) and falls back to shasum (macOS).

- openshell-cli: sandbox_exec_grpc gated the interactive exec path on
  tty_override == Some(true), requiring an explicit --tty flag. Change the
  condition to use the auto-detected tty variable so interactive programs
  (TUIs, shells) work without the flag.

- openshell-server: run_exec_with_russh hardcoded PTY dimensions to 0x0.
  Thread cols/rows from the ExecSandboxRequest through handle_exec_sandbox,
  stream_exec_over_relay, and run_exec_with_russh, defaulting to 80x24
  (matching the interactive exec path).

- openshell-supervisor-process: /dev/tty is a magic device that refers to
  the calling process's controlling terminal. The supervisor has no
  controlling terminal, so PathFd::new("/dev/tty") fails with ENXIO
  during Landlock prepare(), and the path is silently skipped in
  best-effort mode. After the child calls setsid() + TIOCSCTTY (in the
  pre_exec hook for PTY sessions), /dev/tty becomes accessible. Add
  PreparedRuleset::add_dev_tty_if_available() which is called in enforce()
  after the child has a controlling terminal but before restrict_self().
  This allows TUI programs (prompt_toolkit, ratatui) inside sandboxes to
  open /dev/tty without requiring users to add it to the policy.

Signed-off-by: Jesse Jaggars <jjaggars@redhat.com>
Signed-off-by: Jesse Jaggars <jjaggars@redhat.com>
@copy-pr-bot

copy-pr-bot Bot commented Sep 11, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@jhjaggars

Copy link
Copy Markdown
Contributor Author
 [openshell.supervisor.network]
   additional_ca_cert_paths = [
     "/tmp/openshell-e2e-podman.McovxM/additional-ca/ca.crt",
   ]

Signed-off-by: Jesse Jaggars <jjaggars@redhat.com>
Signed-off-by: Jesse Jaggars <jjaggars@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant