-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for systemd-cryptenroll style pins (FIDO2, TPM) #96
Comments
It sounds like a good idea to support metadata generated by I have a Yubikey4 token and it looks like it does not support FIDO2 protocol. What would be a good token with FIDO2 support? Yubikey5? Or there are other options? Is there any good software emulator for FIDO2 token device? |
I am using the Yubikey 5 with FIDO2 for my mkinitcpio-based setup. I believe the open solutions such as the SoloKeys should also work but I have not used it. I am not aware of any software emulators, unfortunately. |
Also note that TPM2 binding is supported via clevis mechanism e.g. |
I finally got a YubiKey5 with FIDO2 support and checked how Got an initial version of systemd-cryptenroll FIDO2 support. Integration tests for systemd-cryptenroll pass. Pushed the implementation into Booster does not require any extra steps on enrollment stage. It will automatically detect partitions enrolled with systemd and try to unlock it using a FIDO2 device. |
Sorry to be a pain, I happened to use Here is my luksDump (keyslot 0 is a recovery text key enrolled by systemd-cryptenroll, keyslot 1 is the FIDO2 key enrolled by systemd-cryptenroll):
|
Thanks for discovering it! The problem probably comes from luks.go and I'll be glad to fix it. Could you please give me the exact error message you've got from booster? |
The message says:
Thanks! Edit: It appears that |
This update brings support for blake2b/blake2s digests. Issue #96
Thank you for the information. It was indeed a limitation of luks.go library. It turns out that cryptsetup 2.4.0 added support for blake2b/blake2s hash functions. Though at my system cryptsetup uses openssl backend that limits support to Also golang crypto library does not support But in your case you need Thank you for your time! |
It appears that dealing with the Edit: the |
No need to rebuild the package. To enable debug log please add |
I think the most relevant output is Is there anything I need to add to |
|
I have tried with the Yubikey inserted since before boot (though the mkinitcpio-based setup works even after the key is inserted later). It appears that the hid module is loaded after:
|
Indeed, LUKS partition detected and parsed faster than Yubikey initialized by kernel. I just added a quick workaround to handle this situation (2 seconds wait time before checking for Yubikeys) and pushed it to Meanwhile I am thinking about implementing better synchronization mechanism that is tracked here #100 . It will help to avoid such wait time and perform operations with greater parallelism which will make unlocking even faster. |
Thanks, seems to be some progress. After adding
then a pause. I have a PIN set for my key which systemd-cryptenroll required through its
and then it falls back to normal password entry. |
This update brings support for blake2b/blake2s digests. Issue #96
I tried enabling PIN with my Yubikey 5 NFC but it says my unit does not support it :(
|
I believe that you have to set the Yubikey's PIN for FIDO2 before enrolling with systemd-cryptenroll. You can use Edit: also some extra docs on Yubikey FIDO2 PINs: https://support.yubico.com/hc/en-us/articles/4402836718866-Understanding-YubiKey-PINs |
Thanks @AidanGG for the tip. I use Yubikey Personalization tool and it did not allow to configure FIDO2 options. But I was able to enroll |
No problem. So I guess systemd uses the libfido2 library directly to handle PIN entry in the sd-encrypt hook of mkinitcpio, rather than using the |
It turns out Added a commit to |
It now appears that Booster is not loading the hidraw driver. I get
and then there is no longer the message |
hmm, luks opening runs in a separate goroutine and should not block device enumeration... |
@AidanGG I would like to return back to it and debug the HID driver loading issue. Could you please pull the latest |
Thanks @anatol, latest wip build (commit deb6745) does work as expected, but I had to add In my mkinitcpio-based setup, I use the kernel parameter |
Thank you @AidanGG for confirming it. It is really great to hear that the
It is totally valid workaround for your hid driver issue. But I think that booster should detect hid devices (like Yubikey) automatically without any extra user configuration. And then wait till hid drivers start enumerating. I am going to look at this hid device enumeration issue as a part of #100 refactoring.
The request sounds reasonable and it might help in case if there multiple slots/tokens at a LUKS device. Could you please file a separate ticket to track it independently? |
The The 'missing hid driver' will be resolved as a part of #100 refactoring. |
Thank you @anatol, I just realised that systemd-cryptenroll can also enrol a PKCS#11 token with |
Does anybody have an experience with Yubikey+PKCS11? I would like to implement it at booster and I need some here here. Booster needs a way to communicate with the pkcs11 device using some command-line tool and perform the same operation as systemd's code does. Here is what I have
Now I am trying to use
So it is not clear for me what is going on here. Is there some pkcs11 specific configuration need to be done upfront? |
Do you have to generate PKCS#11 RSA keys on the Yubikey with |
This helps to discover Yubikeys when they are inserted *after* boot process started. In such case the system gets udev "add" event that been proccesed by the listener. It helps to fix issue mentioned in #96.
@AidanGG I added a way to list & enumerate HID devices concurrently. It means that Yubikeys should be detected even if they are inserted after the boot process has started. It should also help you with your issue mentioned earlier when hid module requires some time to load and Yubikeys are not initially listed. You do not need I pushed the change to |
This helps to discover Yubikeys when they are inserted *after* boot process started. In such case the system gets udev "add" event that been proccesed by the listener. It helps to fix issue mentioned in #96.
This helps to discover Yubikeys when they are inserted *after* boot process started. In such case the system gets udev "add" event that been proccesed by the listener. It helps to fix issue mentioned in #96.
This helps to discover Yubikeys when they are inserted *after* boot process started. In such case the system gets udev "add" event that been proccesed by the listener. It helps to fix issue mentioned in #96.
This helps to discover Yubikeys when they are inserted *after* boot process started. In such case the system gets udev "add" event that been proccesed by the listener. It helps to fix issue mentioned in #96.
This helps to discover Yubikeys when they are inserted *after* boot process started. In such case the system gets udev "add" event that been proccesed by the listener. It helps to fix issue mentioned in #96.
This helps to discover Yubikeys when they are inserted *after* boot process started. In such case the system gets udev "add" event that been proccesed by the listener. It helps to fix issue mentioned in #96.
This helps to discover Yubikeys when they are inserted *after* boot process started. In such case the system gets udev "add" event that been proccesed by the listener. It helps to fix issue mentioned in #96.
The kernel parameter
rd.luks.options=fido2-device=auto
used for unlocking a disk through a keyslot enrolled in bysystemd-cryptenroll
with its FIDO2 functionality does not seem to be supported, but I have confirmed that it works withmkinitcpio
and thesd-encrypt
hook.The text was updated successfully, but these errors were encountered: