Skip to content
This repository has been archived by the owner on Mar 13, 2022. It is now read-only.

supporting proxy authentication for websocket client(stream/ws_client.py) #255

Closed
itaru2622 opened this issue Oct 1, 2021 · 0 comments · Fixed by #256
Closed

supporting proxy authentication for websocket client(stream/ws_client.py) #255

itaru2622 opened this issue Oct 1, 2021 · 0 comments · Fixed by #256

Comments

@itaru2622
Copy link
Contributor

related to ansible-collections/kubernetes.core#246,
current kubernets-client/python-base and kubernetes-client/python support proxy authentication just for REST but NOT websocket.

This issue is caused by below line in python-base. It has no 'http_proxy_auth=xxx' .

websocket.connect(url, header=header, http_proxy_host=proxy_url.hostname, http_proxy_port=proxy_url.port)

In REST case, kubernets-client/python cares proxy authentication by 'proxy_headers' in following code:

https://github.com/kubernetes-client/python/blob/96dade6021dc2e9ee1430172e1b65d9e9e232b10/kubernetes/client/rest.py#L86-L97

where, configuration.proxy_headers are set by caller, like below code:

https://github.com/ansible-collections/kubernetes.core/blob/c65512357dd90b477dec683999128e0308a96f88/plugins/module_utils/common.py#L202-L204
and
https://github.com/ansible-collections/kubernetes.core/blob/c65512357dd90b477dec683999128e0308a96f88/plugins/module_utils/common.py#L139

@itaru2622 itaru2622 changed the title supporting proxy authentication in websocket client(stream/ws_client.py) supporting proxy authentication for websocket client(stream/ws_client.py) Oct 1, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
1 participant