feat: add backend jwt middleware

This commit is contained in:
Philipp
2026-06-10 16:23:55 +02:00
parent d87d8c6be7
commit 9947286b1e
12 changed files with 795 additions and 20 deletions
+8
View File
@@ -70,6 +70,13 @@ Arbeitsliste auf Basis von `proxmox-console-entwicklungsplan.md`. Die Entwurfsda
- [x] Audit-Log auf owner/admin beschraenkt
- [x] Direkter Query als Nicht-Mitglied lokal verifiziert
- [x] Supabase-Advisor-Follow-up: RLS auf allen uebrigen Public-Tabellen aktiviert
- [x] E1-T02: JWT-Validierungs-Middleware im Backend
- [x] `Authorization: Bearer <jwt>` Middleware angelegt
- [x] RS256/ES256 Validierung gegen Supabase-JWKS angelegt
- [x] Lokalen HS256-Fallback fuer Self-Hosted-Legacy-Keys angelegt
- [x] Issuer, Expiry, Not-Before und Signatur werden validiert
- [x] `sub`, `email`, `role` werden als Principal in den Request-Context gelegt
- [x] Geschuetzten `/me` Endpunkt angelegt
## MVP-Backlog
@@ -117,3 +124,4 @@ Arbeitsliste auf Basis von `proxmox-console-entwicklungsplan.md`. Die Entwurfsda
- 2026-06-10: Audit-Log-Migration `0007_audit_log` angelegt und Append-only-Verhalten lokal gegen Supabase verifiziert.
- 2026-06-10: RLS-Migration `0008_rls_policies` angelegt und Mitglied/Nicht-Mitglied-Isolation lokal gegen Supabase verifiziert.
- 2026-06-10: RLS-Advisor-Cleanup `0009_rls_advisor_cleanup` angelegt; alle Public-Tabellen haben RLS aktiv.
- 2026-06-10: JWT-Middleware-Tests fuer gueltige, abgelaufene, manipulierte und fehlende Tokens erfolgreich.