Add native doctor auth diagnostics
This commit is contained in:
@@ -38,6 +38,7 @@ pub enum PacketKind {
|
||||
StreamWindowAdjust = 22,
|
||||
StreamEof = 23,
|
||||
StreamClose = 24,
|
||||
NativeAuthCheckOk = 25,
|
||||
}
|
||||
|
||||
impl TryFrom<u8> for PacketKind {
|
||||
@@ -69,6 +70,7 @@ impl TryFrom<u8> for PacketKind {
|
||||
22 => Self::StreamWindowAdjust,
|
||||
23 => Self::StreamEof,
|
||||
24 => Self::StreamClose,
|
||||
25 => Self::NativeAuthCheckOk,
|
||||
_ => bail!("unknown packet kind {value}"),
|
||||
})
|
||||
}
|
||||
@@ -276,6 +278,16 @@ pub struct NativeAuthOkBody {
|
||||
pub ok: NativeAuthOk,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
pub struct NativeAuthCheckOkBody {
|
||||
pub requested_user: String,
|
||||
pub native_auth_enabled: bool,
|
||||
pub allow_tcp_forwarding: bool,
|
||||
pub allow_remote_forwarding: bool,
|
||||
pub allow_agent_forwarding: bool,
|
||||
pub policy_flags: Vec<String>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
pub struct AttachOk {
|
||||
pub client_id: [u8; 16],
|
||||
|
||||
Reference in New Issue
Block a user