Uh oh!
There was an error while loading. Please reload this page.
Adding kerberos support for Presto - #229
Conversation
codecov-io
commented
Aug 15, 2018
Codecov Report
@@ Coverage Diff @@## master #229 +/- ##
==========================================
- Coverage 93.92% 93.24% -0.69%
==========================================
Files 14 14 Lines 1482 1495 +13 Branches 157 162 +5 ==========================================
+ Hits 1392 1394 +2 - Misses 64 74 +10 - Partials 26 27 +1
Continue to review full report at Codecov.
|
gglanzani
left a comment
There was a problem hiding this comment.
Looks good, I've got a couple of minor points!
| ], | ||
| extras_require={ | ||
| 'presto': ['requests>=1.0.0'], | ||
| 'presto': ['requests>=1.0.0', 'requests_kerberos>=0.12.0'], |
There was a problem hiding this comment.
This is actually only needed when using Kerberos, wouldn't it be better to add an extra extra?
There was a problem hiding this comment.
I have added a kerberos field in extra_require. I think that is more suitable. Please let me know your thoughts on this.
| def __init__(self, host, port='8080', username=None, catalog='hive', | ||
| schema='default', poll_interval=1, source='pyhive', session_props=None, | ||
| protocol='http', password=None, requests_session=None, requests_kwargs=None): | ||
| protocol='http', password=None, KerberosRemoteServiceName=None, |
There was a problem hiding this comment.
This would break compatibility if people were using it without named argument. All the kerberos parameters can go at the end.
There was a problem hiding this comment.
Incorporated these changes.
| schema='default', poll_interval=1, source='pyhive', session_props=None, | ||
| protocol='http', password=None, requests_session=None, requests_kwargs=None): | ||
| protocol='http', password=None, KerberosRemoteServiceName=None, | ||
| KerberosPrincipal=None, KerberosConfigPath=None, KerberosKeytabPath=None, |
There was a problem hiding this comment.
Is there a reason not to use snake case?
There was a problem hiding this comment.
Keeping it the same as mentioned in presto docs is the motive.
chadheyne
commented
Mar 1, 2019
@ShashwatArghode@gglanzani -- what's the status of getting this merged in? Would love to get support for this added in so that we can continue to use Superset. |
ShashwatArghode
commented
Mar 1, 2019
@gglanzani@chadheyne |
gglanzani
commented
Mar 2, 2019
@ShashwatArghode I’ve left some comments back then in the PR, and I was curious about your opinion on them |
ShashwatArghode
commented
Mar 5, 2019
@gglanzani I have incorporated the comments. But there is some sqlalchemy related test case failure. I am new to sqlalchemy, I will take a better look at it but any help would be appreciated. |
gglanzani
commented
Mar 6, 2019
You probably need to pass The second exception probably comes from the fact that we use |
chadheyne
commented
Mar 26, 2019
My read of the failing test cases is that it's related to a new SQLAlchemy version being released and https://github.com/dropbox/PyHive/blob/master/.travis.yml#L9 is pulling the most recent version. The newest version added the resolve_fks argument so I don't think modifying the tests will work as the other configurations would continue to fail. Since the failing test cases are unrelated to these changes is there any way we can move forward with this pull request and address those failures in a separate issue? Who do we need to ping on this issue to move forward? |
gglanzani
commented
Mar 27, 2019
@chadheyne You need to ping @gsilk to make it move forward, I am not a committer. |
bolkedebruin
commented
Apr 2, 2019
Ping @gsilk can you have a look? |
gsilk
commented
Apr 11, 2019
Sorry for being tardy on this. I'm going to merge this in and have a look at the failing tests. |
@gsilk great thanks for your kerberos feature; I am running on python 2.7.16 and cannot connect to my presto server ; I am quite sure that my kerberized presto server is Ok because I could use kerberized java client to connect to it; |
cerodav
commented
Jul 28, 2020
Hi, it would be really great if you could give details on how to connect to presto via SQLAlchemy with kerberos based authetication. I don't see any documentation for this anywhere |
#228
Connecting to Kerberized Presto cluster using Kerberos authentication.
SQLAlchemy URI:
presto://{Presto-coordinator}:{port}/{catalog}/{schema}?KerberosKeytabPath=/path/to/keytab&KerberosPrincipal=principal&KerberosRemoteServiceName=service&protocol=https
Patch is tested with Apache Superset.