tiiuae / ghaf

TII SSRC Secure Technologies: Ghaf Framework
https://tiiuae.github.io/ghaf/
Apache License 2.0
35 stars 56 forks source link

Enable Yubikey Authentication #689

Closed vunnyso closed 1 month ago

vunnyso commented 1 month ago

Description of changes

This patch enables Yubikey authentication for ghaf gui-vm. We are doing Yubikey passthrough from ghaf-host to gui-vm. Currently Yubikey Authentication supported with screen locker (gtklock) and sudo command in pam sufficient mode means either password or tap on device is enough for authentication.

Checklist for things done

Testing

Prerequisite: 1) Yubikey hardware, more details here 2) Generate Yubikey public key using following command pamu2fcfg -u ghaf -o pam://gui-vm 3) Make sure you have Yubikey public key added here (example)

Now plug the Yubikey hardware to Ghaf system.

To verify Yubikey device is detected in gui-vm [ghaf@gui-vm:~]$ lsusb | grep YubiKey Bus 003 Device 003: ID 1050:0407 Yubico YubiKey OTP+FIDO+CCID

To verify sudo command is working [ghaf@gui-vm:~]$ sudo su Please touch the device.

[root@gui-vm:/home/ghaf]#

To verify screen lock is working 1) Press Windows + l to lock the screen 2) Press Enter and tap on Yubikey device to unlock the system. image

leivos-unikie commented 1 month ago