← Back to team overview

openstack team mailing list archive

Re: Examples of authentication using the glance REST API?

 

Jay: I asked Michael to rewrite the tool directly using the Glance's REST API - that's why this question is coming up.

Michael: You should just authenticate with keystone directly (python-keystoneclient would be easiest), then pass your X-Auth-Token header in with any subsequent Glance requests.

Waldon


On Jun 11, 2012, at 6:59 AM, Jay Pipes wrote:

> Michael, you shouldn't need to do anything regarding authentication... the glance REST client already handles all of that. When you construct a client object, you pass in the user/password/tenant information that the client uses in constructing authenticated requests.
> 
> All the best,
> -jay
> 
> On 06/11/2012 12:04 AM, Vaze, Mandar wrote:
>> I think glance uses keystone for authentication (default setup)
>> 
>> See https://lists.launchpad.net/openstack/msg12661.html and http://docs.openstack.org/api/openstack-compute/programmer/content/using-python-to-obtain-the-authentication-token.html for "how to get auth token"
>> 
>> Once you use authenticate against keystone, you can get the auth-token and set it as X-Auth-Token http header
>> 
>> -Mandar
>> 
>> -----Original Message-----
>> From: openstack-bounces+mandar.vaze=nttdata.com@xxxxxxxxxxxxxxxxxxx [mailto:openstack-bounces+mandar.vaze=nttdata.com@xxxxxxxxxxxxxxxxxxx] On Behalf Of Michael Still
>> Sent: Monday, June 11, 2012 9:16 AM
>> To: openstack@xxxxxxxxxxxxxxxxxxx
>> Subject: [Openstack] Examples of authentication using the glance REST API?
>> 
>> Hi.
>> 
>> I am trying to find an example of how to do authentication using the glance REST API. I assume there are some HTTP headers that I need to set, but a pointer to some existing code which does this would be appreciated.
>> 
>> This is part of porting the glance replicator to use the REST API instead of the client library.
>> 
>> Thanks heaps,
>> Mikal
>> 
>> _______________________________________________
>> Mailing list: https://launchpad.net/~openstack
>> Post to     : openstack@xxxxxxxxxxxxxxxxxxx
>> Unsubscribe : https://launchpad.net/~openstack
>> More help   : https://help.launchpad.net/ListHelp
>> 
>> ______________________________________________________________________
>> Disclaimer:This email and any attachments are sent in strictest confidence for the sole use of the addressee and may contain legally privileged, confidential, and proprietary data.  If you are not the intended recipient, please advise the sender by replying promptly to this email and then delete and destroy this email and any attachments without any further use, copying or forwarding
>> 
>> _______________________________________________
>> Mailing list: https://launchpad.net/~openstack
>> Post to     : openstack@xxxxxxxxxxxxxxxxxxx
>> Unsubscribe : https://launchpad.net/~openstack
>> More help   : https://help.launchpad.net/ListHelp
> 
> _______________________________________________
> Mailing list: https://launchpad.net/~openstack
> Post to     : openstack@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~openstack
> More help   : https://help.launchpad.net/ListHelp



References