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
|
|
@ -1,5 +1,6 @@
|
|||
<?php
|
||||
|
||||
use App\Http\Controllers\CspReportController;
|
||||
use App\Http\Controllers\HealthController;
|
||||
use App\Http\Middleware\BasicAuthMiddleware;
|
||||
use App\Http\Middleware\EnsureSessionIsNotRevoked;
|
||||
|
|
@ -12,6 +13,7 @@ use App\Http\Middleware\ReportErrorSignals;
|
|||
use App\Http\Middleware\SecurityHeaders;
|
||||
use App\Http\Middleware\SetCurrentPortal;
|
||||
use App\Http\Middleware\SetEdition;
|
||||
use App\Support\ContentSecurityPolicy;
|
||||
use Illuminate\Foundation\Application;
|
||||
use Illuminate\Foundation\Configuration\Exceptions;
|
||||
use Illuminate\Foundation\Configuration\Middleware;
|
||||
|
|
@ -38,6 +40,12 @@ return Application::configure(basePath: dirname(__DIR__))
|
|||
Route::get('/health', HealthController::class)
|
||||
->middleware('throttle:30,1')
|
||||
->name('health.deep');
|
||||
|
||||
// CSP-Meldungen der Browser (Melde-Modus, Sicherheitsaudit
|
||||
// 07.10.2026) — ohne web-Gruppe: keine Session, kein CSRF.
|
||||
Route::post(ContentSecurityPolicy::REPORT_PATH, CspReportController::class)
|
||||
->middleware('throttle:60,1')
|
||||
->name('csp.report');
|
||||
},
|
||||
)
|
||||
->withMiddleware(function (Middleware $middleware) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue