Trait SecureBuilderExt

Source
pub trait SecureBuilderExt<Base: BaseType + StoreCopy> {
    // Required method
    fn build_secure(
        &self,
        base: Base,
        s_key: &SigningKey,
    ) -> Result<Object<Base>, TwzError>;
}
Expand description

An extension trait for the ObjectBuilder from the twizzler crate that allows for the creation of objects that have restrained default permissions.

We get around the write requirement by creating a capability before we write the base of the object.

Required Methods§

Source

fn build_secure( &self, base: Base, s_key: &SigningKey, ) -> Result<Object<Base>, TwzError>

Builds a “secure” object, one without Protections::READ|Protections::Write as its default_prots.

It achieves this by creating a capability for the object within the current security context, and then writing to the object after that capability has been created.

Implementations on Foreign Types§

Source§

impl<Base> SecureBuilderExt<Base> for ObjectBuilder<Base>
where Base: BaseType + StoreCopy,

Source§

fn build_secure( &self, base: Base, s_key: &SigningKey, ) -> Result<Object<Base>, TwzError>

Implementors§