Expand description
Security utilities for protocol handling
This module provides security-related utilities including content-type whitelisting, message validation, and safety checks.
§Content-Type Whitelist
By default, only safe serialization formats are allowed. Pickle is explicitly blocked due to security concerns (arbitrary code execution).
§Example
use celers_protocol::security::{ContentTypeWhitelist, SecurityPolicy};
let policy = SecurityPolicy::strict();
assert!(policy.is_content_type_allowed("application/json"));
assert!(!policy.is_content_type_allowed("application/x-python-pickle"));Structs§
- Content
Type Whitelist - Content-type whitelist for allowed serialization formats
- Security
Policy - Security policy for message handling
Enums§
- Security
Error - Security validation error
Functions§
- is_
unsafe_ content_ type - Check if a content type is known to be unsafe