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
I'm using trino-python-client in order to access to trino coordinator, and I would like to connect with basic authentication and over http (ie: I don't need to secure the connection because trino-python-client and coordinator and runing in a kubernetes cluster and in the namespace), but I get the error cannot use authentication with HTTP.
I want to activate the basic authentication in order to enable the access control (I can access without authentication, but there will be no access control).
Is there way to properly configure trino-python-client in order to avoid to have this error ?
Trino version: 475
trino-python-client: 0.333.0
My python code:
import getpass
password = getpass.getpass("Trino password: ")
# Connection settings
host = 'trino'
port = 8080
user = 'admin'
catalog = 'psql'
schema = 'public'
try:
conn = connect(
host=host,
port=port,
user=user,
catalog=catalog,
schema=schema,
http_scheme='http',
auth=BasicAuthentication(user, password),
timezone='Europe/Paris'
)
cur = conn.cursor()
cur.execute("SHOW CATALOGS")
result = cur.fetchall()
print("✅ Connection successful. Result:", result)
except requests.exceptions.RequestException as req_err:
print("🔌 Network error:", req_err)
except Exception as e:
print("❌ Some other error occurred:", e)
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hello
I'm using trino-python-client in order to access to trino coordinator, and I would like to connect with basic authentication and over http (ie: I don't need to secure the connection because trino-python-client and coordinator and runing in a kubernetes cluster and in the namespace), but I get the error
cannot use authentication with HTTP
.I want to activate the basic authentication in order to enable the access control (I can access without authentication, but there will be no access control).
Is there way to properly configure trino-python-client in order to avoid to have this error ?
Trino version: 475
trino-python-client: 0.333.0
My python code:
Thanks in advance for your help
Beta Was this translation helpful? Give feedback.
All reactions