Ticket was cloned from Red Hat Bugzilla (product Red Hat Enterprise Linux 7): Bug 1452081
Description of problem: In order to work with IPA and Yubikey, libyubikey is required. Right now, it doesn't get installed by default and not available in official repo. [root@master1 ~]# ipa -v otptoken-add-yubikey --owner=testuser1 ipa: INFO: trying https://master1.testrelm.test/ipa/session/json ipa: ERROR: non-public: ValueError: No backend available Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/ipalib/backend.py", line 139, in execute result = self.Command[_name](*args, **options) File "/usr/lib/python2.7/site-packages/ipalib/frontend.py", line 447, in __call__ return self.__do_call(*args, **options) File "/usr/lib/python2.7/site-packages/ipalib/frontend.py", line 475, in __do_call ret = self.run(*args, **options) File "/usr/lib/python2.7/site-packages/ipalib/frontend.py", line 798, in run return self.forward(*args, **options) File "/usr/lib/python2.7/site-packages/ipaclient/plugins/otptoken_yubikey.py", line 124, in forward yk = yubico.find_yubikey() File "/usr/lib/python2.7/site-packages/yubico/yubikey.py", line 229, in find_key YK = YubiKeyUSBHID(debug=debug, skip=skip) File "/usr/lib/python2.7/site-packages/yubico/yubikey_usb_hid.py", line 165, in __init__ if not self._open(skip): File "/usr/lib/python2.7/site-packages/yubico/yubikey_usb_hid.py", line 447, in _open usb_device = self._get_usb_device(skip) File "/usr/lib/python2.7/site-packages/yubico/yubikey_usb_hid.py", line 497, in _get_usb_device find_all=True, idVendor=_YUBICO_VID)] File "/usr/lib/python2.7/site-packages/usb/core.py", line 864, in find raise ValueError('No backend available') ValueError: No backend available ipa: ERROR: an internal error has occurred [root@master1 ~]# dmesg | tail -10 [ 2700.319957] usb 1-1: New USB device found, idVendor=1050, idProduct=0407 [ 2700.319961] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0 [ 2700.319964] usb 1-1: Product: Yubikey 4 OTP+U2F+CCID [ 2700.319966] usb 1-1: Manufacturer: Yubico [ 2700.337995] input: Yubico Yubikey 4 OTP+U2F+CCID as /devices/pci0000:00/0000:00:06.0/usb1/1-1/1-1:1.0/input/input6 [ 2700.389167] hid-generic 0003:1050:0407.0001: input,hidraw0: USB HID v1.10 Keyboard [Yubico Yubikey 4 OTP+U2F+CCID] on usb-0000:00:06.0-1/input0 [ 2700.403784] hid-generic 0003:1050:0407.0002: hiddev0,hidraw1: USB HID v1.10 Device [Yubico Yubikey 4 OTP+U2F+CCID] on usb-0000:00:06.0-1/input1 Version-Release number of selected component (if applicable): ipa-server-4.5.0-12.el7.x86_64 How reproducible: 100% Steps to Reproduce: 1. Install IPA server and create IPA user 2. Attach YubiKey 3. Add OTP token for user using Yubikey Actual results: Traceback like above. Expected results: OTP Token should get added. Additional info: After installing libyubikey package traceback disappears.
Metadata Update from @pvoborni: - Custom field rhbz adjusted to https://bugzilla.redhat.com/show_bug.cgi?id=1452081
Metadata Update from @tdudlak: - Issue assigned to tdudlak
Metadata Update from @frenaud: - Custom field on_review adjusted to https://github.com/freeipa/freeipa/pull/942
master:
Metadata Update from @tkrizek: - Issue close_status updated to: fixed - Issue status updated to: Closed (was: Open)
Metadata Update from @pvoborni: - Issue set to the milestone: FreeIPA 4.5.4 (was: FreeIPA 4.6) - Issue status updated to: Open (was: Closed) - Issue tagged with: backport
ipa-4-5:
Metadata Update from @stlaz: - Issue close_status updated to: fixed - Issue status updated to: Closed (was: Open)
ipa-4-7:
ipa-4-6: