Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: OpenStack: Dev

Examples of authentication using the glance REST API?

 

 

OpenStack dev RSS feed   Index | Next | Previous | View Threaded


michael.still at canonical

Jun 10, 2012, 8:45 PM

Post #1 of 4 (788 views)
Permalink
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 [at] lists
Unsubscribe : https://launchpad.net/~openstack
More help : https://help.launchpad.net/ListHelp


Mandar.Vaze at nttdata

Jun 10, 2012, 9:04 PM

Post #2 of 4 (788 views)
Permalink
Re: Examples of authentication using the glance REST API? [In reply to]

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 [at] lists [mailto:openstack-bounces+mandar.vaze=nttdata.com [at] lists] On Behalf Of Michael Still
Sent: Monday, June 11, 2012 9:16 AM
To: openstack [at] lists
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 [at] lists
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 [at] lists
Unsubscribe : https://launchpad.net/~openstack
More help : https://help.launchpad.net/ListHelp


jaypipes at gmail

Jun 11, 2012, 6:59 AM

Post #3 of 4 (782 views)
Permalink
Re: Examples of authentication using the glance REST API? [In reply to]

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 [at] lists [mailto:openstack-bounces+mandar.vaze=nttdata.com [at] lists] On Behalf Of Michael Still
> Sent: Monday, June 11, 2012 9:16 AM
> To: openstack [at] lists
> 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 [at] lists
> 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 [at] lists
> Unsubscribe : https://launchpad.net/~openstack
> More help : https://help.launchpad.net/ListHelp

_______________________________________________
Mailing list: https://launchpad.net/~openstack
Post to : openstack [at] lists
Unsubscribe : https://launchpad.net/~openstack
More help : https://help.launchpad.net/ListHelp


brian.waldon at rackspace

Jun 11, 2012, 7:54 AM

Post #4 of 4 (779 views)
Permalink
Re: Examples of authentication using the glance REST API? [In reply to]

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 [at] lists [mailto:openstack-bounces+mandar.vaze=nttdata.com [at] lists] On Behalf Of Michael Still
>> Sent: Monday, June 11, 2012 9:16 AM
>> To: openstack [at] lists
>> 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 [at] lists
>> 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 [at] lists
>> Unsubscribe : https://launchpad.net/~openstack
>> More help : https://help.launchpad.net/ListHelp
>
> _______________________________________________
> Mailing list: https://launchpad.net/~openstack
> Post to : openstack [at] lists
> Unsubscribe : https://launchpad.net/~openstack
> More help : https://help.launchpad.net/ListHelp


_______________________________________________
Mailing list: https://launchpad.net/~openstack
Post to : openstack [at] lists
Unsubscribe : https://launchpad.net/~openstack
More help : https://help.launchpad.net/ListHelp

OpenStack dev RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.