Skip to content

LibSqlClient.openSimpleConnection: include Bearer auth token#52

Merged
serge-rider merged 1 commit into
dbeaver:develfrom
IceboxDev:fix/openSimpleConnection-auth-token
May 22, 2026
Merged

LibSqlClient.openSimpleConnection: include Bearer auth token#52
serge-rider merged 1 commit into
dbeaver:develfrom
IceboxDev:fix/openSimpleConnection-auth-token

Conversation

@IceboxDev

Copy link
Copy Markdown
Contributor

LibSqlClient.executeBatch includes the Authorization: Bearer <token> header when an auth token is configured, but openSimpleConnection (used by LibSqlDatabaseMetaData.readServerVersion to hit /version) does not. Against any libSQL server that requires authentication on every request (notably Turso's managed service) this returns 401 Unauthorized, so getDatabaseProductName() / getDatabaseProductVersion() fail.

Reproduction (Turso):

curl -i https://<turso-host>/version
# HTTP/1.1 401 Unauthorized
curl -i -H "Authorization: Bearer $TOKEN" https://<turso-host>/version
# HTTP/1.1 200 OK   (or 404 ? see follow-up PR for the 404 path)

Fix: mirror executeBatch's auth-header logic in openSimpleConnection.

@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 0 complexity · 0 duplication

Metric Results
Complexity 0
Duplication 0

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@LonwoLonwo

Copy link
Copy Markdown
Member

Thanks @IceboxDev

We will take a look.

@labanovichttps

Copy link
Copy Markdown
Contributor

@serge-rider serge-rider merged commit c2310d0 into dbeaver:devel May 22, 2026
3 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants