Skip to content

feat(build): add system CA root mode#2324

Open
politerealism wants to merge 2 commits into
NVIDIA:mainfrom
politerealism:openshell-unbundle-certs
Open

feat(build): add system CA root mode#2324
politerealism wants to merge 2 commits into
NVIDIA:mainfrom
politerealism:openshell-unbundle-certs

Conversation

@politerealism

Copy link
Copy Markdown

Summary

  • Add mutually exclusive bundled-ca-roots / system-ca-roots feature flags to openshell-supervisor-network and openshell-sandbox, allowing Linux distribution builds to use the platform trust store instead of bundled Mozilla roots
  • Switch CLI and gateway unconditionally to native CA roots (rustls-tls-native-roots, tls-rustls-ring-native-roots) so RPM-built binaries respect the system trust store without feature flags
  • Fix rust:verify:telemetry-off CI task to explicitly re-enable bundled-ca-roots when disabling default features, preventing the new compile_error! guard from firing

Related Issue

Enables downstream RPM packaging (https://gitlab.com/redhat/hummingbird/rpms/-/merge_requests/2503) to build against system CA roots.

Changes

  • crates/openshell-supervisor-network/Cargo.toml: Make webpki-roots optional behind bundled-ca-roots (default), add system-ca-roots feature gating rustls-native-certs
  • crates/openshell-supervisor-network/src/l7/tls.rs: Add compile-time guards enforcing exactly one CA root mode; refactor build_upstream_client_config to return Result and support both modes
  • crates/openshell-sandbox/Cargo.toml: Forward bundled-ca-roots/system-ca-roots features to supervisor-network; set default-features = false on the dependency
  • tasks/rust.toml: Add rust:verify:system-ca-roots CI task; fix rust:verify:telemetry-off to pass --features bundled-ca-roots
  • Cargo.toml: Add rustls-native-certs to workspace dependencies; switch reqwest, sqlx, kube to native root variants

Testing

  • mise run rust:verify:telemetry-off passes (telemetry compiled out, CA root guard satisfied)
  • mise run rust:verify:system-ca-roots passes (system-ca-roots compiles, no webpki-roots in dep tree)
  • cargo test -p openshell-supervisor-network passes under default features
  • Downstream RPM spec (cargo build --release --bin openshell --bin openshell-gateway) builds without feature flags

Checklist

  • Conventional commit format
  • compile_error! guards enforce mutual exclusion
  • No bundled Mozilla roots leak into system-ca-roots builds
  • CLI and gateway use native roots unconditionally
  • CI telemetry-off verification updated

maxamillion and others added 2 commits June 30, 2026 17:03
Allow distro builds to use native trust stores for supervisor upstream TLS while keeping bundled Mozilla roots as the default. Avoid bundled root crates in system-ca-roots builds by using native-root TLS features and z3 0.20.

Signed-off-by: Adam Miller <admiller@redhat.com>
The telemetry-off task uses --no-default-features which now disables
bundled-ca-roots in addition to telemetry, triggering the compile_error
guard. Re-enable bundled-ca-roots explicitly so the task verifies only
telemetry compilation.

Signed-off-by: Scott Burdine <sburdine@nvidia.com>
Signed-off-by: politerealism <burdcat17@gmail.com>
@copy-pr-bot

copy-pr-bot Bot commented Jul 16, 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.

@github-actions

Copy link
Copy Markdown

Thank you for your interest in contributing to OpenShell, @politerealism.

This project uses a vouch system for first-time contributors. Before submitting a pull request, you need to be vouched by a maintainer.

To get vouched:

  1. Open a Vouch Request discussion.
  2. Describe what you want to change and why.
  3. Write in your own words — do not have an AI generate the request.
  4. A maintainer will comment /vouch if approved.
  5. Once vouched, open a new PR (preferred) or reopen this one after a few minutes.

See CONTRIBUTING.md for details.

@github-actions github-actions Bot closed this Jul 16, 2026
@github-actions

github-actions Bot commented Jul 16, 2026

Copy link
Copy Markdown

All contributors have signed the DCO ✍️ ✅
Posted by the DCO Assistant Lite bot.

@politerealism

Copy link
Copy Markdown
Author

I have read the DCO document and I hereby sign the DCO.

@politerealism

Copy link
Copy Markdown
Author

recheck

@maxamillion maxamillion reopened this Jul 16, 2026
@maxamillion

Copy link
Copy Markdown
Collaborator

/ok to test 00c9b14

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.

2 participants