Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions src/bin/rbw-agent/ssh_agent.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,20 @@ impl ssh_agent_lib::agent::Session for SshAgent {
ssh_agent_lib::ssh_key::Signature,
ssh_agent_lib::error::AgentError,
> {
// Security keys (FIDO2) require physical hardware interaction that
// this agent cannot perform. Decline early so the SSH client can
// fall back to another agent or direct hardware access.
if matches!(
&request.pubkey,
ssh_agent_lib::ssh_key::public::KeyData::SkEcdsaSha2NistP256(_)
| ssh_agent_lib::ssh_key::public::KeyData::SkEd25519(_)
) {
return Err(ssh_agent_lib::error::AgentError::Other(
"security keys require hardware interaction; declining"
.into(),
));
}

let pubkey =
ssh_agent_lib::ssh_key::PublicKey::new(request.pubkey, "");

Expand Down
Loading