pub enum Capability {
InterfaceAccess {
name: String,
},
NetworkEndpoint {
url: String,
},
KeyAccess {
key_id: String,
},
FilesystemPath {
path: PathBuf,
mode: FilesystemMode,
},
}Expand description
A capability a sandboxed plugin may be granted.
Capabilities are explicit, granular, and revocable. The sandbox
runtime checks every host-import invocation against the instance’s
current capability set; a denied call traps with
Error::CapabilityDenied.
For the process sandbox the capability set is enforced host-side:
the host refuses to forward a cfm_* call to the subprocess unless
the matching capability is present. (A future revision may push the
capability gate into a seccomp/AppSandbox profile on the child.)
Variants§
InterfaceAccess
Plugin may call the cfm_<name>_* host-import family
(e.g. InterfaceAccess { name: "hash" } enables cfm_hash_*).
NetworkEndpoint
Plugin may talk to this network endpoint.
KeyAccess
Plugin may reference this key (read/use, never reveal bytes).
FilesystemPath
Plugin may read/write this filesystem path.
Trait Implementations§
Source§impl Clone for Capability
impl Clone for Capability
Source§fn clone(&self) -> Capability
fn clone(&self) -> Capability
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more