<div dir="ltr"><div><div>Sure John . Thanks a lot John for your response.<br><br></div>I would like Barbican to support the retrieval of the secret in plain/text format generated from the order resource.Since it is very important for our Encryption usecase which is dependent on the key generated from Barbican.<br><br></div>I would like to know your opinion.<br><div><br></div><div>Thanks and Regards,<br></div><div>Asha Seshagiri<br></div><div><br><br><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jun 8, 2015 at 8:36 AM, John Wood <span dir="ltr"><<a href="mailto:john.wood@rackspace.com" target="_blank">john.wood@rackspace.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">



<div style="word-wrap:break-word;color:rgb(0,0,255);font-size:14px;font-family:Calibri,sans-serif">
<div>Hello Asha,</div>
<div><br>
</div>
<div>Barbican is not yet supporting the conversion of secrets of one format to another. If you have thoughts on desired conversions however, please mentioned them in this thread, or else consider mentioning them in our weekly IRC meeting (freenode #openstack-meeting-alt
 at 3pm CDT).</div>
<div><br>
</div>
<div>Thanks,</div>
<div>John</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<span>
<div style="font-family:Calibri;font-size:11pt;text-align:left;color:black;BORDER-BOTTOM:medium none;BORDER-LEFT:medium none;PADDING-BOTTOM:0in;PADDING-LEFT:0in;PADDING-RIGHT:0in;BORDER-TOP:#b5c4df 1pt solid;BORDER-RIGHT:medium none;PADDING-TOP:3pt">
<span style="font-weight:bold">From: </span>Asha Seshagiri <<a href="mailto:asha.seshagiri@gmail.com" target="_blank">asha.seshagiri@gmail.com</a>><br>
<span style="font-weight:bold">Date: </span>Monday, June 8, 2015 at 12:17 AM<br>
<span style="font-weight:bold">To: </span>John Wood <<a href="mailto:john.wood@rackspace.com" target="_blank">john.wood@rackspace.com</a>><br>
<span style="font-weight:bold">Cc: </span>openstack-dev <<a href="mailto:openstack-dev@lists.openstack.org" target="_blank">openstack-dev@lists.openstack.org</a>>, Douglas Mendizabal <<a href="mailto:douglas.mendizabal@RACKSPACE.COM" target="_blank">douglas.mendizabal@RACKSPACE.COM</a>>,
 "Reller, Nathan S." <<a href="mailto:Nathan.Reller@jhuapl.edu" target="_blank">Nathan.Reller@jhuapl.edu</a>>, Adam Harwell <<a href="mailto:adam.harwell@RACKSPACE.COM" target="_blank">adam.harwell@RACKSPACE.COM</a>>, Paul Kehrer <<a href="mailto:paul.kehrer@RACKSPACE.COM" target="_blank">paul.kehrer@RACKSPACE.COM</a>><div><div class="h5"><br>
<span style="font-weight:bold">Subject: </span>Re: Barbican : Retrieval of the secret in text/plain format generated from Barbican order resource<br>
</div></div></div><div><div class="h5">
<div><br>
</div>
<div>
<div>
<div dir="ltr">Thanks John for your response.
<div>I am aware that application/octet-stream works for the retrieval of secret . </div>
<div>We are utilizing the key generated from Barbican in our AES encryption algorithm . Hence we  wanted the response in text/plain format from Barbican since AES encryption algorithm would need the key of ASCII format which should be either 16,24 or 32 bytes.</div>
<div><br>
</div>
<div><span style="color:rgb(80,0,80);font-family:Calibri,sans-serif;font-size:14px">The AES encyption algorithms would not accept the binary format and even if binary  is converted into ascii , encoding is failing for few of the keys because some characters
 exceeeds the range of ASCII and for some keys  after encoding length exceeds 32 bytes  which is the maximum length for doing AES encryption.</span><br>
</div>
<div><span style="color:rgb(80,0,80);font-family:Calibri,sans-serif;font-size:14px"><br>
</span></div>
<div><font color="#500050" face="Calibri,sans-serif"><span style="font-size:14px">Would like to know the reason behind Barbican not supporting the retrieval of the secret in text/plain format generated from the order resource in plain/text format. </span></font></div>
<div><br>
</div>
<div>Thanks and Regards,</div>
<div>Asha Seshagiri </div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Sun, Jun 7, 2015 at 11:43 PM, John Wood <span dir="ltr">
<<a href="mailto:john.wood@rackspace.com" target="_blank">john.wood@rackspace.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div style="word-wrap:break-word;font-size:14px;font-family:Calibri,sans-serif;color:rgb(0,0,255)">
<div>Hello Asha,</div>
<div><br>
</div>
<div>The AES type key should require an application/octet-stream Accept header to retrieve the secret as it is a binary type. Please replace ‘text/plain’ with ‘application/octet-stream’ in your curl calls below.</div>
<div><br>
</div>
<div>Thanks,</div>
<div>John</div>
<div><br>
</div>
<div><br>
</div>
<span>
<div style="font-family:Calibri;font-size:11pt;text-align:left;color:black;border-width:1pt medium medium;border-style:solid none none;padding:3pt 0in 0in;border-top-color:rgb(181,196,223)">
<span style="font-weight:bold">From: </span>Asha Seshagiri <<a href="mailto:asha.seshagiri@gmail.com" target="_blank">asha.seshagiri@gmail.com</a>><br>
<span style="font-weight:bold">Date: </span>Friday, June 5, 2015 at 2:42 PM<br>
<span style="font-weight:bold">To: </span>openstack-dev <<a href="mailto:openstack-dev@lists.openstack.org" target="_blank">openstack-dev@lists.openstack.org</a>><br>
<span style="font-weight:bold">Cc: </span>Douglas Mendizabal <<a href="mailto:douglas.mendizabal@RACKSPACE.COM" target="_blank">douglas.mendizabal@RACKSPACE.COM</a>>, John Wood <<a href="mailto:john.wood@rackspace.com" target="_blank">john.wood@rackspace.com</a>>,
 "Reller, Nathan S." <<a href="mailto:Nathan.Reller@jhuapl.edu" target="_blank">Nathan.Reller@jhuapl.edu</a>>, Adam Harwell <<a href="mailto:adam.harwell@RACKSPACE.COM" target="_blank">adam.harwell@RACKSPACE.COM</a>>, Paul Kehrer <<a href="mailto:paul.kehrer@RACKSPACE.COM" target="_blank">paul.kehrer@RACKSPACE.COM</a>><br>
<span style="font-weight:bold">Subject: </span>Re: Barbican : Retrieval of the secret in text/plain format generated from Barbican order resource<br>
</div>
<div>
<div>
<div><br>
</div>
<div>
<div>
<div dir="ltr">Hi All ,
<div><br>
</div>
<div>I am currently working on use cases for database and file Encryption.It is really important for us to know since my Encryption use case would be using the key generated by Barbican through order resource as the key.</div>
<div>The encyption algorithms would not accept the binary format and even if converted into ascii , encoding is failing for few of the keys because some characters exceeeds the range of ASCII and for some key  after encoding length exceeds 32 bytes  which is
 the maximum length for doing AES encryption.</div>
<div>It would be great if  someone could respond to the query ,since it would block my further investigations on Encryption usecases using Babrican </div>
<div><br>
</div>
<div>Thanks and Regards,</div>
<div>Asha Seshagiri</div>
<div><br>
</div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Wed, Jun 3, 2015 at 3:51 PM, Asha Seshagiri <span dir="ltr">
<<a href="mailto:asha.seshagiri@gmail.com" target="_blank">asha.seshagiri@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div dir="ltr">
<div>
<div>
<div>
<div>Hi All,<br>
<br>
</div>
Unable to retrieve the secret in text/plain format  generated from Barbican order resource
<br>
</div>
<br>
</div>
Please find the curl command and responses for <br>
<br>
</div>
<b>Order creation with payload content type as text/plain</b> :<br>
<div>
<div>
<div>
<div>
<div><br>
[root@barbican-automation ~]# curl -X POST -H 'content-type:application/json' -H "X-Auth-Token:9b211b06669249bb89665df068828ee8" \<br>
> -d '{"type" : "key", "meta": {"name": "secretname2","algorithm": "aes", "bit_length":256,  "mode": "cbc", "payload_content_type": <b>"text/plain"</b>}}'  -k
<a href="https://169.53.235.102:9311/v1/orders" target="_blank">https://169.53.235.102:9311/v1/orders</a><br>
<br>
<b>{"order_ref": "<a href="https://169.53.235.102:9311/v1/orders/727113f9-fcda-4366-9f85-93b15edd4680" target="_blank">https://169.53.235.102:9311/v1/orders/727113f9-fcda-4366-9f85-93b15edd4680</a></b>"}<br>
<br>
</div>
<div><b>Retrieval of the order by ORDER ID in order to get to know the secret generated by Barbican</b><br>
</div>
<div><br>
[root@barbican-automation ~]# curl -H 'Accept: application/json' -H "X-Auth-Token:9b211b06669249bb89665df068828ee8" \<br>
> -k  <b><a href="https://169.53.235.102:9311/v1/orders/727113f9-fcda-4366-9f85-93b15edd4680" target="_blank">https://169.53.235.102:9311/v1/orders/727113f9-fcda-4366-9f85-93b15edd4680</a></b><br>
{"status": "ACTIVE", "sub_status": "Unknown", "updated": "2015-06-03T19:08:13", "created": "2015-06-03T19:08:12", "order_ref": "<a href="https://169.53.235.102:9311/v1/orders/727113f9-fcda-4366-9f85-93b15edd4680" target="_blank">https://169.53.235.102:9311/v1/orders/727113f9-fcda-4366-9f85-93b15edd4680</a>",
 "secret_ref": "<b><a href="https://169.53.235.102:9311/v1/secrets/5c25525d-a162-4b0b-9954-90c4ce426c4e" target="_blank">https://169.53.235.102:9311/v1/secrets/5c25525d-a162-4b0b-9954-90c4ce426c4e</a></b>", "creator_id": "cedd848a8a9e410196793c601c03b99a",
 "meta": {"name": "secretname2", "algorithm": "aes", "payload_content_type": "text/plain", "mode": "cbc", "bit_length": 256, "expiration": null}, "sub_status_message": "Unknown", "type": "key"}[root@barbican-automation ~]#<br>
<br>
<br>
<b>Retrieval of the secret failing with the content type text/plain</b><br>
<br>
[root@barbican-automation ~]# curl -H 'Accept:text/plain' -H "X-Auth-Token:9b211b06669249bb89665df068828ee8" -k
<b><a href="https://169.53.235.102:9311/v1/secrets/5c25525d-a162-4b0b-9954-90c4ce426c4e/payload" target="_blank">https://169.53.235.102:9311/v1/secrets/5c25525d-a162-4b0b-9954-90c4ce426c4e/payload</a></b><br>
<span style="color:rgb(255,0,0)"><b>{"code": 500, "description": "Secret payload retrieval failure seen - please contact site administrator.", "title": "Internal Server Error"}</b></span><br>
<br clear="all">
I would like to know wheather this is a bug from Barbican side  since Barbican allows creation of the order resource with text/plain as the payload_content type but the retrieval of the secret payload with the content type text/plain is not allowed.<br>
<br>
</div>
<div>Any help would highly be appreciated.<span><font color="#888888"><br>
</font></span></div>
<span><font color="#888888">
<div>-- <br>
<div>
<div><i>Thanks and Regards,</i></div>
<div><i>Asha Seshagiri</i></div>
</div>
</div>
</font></span></div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
<br>
<br clear="all">
<div><br>
</div>
-- <br>
<div>
<div><em>Thanks and Regards,</em></div>
<div><em>Asha Seshagiri</em></div>
</div>
</div>
</div>
</div>
</div>
</div>
</span></div>
</blockquote>
</div>
<br>
<br clear="all">
<div><br>
</div>
-- <br>
<div>
<div><em>Thanks and Regards,</em></div>
<div><em>Asha Seshagiri</em></div>
</div>
</div>
</div>
</div>
</div>
</div></div></span>
</div>

</blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature"><div><em>Thanks and Regards,</em></div>
<div><em>Asha Seshagiri</em></div></div>
</div>