Bug 1212038 - Yubikey RPM missing udev rules file to access device by non-root user
Summary: Yubikey RPM missing udev rules file to access device by non-root user
Status: IN_PROGRESS
Alias: None
Product: openSUSE Tumbleweed
Classification: openSUSE
Component: Security (show other bugs)
Version: Current
Hardware: x86-64 openSUSE Tumbleweed
: P5 - None : Major (vote)
Target Milestone: ---
Assignee: Torsten Gruner
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-06-05 16:55 UTC by t neo
Modified: 2023-06-06 15:41 UTC (History)
2 users (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description t neo 2023-06-05 16:55:34 UTC
Based upon my forum topic: 
https://forums.opensuse.org/t/yubikey-not-recognized-unless-using-sudo/166643/5

I installed Yubikey manager from the official repository. My key (Yubikey Standard/ Legacy) is not recognized by the manager application when the application is run as non-root user. The device upon insertion is not seen.

Executing "lsusb | grep Yubikey" does show the info.
Executing "ykman info" does return: No Yubikey detecded
Executing "sudo ykman info" does return the values for the Yubikey.

This is resolved by creating a udev rule: 
sudo vi /usr/lib/udev/rules.d/99-yubikeys.rules

Insert:
SUBSYSTEMS=="usb", ATTRS{idVendor}=="1050", ATTRS{idProduct}=="0116", TAG+="uaccess"
Comment 1 t neo 2023-06-06 04:15:13 UTC
Tinkering on Leap 15.4 to replicate my steps. I also need to add these 2 udev rules:
https://github.com/Yubico/yubikey-personalization/blob/master/69-yubikey.rules
https://github.com/Yubico/yubikey-personalization/blob/master/70-yubikey.rules

Than inserting the key gets recognized by yubikey manager.
Comment 2 Matthias Gerstner 2023-06-06 07:45:41 UTC
Assigning to yubikey-manager maintainers.

There is a similar udev file in the package "ykpers". You can check if
installing that already helps.
Comment 3 Torsten Gruner 2023-06-06 10:39:38 UTC
Install "libfido2-udev" package only. This includes the 70-yubikey.rules with a patch for group rules.
Comment 4 t neo 2023-06-06 13:44:56 UTC
The libfido2-udev package adds "70-fido2.rules". The contents for the 70-fido2.rules contains the contents as found here: https://github.com/Yubico/libfido2/blob/main/udev/70-u2f.rules 

Adding the libfido2-udev package does not add the 69-yubikey.rules, 70-yubikey.rules and 99-yubikeys.rules rules that were needed to recognize the device as non-root user.

Installing ykpers package does add the 69-yubikey.rules to my system.
Comment 5 t neo 2023-06-06 15:41:38 UTC
I created a fresh Virtualbox with Leap 15.4

Installing yubikey-manager-qt and ykpers does make sure a non-root user can interact with the key using ykman on the terminal. However in yubikey-manager the Yubikey is not recognized.