<div dir="ltr"><div><div>Hi Daniel<br><br></div>Much of this got discussed before. <br><br>Encrypted images uploaded to glance aren't shareable, and there is definitely a desire by many users to keep the usual glance functionality while having encryption at rest in cinder for e.g. regulatory purposes.<br><br></div><div>There is also some desire to be able to migrate unencrypted volume types to encrypted types inside cinder, which would require cinder to be able to create an encrypted volume in a similar way to creating from an image.<br><br><br></div><div>Managing access to the key data is, as far as I'm aware, the job of e.g. barbican/castellan, not nova per se. There are several usecases for encryption, and several of the less paranoid make good sense without requiring nova to be the only thing with access to the key material.<br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On 23 November 2015 at 13:21, Daniel P. Berrange <span dir="ltr"><<a href="mailto:berrange@redhat.com" target="_blank">berrange@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On Fri, Nov 20, 2015 at 11:34:29AM -0800, Walter A. Boring IV wrote:<br>
> On 11/20/2015 10:19 AM, Daniel P. Berrange wrote:<br>
> >On Fri, Nov 20, 2015 at 02:45:15PM +0200, Duncan Thomas wrote:<br>
> >>Brick does not have to take over the decisions in order to be a useful<br>
> >>repository for the code. The motivation for this work is to avoid having<br>
> >>the dm setup code copied wholesale into cinder, where it becomes difficult<br>
> >>to keep in sync with the code in nova.<br>
> >><br>
> >>Cinder needs a copy of this code since it is on the data path for certain<br>
> >>operations (create from image, copy to image, backup/restore, migrate).<br>
> >A core goal of using volume encryption in Nova to provide protection for<br>
> >tenant data, from a malicious storage service. ie if the decryption key<br>
> >is only ever used by Nova on the compute node, then cinder only ever sees<br>
> >ciphertext, never plaintext. Thus if cinder is compromised, then it can<br>
> >not compromise any data stored in any encrypted volumes.<br>
> ><br>
> >If cinder is looking to get access to the dm-seutp code, this seems to<br>
> >imply that cinder will be getting access to the plaintext data, which<br>
> >feels to me like it de-values the volume encryption feature somewhat.<br>
> ><br>
> >I'm fuzzy on the details of just what code paths cinder needs to be<br>
> >able to convert from plaintext to ciphertext or vica-verca, but in<br>
> >general I think it is desirable if we can avoid any such operation<br>
> >in cinder, and keep it so that only Nova compute nodes ever see the<br>
> >decrypted data.<br>
> Being able to limit the number of points where an encrypted volume can be<br>
> used unencrypted<br>
> is obviously a good goal.<br>
> Unfortunately, it's entirely unrealistic to expect Cinder to never be able<br>
> to have access that access.<br>
><br>
> Cinder currently needs access to write data to volumes that are encrypted<br>
> for several operations.<br>
><br>
> 1) copy volume to image<br>
<br>
</div></div>If a volume is encrypted and it is being copied to an image, IMHO we<br>
should not aim to decrypt it. We should copy the data as is and mark<br>
the image as encrypted in glance, and then use it as is next time the<br>
image is needed.<br>
<br>
FYI, Nova is already aiming to consider both the glance data storage<br>
and the glance service as a whole, as untrustworthy. The first step<br>
in this is using cryptographic signatures to detect unauthorized<br>
image data modification by a compromised glance. Encryption will be<br>
a later step in the process.<br>
<span class=""><br>
> 2) copy image to volume<br>
<br>
</span>This is semi-plausible as a place where Cinder needs to go from<br>
unencrypted image data to encrypted volume data, when a user is<br>
creating a volume from an image ahead of time, distinct from any<br>
VM boot attempt. In such a case it is desirable that Cinder not<br>
be able to request any existing volume keys from the key server,<br>
merely have the ability to upload new keys and throw away its<br>
local copy thereafter.<br>
<br>
> 3) backup<br>
<br>
Cinder should really not try to decrypt volumes when backing them<br>
up. If it conversely wants to encrypt volumes during backup, it<br>
can do so with separate backup keys, distinct from those used for<br>
primary volume encryption for use at runtime.<br>
<span class="im HOEnZb"><br>
<br>
Regards,<br>
Daniel<br>
--<br>
|: <a href="http://berrange.com" rel="noreferrer" target="_blank">http://berrange.com</a> -o- <a href="http://www.flickr.com/photos/dberrange/" rel="noreferrer" target="_blank">http://www.flickr.com/photos/dberrange/</a> :|<br>
|: <a href="http://libvirt.org" rel="noreferrer" target="_blank">http://libvirt.org</a> -o- <a href="http://virt-manager.org" rel="noreferrer" target="_blank">http://virt-manager.org</a> :|<br>
|: <a href="http://autobuild.org" rel="noreferrer" target="_blank">http://autobuild.org</a> -o- <a href="http://search.cpan.org/~danberr/" rel="noreferrer" target="_blank">http://search.cpan.org/~danberr/</a> :|<br>
|: <a href="http://entangle-photo.org" rel="noreferrer" target="_blank">http://entangle-photo.org</a> -o- <a href="http://live.gnome.org/gtk-vnc" rel="noreferrer" target="_blank">http://live.gnome.org/gtk-vnc</a> :|<br>
<br>
</span><div class="HOEnZb"><div class="h5">__________________________________________________________________________<br>
OpenStack Development Mailing List (not for usage questions)<br>
Unsubscribe: <a href="http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe" rel="noreferrer" target="_blank">OpenStack-dev-request@lists.openstack.org?subject:unsubscribe</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" rel="noreferrer" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature"><div dir="ltr"><div>-- <br>Duncan Thomas</div></div></div>
</div>