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
[KYUUBI #6908] Connection class ssl context object paramater
**Why are the changes needed:**
Currently looking to connect to a HiveServer2 behind an NGINX proxy that is requiring mTLS communication. pyHive seems to lack the capability to establish an mTLS connection in applications such as Airflow directly communicating to the HiveServer2 instance.
The change needed is to be able to pass in the parameters for a proper mTLS ssl context to be established. I believe that creating your own ssl_context object is the quickest and cleanest way to do so, leaving the responsibility of configuring it to further implementations and users. Also cuts down on code length.
**How was this patch tested:**
Corresponding pytest fixtures have been added, using the mock module to see if ssl_context object was properly accessed, or if the default one created in the Connection initialization was properly configured.
Was not able to run pytest fixtures specifically, was lacking JDBC driver, first time contributing to open source, happy to run tests if provided guidance. Passed a clean build and test of the entire kyuubi project in local dev environment.
**Was this patch authored or co-authored using generative AI tooling**
Yes, Generated-by Cursor-AI with Claude Sonnet 3.5 agent
Closes#6935 from alexio215/connection-class-ssl-context-param.
Closes#6908539b299 [Cheng Pan] Update python/pyhive/tests/test_hive.py
14c6074 [Alex Wojtowicz] Simplified testing, following pattern of other tests, need proper SSL setup with nginx to test ssl_context fully
b947f24 [Alex Wojtowicz] Added exception handling since JDBC driver will not run in python tests
11f9002 [Alex Wojtowicz] Passing in fully configured mock object before creating connection
009c5cf [Alex Wojtowicz] Added back doc string documentation
e3280bc [Alex Wojtowicz] Python testing
529de8a [Alex Wojtowicz] Added ssl_context object. If no obj is provided, then it continues to use default provided parameters
Lead-authored-by: Alex Wojtowicz <[email protected]>
Co-authored-by: Cheng Pan <[email protected]>
Signed-off-by: Cheng Pan <[email protected]>
0 commit comments