<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">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">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">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">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">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">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.<br></div><div>-- <br><div class="gmail_signature"><div><i>Thanks and Regards,</i></div>
<div><i>Asha Seshagiri</i></div></div>
</div></div></div></div></div></div>