Skip to content

Allow pam_systemd_homed to be forced to ask for FIDO2 pin #17176

@arianvp

Description

@arianvp

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-verification to homectl that will set a boolean flag on UserRecord
  • Add a field to UserRecord to store the boolean
  • homed should honour this flag when making calls to libfido2; e.g. fido2_assert_*

Describe alternatives you've considered
Press (annoyingliy) my yubikey twice during login. Not great; but not terrible.

Metadata

Metadata

Assignees

No one assigned

    Labels

    RFE 🎁Request for Enhancement, i.e. a feature requesthomedhomed, homectl, pam_homed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions