feat(ssh): implement KnownHostsService TOFU/MITM guard, sudo helper, and multiplexed SSHPool with ProxyJump
This commit is contained in:
parent
df030ba8ba
commit
b742f0ebf8
4 changed files with 1129 additions and 1 deletions
|
|
@ -2,6 +2,16 @@ import { z } from 'zod';
|
|||
|
||||
export type VaultState = 'uninitialized' | 'locked' | 'unlocked';
|
||||
|
||||
export type ServerConnectionStatus =
|
||||
| 'disconnected'
|
||||
| 'connecting'
|
||||
| 'connected'
|
||||
| 'tofu_pending'
|
||||
| 'host_key_mismatch'
|
||||
| 'auth_error'
|
||||
| 'vault_locked'
|
||||
| 'disabled';
|
||||
|
||||
export interface ConfigWarning {
|
||||
filePath: string;
|
||||
code: string;
|
||||
|
|
@ -50,12 +60,35 @@ export interface AlertEventSummary {
|
|||
ts: number;
|
||||
}
|
||||
|
||||
export interface HostKeyAlert {
|
||||
export interface PendingTofuInfo {
|
||||
serverId: string;
|
||||
hostPortKey: string;
|
||||
host: string;
|
||||
port: number;
|
||||
algorithm: string;
|
||||
fingerprint: string;
|
||||
firstSeenAt: number;
|
||||
}
|
||||
|
||||
export interface HostKeyAlert {
|
||||
serverId: string;
|
||||
hostPortKey: string;
|
||||
host: string;
|
||||
port: number;
|
||||
algorithm: string;
|
||||
expectedFingerprint: string;
|
||||
actualFingerprint: string;
|
||||
detectedAt: number;
|
||||
}
|
||||
|
||||
export interface ServerRuntimeState {
|
||||
serverId: string;
|
||||
status: ServerConnectionStatus;
|
||||
osDetected?: 'linux' | 'bsd' | 'macos';
|
||||
lastError?: string;
|
||||
connectedAt?: number;
|
||||
tofuPending?: PendingTofuInfo;
|
||||
hostKeyMismatch?: HostKeyAlert;
|
||||
}
|
||||
|
||||
export const ClientWsFrameSchema = z.discriminatedUnion('type', [
|
||||
|
|
@ -111,6 +144,7 @@ export type ServerWsFrame =
|
|||
}
|
||||
| { type: 'security:panic-lock' }
|
||||
| { type: 'error'; code: string; message: string }
|
||||
| { type: 'servers:state'; states: ServerRuntimeState[] }
|
||||
| {
|
||||
type: 'metrics:tick';
|
||||
serverId: string;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue