From 4d3ab040bfe8d1146f5ef159d2f5826fec385e97 Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Thu, 15 Jun 2023 11:06:01 +0100 Subject: [PATCH] Support postgres client certificates --- packages/server/src/integrations/postgres.ts | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/packages/server/src/integrations/postgres.ts b/packages/server/src/integrations/postgres.ts index 9b2f94db8f..b1f20f97ec 100644 --- a/packages/server/src/integrations/postgres.ts +++ b/packages/server/src/integrations/postgres.ts @@ -42,6 +42,8 @@ interface PostgresConfig { schema: string ssl?: boolean ca?: string + clientKey?: string + clientCert?: string rejectUnauthorized?: boolean } @@ -98,6 +100,19 @@ const SCHEMA: Integration = { required: false, }, ca: { + display: "Server CA", + type: DatasourceFieldType.LONGFORM, + default: false, + required: false, + }, + clientKey: { + display: "Client key", + type: DatasourceFieldType.LONGFORM, + default: false, + required: false, + }, + clientCert: { + display: "Client cert", type: DatasourceFieldType.LONGFORM, default: false, required: false, @@ -150,6 +165,8 @@ class PostgresIntegration extends Sql implements DatasourcePlus { ? { rejectUnauthorized: this.config.rejectUnauthorized, ca: this.config.ca, + key: this.config.clientKey, + cert: this.config.clientCert, } : undefined, }