Open spoelstraethan opened 3 years ago
ykman
should be able to detect the key even if some of the USB transports aren't accessible. The best way to see what's going on would be to run ykman --diagnose
, which will attempt to connect over all 3 transports.
FWIW, ykman
is successfully detecting a YubiKey 5 NFC for me inside a Debian 11 crostini vm under ChromeOS 98.0.4758.91 once access is provided to the VM in the ChromeOS Linux USB Preferences menu.
$ lsusb | grep Yubikey
Bus 001 Device 009: ID 1050:0407 Yubico.com Yubikey 4/5 OTP+U2F+CCID
$ ykman info
Device type: YubiKey 5 NFC
Serial number: XXXXXX
Firmware version: 5.2.7
Form factor: Keychain (USB-A)
Enabled USB interfaces: OTP, FIDO, CCID
NFC transport is enabled.
Applications USB NFC
FIDO2 Enabled Enabled
OTP Enabled Enabled
FIDO U2F Enabled Enabled
OATH Enabled Enabled
YubiHSM Auth Not available Not available
OpenPGP Enabled Enabled
PIV Enabled Enabled
I haven't got FIDO/U2F working however, I assume because of the lack of hidraw support in the crostini vm.
$ ykman fido info
Error: No YubiKey found with the given interface(s)
$ ls -l /dev/hidraw*
zsh: no matches found: /dev/hidraw*
$ ls -l /sys/class/hidraw
ls: cannot access '/sys/class/hidraw': No such file or directory
I noted this on a related chromium issue, hoping to get a response there.
https://github.com/Yubico/yubikey-manager/blob/0f290367c38db0a3678123d53309444b543c0583/ykman/device.py#L57
You would be surprised at how many developers serious about security throw a fit when their Yubikey isn't working in Crostini, luckily this just appears to be an issue with detection by the Yubikey Manager app/CLI and doesn't affect the GPG functionality they tend to be clamoring for.
I'm curious whether this detection is relying solely on the HID while also discovering the CCID/GPG capabilities, or if it can detect a card that has OTP+FIDO+CCID enabled but only part of those are visible due to the Crostini/ChromeOS security layer.
The
gpg --card-status
output looks normal (taken from a 5C not the 5NFC used later, but same things visible):This is what I see of the device in Crostini: Running
pcsc_scan
:Versus what I see in the Crosh shell (ChromeOS command line):