-
-
Notifications
You must be signed in to change notification settings - Fork 48
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
tpm2 disk encryption with systemd-cryptenroll #9756
Comments
Is there an equivalent variant for crypttab change but using kernel cmdline? We try to distribute pre-generated unified Xen, without host-specific settings, and provide those via cmdline. Current version allows any cmdline to be set, but we plan to add some filtering to allow only some option. |
Adding the The dracut changes can not be done via the kernel command line since the tpm2 tools need to be included in the initrd. (This is not necessarily about unified images; these steps are necessary to enable tpm2 sealed keys even if you're booting via grub or other means) |
I mean I want bundled initramfs without |
I might be mistaken about part of my request -- is It does appear that options can be specified in the kernel command line to |
Currently it isn't, but this one I'm okay with changing.
Thanks, this is exactly what I'm asking for :) |
The problem you're addressing (if any)
When enabling TPM2 sealed disk encryption keys with
systemd-cryptenroll
(available as of systemd 248] it is fairly easy to seal the key (other than requiring that the user know the partition that is encrypted with LUKS):There are three additional steps that need to be done once and are somewhat tricky. The first is that tpm2-tss has to be included in the initrd by creating a new dracut config file:
And the second is that
/etc/crypttab
has to specify that the tpm2 slot in LUKS should be used. Some guides suggest editing the file to add the option or use sed to try to do so automatically. If they get this wrong, the system might not be bootable.And finally the user must rebuild the initrd with
sudo dracut -f
to pick up the newcrypttab
and include thetpm2-tss
module in the image. If they are booting a signed UKI, they must also rebuild and re-sign their unifed Xen and dom0 vmlinux image.The solution you'd like
The Qubes initrd could include the tpm2-tss module by default since hopefully many users will choose to use hardware protected keys.
The
/etc/crypttab
generation can include thetpm2-device=auto
option for encrypted partitions even if no TPM2 sealed keys are created. The fallback behaviour is to ask for the passphrase anyway, so it does not change the boot time or user experience to have it included. Many of the guides also include the PCR list in thecrypttab
, although the default behaviour is to use the ones specified in the LUKS header (along with a PIN if used) so there is no need to do more than add thetpm2-device
option.The value to a user and who that user might be
Guides for enabling hardware sealed keys for new users can be as simple as running
systemd-cryptenroll
with the users choice of PCRs, without requiring extra steps to reconfigure dracut, hand editing the crypttab that could risk breaking the boot, or rebuilding the initrd.Completion criteria checklist
No response
The text was updated successfully, but these errors were encountered: