pub trait PluginSecurityGate: Send + Sync {
// Required methods
fn check_http_request<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
plugin_id: &'life1 str,
method: &'life2 str,
url: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<(), String>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait;
fn check_file_read<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
plugin_id: &'life1 str,
path: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<(), String>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn check_file_write<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
plugin_id: &'life1 str,
path: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<(), String>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
}Expand description
Security gate for plugin host function calls.
Each method corresponds to a class of sensitive operation that a WASM plugin can request through host functions. Implementors decide whether to permit or deny the operation.
Required Methods§
Sourcefn check_http_request<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
plugin_id: &'life1 str,
method: &'life2 str,
url: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<(), String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn check_http_request<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
plugin_id: &'life1 str,
method: &'life2 str,
url: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<(), String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Check whether the plugin is allowed to make an HTTP request.
Sourcefn check_file_read<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
plugin_id: &'life1 str,
path: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<(), String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn check_file_read<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
plugin_id: &'life1 str,
path: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<(), String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Check whether the plugin is allowed to read a file.
Sourcefn check_file_write<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
plugin_id: &'life1 str,
path: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<(), String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn check_file_write<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
plugin_id: &'life1 str,
path: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<(), String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Check whether the plugin is allowed to write a file.