You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@libcloud.apache.org by Richard Conway <ri...@elastacloud.com> on 2014/05/14 19:36:32 UTC

[dev] Microsoft Azure compute driver

Hi,

I’ve started writing a compute driver for Microsoft Azure and I was hoping to get some guidance from the list.

I need to be able to create a mutually authenticated SSL session. The client connection has a .pem file which will be used in the session. An X509 certificate within an Azure subscription is used to verify the request. I’m trying to figure out the way to do this currently.

Azure differs from the other compute drivers in that there is no sign in through oauth so no setting of an http auth header. The right way seems to be to somehow to pass through a key_file/cert_file (I have the .pem) to the underlying ssl connection in LibcloudHTTPSConnection.

If I could get guidance some around the best way to do this it would be great. I have a feeling I’ll overengineer things otherwise ☹

Thanks.

Richard Conway
Head of Strategy and Evangelism | Elastacloud Limited |
Windows Azure MVP and Insider
T. 0208 530 3999 (office) | 07590333990 (mobile)
W. Web Site<http://www.elastacloud.com/> | My Linked In<applewebdata://D40E0893-DB28-4B52-94DE-FC6823F51ADC/uk.linkedin.com/in/richardelastacloud/> | My Blog<http://azurecoder.azurewebsites.net/> | My Twitter<applewebdata://D40E0893-DB28-4B52-94DE-FC6823F51ADC/twitter.com/azurecoder> | UK Azure User Group Twitter<applewebdata://D40E0893-DB28-4B52-94DE-FC6823F51ADC/twitter.com/ukwaug>




Re: [dev] Microsoft Azure compute driver

Posted by Matt Baldwin <ba...@stackpointcloud.com>.
Hey Richard:

I actually have a compute driver almost done and just need to drop in this
last bit and I'll be ready to submit it to libcloud. You can find my code
here:

https://github.com/baldwinSPC/libcloud/blob/trunk/libcloud/compute/drivers/azure_compute.py

Do you want to jointly workout of that repo and we can submit it once its
ready? I've been testing through it over the past few weeks. Ping me off
list if you want. There are a couple of blockers from submitting it. I,
too, need to implement the auth piece, build unit tests, then urge
Microsoft to merge a few pull requests into the Azure REST API I
contributed. There are issues with deleting instances in the current Azure
REST library.

Thanks.
-matt


On Wed, May 14, 2014 at 10:36 AM, Richard Conway <ri...@elastacloud.com>wrote:

> Hi,
>
> I’ve started writing a compute driver for Microsoft Azure and I was hoping
> to get some guidance from the list.
>
> I need to be able to create a mutually authenticated SSL session. The
> client connection has a .pem file which will be used in the session. An
> X509 certificate within an Azure subscription is used to verify the
> request. I’m trying to figure out the way to do this currently.
>
> Azure differs from the other compute drivers in that there is no sign in
> through oauth so no setting of an http auth header. The right way seems to
> be to somehow to pass through a key_file/cert_file (I have the .pem) to the
> underlying ssl connection in LibcloudHTTPSConnection.
>
> If I could get guidance some around the best way to do this it would be
> great. I have a feeling I’ll overengineer things otherwise ☹
>
> Thanks.
>
> Richard Conway
> Head of Strategy and Evangelism | Elastacloud Limited | Windows Azure MVP
> and Insider
> T. 0208 530 3999 (office) | 07590333990 (mobile)
> W. Web Site<http://www.elastacloud.com/> | My Linked
> In<applewebdata://D40E0893-DB28-4B52-94DE-FC6823F51ADC/
> uk.linkedin.com/in/richardelastacloud/> | My Blog<
> http://azurecoder.azurewebsites.net/> | My
> Twitter<applewebdata://D40E0893-DB28-4B52-94DE-FC6823F51ADC/
> twitter.com/azurecoder> | UK Azure User Group
> Twitter<applewebdata://D40E0893-DB28-4B52-94DE-FC6823F51ADC/
> twitter.com/ukwaug>
>
>
>
>

Re: [dev] Microsoft Azure compute driver

Posted by Markos Gogoulos <mg...@mist.io>.
 

Hi Richard,

we've been thinking recently to add support for Azure
compute as well. 

At the moment I'm not familiar with Azure, from a
very quick look at it's python sdk
(https://github.com/Azure/azure-sdk-for-python/blob/master/azure/http/httpclient.py)
I see that an httplib.HTTPSConnection is established that contains the
cert_file of the client 

You need to create an AzureConnection class
and pass the client cert_file (also the server's cert file) on __init__.
There are still headers that need be added in Azure, such as
"x-ms-version" according to some examples I've seen on stack overflow.


libcloud's Google Compute Engine driver authenticates with private key
-instead of API key/secret as most other drivers- so it might be a good
reference.

I hope that this blog post will also be of any help -
http://blog.mist.io/post/67366170830/how-to-create-a-libcloud-driver-from-scratch

Cheers,
Markos

Στις
14.05.2014 20:36, Richard Conway έγραψε: 

> Hi,
> 
> I've started
writing a compute driver for Microsoft Azure and I was hoping to get
some guidance from the list.
> 
> I need to be able to create a mutually
authenticated SSL session. The client connection has a .pem file which
will be used in the session. An X509 certificate within an Azure
subscription is used to verify the request. I'm trying to figure out the
way to do this currently.
> 
> Azure differs from the other compute
drivers in that there is no sign in through oauth so no setting of an
http auth header. The right way seems to be to somehow to pass through a
key_file/cert_file (I have the .pem) to the underlying ssl connection in
LibcloudHTTPSConnection.
> 
> If I could get guidance some around the
best way to do this it would be great. I have a feeling I'll
overengineer things otherwise ☹
> 
> Thanks.
> 
> Richard Conway
> Head
of Strategy and Evangelism | Elastacloud Limited |
Windows Azure MVP and
Insider
> T. 0208 530 3999 (office) | 07590333990 (mobile)
> W. Web
Site<http://www.elastacloud.com/ [1]> | My Linked
In<applewebdata://D40E0893-DB28-4B52-94DE-FC6823F51ADC/uk.linkedin.com/in/richardelastacloud/>
| My Blog<http://azurecoder.azurewebsites.net/ [2]> | My
Twitter<applewebdata://D40E0893-DB28-4B52-94DE-FC6823F51ADC/twitter.com/azurecoder>
| UK Azure User Group
Twitter<applewebdata://D40E0893-DB28-4B52-94DE-FC6823F51ADC/twitter.com/ukwaug>




Links:
------
[1] http://www.elastacloud.com/
[2]
http://azurecoder.azurewebsites.net/