Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document how to use self-signed certificates with trino-python-client #52

Closed
fanglu-wish opened this issue Oct 19, 2020 · 2 comments · Fixed by #190
Closed

Document how to use self-signed certificates with trino-python-client #52

fanglu-wish opened this issue Oct 19, 2020 · 2 comments · Fixed by #190

Comments

@fanglu-wish
Copy link

Followed the instructions LDAP Authentication to deploy a LDAP presto cluster

Installed presto-python-client 0.301.0


> conn = presto.dbapi.connect(
    host='<presto-ldap host name>',
    port=8443,
    user='<username>',
    catalog='hive',
    schema='default',
    http_scheme='https',
    auth=presto.auth.BasicAuthentication("<username>", "<password>"),
)

> cur = conn.cursor()

> cur.execute('show schemas')

But Got the following exception
SSLError: HTTPSConnectionPool(host='presto-ldap.service.us-west-2b.consul', port=8443): Max retries exceeded with url: /v1/statement (Caused by SSLError(SSLError(1, u'[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:727)'),))

According to the doc LDAP Authentication, need to create a jks file and set up the two configurations

http-server.https.keystore.path=/etc/presto_keystore.jks
http-server.https.keystore.key=keystore_password

So in presto-python-client, how to pass the jks file and password while connecting the LDAP presto cluster?

@findepi
Copy link
Member

findepi commented Oct 20, 2020

Can you please see #31 (#29)?

@ebyhr ebyhr changed the title Can't connect LDAP presto cluster by presto-python-client Can't connect LDAP trino cluster by trino-python-client Aug 17, 2021
@hashhar hashhar changed the title Can't connect LDAP trino cluster by trino-python-client Document how to use self-signed certificates with trino-python-client Jun 28, 2022
@hashhar
Copy link
Member

hashhar commented Jun 28, 2022

LDAP works and is documented now at https://github.com/trinodb/trino-python-client#basic-authentication.

But we are still missing docs for how to use with clusters that use self-signed certs so renamed the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

3 participants