argos83 / pysphere

Automatically exported from code.google.com/p/pysphere
88 stars 76 forks source link

Connecting using Kerberos / AD #17

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Connect to pysphere using Kerberos / AD

From: https://groups.google.com/forum/#!topic/pysphere/jcFn6ZtwUgk

This should be done by implementing this function: 
http://www.vmware.com/support/developer/vc-sdk/visdk41pubs/ApiReference/vim.Sess
ionManager.html#loginBySSPI

Original issue reported on code.google.com by argo...@gmail.com on 31 Jul 2012 at 1:06

GoogleCodeExporter commented 9 years ago
Thanks. I'm happy to try to test for you if it helps.

Original comment by wyard...@gmail.com on 31 Jul 2012 at 6:23

GoogleCodeExporter commented 9 years ago
Implemented using sspi module from http://sourceforge.net/projects/pywin32/. 
Tested with ESXi 4.1. Patch attached.

Original comment by gento...@gmail.com on 16 Mar 2014 at 6:36

Attachments:

GoogleCodeExporter commented 9 years ago
Also works with standalone ESXi 5.0/Win 2008 R2 SP1/Python 2.7.5/Pywin32 218

Original comment by gento...@gmail.com on 18 Mar 2014 at 2:25

GoogleCodeExporter commented 9 years ago
Usage:
>>> from pysphere import VIServer
>>> server = VIServer()
>>> server.connect('servername', passthrough=True)

Original comment by gento...@gmail.com on 18 Mar 2014 at 5:40

GoogleCodeExporter commented 9 years ago
Added MIT Kerberos authentication.
Tested on CentOS 6.5 and Gentoo with ESXi 4.1 and Windows 2008 R2 as KDC.
python-kerberos/pykerberos package should be installed in client system.

Usage:
in shell:
$ kinit username@REALM.LOCAL

after that in python:
>>> from pysphere import VIServer
>>> server = VIServer()
>>> server.connect('servername', passthrough=True)

Original comment by gento...@gmail.com on 23 Mar 2014 at 7:20

Attachments: