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<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.