From 00ace7583eef8d9acc151c2fcc431b0c3df823c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20S=C3=A1nchez?= Date: Mon, 6 Jul 2026 10:12:23 -0600 Subject: [PATCH] fix[frontend](integrations): added https certificates load before enabling integrations where need --- .../components/setup/CustomSetup.tsx | 4 ++-- .../setup/collector/ForwarderGuide.tsx | 19 +++++++++++++++++++ .../setup/collector/collectors/github.tsx | 8 +++++--- frontend/src/shared/i18n/locales/de.json | 4 ++++ frontend/src/shared/i18n/locales/en.json | 4 ++++ frontend/src/shared/i18n/locales/es.json | 4 ++++ frontend/src/shared/i18n/locales/fr.json | 4 ++++ frontend/src/shared/i18n/locales/it.json | 4 ++++ frontend/src/shared/i18n/locales/pt.json | 4 ++++ frontend/src/shared/i18n/locales/ru.json | 4 ++++ 10 files changed, 54 insertions(+), 5 deletions(-) diff --git a/frontend/src/features/integrations/components/setup/CustomSetup.tsx b/frontend/src/features/integrations/components/setup/CustomSetup.tsx index b73c0f384..9f03765d0 100644 --- a/frontend/src/features/integrations/components/setup/CustomSetup.tsx +++ b/frontend/src/features/integrations/components/setup/CustomSetup.tsx @@ -117,8 +117,8 @@ export function CustomSetup({ integration }: { integration: Integration }) { /> - {/* TLS needs certificates loaded first. */} - {proto === 'tls' && ( + {/* TLS and HTTPS need certificates loaded first. */} + {(proto === 'tls' || proto === 'https') && (

{t(`${ROOT}.choose.tlsFirst`)}

diff --git a/frontend/src/features/integrations/components/setup/collector/ForwarderGuide.tsx b/frontend/src/features/integrations/components/setup/collector/ForwarderGuide.tsx index 4395c5fa9..23b983b0b 100644 --- a/frontend/src/features/integrations/components/setup/collector/ForwarderGuide.tsx +++ b/frontend/src/features/integrations/components/setup/collector/ForwarderGuide.tsx @@ -146,6 +146,25 @@ function TLSSection({ sourceType, port }: { sourceType: string; port: string }) ) } +// ── HTTPS certificates step ─────────────────────────────────────────────────── + +// Required (not collapsible) cert-loading step for collectors whose listener is +// natively HTTPS — same command CustomSetup shows for the tls protocol. +export function HttpsCertsSection({ step, port }: { step: number; port: string }) { + const { t } = useTranslation() + const loadCmd = `/opt/utmstack-forwarder/utmstack_forwarder load-tls-certs /path/to/cert.crt /path/to/key.key` + + return ( +
+

{t(`${SHARED}.httpsCerts.body`, { port })}

+ +

+ {t(`${SHARED}.tls.step1Note`)} +

+
+ ) +} + // ── Forwarder install section ───────────────────────────────────────────────── export function ForwarderInstall({ source }: { source: string }) { diff --git a/frontend/src/features/integrations/components/setup/collector/collectors/github.tsx b/frontend/src/features/integrations/components/setup/collector/collectors/github.tsx index 9740e728d..634d3f419 100644 --- a/frontend/src/features/integrations/components/setup/collector/collectors/github.tsx +++ b/frontend/src/features/integrations/components/setup/collector/collectors/github.tsx @@ -1,6 +1,6 @@ import { useTranslation, Trans } from 'react-i18next' import { registerCollector } from '../registry' -import { ForwarderGuide, forwarderHost } from '../ForwarderGuide' +import { ForwarderGuide, HttpsCertsSection, forwarderHost } from '../ForwarderGuide' import { Section } from '@/features/integrations/components/ui/Section' import { CodeBlock } from '@/features/integrations/components/ui/CodeBlock' import type { Integration } from '@/features/integrations/types' @@ -16,7 +16,9 @@ function GithubGuide({ module: _module }: { module: Integration }) { return ( -
+ + +

{t(`${ROOT}.step1.body`)}

@@ -28,7 +30,7 @@ function GithubGuide({ module: _module }: { module: Integration }) {

{t(`${ROOT}.certWarning.body`)}

-
+

{t(`${ROOT}.step2.body`)}