cloudera / impyla

Python DB API 2.0 client for Impala and Hive (HiveServer2 protocol)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Retain all cookies by default

joemcdonnell opened this issue · comments

connect's 'http_cookie_names' parameter specifies a list of cookies to retain and pass along for HS2 HTTP connections. This currently defaults to ['impala.auth', 'impala.session.id', 'hive.server2.auth'] (see https://github.com/cloudera/impyla/blob/master/impala/dbapi.py#L192 ).

In general, we don't know what proxies are between impala-shell and Impala, and we don't know what cookie name they rely on being preserved. As an example, Apache Knox can rely on a cookie it sets to route requests to the appropriate Impala coordinator. Limiting our cookie preservation to a small allow list makes this much more brittle and hard to use. Clients need to know the right list of cookies to put in http_cookie_names, and that is not obvious.

It seems like the default behavior should be to preserve all cookies. Maybe http_cookie_names=None adopts this behavior, and the user can still specify http_cookie_names to limit the cookies for unusual cases.

Companion Impala issue: IMPALA-12093

I'm interested in doing this, can you assign it to me?