[HIGH] Agent-WS-Auth ohne Rate-Limit/Lockout — Token-Bruteforce gegen Root-Kanal (public) #181
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Teil des Public-Readiness-Epics. HIGH (sobald Agent-WS public).
Der Agent-WS (
server/websocket/agent_ws.py:97-108) ist "public, token-auth only". Bei oeffentlicher Erreichbarkeit ohne Rate-Limit/Lockout ist Token-Bruteforce gegen den Root-Command-Kanal moeglich. Aktuell: bei Fehlschlag nurlogger.warning(...), kein Zaehler, kein Delay, kein Block.Fix
Akzeptanz
Branch
feat/agent-ws-auth-ratelimit#181 umgesetzt · Commit
d748c17(Backend-only, kein Agent-Build). Issue bleibt offen.Setzt auf dem neuen #185-Handshake auf.
websocket/auth_ratelimit.py: per-Quell-IP Sliding-Window (5 Fehlschlaege/60s → Block), exponentielles Backoff (30s→60s→120s… Cap 1h), Erfolg setzt den Zaehler zurueck. In-Memory.agent_ws.py: geblockte IP wird vor jeder Auth-Arbeit abgewiesen (kein Challenge/DB-Hit). Strukturiertes, fail2ban-parsebares Log:agent-auth-fail ip=<IP> reason=<grund>+agent-auth-block ip=<IP> retry_in=<n>s. Konstante Antwortzeit (kein Timing-Orakel).wiki/Security.md: Log-Format + Beispiel-fail2ban-Filter (failregex = ^.*agent-auth-fail ip=<HOST> reason=.*$) + Jail.Akzeptanz: wiederholte Fehlversuche einer IP werden gedrosselt/geblockt ✅ · Log fail2ban-parsebar ✅. Wirksam nach Backend-Rebuild (zusammen mit #185).
Verifiziert @
d748c17→ erfüllt, wird geschlossen.Rate-Limit greift VOR Challenge/DB (agent_ws.py:~120,
auth_limiter.is_blocked); Lockout + fail2ban-parsebares Log; wiki/Security.md ✓