Self-Updater und Lizenzprüfung
Umsetzung von docs/specs/self-updater.md für Laravel: - Installierter Stand als SHA in storage/.version, Fortschritt in storage/.update-progress, selbstheilender Wartungsmodus in storage/.maintenance - Update-Client je Kanal (stable/development), nur HTTPS, begrenzte Redirects, ZIP-Download per Stream mit PK- und SHA-256-Prüfung - Entpacken mit zweistufigem ZIP-Slip-Schutz, Übernahme mit geschützten Pfaden (atomar je Datei, nie löschen), Migrationen, Cache- und OPcache-Reset - Lizenzspeicher außerhalb der DB, Geräte-ID als Zufallszahl, rotierendes Gerätetoken wird bei jeder Antwort (auch Fehler und Downloads) sofort gespeichert - Lizenzfehler mit verständlichen Meldungen – sie sperren nie das Portal - Seite „Aktualisierung“ mit Kanal, Suche, Changelog-Vorschau, Fortschritt, Migrationen, Änderungsprotokoll, Lizenz und Datenschutzhinweis - Wartungs-Middleware (503 + Retry-After) und Auto-Migration per Fingerabdruck - Audit-Log für Updates, Kanalwechsel und Lizenzänderungen - Version 0.2.0 Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
a36752e09a
commit
43244d751a
41 changed files with 3184 additions and 3 deletions
61
config/updater.php
Normal file
61
config/updater.php
Normal file
|
|
@ -0,0 +1,61 @@
|
|||
<?php
|
||||
|
||||
/*
|
||||
| Self-Updater und Lizenz – siehe docs/specs/self-updater.md und docs/PLAN.md (Abschnitt 5).
|
||||
| Der technische Schlüssel beim Hersteller ist „mitarbeiterportal“, unabhängig vom Produktnamen.
|
||||
*/
|
||||
|
||||
return [
|
||||
|
||||
'software' => 'mitarbeiterportal',
|
||||
|
||||
// Update-Kanäle: jeweils eigene Proxy-Basis-URL. Standard ist „stable“.
|
||||
'channels' => [
|
||||
'stable' => [
|
||||
'label' => 'Stabil',
|
||||
'url' => 'https://update.loheide.cloud/mitarbeiterportal',
|
||||
],
|
||||
'development' => [
|
||||
'label' => 'Entwicklung',
|
||||
'url' => 'https://update.loheide.cloud/mitarbeiterportal-development',
|
||||
],
|
||||
],
|
||||
|
||||
'default_channel' => 'stable',
|
||||
|
||||
'api_url' => 'https://api.loheide.cloud/v1',
|
||||
|
||||
'changelog_url' => 'https://update.loheide.cloud/mitarbeiterportal/changelog',
|
||||
|
||||
'timeouts' => [
|
||||
'json' => 20,
|
||||
'zip' => 180,
|
||||
],
|
||||
|
||||
'max_redirects' => 3,
|
||||
|
||||
// Werden beim Übernehmen eines Updates NIE überschrieben.
|
||||
// Verzeichnisse mit Schrägstrich am Ende, Dateien exakt.
|
||||
// Abweichung von der Vorgabe: vendor/ ist bewusst NICHT geschützt (docs/PLAN.md, 5.2).
|
||||
'protected_paths' => [
|
||||
'.env',
|
||||
'.git/',
|
||||
'storage/',
|
||||
'bootstrap/cache/',
|
||||
'node_modules/',
|
||||
'vendor-dev/',
|
||||
'composer.lock',
|
||||
'package-lock.json',
|
||||
'plugins/',
|
||||
'public/storage/',
|
||||
'public/uploads/',
|
||||
'public/hot',
|
||||
'config/local.php',
|
||||
'.htaccess',
|
||||
'database/database.sqlite',
|
||||
],
|
||||
|
||||
// Wartungsmodus läuft spätestens nach dieser Zeit von allein aus.
|
||||
'maintenance_max_seconds' => 600,
|
||||
|
||||
];
|
||||
Loading…
Add table
Add a link
Reference in a new issue