pub enum EgressPosture {
Open,
Unsealed,
BestEffort,
Sealed,
}Expand description
Conservative network posture inferred from launch options.
Customer-managed connector ARNs do not prove internet isolation: their VPC routing
must be checked separately. No combination of flags is automatically Sealed.
Variants§
Open
INTERNET_EGRESS is on the request: the VM has outbound network by design.
Unsealed
Internet isolation has not been verified. This is the default launch posture.
BestEffort
Advisory in-guest proxy denial (crate::sandbox::RunRequest::deny_egress).
A workload can bypass it by ignoring its environment.
Sealed
Internet isolation verified separately through VPC routing configuration.
Retained for stored labels; never inferred by EgressPosture::for_launch.
Implementations§
Source§impl EgressPosture
impl EgressPosture
Sourcepub fn for_launch(egress: bool, deny_egress: bool) -> EgressPosture
pub fn for_launch(egress: bool, deny_egress: bool) -> EgressPosture
The posture of a launch that requested egress and asked for deny_egress.
These flags cannot verify VPC routing, so this never returns Sealed.
Sourcepub fn as_str(self) -> &'static str
pub fn as_str(self) -> &'static str
The wire spelling, which is what an envelope and a --json consumer branch on.
Four values and no Option: a consumer never has to guard against a missing
posture, and none of the four is the empty string a bool degrades into.
Sourcepub fn is_sealed(self) -> bool
pub fn is_sealed(self) -> bool
Whether outbound traffic is refused by something other than the workload’s goodwill.
Only EgressPosture::Sealed answers true. EgressPosture::BestEffort does
not, and that is the whole reason this predicate exists rather than a
posture != Open test at each call site.
Sourcepub fn from_label(label: &str) -> Option<EgressPosture>
pub fn from_label(label: &str) -> Option<EgressPosture>
The posture a stored label names, or None for a string this version does not know.
The inverse of EgressPosture::as_str, and it exists for one caller: the CLI’s
name registry persists the label of the launch a name was registered for, and
agent-up’s refresh path reads it back in a later process rather than assuming the
posture of the launch it did not perform. None rather than a default, so the caller
decides what an unreadable record means instead of inheriting a claim.
Trait Implementations§
Source§impl Clone for EgressPosture
impl Clone for EgressPosture
Source§fn clone(&self) -> EgressPosture
fn clone(&self) -> EgressPosture
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for EgressPosture
Source§impl Debug for EgressPosture
impl Debug for EgressPosture
Source§impl Default for EgressPosture
Defaults to the posture of a launch with no network flags.
impl Default for EgressPosture
Defaults to the posture of a launch with no network flags.
Source§fn default() -> EgressPosture
fn default() -> EgressPosture
Source§impl Display for EgressPosture
impl Display for EgressPosture
impl Eq for EgressPosture
Source§impl Hash for EgressPosture
impl Hash for EgressPosture
Source§impl PartialEq for EgressPosture
impl PartialEq for EgressPosture
impl StructuralPartialEq for EgressPosture
Auto Trait Implementations§
impl Freeze for EgressPosture
impl RefUnwindSafe for EgressPosture
impl Send for EgressPosture
impl Sync for EgressPosture
impl Unpin for EgressPosture
impl UnsafeUnpin for EgressPosture
impl UnwindSafe for EgressPosture
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more