[openstack-dev] [barbican] Barbican : Unable to send PUT request to store the secret
John Wood
john.wood at RACKSPACE.COM
Sat Mar 21 03:34:10 UTC 2015
Hello Asha,
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:
Re: [openstack-dev] [barbican] Unable to send PUT request to store the secret
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.
This demo script may help you as well: https://github.com/openstack/barbican/blob/master/bin/demo_requests.py#L85
Thanks,
John
From: Asha Seshagiri <asha.seshagiri at gmail.com<mailto:asha.seshagiri at gmail.com>>
Reply-To: openstack-dev <openstack-dev at lists.openstack.org<mailto:openstack-dev at lists.openstack.org>>
Date: Friday, March 20, 2015 at 2:05 PM
To: openstack-dev <openstack-dev at lists.openstack.org<mailto:openstack-dev at lists.openstack.org>>
Subject: [openstack-dev] Barbican : Unable to send PUT request to store the secret
Hi All ,
I am unable to send the PUT request using the CURL command for storing the secret .
root at 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"}}' http://localhost:9311/v1/secrets
{"secret_ref": "http://localhost:9311/v1/secrets/84aaac35-daa9-4ffb-b03e-18596729705d"}
curl -X PUT -H 'content-type:application/json' -H 'X-Project-Id: 12345' -d '{"secret": {"payload": "secretput", "payload_content_type": "text/plain" }}' http://localhost:9311/v1/secrets
{"code": 405, "description": "", "title": "Method Not Allowed"}
It would be great if some one could help me .
Thanks in advance.
--
Thanks and Regards,
Asha Seshagiri
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20150321/41b77e99/attachment.html>
More information about the OpenStack-dev
mailing list