Open zdxerr opened 6 years ago
@tianhao64, @hartsock Please help!!
I'm interesting in the same as well. The problem statement that I'm working on is,
`// UserSessionService is available as injected Spring Service // Get UserSession Object UserSession userSession = userSessionService.getUserSession(); ServerInfo sInfo = userSession.serversInfo[0];
String sessionId = sInfo.sessionCookie;`
si = SmartConnectNoSSL(host='scspr0524721001.gdl.englab.netapp.com', user=None, pwd=None, b64token='681d9551-4771-4aaf-8128-c357d2a2bb55', mechanism='sspi');
Every iteration gave an error "'Cannot complete login due to an incorrect user name or password."
The same code when used with mechanism=userpass
and passing username and password works and returns instance of serviceInstance.
Is there something else, which needs to be configured before this method can be invoked?
The environment details for test are as below
I tried using this with token = vmware_soap_session=\"sometoken\"
then getting base64encoding of token
and using in SmartConnectNoSSL
, It still asks for password. Using 6.7.0.2018.9
version.
I don't know if this is all correct, but it worked for me:
import winkerberos as kerberos
from pyVim.connect import SmartConnectNoSSL
status, context = kerberos.authGSSClientInit('host@' + ADDRESS, gssflags=kerberos.GSS_C_MUTUAL_FLAG | kerberos.GSS_C_SEQUENCE_FLAG)
status = kerberos.authGSSClientStep(context, '')
response = kerberos.authGSSClientResponse(context)
session = SmartConnectNoSSL(host=ADDRESS, b64token=response, mechanism='sspi')
Same question here, please help! @tianhao64
Got any fix? @tushartarkas
Can you please give an example of how to use SSPI Login with SmartConnect. What data should I write into the b64token?