[openstack-dev] [Keystone] creadential API example BUG?

Steven Hardy shardy at redhat.com
Tue Dec 2 09:29:17 UTC 2014


On Tue, Dec 02, 2014 at 09:10:01AM +0000, Mizutani, Michiyuki wrote:
> 
> Hi all,
> 
> I want to confirm that about the examples of the credential api that described at the following URL.
> 
> http://docs.openstack.org/api/openstack-identity-service/3/content/create-credential-post-credentials.html
> 
> I tried to request to our keystone server using the request example described in the reference.
> However we got a following error.
> 
> {"error": {"message": "Invalid blob in credential", "code": 400, "title": "Bad Request"}}
> 
> I think the reason of this error is because request is not using JSON string in "blob".
> Is my thinking correct?
> 
> Has this problem been already registered?
> Do I need regist to BUG report if it not yet registered?

It's a documentation bug IMO - if you use the "ec2" type then yes the data
blob does need to be a json serialized dict with specific keys (the
access/secret of the ec2 keypair).

If you pass some other type (e.g not "ec2") then I think you can pass
whatever data you want in the blob.

Here's the validation code:

https://github.com/openstack/keystone/blob/master/keystone/credential/controllers.py#L39

Here's some historical bugs explaining why we need this format for ec2
type:

https://bugs.launchpad.net/keystone/+bug/1259584
https://bugs.launchpad.net/keystone/+bug/1269637

Here's an example of using the interface:

https://github.com/openstack/heat/blob/master/heat/common/heat_keystoneclient.py#L585

Hope that helps.

Steve



More information about the OpenStack-dev mailing list