Skip to content

Add PostgreSQL SSL Mode#78

Merged
debba merged 2 commits intodebba:mainfrom
sycured:pgsslmode
Mar 9, 2026
Merged

Add PostgreSQL SSL Mode#78
debba merged 2 commits intodebba:mainfrom
sycured:pgsslmode

Conversation

@sycured
Copy link
Contributor

@sycured sycured commented Mar 9, 2026

Fix #77

@sycured sycured marked this pull request as ready for review March 9, 2026 04:28
port: 3306,
username: "",
database: "",
ssl_mode: "",
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARNING: State/UI mismatch - initial value is "" but UI shows "prefer"

The select at line 371 uses formData.ssl_mode || "prefer" which displays "prefer" as the default. However, the actual state value is an empty string, which gets sent to the backend and silently fails to parse (falling back to postgres default instead of "prefer").

Suggested change
ssl_mode: "",
ssl_mode: "prefer",

@kilo-code-bot
Copy link

kilo-code-bot bot commented Mar 9, 2026

Code Review Summary

Status: 1 Issue Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 0
WARNING 1
SUGGESTION 0
Issue Details (click to expand)

WARNING

File Line Issue
src/components/ui/NewConnectionModal.tsx 117 State/UI mismatch for ssl_mode default value

The initial state sets ssl_mode: "" but the UI displays "prefer" as the default. This causes the backend to receive an empty string which silently fails to parse, falling back to the postgres default instead of the user's expected "prefer" setting.

Files Reviewed (3 files)
  • src-tauri/src/models.rs - Added ssl_mode field to ConnectionParams struct ✓
  • src-tauri/src/pool_manager.rs - Refactored to use PgConnectOptions with SSL mode support ✓
  • src/components/ui/NewConnectionModal.tsx - Added SSL mode selector for PostgreSQL (1 issue found)

Fix these issues in Kilo Cloud

@debba
Copy link
Owner

debba commented Mar 9, 2026

LGTM

@debba debba merged commit 74cbf48 into debba:main Mar 9, 2026
@sycured sycured deleted the pgsslmode branch March 9, 2026 14:00
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.

[Bug]: TLS connection: bad protocol version when connecting to postgresql via kubectl port-forward

2 participants