-
-
Notifications
You must be signed in to change notification settings - Fork 14
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
decrypt multiple devices on boot #22
base: master
Are you sure you want to change the base?
Conversation
Hey! Cool work you're doing here. Couple of comments though, can we please have functionality that allows us to specify the path to the device then the cryptname? This can be useful if we are trying to use mortar on a system that currently doesn't have a crypttab or for users who want to change this mapping up. Generally I prefer the "declarative" approach as default, with "smart" as a fallback. Perhaps something like:
as the default/preferred, but keeping your functionality that goes and finds the path if it can in event the user did not set the path manually. E.g.
If we could also split your cleanup of my code (thanks btw) into a separate PR, that would be great. Not sure where all that was done, but I did see the switch of sourcing mortar.env in the |
As a side note to readers, it appears this approach has the tradeoff of using the same key in the TPM to unlock both/all drives. If this is acceptable for your use case, this can be a pretty useful feature and one I would be fine adding along with this caveat in the readme, but just a heads-up. |
The style For the PR splitup: I tried to split different functionality to different commits. For cherry picking single commits. There are some collisions as some of the commits do not work by themselfs alone, but for the named And yes, you are absolutely correct with your side note. The idea was to have a single key for single data as the intend is to decrypt multiple raid drives (on the one hand) and for multiple independent drives (on the other hand) if one of the keys is compromised this is obviously the drive with the most sensitive data or the root drive (Murphys law, you know...) and this one will give the attacker full access to your data anyway. ;-) |
I have adapted mortar to be able to decrypt two devices for a dm-raid/btrfs configuration.
This is just a proof of concept. I'm running Debian on some older PC with TPM 1.2 only. So I extended mortar only for debian and TPM 1.2 and it works so far.
For this reason this is a draft pull request for discussion and not for direct inclusion!
I'm using btrfs on two luks devices but using some dm-raid/lvm configuration would be the same.
The main visible change in mortar.env is: removing CRYPTDEV and CRYPTNAME variables in favor of a CRYPTNAMES variable. CRYPTNAMES is a list of crypt device names from crypttab. See mortar.env and code changes for further information. This eases configuration a little and makes UUID=xxx devices possible.