Describe the bug
Username,password is not mandatory for clickhouse. If they are not set then the current implementation sends a Basic Og== as the Authorization header and it fails.
To Reproduce
The code is not much, but one need a clickhouse instance without any user/password auth. I used the clickhouse/clickhouse-server:23.3.13.6-alpine docker image without the CLICKHOUSE_USER and CLICKHOUSE_PASSWORD env vars.
from sqlalchemy import create_engine, literal
from clickhouse_sqlalchemy import make_session
# have a clikchouse without password auth
url = 'clickhouse+http://localhost:8123'
http_engine = create_engine(url)
http_session = make_session(http_engine)
http_session.query(literal(1)).scalar() # this raises an error
Expected behavior
If the username is not set then do not send the Authorization header.
Versions
- clickhouse-sqlalchemy 0.2.4 (reproducible with the current main as well)
- python 3.10
Describe the bug
Username,password is not mandatory for clickhouse. If they are not set then the current implementation sends a
Basic Og==as the Authorization header and it fails.To Reproduce
The code is not much, but one need a clickhouse instance without any user/password auth. I used the
clickhouse/clickhouse-server:23.3.13.6-alpinedocker image without theCLICKHOUSE_USERandCLICKHOUSE_PASSWORDenv vars.Expected behavior
If the username is not set then do not send the Authorization header.
Versions