You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I call SmartConnect with a SAML token, I get the following exception:
pyVmomi.VmomiSupport.vim.fault.InvalidLogin: (vim.fault.InvalidLogin) {
dynamicType = <unset>,
dynamicProperty = (vmodl.DynamicProperty) [],
msg = 'Cannot complete login due to an incorrect user name or password.',
faultCause = <unset>,
faultMessage = (vmodl.LocalizableMessage) []
With a SAML token, I would expect a value service_instance to be created. However, instead I get the aforementioned exception.
Additional context
I made a change to the __login function in connect.py (pyVim/connect.py) that seems to have corrected the problem.
I noticed that one of __login's parameters was 'token' and that this parameter was not being used when creating a SoadStubAdapter object. So I added the parameter 'samlToken=token', as in:
This seems to have corrected the issue. I am not eager to make a change to submit it because I am no expert in pyVim and don't really understand the /sdk soap API in vcenter and the requirements for making a request.
But I do believe SAML token's for pyVim requests is broken and it has something to do with where the token is located in the SOAP request.
Thanks,
Kevin
The text was updated successfully, but these errors were encountered:
Describe the bug
When I call SmartConnect with a SAML token, I get the following exception:
Reproduction steps
I use the following code to get a SAML token:
With the SAML token in hand, I call:
Expected behavior
With a SAML token, I would expect a value service_instance to be created. However, instead I get the aforementioned exception.
Additional context
I made a change to the __login function in connect.py (pyVim/connect.py) that seems to have corrected the problem.
I noticed that one of __login's parameters was 'token' and that this parameter was not being used when creating a SoadStubAdapter object. So I added the parameter 'samlToken=token', as in:
This seems to have corrected the issue. I am not eager to make a change to submit it because I am no expert in pyVim and don't really understand the /sdk soap API in vcenter and the requirements for making a request.
But I do believe SAML token's for pyVim requests is broken and it has something to do with where the token is located in the SOAP request.
Thanks,
Kevin
The text was updated successfully, but these errors were encountered: