From fe20e6f4a8fa3bb990ca186188a28e70283a1105 Mon Sep 17 00:00:00 2001 From: Gauthier Date: Tue, 16 Nov 2021 17:18:40 +0800 Subject: [PATCH] Update Kafka configuration types According to https://nodejs.org/dist/latest-v8.x/docs/api/tls.html#tls_tls_createsecurecontext_options the `ssl` options `ca`, `key`, and `cert` are all optional. In my case, i need to pass `rejectUnauthorized`, but I can't do so as the backend expects a `key`. Passing an empty string works, but everything becomes redacted in my log because of that. Signed-off-by: Gauthier Roebroeck --- plugins/kafka-backend/config.d.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/kafka-backend/config.d.ts b/plugins/kafka-backend/config.d.ts index ee29560809..1417c1fe63 100644 --- a/plugins/kafka-backend/config.d.ts +++ b/plugins/kafka-backend/config.d.ts @@ -33,8 +33,9 @@ export interface Config { | { ca: string[]; /** @visibility secret */ - key: string; + key?: string; cert: string; + rejectUnauthorized?: boolean; } | boolean; /**