pub enum EgressPolicy {
Internet,
Allow {
allow: Vec<String>,
},
}Expand description
Per-sandbox outbound policy enforced by the gateway.
Mail ports 25, 465 and 587 require an explicit port in an allowlist target,
such as smtp.example.com:587; internet and portless targets exclude them.
This protects the deployment’s shared outbound IP from mail abuse and blocklisting,
which could disrupt every tenant’s access through that IP.
Variants§
Internet
Public internet access except mail ports 25, 465 and 587. Private and link-local destinations remain forbidden.
Allow
Explicit destinations; unspecified ports exclude 25, 465 and 587. Wildcards include the apex. An explicit port can allow a mail destination.
Implementations§
Source§impl EgressPolicy
impl EgressPolicy
Sourcepub fn validate(&self) -> Result<()>
pub fn validate(&self) -> Result<()>
Validates every target before a deployment or runtime request can take effect.
Sourcepub fn normalized(&self) -> Result<Self>
pub fn normalized(&self) -> Result<Self>
Returns a validated policy with ASCII, lowercase names and canonical IP networks.
Sourcepub fn canonical_json(&self) -> Result<Vec<u8>>
pub fn canonical_json(&self) -> Result<Vec<u8>>
Canonical JSON used to authenticate gateway policy writes: normalized, sorted, no whitespace. Duplicate entries remain present; sorting makes input order irrelevant to the digest.
Sourcepub fn policy_digest(&self) -> Result<String>
pub fn policy_digest(&self) -> Result<String>
SHA-256 digest authenticating the policy body in an admin JWS.
Trait Implementations§
Source§impl Clone for EgressPolicy
impl Clone for EgressPolicy
Source§impl Debug for EgressPolicy
impl Debug for EgressPolicy
Source§impl<'de> Deserialize<'de> for EgressPolicy
impl<'de> Deserialize<'de> for EgressPolicy
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
impl Eq for EgressPolicy
Source§impl PartialEq for EgressPolicy
impl PartialEq for EgressPolicy
Source§impl Serialize for EgressPolicy
impl Serialize for EgressPolicy
impl StructuralPartialEq for EgressPolicy
Auto Trait Implementations§
impl Freeze for EgressPolicy
impl RefUnwindSafe for EgressPolicy
impl Send for EgressPolicy
impl Sync for EgressPolicy
impl Unpin for EgressPolicy
impl UnsafeUnpin for EgressPolicy
impl UnwindSafe for EgressPolicy
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.