Improve KMIP error code for invalid key spec

Bug #1568119 reported by Max
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-barbicanclient
Fix Committed
Undecided
Max

Bug Description

When using KMIP plugin for backend, Generate RSA using the orders interface with passphrase, returns 500 status. This feature is not yet supported for KMIP backend. So in this case a 4XX Error code [Bad Request] would be an appropriate error code instead of 500.

Detailed description:

1) Version of Barbican we are using:

   - stable/master

2) Reproduce steps:
    a) Install via devstack, with following barbican post-configuration in local.conf:

       #...
        [[post-config|$BARBICAN_CONF]]
        [secretstore]
        namespace = barbican.secretstore.plugin
        enabled_secretstore_plugins = kmip_plugin

       [kmip_plugin]
       username = 'yourUserName'
       password = '*******'
       host = 11.222.333.44
       port = 6666
       keyfile = '/opt/stack/Certs/user_unencrypted.key'
       certfile = '/opt/stack/Certs/user.crt'
       ca_certs = '/opt/stack/Certs/LocalCA.crt'
      #...

   b) Generate RSA using the orders interface:
        curl -X POST http://localhost:9311/v1/orders -H 'Accept: application/json' -H 'Content-Type: application/json' -H 'X-Project-Id:12345' -d '{"meta":{"bit_length": 2048, "passphrase": "password", "name": "ordered rsacontainer1", "algorithm": "rsa", "mode": "cbc"}, "type": "asymmetric"}'

       {"order_ref": "http://localhost:9311/v1/orders/7bc8615d-555b-42f4-8819-dca8e6572473"}

     c) Check order status:
        curl -H 'X-Project-Id:12345' http://localhost:9311/v1/orders/7bc8615d-555b-42f4-8819-dca8e6572473

        {"status": "ERROR", "updated": "2016-04-08T19:31:34.448945", "created": "2016-04-08T19:31:34.280043", "order_ref": "http://localhost:9311/v1/orders/7bc8615d-555b-42f4-8819-dca8e6572473", "meta": {"name": "ordered rsacontair1", "algorithm": "rsa", "mode": "cbc", "passphrase": "password", "bit_length": 2048, "expiration": null}, "error_status_code": "500", "error_reason": "Process TypeOrder failure seen - please contact site administrator.", "type": "asymmetric"}

Max (maxaa)
Changed in python-barbicanclient:
assignee: nobody → Max (max-abidi)
Revision history for this message
Max (maxaa) wrote :
Revision history for this message
Doug Hellmann (doug-hellmann) wrote : Fix included in openstack/barbican 3.0.0.0b2

This issue was fixed in the openstack/barbican 3.0.0.0b2 development milestone.

Changed in python-barbicanclient:
status: New → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.