Skip to content

fix(connections): default mongo to TLS-off so local mongo connects - #105

Merged
oesukam merged 1 commit into
mainfrom
fix/mongo-tls-default
Aug 6, 2026
Merged

fix(connections): default mongo to TLS-off so local mongo connects#105
oesukam merged 1 commit into
mainfrom
fix/mongo-tls-default

Conversation

@oesukam

@oesukam oesukam commented Aug 6, 2026

Copy link
Copy Markdown
Collaborator

Problem

A new MongoDB connection failed the Test button ("Test failed") against a plain local Mongo.

Root cause: the connection form defaults ssl_mode: "prefer" for every engine, but the Mongo driver reads tls: ssl_mode != "disable". So "prefer" flips TLS on, and a non-TLS local Mongo rejects the handshake.

Fix

  • Add an sslDefault field to the engine registry — Mongo (and other non-TLS-first engines) default to "disable"; Postgres/MySQL keep "prefer".
  • On engine change in the form, snap ssl_mode to the new engine's default unless the user picked a non-default mode we'd clobber (same pattern already used for the port).
  • Users with a TLS-enabled Mongo just flip the SSL select on.

Tests

Added registry assertions (Mongo → disable, SQL → prefer). Full suite: 320 passing.

A new MongoDB connection inherited ssl_mode "prefer" (the Postgres default).
The Mongo driver reads `tls: ssl_mode != "disable"`, so "prefer" flipped TLS
on and the handshake failed against a plain, non-TLS local Mongo — surfacing
as "Test failed".

Encode an ssl default per engine in the registry (Mongo → "disable", SQL
engines → "prefer") and snap ssl_mode on engine change, unless the user picked
a non-default mode. Users with a TLS Mongo just flip SSL on.
@oesukam
oesukam merged commit acb82fa into main Aug 6, 2026
6 checks passed
@oesukam
oesukam deleted the fix/mongo-tls-default branch August 6, 2026 13:21
@oesukam oesukam mentioned this pull request Aug 6, 2026
oesukam added a commit that referenced this pull request Aug 6, 2026
Version bump for the **v0.4.0** release: `0.3.0 → 0.4.0` in
`tauri.conf.json`, `Cargo.toml`, and `Cargo.lock`.

## What's in v0.4.0 (since v0.3.0)

**Features**
- MongoDB support: JS scripting, table-data browse/edit/insert/delete,
connection URL, TLS handling (#101, #103, #105)
- Engine registry — per-engine metadata drives the connection form,
queries, display (#103)
- Rail sessions behave like tabs: click selects, right-click to close,
dim inactive, reconnect on click (#104)
- Row count + query timer moved to a footer below the grid, for both
table-data and SQL tabs (#108, #109)

**Fixes**
- Grid fills the pane for few-column tables; no open blink (#106)
- Edit-connection opens the real connection; Mongo honors its pinned
database (#107)
- Startup white-flash eliminated (dark window bg + pre-render tab
hydration) (#110)
- Mongo defaults to TLS-off so a local Mongo connects (#105)
- Actionable commitlint PR-title error (#102); release gated on
lint/typecheck/tests (#100)

## Gate

lint (0 errors), typecheck (CI-style clean), 321 unit tests, frontend
build — all green locally.

After merge, the Release workflow is triggered with `publish=false` to
produce a **draft** release for review.
oesukam added a commit that referenced this pull request Aug 22, 2026
Version bump for the **v0.4.0** release: `0.3.0 → 0.4.0` in
`tauri.conf.json`, `Cargo.toml`, and `Cargo.lock`.

## What's in v0.4.0 (since v0.3.0)

**Features**
- MongoDB support: JS scripting, table-data browse/edit/insert/delete,
connection URL, TLS handling (#101, #103, #105)
- Engine registry — per-engine metadata drives the connection form,
queries, display (#103)
- Rail sessions behave like tabs: click selects, right-click to close,
dim inactive, reconnect on click (#104)
- Row count + query timer moved to a footer below the grid, for both
table-data and SQL tabs (#108, #109)

**Fixes**
- Grid fills the pane for few-column tables; no open blink (#106)
- Edit-connection opens the real connection; Mongo honors its pinned
database (#107)
- Startup white-flash eliminated (dark window bg + pre-render tab
hydration) (#110)
- Mongo defaults to TLS-off so a local Mongo connects (#105)
- Actionable commitlint PR-title error (#102); release gated on
lint/typecheck/tests (#100)

## Gate

lint (0 errors), typecheck (CI-style clean), 321 unit tests, frontend
build — all green locally.

After merge, the Release workflow is triggered with `publish=false` to
produce a **draft** release for review.
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.

1 participant