public type secret creation fails with 400
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Barbican |
Fix Released
|
Critical
|
Douglas Mendizábal |
Bug Description
When attempting to store a Public RSA Key using a "public" secret type in a one POST request, the operation incorrectly fails with a 400 - bad request response.
Steps to recreate:
# Create the RSA keypair
openssl genrsa -out private.pem 2048
# Extract the public key
openssl rsa -in private.pem -out public.pem -pubout
# Base64 encode the contents of the public key
PUB_BASE64=$(base64 < public.pem)
# Send the encoded blob to barbican in a single POST request
curl -vv -H "X-Auth-Token: $TOKEN" \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-d '{"name": "RSA Public Key",
"secret_type": "public",
"payload": "'"$PUB_BASE64"'",
"payload_
"payload_
"algorithm": "RSA"}' \
http://
Expected response:
200 OK - { "secret_ref": "<some_ref>"}
Actual response:
400 - Bad Request
Changed in barbican: | |
milestone: | none → kilo-rc1 |
importance: | Undecided → Critical |
Changed in barbican: | |
assignee: | nobody → Juan Antonio Osorio Robles (juan-osorio-robles) |
Changed in barbican: | |
assignee: | Juan Antonio Osorio Robles (juan-osorio-robles) → nobody |
Changed in barbican: | |
status: | New → Confirmed |
Changed in barbican: | |
assignee: | nobody → Douglas Mendizábal (dougmendizabal) |
Changed in barbican: | |
status: | Fix Committed → Fix Released |
Changed in barbican: | |
milestone: | kilo-rc1 → 2015.1.0 |
Fix proposed to branch: master /review. openstack. org/173396
Review: https:/