Hi,
> Is there any way to entice KIWI to build a read-only live image that is
> LUKS-encrypted? Ideally this approach would feature a Secure
> Boot-compliant GRUB with the standard password prompt known from
> LVM/LUKS, and produce the same kind of easily flashable ISO that is the
> output of a standard KIWI live build process.
The problem here is that you want this to build as a live ISO image.
The current live image builder has no support for encryption as you
already found out. I did an experimental patch to the live builder
such that it builds me an encrypted ISO. See here:
https://github.com/OSInside/kiwi/tree/luks_for_live
and the diff:
https://github.com/OSInside/kiwi/compare/luks_for_live?expand=1
It did work for me but I'm not sure if this is a useful setup
for the following reasons:
* We loose all compression advantage because of randomized encryption.
As such the ISO is not small
* The initrd and kernel are readable from the ISO unencrypted which
can be considered a security flaw. grub reading from eltorito, see
the xorriso call when you build... maybe this can be done differently
such that cryptomount from grub can be used. For iso's this would
require more kiwi changes though which I haven't done.
* Booting requires interaction because you need to enter the
luks passphrase unless set empty (luks=""). If set empty
no security at all exists only the layer and it can't be
turned to be secure because it's all read-only (ISO)
for testing and simplicity I used an empty passphrase
* For security re-encryption should be done because if not the
LUKS header could be read from the image binary. kiwi supports
that but it cannot be applied on a read-only media, again (ISO)
As such I wonder about the use case :)
I hope the provided patch and information helps
Best regards,
Marcus
--
Public Key available via:
https://keybase.io/marcus_schaefer/key.asc
keybase search marcus_schaefer