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

Mizutani, Michiyuki m_mizutani at jp.fujitsu.com
Tue Dec 2 10:17:46 UTC 2014


Hi Steven,

Thank you for your quick response.

The following document is correct as credential API of ec2tokens, isn't it?
http://developer.openstack.org/api-ref-identity-v3.html

So, I was confuse about specifying to request body of credential API.

Thanks again!

> -----Original Message-----
> From: Steven Hardy [mailto:shardy at redhat.com]
> Sent: Tuesday, December 02, 2014 6:29 PM
> To: OpenStack Development Mailing List (not for usage questions)
> Subject: Re: [openstack-dev] [Keystone] creadential API example BUG?
> 
> 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/cre
> > ate-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_keyston
> eclient.py#L585
> 
> Hope that helps.
> 
> Steve
> 
> _______________________________________________
> OpenStack-dev mailing list
> OpenStack-dev at lists.openstack.org
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev



More information about the OpenStack-dev mailing list