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 communicate with vCenter Server and all the traffic goes through a kerberos authenticated proxy sever. I am not able to authenticate the proxy server since the requests.session does not support/use 'Proxy-Authorization' header.
I am using below code:
importrequestsimporturllib3fromvmware.vapi.vsphere.clientimportcreate_vsphere_clientfromrequests_kerberosimportHTTPKerberosAuthkerb_auth=HTTPKerberosAuth(force_preemptive=True)
auth_header=kerb_auth.generate_request_header(None, '10.24.129.100', True)
session=requests.session()
# Disable cert verification for demo purpose.# This is not recommended in a production environment.session.verify=Falsesession.proxies= {
'http': 'http://10.24.129.100:3128',
'https': 'http://10.24.129.100:3128',
}
session.headers= {
'Proxy-Authorization': auth_header
}
# Disable the secure connection warning for demo purpose.# This is not recommended in a production environment.urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
# Connect to a vCenter Server using username and passwordvsphere_client=create_vsphere_client(server='VC_IP',
username='[email protected]',
password='p@s$w0rD',
session=session)
# List all VMs inside the vCenter Serverprint(len(vsphere_client.vcenter.VM.list()))
Even for proxy server with basic authentication, we have to set proxy credentials as below:
Is your feature request related to a problem? Please describe.
I need to communicate with vCenter Server and all the traffic goes through a kerberos authenticated proxy sever. I am not able to authenticate the proxy server since the requests.session does not support/use
'Proxy-Authorization'
header.I am using below code:
Even for proxy server with basic authentication, we have to set proxy credentials as below:
Is there a way to connect to vCenter Server via kerberos authenticated proxy server by using VMware automation SDK python project?
Describe the solution you'd like
A way to authenticate proxy server which supports kerberos authentication.
Describe alternatives you've considered
The WAR for this is to directly use vCenter APIs with urllib3 library.
Additional context
No response
The text was updated successfully, but these errors were encountered: