tffhrtp
(Matthew Davis)
April 3, 2024, 3:57pm
1
As of yet, there is not documentation on how to use a FIDO2 key with LUKS for Atomic Desktops. There is an existing article that discusses this on non-atomic desktops:
Therefore, I believe that there should be an article that discusses this, especially since Atomic Desktops are becoming more and more popular.
I would not be able to write this article since I have yet to find the solution. Maybe there is someone that already has the solution that would be able to document it in an article?
1 Like
glb
(Gregory Lee Bartholomew)
April 3, 2024, 3:58pm
2
This sounds good to me. +1.
1 Like
tffhrtp
(Matthew Davis)
Category updated
April 3, 2024, 4:00pm
4
jakfrost
(Stephen Douglas Snow)
April 3, 2024, 4:02pm
5
+1 from me, though I have no Fido key or desire to write the post.
1 Like
tffhrtp
(Matthew Davis)
April 3, 2024, 4:03pm
6
I can collaborate on this, I’d be willing to test anything that needs to be done. I have an abundance of FIDO2 keys.
jakfrost
(Stephen Douglas Snow)
April 3, 2024, 4:04pm
7
You do seem like the correct candidate to write the post. By writing it, you will no doubt learn how to do it, and I would definitely help you write it if you like.
I do not have FIDO keys, but do use --key-file
( I have 36 currently ) with LUKS, so if you need my help just post it here.
1 Like
rlengland
(Richard England)
April 3, 2024, 4:08pm
9
Late to this party but I would give this a +1 as well.
1 Like
tffhrtp
(Matthew Davis)
April 3, 2024, 4:19pm
10
I think I will include TPM2 in this article, too, since the process of decrypting is similar to FIDO2. There are minor changes to the arg’s, and I think they are both related.
2 Likes
tffhrtp
(Matthew Davis)
April 3, 2024, 5:37pm
11
Can somebody confirm that the following works with an Atomic 39 and whether or not it is consistent with Atomic 40? Please use the aforementioned article in the opening post as a guide.
rpm-ostree initramfs --enable --arg=--force-add --arg=tpm2-tss
If, in fact, the above command works on Atomic and TPM2, I might be able to modify the arg’s to get it it to work with:
rpm-ostree initramfs --enable --arg=--force-add --arg=fido2-device
Q: Are you using FIDO2 with LUKS2 or is this for a pre LUKS decryption like BIOS level?
tffhrtp
(Matthew Davis)
April 3, 2024, 6:02pm
13
The way it is set up is that upon install you would do LUKS2 encryption with a password. Then once you have your desktop you would do the following:
echo "add_dracutmodules+=\" fido2 \"" | sudo tee /etc/dracut.conf.d/fido2.conf add_dracutmodules+=" fido2 "
sudo systemd-cryptenroll --fido2-device auto /dev/nvme0n1p3
sudo nano /etc/crypttab
append fido2-device=auto
sudo rpm-ostree initramfs...
OR
echo "add_dracutmodules+=\" tpm2-tss \"" | sudo tee /etc/dracut.conf.d/tpm2.conf add_dracutmodules+=" tpm2-tss "
sudo systemd-cryptenroll --wipe-slot tpm2 --tpm2-device auto --tpm2-pcrs "0+1+2+3+4+5+7+9" /dev/nvme0n1p3
sudo nano /etc/crypttab
append tpm2-device=auto,tpm2-pcrs=0+1+2+3+4+5+7+9
sudo rpm-ostree initframfs...
tffhrtp
(Matthew Davis)
April 3, 2024, 6:06pm
15
I just need somebody’s help with the proper rpm-ostree initramfs command…I haven’t been able to figure that one out.
1 Like
Just a random thought, since it’s OStree, is that even possible in /etc/*
tffhrtp
(Matthew Davis)
April 3, 2024, 7:14pm
17
TL;DR all edits are kept unless you rollback.
Yes, each deployment has its own independent copy of /etc/*
meaning that if you rollback, the changes to that copy will be rolled back. But, if you do make changes to /etc/*
and upgrade, the defaults of the new deployment will be merged with your current copy of /etc/*
so the modifications will be kept. In the end, unless you rollback, changes will be kept.
1 Like
Useful tidbit to note for the article too.
tffhrtp
(Matthew Davis)
April 3, 2024, 9:09pm
19
As previously discussed, there are options for unlocking LUKS partitions by using systemd-cryptenroll in coordination with a TPM2 chip and FIDO2 U2F security keys. By utilizing this, TPM2 chips and FIDO2 U2F security keys offer an alternative to...
Est. reading time: 4 minutes
Draft is in Wordpress, for those of you who are interested. I still need to confirm that all of the commands are correct with testing.
1 Like
tffhrtp
(Matthew Davis)
April 4, 2024, 12:00am
20
This is the error I get when trying to do
$ rpm-ostree initramfs --enable --arg=--force-add --arg=fido2-device
error: bwrap(rpmostree-dracut-wrapper): Child process killed by signal 1
opened 12:32AM - 04 Apr 24 UTC
bug
Ultimate goal is to be able to unlock LUKS2 volumes encrypted with a FIDO2 key u… pon boot as an alternative to a password.
Running rpm-ostree initramfs with arg fails with error: bwrap(rpmostree-dracut-wrapper): Child process killed by signal 1
After performing:
Add fido2 module to configuration
$ echo "add_dracutmodules+=\" fido2 \"" | sudo tee /etc/dracut.conf.d/fido2.conf
add_dracutmodules+=" fido2 "
$ sudo systemd-cryptenroll --fido2-device auto /dev/nvme0n1p3
Update /etc/crypttab by appending fido2-device=auto
Rebuild nitramfs by using the following command:
$ rpm-ostree initramfs --enable --arg=--force-add --arg=fido2-device
error: bwrap(rpmostree-dracut-wrapper): Child process killed by signal 1
Expected result is rpm-ostree initramfs with arg will rebuild initramfs and allow for fido2 keys to be used upon booting a disk that is encrypted with LUKS2
**OS version:**
Fedora Silverblue 39 - fully updated
rpm-ostree status -b
State: idle
BootedDeployment:
â—Ź fedora:fedora/39/x86_64/silverblue
Version: 39.20240403.0 (2024-04-03T00:41:12Z)
BaseCommit: 23c1e1e0a565124e5f2fb6dca5189ccc9f717e8b32e9447e12bc63a98997162e
GPGSignature: Valid signature by E8F23996F23218640CB44CBE75CF5AC418B8E74C
LayeredPackages: fido2-tools langpacks-en pam-u2f pam_yubico pamu2fcfg
yubikey-manager
1 Like