security: Andere Geräte abmelden, IP-weites Login-Limit, dauerhafte Sperrmarke, Passwortregeln, CSP im Melde-Modus
Restliche Phase 4 aus dem Sicherheitsaudit 07.10.2026: - Sicherheitsseite: „Andere Geräte abmelden“ rotiert remember_token und beendet alle anderen Sessions, die aktuelle bleibt (nicht während einer Impersonation). - LoginIpThrottle: 20 Fehlversuche je IP in 15 Minuten über alle Konten. Gezählt über das Failed-Event, damit Livewire-Login und Fortifys POST /login denselben Zähler teilen; Erfolg setzt ihn nicht zurück. - Sperrmarke für Sessions in users.sessions_revoked_at_ms statt nur im Cache — übersteht cache:clear. Die alte Cache-Marke zählt übergangsweise mit und kann im nächsten Release entfallen. - Neue und geänderte Passwörter: mindestens 12 Zeichen, in Produktion zusätzlich uncompromised() (HIBP, k-Anonymität). Bestehende bleiben gültig. - Content-Security-Policy-Report-Only in Produktion; Meldungen über /csp-report nach storage/logs/csp-*.log, je Meldung höchstens einmal pro Stunde, ohne Query und tokenartige Pfadsegmente. Migration: users.sessions_revoked_at_ms (users hat FULLTEXT, 25 MB, Sekunden). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
9c4962fbe0
commit
5dfd622141
27 changed files with 601 additions and 39 deletions
|
|
@ -20,4 +20,20 @@ return [
|
|||
'max_age' => (int) env('SECURITY_HSTS_MAX_AGE', 31536000),
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Content Security Policy (Melde-Modus)
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Setzt `Content-Security-Policy-Report-Only` auf HTML-Antworten
|
||||
| (App\Support\ContentSecurityPolicy). Browser blockieren nichts, sie
|
||||
| melden Verstöße an /csp-report → storage/logs/csp-*.log. Standardmäßig
|
||||
| nur in Produktion.
|
||||
|
|
||||
*/
|
||||
|
||||
'csp' => [
|
||||
'report_only' => (bool) env('SECURITY_CSP_REPORT_ONLY', env('APP_ENV') === 'production'),
|
||||
],
|
||||
|
||||
];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue