1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
// ABOUTME: Shared SSH authentication utilities for coven services.
// ABOUTME: Provides key management, fingerprinting, and gRPC auth credentials.
//! # coven-ssh
//!
//! SSH key management and authentication utilities for coven services.
//!
//! This crate provides a unified implementation of SSH-based authentication
//! used by coven-agent, coven-leader, and coven-swarm to communicate with
//! coven-gateway.
//!
//! ## Features
//!
//! - **Key Management**: Load existing SSH keys or generate new ed25519 keys
//! - **Fingerprinting**: Compute SHA256 fingerprints compatible with Go's ssh library
//! - **gRPC Auth**: Apply SSH authentication credentials to tonic requests
//!
//! ## Example
//!
//! ```no_run
//! use coven_ssh::{load_or_generate_key, compute_fingerprint, SshAuthCredentials};
//! use std::path::PathBuf;
//!
//! // Load or generate a key
//! let key_path = PathBuf::from("/path/to/key");
//! let private_key = load_or_generate_key(&key_path).expect("key should load");
//!
//! // Compute fingerprint for identification
//! let fingerprint = compute_fingerprint(private_key.public_key()).expect("fingerprint should compute");
//! println!("Key fingerprint: {}", fingerprint);
//!
//! // Create auth credentials for gRPC
//! let creds = SshAuthCredentials::new(&private_key).expect("credentials should create");
//!
//! // Apply to a gRPC request
//! let mut request = tonic::Request::new(());
//! creds.apply_to_request(&mut request).expect("should apply");
//! ```
// Re-export primary types and functions
pub use ;
pub use ;
pub use compute_fingerprint;
pub use ;
// Re-export ssh_key types for convenience
pub use ;