pub struct SshAction {
pub message: String,
pub reject: bool,
pub accept: bool,
pub session_duration_nanos: Option<i64>,
pub allow_agent_forwarding: bool,
pub allow_local_port_forwarding: bool,
pub allow_remote_port_forwarding: bool,
pub recorders: Vec<SocketAddr>,
pub on_recording_failure: Option<SshRecorderFailureAction>,
pub hold_and_delegate: String,
}Expand description
The action taken when a rule matches. Mirrors tailcfg.SSHAction.
Recording (recorders / on_recording_failure) and the interactive hold_and_delegate
control round-trip are carried through from the wire so the server can enforce them
fail-closed. This fork has no recorder transport and no delegate round-trip yet, so a rule
that demands either (non-empty recorders, or a non-empty hold_and_delegate) cannot be
honored and the session is refused rather than silently downgraded to a plain accept.
Fields§
§message: StringOptional message shown to the user.
reject: boolReject the connection.
accept: boolAccept the connection.
session_duration_nanos: Option<i64>Max session duration in nanoseconds (None/0 = unlimited).
allow_agent_forwarding: boolAllow SSH agent forwarding.
allow_local_port_forwarding: boolAllow local port forwarding.
allow_remote_port_forwarding: boolAllow remote port forwarding.
recorders: Vec<SocketAddr>Session recorders (ip:port) this session must be streamed to. A non-empty list means
the policy demands recording; mirrors tailcfg.SSHAction.Recorders.
on_recording_failure: Option<SshRecorderFailureAction>What to do when recording cannot be performed; mirrors tailcfg.SSHAction.OnRecordingFailure.
None is Go’s “ignore recording failures” (fail-open). The interim server still refuses
when it has no recorder transport at all — see SshAccept::recording_required.
hold_and_delegate: StringIf non-empty, the rule wants the final decision delegated to this URL over a control
round-trip (Go HoldAndDelegate). Carried for fidelity; this fork does not perform the
delegate fetch, so a rule bearing it is treated as not-yet-supported and denied (fail-closed)
rather than silently accepted. Mirrors tailcfg.SSHAction.HoldAndDelegate.
Trait Implementations§
impl Eq for SshAction
impl StructuralPartialEq for SshAction
Auto Trait Implementations§
impl Freeze for SshAction
impl RefUnwindSafe for SshAction
impl Send for SshAction
impl Sync for SshAction
impl Unpin for SshAction
impl UnsafeUnpin for SshAction
impl UnwindSafe for SshAction
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<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<A, T> DynMessage<A> for T
impl<A, T> DynMessage<A> for T
Source§fn handle_dyn<'a>(
self: Box<T>,
state: &'a mut A,
actor_ref: ActorRef<A>,
tx: Option<Sender<Result<Box<dyn Any + Send>, SendError<Box<dyn Any + Send>, Box<dyn Any + Send>>>>>,
stop: &'a mut bool,
) -> Pin<Box<dyn Future<Output = Result<(), Box<dyn ReplyError>>> + Send + 'a>>
fn handle_dyn<'a>( self: Box<T>, state: &'a mut A, actor_ref: ActorRef<A>, tx: Option<Sender<Result<Box<dyn Any + Send>, SendError<Box<dyn Any + Send>, Box<dyn Any + Send>>>>>, stop: &'a mut bool, ) -> Pin<Box<dyn Future<Output = Result<(), Box<dyn ReplyError>>> + Send + 'a>>
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
impl<T> ErasedDestructor for Twhere
T: 'static,
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
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