Meilenstein 4: Rate-Limit, Audit-Log und Backup
- Login-Rate-Limit (5 pro Benutzername, 20 pro IP in 15 Minuten), in SQLite gespeichert - Audit-Log für Login, Fehlversuche, Logout und alle Änderungen an Verbindungen; fremde private Einträge bleiben verborgen; API /api/audit und Ansicht im Frontend - scripts/backup.sh: konsistente Kopie per SQLite-Backup-API, Integritätsprüfung, gzip, Rechte 600, Aufräumen nach N Tagen - Tests für Rate-Limit und Audit-Log, SETUP.md ergänzt Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
37a60fc62a
commit
64b3dfbb08
15 files changed
+540
-11
No files matched your search
+2
-1
@@ -7,7 +7,7 @@ from fastapi.staticfiles import StaticFiles
|
||||
|
||||
from .config import PROJEKT_ROOT
|
||||
from .db import init_db
|
||||
from .routes import auth_routes, connections
|
||||
from .routes import audit_routes, auth_routes, connections
|
||||
|
||||
|
||||
@asynccontextmanager
|
||||
@@ -34,6 +34,7 @@ async def sicherheits_header(request, call_next):
|
||||
|
||||
app.include_router(auth_routes.router)
|
||||
app.include_router(connections.router)
|
||||
app.include_router(audit_routes.router)
|
||||
|
||||
# Frontend zuletzt einhängen, damit /api/* Vorrang hat
|
||||
app.mount("/", StaticFiles(directory=PROJEKT_ROOT / "frontend", html=True), name="frontend")
|
||||
Reference in new issue
Block a user