<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body>
Hi Djimeli,<br>
<br>
Thanks for working through this issues. It's a problem indeed with
the existing metadata not being set. <br>
<br>
I think the solution you propose sounds fair -- let's see if
existing non-encrypted metadata can be encrypted whenever the key
has been set. I do however, want us to ensure that it does not break
the API call and hopefully doesn't make it any slower.<br>
<br>
You can go ahead with prototyping a solution, we may need to discuss
this over a lite-spec (I will explain later) and on your review when
it's up.<br>
<br>
Thanks again.<br>
<br>
<div class="moz-cite-prefix">On 5/19/16 7:29 PM, Djimeli Konrad
wrote:<br>
</div>
<blockquote
cite="mid:CAK3i8CxF==jQmMRziKy1gzn6FqhnuVOp73YthXc-WpK3Tu3Edg@mail.gmail.com"
type="cite">
<div dir="ltr">Hello Nikhil,<br>
<div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On 19 May 2016 at 04:11, Nikhil
Komawar <span dir="ltr"><<a moz-do-not-send="true"
href="mailto:nik.komawar@gmail.com" target="_blank">nik.komawar@gmail.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left:1px solid
rgb(204,204,204);padding-left:1ex">
<br>
Here's something to get started:<br>
<br>
* Change your tests here
glance/tests/functional/__init__.py to<br>
metadata_encryption_key to the value you want to set.<br>
<br>
* See if they pass or fail. <br>
</blockquote>
<div><br>
</div>
<div>I made the change to the test as you suggested and
the test still passes. <br>
<br>
I have just found out that "ValueError: Input strings
must be a multiple of 16 in length" and "TypeError:
Incorrect padding" are caused by calling
crypt.urlsafe_decrypt(...) on a data that was not
previously encrypted. For example when the
metadata_encryption_key is set, and there is existing
data which had not been encrypted, "glance image-list"
would invoke the decrypt function on the data which was
not previously encrypted leading to errors.<br>
<br>
</div>
<div>A solution to this may be to encrypt existing data
when metadata_encryption_key is set and decrypt the data
if it is reset. I would like get some more
ideas/opinions in this issue.<br>
<br>
</div>
<div>Thanks<br>
</div>
<div>Konrad<br>
</div>
</div>
</div>
</div>
</div>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Thanks,
Nikhil</pre>
</body>
</html>