docs: add moderation/content-scanning page (Issue #18)
+1
@@ -20,6 +20,7 @@
|
||||
| **Monitoring** | [Monitoring.md](Monitoring.md) | ✅ Deployed | Alloy → Prometheus/Loki |
|
||||
| **Element Customization** | [Element-Customization.md](Element-Customization.md) | ✅ Deployed | Themes, Desktop Setup, Admin Panel |
|
||||
| **Room Policies** | [Room-Policies.md](Room-Policies.md) | ✅ Deployed | Retention, Publication, Auto-Join |
|
||||
| **Moderation & Content Scanning** | [Moderation-Content-Scanning.md](Moderation-Content-Scanning.md) | ✅ Draupnir deployed / ⏳ Scanner geplant | Ban-Bot (Issue #18), Media-Scanning (Issue #19) |
|
||||
|
||||
### Operations & Architecture
|
||||
|
||||
|
||||
@@ -0,0 +1,64 @@
|
||||
# Moderation Bot & Content Scanning
|
||||
|
||||
**Status**: ✅ Draupnir deployed (2026-07-29, Closes Issue #18) | ⏳ Content Scanner geplant, noch nicht umgesetzt (Issue #19)
|
||||
**Konfiguration**: `apps/production/draupnir*.yaml`
|
||||
|
||||
## 1. Draupnir (Moderationsbot)
|
||||
|
||||
Community-Nachfolger von Mjolnir. Läuft als eigener Bot-Account (`@draupnir:axion1337.chat`),
|
||||
verwaltet Ban-Listen ("Policy Rooms") und setzt sie in geschützten Räumen durch.
|
||||
|
||||
### Bot-Account & Zugriff (Bootstrap)
|
||||
|
||||
Authentifizierung läuft über MAS (kein klassisches `registration_shared_secret`):
|
||||
|
||||
```bash
|
||||
kubectl exec -it -n matrix deploy/matrix-stack-matrix-authentication-service -- \
|
||||
mas-cli manage register-user draupnir --yes
|
||||
|
||||
kubectl exec -it -n matrix deploy/matrix-stack-matrix-authentication-service -- \
|
||||
mas-cli manage issue-compatibility-token draupnir
|
||||
```
|
||||
|
||||
Token wird manuell per `sops apps/production/draupnir-secret.yaml` eingetragen.
|
||||
|
||||
### Stolpersteine (live gefunden)
|
||||
|
||||
- `gnuxie/draupnir:v2.9.0` crasht mit `initialManager` ("Can't join remote room..."). Die
|
||||
automatische Management-Room-Erstellung funktioniert erst ab **v3.1.0** - deployt.
|
||||
- v3.x braucht ein explizites CLI-Argument statt `NODE_CONFIG_DIR`-Autodiscovery:
|
||||
`args: ["bot", "--draupnir-config", "/data/config/default.yaml"]`.
|
||||
- NetworkPolicy: `matrix-stack-synapse` routet über haproxy, dessen Ingress-Policy
|
||||
standardmäßig nur Traefik erlaubt - eigene `podSelector`-Ausnahme für Draupnir nötig.
|
||||
|
||||
### Verschlüsselter Management-Room
|
||||
|
||||
Standardmäßig unverschlüsselt. Mit `experimentalRustCrypto: true` (Hersteller-Warnung: "not
|
||||
considered production safe", in unserem Test aber fehlerfrei) + manuellem Aktivieren der
|
||||
Raumverschlüsselung in Element (wirkt nicht rückwirkend auf bereits erstellte Räume).
|
||||
|
||||
### Befehle (Kurzreferenz)
|
||||
|
||||
| Befehl | Zweck |
|
||||
|--------|-------|
|
||||
| `status` | Bot-Status |
|
||||
| `rooms add <room>` | Raum unter Schutz stellen (Voraussetzung für Bans!) |
|
||||
| `list create <shortcode> <alias>` | Neue Policy-Liste (automatisch beobachtet + geschützt) |
|
||||
| `ban <user> <liste> <grund>` | 2. Argument = Policy-Liste, NICHT der Ziel-Raum |
|
||||
| `kick <user> <room> <grund>` | Direkter Kick ohne Listen-Umweg |
|
||||
| `rules` | Regeln einer Policy-Liste anzeigen |
|
||||
|
||||
**Live getestet** (2026-07-29): Testraum geschützt, Policy-Liste angelegt, Testnutzer über
|
||||
`ban`+Liste erfolgreich entfernt. Kernmechanismus bestätigt funktionsfähig.
|
||||
|
||||
## 2. Content Scanner (Issue #19, noch nicht umgesetzt)
|
||||
|
||||
`matrix-content-scanner-python` ist ein Proxy, den der **Client** explizit statt der normalen
|
||||
Media-Endpunkte aufrufen muss - weder aktuelles Element Web noch Element X unterstützen das
|
||||
(nur alte, unsupportete Android/iOS-SDKs taten es). Verschlüsselte Anhänge kann Synapse ohnehin
|
||||
nie scannen (kein Schlüssel).
|
||||
|
||||
**Konsequenz**: würde nur manuelle/skriptgesteuerte Admin-Prüfungen ermöglichen, keinen echten
|
||||
Nutzer-Traffic transparent schützen. Echte Absicherung bräuchte einen Client-Fork oder ein
|
||||
eigenes Synapse-`check_media_file_for_spam`-Modul - separater, größerer Aufwand. Details:
|
||||
[[Element-Customization]] und `docs/deployment-guides/06-moderation-content-scanning.md`.
|
||||
Reference in New Issue
Block a user