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
Is your feature request related to a problem? Please describe.
I need to connect to vCenter server via authenticated proxy. But, I could not do so using SmartConnect.
I know, I need to send Proxy-Authorization header in the SmartConnect request but I couldn't find a way to do this.
I tried putting it in customHeaders attribute as given below:
Traceback (most recent call last):
File "connect_to_vc.py", line 19, in <module>
si = SmartConnect(host=vcenter_address
File "/usr/local/lib/python3.8/dist-packages/pyVim/connect.py", line 939, in SmartConnect
supportedVersion = __FindSupportedVersion(protocol, host, port, path,
File "/usr/local/lib/python3.8/dist-packages/pyVim/connect.py", line 763, in __FindSupportedVersion
serviceVersionDescription = __GetServiceVersionDescription(
File "/usr/local/lib/python3.8/dist-packages/pyVim/connect.py", line 694, in __GetServiceVersionDescription
return __GetElementTree(protocol, server, port,
File "/usr/local/lib/python3.8/dist-packages/pyVim/connect.py", line 655, in __GetElementTree
conn.request("GET", path)
File "/usr/lib/python3.8/http/client.py", line 1256, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/usr/lib/python3.8/http/client.py", line 1302, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "/usr/lib/python3.8/http/client.py", line 1251, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "/usr/lib/python3.8/http/client.py", line 1011, in _send_output
self.send(msg)
File "/usr/lib/python3.8/http/client.py", line 951, in send
self.connect()
File "/usr/lib/python3.8/http/client.py", line 1418, in connect
super().connect()
File "/usr/lib/python3.8/http/client.py", line 927, in connect
self._tunnel()
File "/usr/lib/python3.8/http/client.py", line 905, in _tunnel
raise OSError("Tunnel connection failed: %d %s" % (code,
OSError: Tunnel connection failed: 407 Proxy Authentication Required
Is authenticated proxy supported in pyvmomi? If not, can you please guide me how I can do this using pyvmomi?
Describe the solution you'd like
Add authenticated proxy support in pyvmomi.
Describe alternatives you've considered
None
Additional context
No response
The text was updated successfully, but these errors were encountered:
Hello,
Can anyone tell me if there is a way to use authenticated proxy server with pyVmomi?
VedaNiks
changed the title
Connection to vCenter Server via authenticated proxy server fails
Connection to vCenter Server via authenticated proxy server fails [VMware Staff Assist Needed]
Jun 2, 2023
VedaNiks
changed the title
Connection to vCenter Server via authenticated proxy server fails [VMware Staff Assist Needed]
Connection to vCenter Server via authenticated proxy server fails
Jun 2, 2023
Is your feature request related to a problem? Please describe.
I need to connect to vCenter server via authenticated proxy. But, I could not do so using SmartConnect.
I know, I need to send
Proxy-Authorization
header in the SmartConnect request but I couldn't find a way to do this.I tried putting it in
customHeaders
attribute as given below:On executing above code I see below error:
Is authenticated proxy supported in pyvmomi? If not, can you please guide me how I can do this using pyvmomi?
Describe the solution you'd like
Add authenticated proxy support in pyvmomi.
Describe alternatives you've considered
None
Additional context
No response
The text was updated successfully, but these errors were encountered: