taurusdb-core 0.5.0-rc.8 → 0.5.0-rc.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/config/schema.js
CHANGED
|
@@ -24,7 +24,7 @@ const SecuritySchema = z
|
|
|
24
24
|
.object({
|
|
25
25
|
dynamicTargetsEnabled: z.boolean().default(true),
|
|
26
26
|
recycleBinRestoreEnabled: z.boolean().default(true),
|
|
27
|
-
requireTls: z.boolean().default(
|
|
27
|
+
requireTls: z.boolean().default(false),
|
|
28
28
|
approvalSecretPath: z.string().min(1).optional(),
|
|
29
29
|
approvalTtlSeconds: z.number().int().positive().max(3600).default(300),
|
|
30
30
|
credentialIdleTtlMinutes: z.number().int().positive().max(30).default(30),
|
|
@@ -20,12 +20,12 @@ async function resolveTls(tls, secretResolver, host, requireTls) {
|
|
|
20
20
|
if (requireTls && tls?.enabled === false) {
|
|
21
21
|
throw new ConnectionPoolError("TLS is required by server policy and cannot be disabled for this datasource.");
|
|
22
22
|
}
|
|
23
|
-
if (requireTls && tls?.rejectUnauthorized === false) {
|
|
24
|
-
throw new ConnectionPoolError("TLS certificate verification is required by server policy.");
|
|
25
|
-
}
|
|
26
23
|
const resolved = {
|
|
27
24
|
enabled: tls?.enabled ?? true,
|
|
28
|
-
|
|
25
|
+
// Dynamic cloud targets are commonly bound by public IP while the server
|
|
26
|
+
// certificate is issued to a DNS name. When TLS is explicitly enabled,
|
|
27
|
+
// make CA/hostname verification a separate profile opt-in.
|
|
28
|
+
rejectUnauthorized: tls?.rejectUnauthorized ?? false,
|
|
29
29
|
servername: tls?.servername ?? (isIP(host) === 0 ? host : undefined),
|
|
30
30
|
};
|
|
31
31
|
if (tls?.ca) {
|