Add YubiKey extension - #327
Open
LLawli wants to merge 1 commit into
Open
Conversation
Native YubiKey extension: TOTP codes, FIDO2 passkeys and PIV certificates, with no external dependencies (no ykman/yubikit/Python, no native addons). Speaks OATH/PIV over CCID (pcscd) and FIDO2 over HID directly, in pure TypeScript. English and Portuguese UI.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
YubiKey
Use a YubiKey from Vicinae: TOTP codes, FIDO2 passkeys and PIV certificates.
The distinguishing point is that it is fully native and dependency-free. It does
not shell out to
ykman/yubikit, needs no Python, and bundles no native addon. Everyprotocol is implemented in pure TypeScript on Node's standard library:
pcscdwinscard_msgprotocol directlyover its Unix socket.
CTAPHID+ canonical CBOR + PIN/UV protocol v1/v2) via/dev/hidraw.D-Bus client (imported from
ykman's keystore when present, so no password prompt inthe common case).
The only runtime requirement is a running
pcscd(present on virtually every Linuxdesktop), plus the standard FIDO udev rule for the passkey screen. Missing tools are
detected and reported with install guidance.
Commands
pastes the selected code into the focused field. Touch-required accounts ask for the
touch before pasting.
certificates. The PIN is asked in-app and kept only in memory.
Notes for review
otpextension. That one is a software OTPmanager (stores TOTP/HOTP secrets). This one reads codes from a physical YubiKey and
also handles FIDO2/PIV; it does nothing without the hardware key plugged in.
Clipboard.paste()has noconcealedflag (onlycopy()does), pasting a code writes it to Vicinae's clipboard history in plaintext.The extension removes that entry right after pasting, and degrades gracefully (logs a
warning, never breaks the paste) if the schema changes. An upstream
concealedoptionon
paste()would let us delete this code entirely.Languagepreference.extensions/yubikey/docs/.Checks
Passes
npm ci,vici buildandvici lintlocally. Preview images are HTML/CSSmockups (fictitious data), not screenshots of real accounts.