fix(runtime): support fuse mounts with minimal permissions - #1149
Draft
G4614 wants to merge 1 commit into
Draft
Conversation
Add an opt-in --fuse flag (advanced.fuse) that grants a box the minimum runtime permissions FUSE filesystems need: CAP_SYS_ADMIN and a /dev/fuse device node, in both the sandbox layer (bwrap/ landlock) and the guest container spec. Advertised over REST via CreateBoxAdvancedOptions.fuse; older servers that predate the capability are rejected rather than silently ignoring the request.
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
Split out of #1056. Adds an opt-in
--fuseflag (advanced.fuse) that grants a box the minimum runtime permissions FUSE filesystems need:CAP_SYS_ADMINand a/dev/fusedevice node, in both the sandbox layer (bwrap/landlock) and the guest container spec. Advertised over REST viaCreateBoxAdvancedOptions.fuse; older servers that predate the capability are rejected rather than silently ignoring the request.Unrelated to volume mounts — split out because it grants a new sandbox capability (
CAP_SYS_ADMIN+ device access) and deserves independent review from the storage API work in #1056.Test plan:
BOXLITE_DEPS_STUB=1 cargo test -p boxlite --lib --features rest fuse— 3 tests passBOXLITE_DEPS_STUB=1 cargo test -p boxlite-cli fuse— 2 tests passBOXLITE_DEPS_STUB=1 cargo test -p boxlite-cli --bin boxlite cli::tests::— 64/64 pass, no regressions