azure-sdk-for-cpp icon indicating copy to clipboard operation
azure-sdk-for-cpp copied to clipboard

[Feature Request] Request to support proxy auth for azure-sdk-for-cpp

Open anyoiuo opened this issue 3 years ago • 9 comments

Hi Azure team, We are need to using proxy auth (username and password). We found your SDK is not support yet.

Could you support this feature for Curl transport?

https://github.com/Azure/azure-sdk-for-cpp/blob/main/sdk/core/azure-core/inc/azure/core/http/curl_transport.hpp

https://github.com/Azure/azure-sdk-for-cpp/blob/main/sdk/core/azure-core/src/http/curl/curl.cpp

https://curl.se/libcurl/c/CURLOPT_PROXYAUTH.html

In addition, we also submit a ticket to azure support portal (Task Number: 2112140060002220) and they suggest us to creating a issue to this Git repo.

Circle Chen Trend Micro

anyoiuo avatar Dec 17 '21 07:12 anyoiuo

Thank you for submitting this request. We will look into adding this support in a future release.

RickWinter avatar Dec 27 '21 20:12 RickWinter

Hello @anyoiuo, thank you for reaching out.

Have you tried using proxy environment variables to set the full proxy configuration?
Something like

export http_proxy=http://USERNAME:PASSWORD@SERVER:PORT/

See this

Libcurl should honor the env vars as mentioned here: https://curl.se/libcurl/c/CURLOPT_PROXY.html

vhvb1989 avatar Dec 29 '21 23:12 vhvb1989

The options can be easily added to the libcul transport adapter options. However, there's not currently an available strategy for testing that it would work as expected ( No proxy with auth within CI or test env ). Coverage or correctness support might be missing. I need to talk to the team about this to see alternatives.

In the mind time, if using env vars for the proxy won't work for you, you can also give it a try to implement a custom transport adapter where you can take control of the libcurl handle to set any configuration to it before performing the request. See an example of it here: https://github.com/vhvb1989/libcurl-callbacks-transport-adapter

Will be back to you about implementing this.

vhvb1989 avatar Dec 30 '21 00:12 vhvb1989

We already added this options and modified some code. Currently, it is work properly. We are waiting to the official support for it.

anyoiuo avatar Jan 18 '22 03:01 anyoiuo

Hello @anyoiuo

We’re very glad that you are unblocked and are successful with the proxy support you added yourself. At this time, we have higher priorities and there is no timeline for when official support will be introduced.

vhvb1989 avatar Mar 04 '22 17:03 vhvb1989

Hi @anyoiuo. Thank you for opening this issue and giving us the opportunity to assist. We believe that this has been addressed. If you feel that further discussion is needed, please add a comment with the text “/unresolve” to remove the “issue-addressed” label and continue the conversation.

ghost avatar Mar 04 '22 17:03 ghost

Hi @anyoiuo, since you haven’t asked that we “/unresolve” the issue, we’ll close this out. If you believe further discussion is needed, please add a comment “/unresolve” to reopen the issue.

ghost avatar Mar 11 '22 22:03 ghost

/unresolve

anyoiuo avatar Mar 13 '22 14:03 anyoiuo

FWIW, this work item is included in the /feature/websockets.

We're currently vetting the other work in this branch with partners and hope to have this fully merged with main sometime this fall (3Q 2022).

LarryOsterman avatar Aug 22 '22 18:08 LarryOsterman