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
{{ message }}
Repository navigation
Commit 4ddb26e
Browse filesBrowse the repository at this point in the historyBrowse files
fix(sqlserver): support verify-full TLS mode (#443)
* fix(sqlserver): support verify-full TLS mode
Enable certificate and hostname verification when sslmode=verify-full is explicit. Accept the mode in TOML, document Node trust configuration, and add focused parser and configuration tests. Preserve existing defaults and parsing behavior.
* fix(sqlserver): reject invalid and duplicate sslmode values
Copy file name to clipboardExpand all lines: CLAUDE.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -176,7 +176,7 @@ outside TOML and follow the same order:
176
176
- SQL Server (NTLM): `sqlserver://user:password@localhost:1433/dbname?authentication=ntlm&domain=MYDOMAIN`
177
177
- Oracle: `oracle://user:password@localhost:1521/FREEPDB1` (path is the service name; `?sid=ORCL` for a SID; `sslmode=require`/`verify-full` switch to TCPS)
178
178
- SQLite: `sqlite:///path/to/database.db` or `sqlite:///:memory:`
179
-
- SSL modes: `sslmode=disable` (no SSL), `sslmode=require` (SSL without cert verification), `sslmode=verify-ca` (PostgreSQL only, CA verification), `sslmode=verify-full` (PostgreSQLand Oracle, CA + hostname verification). Use`sslrootcert` to specify CA certificate path for verify modes. PostgreSQL client certificate auth: `sslcert` + `sslkey` (PEM, unencrypted, both required; `sslmode` must be `require`, `verify-ca` or `verify-full` — `disable` or unset is rejected) in the DSN or TOML source.
179
+
- SSL modes: `sslmode=disable` (no SSL), `sslmode=require` (SSL without cert verification), `sslmode=verify-ca` (PostgreSQL only, CA verification), `sslmode=verify-full` (PostgreSQL, SQL Server and Oracle, CA + hostname verification). On PostgreSQL, use`sslrootcert` to specify CA certificate path for verify modes. PostgreSQL client certificate auth: `sslcert` + `sslkey` (PEM, unencrypted, both required; `sslmode` must be `require`, `verify-ca` or `verify-full` — `disable` or unset is rejected) in the DSN or TOML source.
| Oracle | ✅ | ✅ | ❌ | ✅ | Plain TCP (`tcps://` only with `require`/`verify-full`) |
273
273
| SQLite | ❌ | ❌ | ❌ | ❌ | N/A (file-based) |
274
274
275
275
-`sslmode=disable`: All SSL/TLS encryption is turned off. Data is transmitted in plaintext.
276
276
-`sslmode=require`: Connection is encrypted, but the server's certificate is not verified.
277
277
-`sslmode=verify-ca`: SSL with CA certificate verification, but no hostname check. **PostgreSQL only.** Use `sslrootcert` to specify the CA certificate path.
278
-
-`sslmode=verify-full`: SSL with CA certificate and hostname verification. **PostgreSQLand Oracle.** On PostgreSQL use `sslrootcert` to specify the CA certificate path; on Oracle the server certificate is validated against the system trust store.
278
+
-`sslmode=verify-full`: SSL with CA certificate and hostname verification. **PostgreSQL, SQL Server, and Oracle.** On PostgreSQL use `sslrootcert` to specify the CA certificate path. SQL Server uses Node's configured trust roots; set `NODE_EXTRA_CA_CERTS` to a PEM CA bundle before process startup if an additional CA is needed. Oracle uses the system trust store.
279
279
280
280
<Note>
281
281
Unlike libpq, DBHub does not upgrade `sslmode=require` to `verify-ca` when `sslrootcert` is present: that combination is rejected at startup, so set `sslmode=verify-ca` explicitly. libpq's `allow` and `prefer` modes are not supported for PostgreSQL either; use `require` (or a verify mode) instead.
Copy file name to clipboardExpand all lines: docs/config/toml.mdx
+4-2Lines changed: 4 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -363,9 +363,11 @@ Sources define database connections. Each source represents a database that DBHu
363
363
-`disable` - No SSL/TLS encryption. Data is transmitted in plaintext.
364
364
-`require` - SSL/TLS encryption enabled, but server certificate is not verified.
365
365
-`verify-ca` - SSL with CA certificate verification (no hostname check). **PostgreSQL only.**
366
-
-`verify-full` - SSL with CA certificate and hostname verification. **PostgreSQL and Oracle.**
366
+
-`verify-full` - SSL with CA certificate and hostname verification. **PostgreSQL, SQL Server, and Oracle.**
367
367
368
-
Supported databases: PostgreSQL, MySQL, MariaDB, SQL Server, Oracle (not applicable to SQLite). `verify-ca` is PostgreSQL only; `verify-full` is supported on PostgreSQL and Oracle (Oracle validates the server certificate against the system trust store, and `sslrootcert` is PostgreSQL only).
368
+
Supported databases: PostgreSQL, MySQL, MariaDB, SQL Server, Oracle (not applicable to SQLite). `verify-ca` is PostgreSQL only; `verify-full` is supported on PostgreSQL, SQL Server and Oracle (Oracle validates the server certificate against the system trust store, and `sslrootcert` is PostgreSQL only).
369
+
370
+
SQL Server `verify-full` uses Node's trust roots. Set `NODE_EXTRA_CA_CERTS` to a PEM CA bundle before process startup if an additional CA is needed.
aws_region?: string;// AWS region required when aws_iam_auth is enabled
38
38
aws_profile?: string;// Named AWS shared-config profile for RDS IAM auth
39
39
instanceName?: string;// SQL Server named instance support
40
-
sslmode?: "disable"|"require"|"verify-ca"|"verify-full";// SSL mode for network databases (not applicable to SQLite, verify-* only applicable for PostgreSQL)
41
-
sslrootcert?: string;// CA certificate path (requires verify-ca or verify-full)
0 commit comments