feat(crowdsec): IDS ein-/ausschalten via Switch — v1.2.63

- system.go: ServiceToggle-Endpoint (POST /system/service-toggle)
  start/stop + enable/disable für crowdsec + crowdsec-firewall-bouncer
- system.go: crowdsec + crowdsec-firewall-bouncer in servicesToCheck
- postinst: sudoers-Einträge für systemctl start/stop/enable/disable
  beider CrowdSec-Units
- UI: Switch im StatusStrip für Agent + Bouncer, getrennt schaltbar,
  disabled wenn CrowdSec nicht installiert oder Viewer-Rolle

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Debian
2026-06-01 22:17:22 +02:00
parent 112a945b5c
commit 414dad6b3b
4 changed files with 111 additions and 19 deletions

View File

@@ -165,6 +165,15 @@ edgeguard ALL=(root) NOPASSWD: /usr/bin/cscli collections list -o json
edgeguard ALL=(root) NOPASSWD: /usr/bin/cscli collections install *
edgeguard ALL=(root) NOPASSWD: /usr/bin/cscli collections remove *
edgeguard ALL=(root) NOPASSWD: /usr/bin/cscli version
# CrowdSec service toggle (start/stop/enable/disable)
edgeguard ALL=(root) NOPASSWD: /usr/bin/systemctl start crowdsec.service
edgeguard ALL=(root) NOPASSWD: /usr/bin/systemctl stop crowdsec.service
edgeguard ALL=(root) NOPASSWD: /usr/bin/systemctl enable crowdsec.service
edgeguard ALL=(root) NOPASSWD: /usr/bin/systemctl disable crowdsec.service
edgeguard ALL=(root) NOPASSWD: /usr/bin/systemctl start crowdsec-firewall-bouncer.service
edgeguard ALL=(root) NOPASSWD: /usr/bin/systemctl stop crowdsec-firewall-bouncer.service
edgeguard ALL=(root) NOPASSWD: /usr/bin/systemctl enable crowdsec-firewall-bouncer.service
edgeguard ALL=(root) NOPASSWD: /usr/bin/systemctl disable crowdsec-firewall-bouncer.service
SUDOERS
# ── Distro-Conf-Includes für die per-Service Renderer ─────────