-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Allow pam_systemd_homed to be forced to ask for FIDO2 pin #17176
Description
Is your feature request related to a problem? Please describe.
I'm currently using https://github.com/Yubico/pam-u2f so that I can use my yubikey to login to my computer without a password; but with the PIN of my yubikey instead.
However, I also want to use homed for portable home diretories. However from the code I understand this would mean that I would have two FIDO credentials and I will be prompted for test of user presence twice. Once to authenticate with pam-u2f and once to unlock the LUKS2 container in pam_systemd_homed
homed also supports this functionality; However with pam-u2f I can configure that i'm always prompted for a pin (as it sets uv = true when creating and asserting the token). homed currently seems to hardcode uv = false which means I do not get prompted for my pin when unlocking my user account. I don't find this sufficiently secure and would like to configure this.
Describe the solution you'd like
Because we have all the code for FIDO2 in homed anyway; optionally allow pam_systemd_homed to authenticate the user with just the FIDO2 token (and not password). This would mean basically duplicating pam-u2f's behaviour into systemd-homed
This would mean not just using the FIDO2 credential for it's hmac-secret but also check the signature it generates using the public key stored in UserRecord
You want to set UV = true on the FIDO2 credential functions; such that the FIDO2 token always prompts for a pin. This is currently not possible in homed as uv = false is hardcoded the osurce code. In pam-u2f this can be configured in the PAM configuration by setting userverification=1. For systemd
I suggest we add an additional field to UserRecord depicting whether we want user verification (that's a pin or biometric) when using the FIDO2 key. It sounds like this is something you want to configure per user; not per host; so it makes sense for me to have this setting live in the UserRecord instead of in /etc/pam.d.
More precisely:
- add a flag
--fido2-user-verificationtohomectlthat will set a boolean flag onUserRecord - Add a field to
UserRecordto store the boolean homedshould honour this flag when making calls tolibfido2; e.g.fido2_assert_*
Describe alternatives you've considered
Press (annoyingliy) my yubikey twice during login. Not great; but not terrible.