<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; color: rgb(0, 0, 255); font-size: 14px; font-family: Calibri, sans-serif;">
<div>Hello Asha,</div>
<div><br>
</div>
<div>First, please add ‘[barbican]’ to the subject line to indicate this thread is of Barbican interest only. So for example, the revised subject line would look like:</div>
<div>Re: [openstack-dev] [barbican] Unable to send PUT request to store the secret</div>
<div><br>
</div>
<div>You appear to be doing a two step secret upload, in which case the second step (the PUT) needs the full URI to the secret…the URI in your PUT call is missing the UUID in other words.</div>
<div><br>
</div>
<div>This demo script may help you as well: <a href="https://github.com/openstack/barbican/blob/master/bin/demo_requests.py#L85">https://github.com/openstack/barbican/blob/master/bin/demo_requests.py#L85</a></div>
<div><br>
</div>
<div>Thanks,</div>
<div>John</div>
<div><br>
</div>
<div><br>
</div>
<span id="OLK_SRC_BODY_SECTION">
<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">asha.seshagiri@gmail.com</a>><br>
<span style="font-weight:bold">Reply-To: </span>openstack-dev <<a href="mailto:openstack-dev@lists.openstack.org">openstack-dev@lists.openstack.org</a>><br>
<span style="font-weight:bold">Date: </span>Friday, March 20, 2015 at 2:05 PM<br>
<span style="font-weight:bold">To: </span>openstack-dev <<a href="mailto:openstack-dev@lists.openstack.org">openstack-dev@lists.openstack.org</a>><br>
<span style="font-weight:bold">Subject: </span>[openstack-dev] Barbican : Unable to send PUT request to store the secret<br>
</div>
<div><br>
</div>
<div>
<div>
<div dir="ltr">
<div>Hi All ,</div>
<div><br>
</div>
<div>I am unable to send the PUT request using the CURL command for storing the secret .</div>
<div><br>
</div>
<div><br>
</div>
<div>root@barbican:~# curl -X POST -H 'content-type:application/json' -H 'X-Project-Id: 12345' -d '{"secret": {"name": "secretname", "algorithm": "aes", "bit_length" : 256, "mode": "cbc"}}'
<a href="http://localhost:9311/v1/secrets">http://localhost:9311/v1/secrets</a></div>
<div>
<div>{"secret_ref": "<a href="http://localhost:9311/v1/secrets/84aaac35-daa9-4ffb-b03e-18596729705d">http://localhost:9311/v1/secrets/84aaac35-daa9-4ffb-b03e-18596729705d</a>"}</div>
</div>
<div><br>
</div>
<div>
<div>curl -X PUT -H 'content-type:application/json' -H 'X-Project-Id: 12345' -d '{"secret": {"payload": "secretput", "payload_content_type": "text/plain" }}'
<a href="http://localhost:9311/v1/secrets">http://localhost:9311/v1/secrets</a></div>
<div><b>{"code": 405, "description": "", "title": "Method Not Allowed"}</b></div>
</div>
<div><br>
</div>
<div>It would be great if some one could help me .</div>
<div>Thanks in advance.</div>
<div><br>
</div>
-- <br>
<div class="gmail_signature">
<div><em>Thanks and Regards,</em></div>
<div><em>Asha Seshagiri</em></div>
</div>
</div>
</div>
</div>
</span>
</body>
</html>