virtual-fido icon indicating copy to clipboard operation
virtual-fido copied to clipboard

No confirmation request on Linux

Open palemium opened this issue 2 years ago • 3 comments

I am trying to run demo on Debian 11 but don't see any signs of success. I am expecting a confirmation prompt in terminal after I tap "Next" button on the test page. Is there a way to get error logs to understand what is wrong?

bullseye:0 2022-11-26 20-06-49

palemium avatar Nov 26 '22 19:11 palemium

From the screenshots, it looks like maybe it's not finding the device? You can enable verbose logging in the code by going to the newLogger(prefix, enabled) lines in the code and enabling them, which would help determine if it is receiving any data from the website.

The verbose logging should just be a command line flag, I'll take a look at that as well.

cmdli avatar Dec 03 '22 17:12 cmdli

I've had the same problem on Linux (Gentoo) and noticed that I had to add a udev rule for the virtual USB device, as by default it's only accessible by root:

user@gentoo-laptop ~ $ ls -l /dev/hidraw0 
crw------- 1 root root 245, 0 16. Mai 03:21 /dev/hidraw0

To make the device accessible to normal users, create a udev rule by e.g. running the following command as root (based on Yubico's reference here):

echo 'KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ACTION=="add|change", ATTRS{idVendor}=="0000", ATTRS{idProduct}=="0000", TAG+="uaccess", GROUP="plugdev", MODE="0660"' > /etc/udev/rules.d/12-fido2-custom.rules

Afterwards, run sudo go run ./cmd/demo start again and check whether the udev rule has taken effect (it works immediately on my side, but if not you could also try udevadm control --reload-rules or even rebooting). The permissions should then look as follows:

user@gentoo-laptop ~ $ ls -l /dev/hidraw0 
crw-rw---- 1 root plugdev 245, 0 16. Mai 03:21 /dev/hidraw0

Finally, make sure your user account is in the plugdev group (if not, add it and completely log out & in again). With this, the virtual USB device should be recognized when trying out e.g. the Yubico test page for WebAuthn.

jan-krieg avatar May 16 '23 01:05 jan-krieg

udev didn't work for me, but this did:

sudo chgrp plugdev /dev/hidraw0
sudo chmod 0660 /dev/hidraw0

I also needed to install the usbip package.

killerkalamari avatar Feb 10 '24 22:02 killerkalamari