Open ShutdownRepo opened 1 year ago
We have a first issue regarding the container's own filesystem. I'm putting this topic aside at the moment, in order to focus on encrypting volumes (i.e. the private workspace).
I think we could use cryptsetup
for that purpose.
cryptsetyp luksFormat
, and a key set by the user interactivelycryptsetup luksOpen
mkfs.ext4
Steps 3 and 5
cryptsetup luksClose
There are multiple problems with this solution:
cryptsetup
on macOS. We would probably need a specific workflow for macOS (and Windows WSL?)cryptsetup luksFormat
, cryptsetup luksOpen
, mount
require elevated (sudo) mode. Can we have a temporary elevated context in the Python execution flow?/dev/mapper/CONTAINER
path to the container volumes 🤷 Closing thoughts, I started a PoC with cryptsetup
for encrypting private workspace volumes, but it's a work in progress, there may be better, more generic (cross-OS) solutions out there. Happy to discuss it
Also no idea yet if and how to encrypt the container's whole filesystem (volumes/mounts apart)
You must run the cryptsetup command from the container itself, not from the host for many reason.
Okay, according to our meeting today, let's work as follows:
luksFormat
, luksOpen
, mkfs.ex4
, and mount
. umount
ed and luksClose
d.luksOpen
ed and mount
ed.A standard, shared, workplace is then replaced with an LUKS container that only the exegol container decrypts, opens and mounts. A compromised host would compromise the integrity and confidentiality of the LUKS container (e.g. if an attacker gets to use docker, is root, etc.) but it would still provide with an optional security improvement.
This feature will probably require a better entrypoint.sh
, able to ask for user input, return some values, etc. Putting it on hold at the moment. Until then, we could make some progress with the backup
feature.
Food for thought, let's also study the ability to support FIDO2 tokens.
Another solution might be gocryptfs: https://wiki.archlinux.org/title/Gocryptfs
Interesting option !
Another solution might be gocryptfs: https://wiki.archlinux.org/title/Gocryptfs
The needs
No response
Description
It'd be awesome to interface with LUKS or similar alternatives to handle encrypted volumes. This would be an option at the creation of the container, to have the
workspace
volume (and possibly the other part of the container filesystem) encrypted with LUKS (or something else) and a key set by the user.It would look like this at the creation of a new container
exegol start container image --luks
It would look like this at the start of an existing container
exegol start container image --luks
Open to suggestions
Alternatives
No response
Additional context
No response