Skip to main content

Module profiles

Module profiles 

Source
Expand description

Base and worker-specific sandbox profiles.

The VM and TPM presets encode OpenVMM resource choices, not requirements of the generic sandbox backend. Consumers choose whether to use these policies.

Each base is exposed as a function returning a configurable Builder, so a worker starts from one and chains its own grants before calling Builder::build:

use sandbox::{Network, profiles};

let profile = profiles::minimal()
    .name("my_worker")
    .network(Network::Unrestricted)
    .build();

Each worker’s sandbox policy is defined in its own module. SandboxRole::profile builds the policy defined by the selected worker’s module:

use sandbox::profiles::SandboxRole;

let profile = SandboxRole::Tpm.profile();
assert_eq!(profile.name(), "tpm_worker");

Enums§

SandboxRole
Selects the sandbox policy for an OpenVMM worker host.

Functions§

minimal
A conservative starting profile that a worker widens for its own needs.
tpm_worker
Build the OpenVMM TPM worker policy with an isolated network namespace.
vm_worker
Build the OpenVMM VM worker policy.