nixops-aws icon indicating copy to clipboard operation
nixops-aws copied to clipboard

EC2: add support encrypted root volume

Open edolstra opened this issue 12 years ago • 5 comments

It would be pretty neat if the root EBS volume could be encrypted. The use case would be to protect it if the instance is stopped and somebody gains access to its. Since we still want the instance to (re)boot automatically, it could get the LUKS key from the EC2 instance user data. The user data could be cleared when the instance is stopped.

The main problem is that all of this has to be done in the initrd (including network setup to fetch the user data).

edolstra avatar May 16 '12 18:05 edolstra

This site mentions a similar idea at the final thoughts: https://launchbylunch.com/posts/2014/Jan/13/encrypting-docker-on-digitalocean/

CMCDragonkai avatar Jul 20 '14 05:07 CMCDragonkai

:+1:

copumpkin avatar Aug 23 '14 03:08 copumpkin

It seems like much of the support for this would be on the NixOS side. Do you have more ideas on what this would look like?

copumpkin avatar Feb 13 '15 18:02 copumpkin

I was thinking about this a little bit. Not in the context of EC2, but in general.

The idea is to have initrd do the network setup (including some primitive firewall rules?) and start sshd (or telnetd) to obtain the passphrase. Nixops would then push the passphrase by connecting to the server and typing it there.

It is still not great from the paranoid point of view as someone can still plant a bug into our initrd and wait for us to connect and give them the passphrase, but it is still much better than nothing.

kirelagin avatar May 25 '17 19:05 kirelagin

Wait a second, looks like this is already implemented! NixOS/nixpkgs#10460

kirelagin avatar May 25 '17 19:05 kirelagin