Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,8 @@ export function CustomSetup({ integration }: { integration: Integration }) {
/>
</label>

{/* TLS needs certificates loaded first. */}
{proto === 'tls' && (
{/* TLS and HTTPS need certificates loaded first. */}
{(proto === 'tls' || proto === 'https') && (
<div className="mb-3">
<p className="mb-1.5 text-[11px] font-medium text-muted-foreground">{t(`${ROOT}.choose.tlsFirst`)}</p>
<CodeBlock code={tlsCertsCmd} />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
<Section title={t(`${SHARED}.httpsCerts.title`)} step={step}>
<p className="mb-2 text-sm text-foreground/90">{t(`${SHARED}.httpsCerts.body`, { port })}</p>
<CodeBlock code={loadCmd} />
<p className="mt-2 rounded-md bg-muted/40 px-3 py-2 text-[11px] text-muted-foreground">
{t(`${SHARED}.tls.step1Note`)}
</p>
</Section>
)
}

// ── Forwarder install section ─────────────────────────────────────────────────

export function ForwarderInstall({ source }: { source: string }) {
Expand Down
Original file line number Diff line number Diff line change
@@ -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'
Expand All @@ -16,7 +16,9 @@ function GithubGuide({ module: _module }: { module: Integration }) {

return (
<ForwarderGuide source={t(`${ROOT}.source`)} port={PORT} sourceType="github" hideTLS>
<Section title={t(`${ROOT}.step1.title`)} step={2}>
<HttpsCertsSection step={2} port={PORT} />

<Section title={t(`${ROOT}.step1.title`)} step={3}>
<p className="mb-2 text-sm text-foreground/90">{t(`${ROOT}.step1.body`)}</p>
<CodeBlock code="sudo /opt/utmstack-forwarder/utmstack_forwarder enable-integration github https" />
<p className="mt-2 rounded-md bg-amber-500/10 border border-amber-500/30 px-3 py-2 text-[11px] text-amber-700 dark:text-amber-400">
Expand All @@ -28,7 +30,7 @@ function GithubGuide({ module: _module }: { module: Integration }) {
<p className="text-sm text-foreground/90">{t(`${ROOT}.certWarning.body`)}</p>
</Section>

<Section title={t(`${ROOT}.step2.title`)} step={3}>
<Section title={t(`${ROOT}.step2.title`)} step={4}>
<p className="mb-3 text-sm text-foreground/90">{t(`${ROOT}.step2.body`)}</p>
<img
src={`${IMG}/webhook.png`}
Expand Down
4 changes: 4 additions & 0 deletions frontend/src/shared/i18n/locales/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -2705,6 +2705,10 @@
"step1Note": "Ein optionales CA-Zertifikat kann als drittes Argument hinzugefügt werden. Lassen Sie es weg, um das Blattzertifikat als CA zu verwenden.",
"step2": "2 · Listener mit TLS erneut aktivieren"
},
"httpsCerts": {
"title": "TLS-Zertifikat auf den Forwarder laden",
"body": "Diese Integration verwendet einen HTTPS-Listener auf Port {{port}}, daher müssen vor der Aktivierung ein Zertifikat und ein Schlüssel auf dem Forwarder geladen werden:"
},
"uninstall": {
"title": "Optional – Forwarder deinstallieren",
"body": "Führen Sie diesen Befehl auf dem Host aus, auf dem der Forwarder installiert ist, um den Dienst zu beenden und alle zugehörigen Dateien zu entfernen."
Expand Down
4 changes: 4 additions & 0 deletions frontend/src/shared/i18n/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -2740,6 +2740,10 @@
"step1Note": "An optional CA certificate can be added as a third argument. Omit it to use the leaf certificate as CA.",
"step2": "2 · Re-enable the listener using TLS"
},
"httpsCerts": {
"title": "Load the TLS certificate on the Forwarder",
"body": "This integration uses an HTTPS listener on port {{port}}, so the Forwarder needs a certificate and key loaded before enabling it:"
},
"uninstall": {
"title": "Optional — Uninstall the Forwarder",
"body": "Run this command on the host where the Forwarder is installed to stop the service and remove all its files."
Expand Down
4 changes: 4 additions & 0 deletions frontend/src/shared/i18n/locales/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -1807,6 +1807,10 @@
"step1Note": "Puedes agregar un certificado CA como tercer argumento. Si se omite, se usa el certificado hoja como CA.",
"step2": "2 · Rehabilitar el listener con TLS"
},
"httpsCerts": {
"title": "Carga el certificado TLS en el Forwarder",
"body": "Esta integración usa un listener HTTPS en el puerto {{port}}, por lo que el Forwarder necesita un certificado y una clave cargados antes de habilitarla:"
},
"uninstall": {
"title": "Opcional — Desinstalar el Forwarder",
"body": "Ejecuta este comando en el host donde está instalado el Forwarder para detener el servicio y eliminar todos sus archivos."
Expand Down
4 changes: 4 additions & 0 deletions frontend/src/shared/i18n/locales/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -2705,6 +2705,10 @@
"step1Note": "Un certificat CA facultatif peut être ajouté comme troisième argument. Omettez-le pour utiliser le certificat feuille comme CA.",
"step2": "2 · Réactiver le listener avec TLS"
},
"httpsCerts": {
"title": "Chargez le certificat TLS sur le Forwarder",
"body": "Cette intégration utilise un listener HTTPS sur le port {{port}}, le Forwarder a donc besoin d'un certificat et d'une clé chargés avant de l'activer :"
},
"uninstall": {
"title": "Optionnel — Désinstaller le Forwarder",
"body": "Exécutez cette commande sur l'hôte où le Forwarder est installé pour arrêter le service et supprimer tous ses fichiers."
Expand Down
4 changes: 4 additions & 0 deletions frontend/src/shared/i18n/locales/it.json
Original file line number Diff line number Diff line change
Expand Up @@ -2705,6 +2705,10 @@
"step1Note": "È possibile aggiungere un certificato CA facoltativo come terzo argomento. Omettilo per utilizzare il certificato foglia come CA.",
"step2": "2 · Riabilita il listener usando TLS"
},
"httpsCerts": {
"title": "Carica il certificato TLS sul Forwarder",
"body": "Questa integrazione usa un listener HTTPS sulla porta {{port}}, quindi il Forwarder richiede un certificato e una chiave caricati prima di abilitarla:"
},
"uninstall": {
"title": "Facoltativo — Disinstalla il Forwarder",
"body": "Esegui questo comando sull'host in cui è installato il Forwarder per interrompere il servizio e rimuovere tutti i suoi file."
Expand Down
4 changes: 4 additions & 0 deletions frontend/src/shared/i18n/locales/pt.json
Original file line number Diff line number Diff line change
Expand Up @@ -1807,6 +1807,10 @@
"step1Note": "Um certificado CA opcional pode ser adicionado como terceiro argumento. Se omitido, o certificado folha é usado como CA.",
"step2": "2 · Reativar o listener com TLS"
},
"httpsCerts": {
"title": "Carregue o certificado TLS no Forwarder",
"body": "Esta integração usa um listener HTTPS na porta {{port}}, então o Forwarder precisa de um certificado e uma chave carregados antes de habilitá-la:"
},
"uninstall": {
"title": "Opcional — Desinstalar o Forwarder",
"body": "Execute este comando no host onde o Forwarder está instalado para parar o serviço e remover todos os seus arquivos."
Expand Down
4 changes: 4 additions & 0 deletions frontend/src/shared/i18n/locales/ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -2605,6 +2605,10 @@
"step1Note": "Дополнительный сертификат CA можно передать третьим аргументом. Если его опустить, в роли CA будет использован конечный сертификат.",
"step2": "2 · Повторно включить прослушиватель с TLS"
},
"httpsCerts": {
"title": "Загрузите TLS-сертификат на Forwarder",
"body": "Эта интеграция использует HTTPS-прослушиватель на порту {{port}}, поэтому перед её включением на Forwarder необходимо загрузить сертификат и ключ:"
},
"uninstall": {
"title": "Дополнительно — Удалить Forwarder",
"body": "Выполните эту команду на хосте, где установлен Forwarder, чтобы остановить службу и удалить все её файлы."
Expand Down
Loading