Skip to content

[EventHubs] Custom ssl certificate support when using http proxy #16304

@yunhaoling

Description

@yunhaoling

Summary

EventHub allows connecting to the service via http proxy.
Currently we expose http proxy setting including:

proxy_hostname (str)
proxy_port (int)
username (str)
password (str)

However, there're scenarios:

  • the http proxy server has its own Server SSL certificate -- when the client wants to build tls connection to the http proxy, a custom certificate is required for authenticating the identity of the proxy server.
  • Apart from the server certificate, there is also Client SSL certificate which is used by the server to authenticate the identity of a client.

We would like to provide the ability to set server/client certificate in EventHub Python SDK for authenticating the identity of the proxy server/client when connection to the service via a http proxy.

Scope of work

  • Client accepts server SSL certificate and uses the certificate (path to the CA_BUNDLE file) in the case of http proxy usage for authenticating the identity of the proxy server when building tls connection.
    • (?) certificate ignored if there's no proxy setting
  • Client accepts client SSL certificate and uses the certificate in the case of http proxy usage for authenticating the identity of the client when building tls connection.
    • (?) certificate ignored if there's no proxy setting
  • The surface should align with the azure-core on exposing the certificate settings at the top-level client

Success Criteria

  • The server ssl certificate and client certificate is supported/implemented in the underlying uamqp library
  • clients accept ssl certificate and client certificate could connect to the service via http proxy which requires the certificates.

Samples

http_proxy = {
proxy_hostname (str)
proxy_port (int)
username (str)
password (str)
connection_verify: path the server certificate CA_BUNDLE file
connection_cert: path to the client side certificate CA_BUNDLE file or (key, certificate pair?)
}

References

Python request ssl cert
Python request client cert

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions