feat: API-Key-Auth für Krea-Endpoints (Automation ohne User-Kontext)
- AuthMiddleware: X-Api-Key Header-Prüfung für /api/images/* Routen - Neues Config-Feld KreaApiKey in appsettings.json - Bei gültigem API-Key wird Request ohne Cookie-Auth durchgelassen - Normaler User-Auth funktioniert weiterhin als Fallback - ARCHITECTURE.md + ARCHITECTURE_QUICK.md aktualisiert
This commit is contained in:
1 parent
1b9cc29421
commit
20f96f69d0
4 files changed
+30
-8
No files matched your search
@@ -194,9 +194,10 @@ User-Input → POST /api/chat (SSE)
|
||||
|
||||
1. `POST /api/auth/login` → Token generiert, als `gott_token` HttpOnly Cookie gesetzt
|
||||
2. Jeder `/api/`-Request → `AuthMiddleware` prüft Cookie → setzt `UserId` + `IsAdmin`
|
||||
3. Ausnahmen: Login, Telegram-Webhook und `GET /api/shared/{token}` brauchen kein Auth
|
||||
4. **Impersonate**: Admin kann via `POST /api/admin/users/{id}/impersonate` als anderer User einloggen
|
||||
5. **DefaultPath**: Pro User ein Basis-Ordner (nur vom Admin setzbar), Session-Workspaces sind relativ dazu
|
||||
3. Ausnahmen: Login, Telegram-Webhook, `GET /api/shared/{token}` und Autologin brauchen kein Auth
|
||||
4. **Krea API-Key**: `/api/images/`-Routen akzeptieren `X-Api-Key`-Header (Config: `KreaApiKey`) für Automation ohne User-Kontext
|
||||
5. **Impersonate**: Admin kann via `POST /api/admin/users/{id}/impersonate` als anderer User einloggen
|
||||
6. **DefaultPath**: Pro User ein Basis-Ordner (nur vom Admin setzbar), Session-Workspaces sind relativ dazu
|
||||
|
||||
---
|
||||
|
||||
@@ -208,7 +209,8 @@ User-Input → POST /api/chat (SSE)
|
||||
"MaxIterations": 100, // Max Tool-Loop Iterationen pro Chat
|
||||
"PayloadLogging": false, // API-Payloads loggen (Debug)
|
||||
"PayloadLoggingGzip": false, // Payload-Logs als .gz komprimieren
|
||||
"KreaToken": "" // Krea API Token (optional)
|
||||
"KreaToken": "", // Krea API Token (optional)
|
||||
"KreaApiKey": "" // API-Key für Krea-Endpoints ohne User-Auth (optional)
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
Reference in new issue
Block a user