feat(network): support additional destination CAs - #3292
Draft
jhjaggars wants to merge 4 commits into
Draft
Conversation
…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>
Contributor
Author
|
Signed-off-by: Jesse Jaggars <jjaggars@redhat.com>
Signed-off-by: Jesse Jaggars <jjaggars@redhat.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
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
[openshell.supervisor.network].additional_ca_cert_pathswith strict, bounded startup validation, canonicalization, redacted metadata, and fail-closed capability-based driver handling.get/patchRBAC to the deterministic gateway-owned name; retain the unavoidable namespace-scopedcreatepermission.Testing
mise run pre-commitpassesmise run testpassesChecklist