diff --git a/web/src/components/CrowdSecComponent.tsx b/web/src/components/CrowdSecComponent.tsx index fe59f73..0a17f7e 100644 --- a/web/src/components/CrowdSecComponent.tsx +++ b/web/src/components/CrowdSecComponent.tsx @@ -9,10 +9,9 @@ import { Alert, AlertDescription } from './ui/alert'; import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from './ui/select'; import { ShieldAlert, Loader2, AlertCircle, CheckCircle, Ban, X, Trash2, - BookOpen, Shield, Activity, Zap, RefreshCw, Globe, + BookOpen, Shield, Activity, Zap, RefreshCw, Globe, Terminal, } from 'lucide-react'; import { Badge } from './ui/badge'; -// Instance provisioning removed — Central-only mode import { useCrowdSec } from '../hooks/useCrowdSec'; import type { AddDecisionRequest, CrowdSecAlert } from '../services/api/networking'; @@ -562,9 +561,8 @@ export function CrowdSecComponent() {

- Agents are CrowdSec engines running inside your k8s clusters. They analyze - logs, detect threats, and report to this LAPI. Each provisioned Wild Cloud instance registers - one agent here. + Agents are CrowdSec engines that analyze logs, detect threats, and report + to this LAPI. Each machine or cluster running CrowdSec registers an agent here.

{status.machines.length === 0 ? (

No agents registered. Provision an instance below.

@@ -679,6 +677,42 @@ export function CrowdSecComponent() {
+ {/* Registering Agents */} + + +
+ + Registering New Agents +
+
+ +

+ To connect a new CrowdSec agent to this LAPI, register a machine and bouncer via the API, + then configure the remote agent to use these credentials. +

+
+

1. Register a machine (agent)

+
+{`curl -X POST /api/v1/crowdsec/machines \\
+  -H "Content-Type: application/json" \\
+  -d '{"name": "my-agent", "password": "a-strong-password"}'`}
+                
+
+
+

2. Register a bouncer

+
+{`curl -X POST /api/v1/crowdsec/bouncers \\
+  -H "Content-Type: application/json" \\
+  -d '{"name": "my-bouncer", "apiKey": "a-bouncer-api-key"}'`}
+                
+
+

+ Then configure the remote CrowdSec agent with the LAPI URL (http://{''}:8080) + and the credentials above. The agent will appear in the Registered Agents list once it connects. +

+
+
+ )}