Skip to content

feat(ssh): add CTAP 2.1 UV tokens to the FIDO client #339

Closed

Description

@inureyes

Two client-side FIDO parity gaps were identified after #333 and #334. The CTAP 2.1 UV-token work is complete here. WebAuthn host-key support remains blocked on released upstream ssh-key and russh support and is now tracked separately in #345.

1. UV tokens for built-in-sensor authenticators

Without a PIN, sign (src/ssh/security_key/internal/mod.rs:219-227) sends options.uv = true, and Device::pin_token (device.rs:208-242) only issues clientPIN 0x05/0x09. libfido2 does something else when the device reports pinUvAuthToken (assert.c:131-139, pin.c:233-238): it fetches a token with getPinUvAuthTokenUsingUvWithPermissions (0x06, no pinHashEnc), sends pinUvAuthParam, and leaves uv out. Without uv it returns FIDO_ERR_PIN_REQUIRED. sk-usbhid.c:723-736 turns PIN_REQUIRED, PIN_INVALID and OPERATION_DENIED into SSH_SK_ERR_PIN_REQUIRED, which brings up the PIN prompt. CTAP 2.0 devices keep the options.uv path.

  • A CTAP 2.1 mock with uv and pinUvAuthToken signs a verify-required key with no PIN. The mock records ClientPin 0x06 with permission 0x02 and the rpId, and a GetAssertion with uv: None and pin_auth set. The mock handler (mock_handlers.rs:178) also accepts 0x06.
  • If the mock answers 0x06 with 0x36, sign returns PinRequired, and retrying with the PIN goes through 0x09.
  • The CTAP 2.0 uv path is unchanged. The "unsupported" notes in docs/openssh-compatibility-status.md are removed.

2. webauthn-sk-ecdsa-sha2-nistp256@openssh.com (moved to #345)

bssh leaves this name out (src/app/query.rs:48-53, src/ssh/tokio_client/algorithms.rs:223-227). It is the only remaining difference from the reference -Q/-G output. russh checks host-key signatures through ssh-key (russh-0.64.1/src/client/kex.rs:337), and the newest published ssh-key, =0.7.0-rc.11 (Cargo.toml:100), has no WebAuthn support. bssh cannot add it without a fork, so this item waits on a released ssh-key and russh in #345.

Verification

cargo fmt --check && cargo clippy -- -D warnings && cargo test --lib security_key && cargo test --lib query && cargo test --lib algorithms

Activity

  1. changed the title [-]feat(ssh): add UV tokens and webauthn-sk support to the FIDO client[/-] [+]feat(ssh): add CTAP 2.1 UV tokens to the FIDO client[/+] on Oct 22, 2026
  2. added a commit that references this issue on Oct 22, 2026
    4fdc748
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions