feat: add CrowdSec API key status handling and warning component
- Implemented `getCrowdsecKeyStatus` API call to retrieve the current status of the CrowdSec API key. - Created `CrowdSecKeyWarning` component to display warnings when the API key is rejected. - Integrated `CrowdSecKeyWarning` into the Security page, ensuring it only shows when relevant. - Updated i18n initialization in main.tsx to prevent race conditions during rendering. - Enhanced authentication setup in tests to handle various response statuses more robustly. - Adjusted security tests to accept broader error responses for import validation.
This commit is contained in:
@@ -259,7 +259,16 @@
|
||||
"disabledDescription": "Intrusion Prevention System mit Community-Bedrohungsintelligenz",
|
||||
"processRunning": "Läuft (PID {{pid}})",
|
||||
"processStopped": "Prozess gestoppt",
|
||||
"toggleTooltip": "CrowdSec-Schutz umschalten"
|
||||
"toggleTooltip": "CrowdSec-Schutz umschalten",
|
||||
"copyFailed": "Kopieren des API-Schlüssels fehlgeschlagen",
|
||||
"keyWarning": {
|
||||
"title": "CrowdSec API-Schlüssel aktualisiert",
|
||||
"description": "Ihr konfigurierter API-Schlüssel wurde von CrowdSec LAPI abgelehnt. Ein neuer Schlüssel wurde automatisch generiert, um den Schutz wiederherzustellen.",
|
||||
"instructions": "Aktualisieren Sie Ihre docker-compose.yml mit dem neuen Schlüssel, um eine erneute Registrierung beim Container-Neustart zu verhindern:",
|
||||
"copyButton": "Kopieren",
|
||||
"copied": "Schlüssel in Zwischenablage kopiert",
|
||||
"restartNote": "Nach der Aktualisierung der docker-compose.yml starten Sie den Container neu, damit die Änderung wirksam wird."
|
||||
}
|
||||
},
|
||||
"acl": {
|
||||
"title": "Zugriffskontrolle",
|
||||
|
||||
@@ -277,7 +277,15 @@
|
||||
"notRegistered": "Not Registered",
|
||||
"sourceEnvVar": "From environment variable",
|
||||
"sourceFile": "From file",
|
||||
"keyStoredAt": "Key stored at"
|
||||
"keyStoredAt": "Key stored at",
|
||||
"keyWarning": {
|
||||
"title": "CrowdSec API Key Updated",
|
||||
"description": "Your configured API key was rejected by CrowdSec LAPI. A new key has been automatically generated to restore protection.",
|
||||
"instructions": "Update your docker-compose.yml with the new key to prevent re-registration on container restart:",
|
||||
"copyButton": "Copy",
|
||||
"copied": "Key copied to clipboard",
|
||||
"restartNote": "After updating docker-compose.yml, restart the container for the change to take effect."
|
||||
}
|
||||
},
|
||||
"acl": {
|
||||
"title": "Access Control",
|
||||
|
||||
@@ -259,7 +259,16 @@
|
||||
"disabledDescription": "Sistema de Prevención de Intrusiones impulsado por inteligencia de amenazas comunitaria",
|
||||
"processRunning": "Ejecutando (PID {{pid}})",
|
||||
"processStopped": "Proceso detenido",
|
||||
"toggleTooltip": "Alternar protección CrowdSec"
|
||||
"toggleTooltip": "Alternar protección CrowdSec",
|
||||
"copyFailed": "Error al copiar la clave API",
|
||||
"keyWarning": {
|
||||
"title": "Clave API de CrowdSec Actualizada",
|
||||
"description": "Su clave API configurada fue rechazada por CrowdSec LAPI. Se ha generado automáticamente una nueva clave para restaurar la protección.",
|
||||
"instructions": "Actualice su docker-compose.yml con la nueva clave para evitar el re-registro al reiniciar el contenedor:",
|
||||
"copyButton": "Copiar",
|
||||
"copied": "Clave copiada al portapapeles",
|
||||
"restartNote": "Después de actualizar docker-compose.yml, reinicie el contenedor para que el cambio surta efecto."
|
||||
}
|
||||
},
|
||||
"acl": {
|
||||
"title": "Control de Acceso",
|
||||
|
||||
@@ -259,7 +259,16 @@
|
||||
"disabledDescription": "Système de Prévention des Intrusions alimenté par le renseignement communautaire sur les menaces",
|
||||
"processRunning": "En cours d'exécution (PID {{pid}})",
|
||||
"processStopped": "Processus arrêté",
|
||||
"toggleTooltip": "Basculer la protection CrowdSec"
|
||||
"toggleTooltip": "Basculer la protection CrowdSec",
|
||||
"copyFailed": "Échec de la copie de la clé API",
|
||||
"keyWarning": {
|
||||
"title": "Clé API CrowdSec Mise à Jour",
|
||||
"description": "Votre clé API configurée a été rejetée par CrowdSec LAPI. Une nouvelle clé a été automatiquement générée pour restaurer la protection.",
|
||||
"instructions": "Mettez à jour votre docker-compose.yml avec la nouvelle clé pour éviter une ré-inscription au redémarrage du conteneur :",
|
||||
"copyButton": "Copier",
|
||||
"copied": "Clé copiée dans le presse-papiers",
|
||||
"restartNote": "Après avoir mis à jour docker-compose.yml, redémarrez le conteneur pour que le changement prenne effet."
|
||||
}
|
||||
},
|
||||
"acl": {
|
||||
"title": "Contrôle d'Accès",
|
||||
|
||||
@@ -259,7 +259,16 @@
|
||||
"disabledDescription": "由社区威胁情报驱动的入侵防御系统",
|
||||
"processRunning": "运行中 (PID {{pid}})",
|
||||
"processStopped": "进程已停止",
|
||||
"toggleTooltip": "切换 CrowdSec 保护"
|
||||
"toggleTooltip": "切换 CrowdSec 保护",
|
||||
"copyFailed": "复制API密钥失败",
|
||||
"keyWarning": {
|
||||
"title": "CrowdSec API密钥已更新",
|
||||
"description": "您配置的API密钥被CrowdSec LAPI拒绝。已自动生成新密钥以恢复保护。",
|
||||
"instructions": "使用新密钥更新您的docker-compose.yml,以防止容器重启时重新注册:",
|
||||
"copyButton": "复制",
|
||||
"copied": "密钥已复制到剪贴板",
|
||||
"restartNote": "更新docker-compose.yml后,重启容器使更改生效。"
|
||||
}
|
||||
},
|
||||
"acl": {
|
||||
"title": "访问控制",
|
||||
|
||||
Reference in New Issue
Block a user