Implement SSH identity authentication and strict host-key verification #114
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Goal
Provide secure, storage-owned SSH authentication and server identity verification for the optional SSH transport without invoking OpenSSH, a shell, or a credential helper.
Scope
russhand keep its session, algorithm, authentication, and trust policy incrates/storage.ProxyCommand, or another program.SecretBytes; never place private key bytes or passphrases in TOML, Git config, logs, command history, or view-ready errors.russh::client::Handler::check_server_keypath against the configured/default OpenSSHknown_hostslocation using Rust parsing.Tests and verification
std::process::Commandor a helper.Acceptance criteria
Depends on the typed SSH remote and feature-wiring issue in this milestone.
Implemented in
5dbda4bbd2ac60937b67eeb683cfb7fca2d4b788and pushed tomain.Implementation:
SecretBytes, and exact-fingerprint pure-Rust SSH-agent selection with bounded identity enumeration.known_hostsverification for exact, comma-list, negated, hashed, non-default-port, revoked, and certificate-authority records. Unknown hosts return a typed confirmation payload; only that payload can be atomically persisted. Changed and revoked keys are never replaced.Verification:
cargo fmt --all -- --checkRUSTFLAGS="-D warnings" cargo check --workspace --all-targetscargo clippy --workspace --all-targets -- -D warningscargo test --workspacecargo clippy --manifest-path crates/storage/Cargo.toml --all-targets --features ssh -- -D warningscargo test --manifest-path crates/storage/Cargo.toml --features ssh --no-fail-fastplus the final targeted SSH suite after hardening.cargo auditran with no suppressions. It reports RUSTSEC-2023-0071 for the existingrsa 0.9.10OpenPGP path and Russh RSA support throughrsa 0.10.0-rc.18; neither has a fixed release. The exposure and signing/decryption distinction are recorded inDEPENDENCIES.md.