fix: enable rls on remaining public tables
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
## Unreleased
|
||||
|
||||
- RLS-Advisor-Cleanup fuer alle uebrigen Public-Tabellen angelegt.
|
||||
- RLS-Migration fuer tenant-bezogene Tabellen mit Membership-basierten Policies angelegt.
|
||||
- Audit-Log-Migration mit append-only Triggern und Tenant-Zeit-Index angelegt.
|
||||
- VMID-Allokator-Migration mit transaktionssicherer Reservation pro Cluster angelegt.
|
||||
|
||||
@@ -69,6 +69,7 @@ Arbeitsliste auf Basis von `proxmox-console-entwicklungsplan.md`. Die Entwurfsda
|
||||
- [x] Membership-basierte SELECT-Policies angelegt
|
||||
- [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
|
||||
|
||||
## MVP-Backlog
|
||||
|
||||
@@ -115,3 +116,4 @@ Arbeitsliste auf Basis von `proxmox-console-entwicklungsplan.md`. Die Entwurfsda
|
||||
- 2026-06-10: VMID-Allokator-Migration `0006_vmid_allocator` angelegt und mit 50 parallelen Reservierungen lokal gegen Supabase verifiziert.
|
||||
- 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.
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
DROP POLICY IF EXISTS profiles_self_update ON public.profiles;
|
||||
DROP POLICY IF EXISTS profiles_self_select ON public.profiles;
|
||||
|
||||
ALTER TABLE public.vmid_reservations DISABLE ROW LEVEL SECURITY;
|
||||
ALTER TABLE public.cluster_vmid_allocators DISABLE ROW LEVEL SECURITY;
|
||||
ALTER TABLE public.clusters DISABLE ROW LEVEL SECURITY;
|
||||
ALTER TABLE public.profiles DISABLE ROW LEVEL SECURITY;
|
||||
ALTER TABLE public.schema_migrations DISABLE ROW LEVEL SECURITY;
|
||||
@@ -0,0 +1,16 @@
|
||||
ALTER TABLE public.schema_migrations ENABLE ROW LEVEL SECURITY;
|
||||
ALTER TABLE public.profiles ENABLE ROW LEVEL SECURITY;
|
||||
ALTER TABLE public.clusters ENABLE ROW LEVEL SECURITY;
|
||||
ALTER TABLE public.cluster_vmid_allocators ENABLE ROW LEVEL SECURITY;
|
||||
ALTER TABLE public.vmid_reservations ENABLE ROW LEVEL SECURITY;
|
||||
|
||||
CREATE POLICY profiles_self_select
|
||||
ON public.profiles
|
||||
FOR SELECT
|
||||
USING (id = public.current_profile_id());
|
||||
|
||||
CREATE POLICY profiles_self_update
|
||||
ON public.profiles
|
||||
FOR UPDATE
|
||||
USING (id = public.current_profile_id())
|
||||
WITH CHECK (id = public.current_profile_id());
|
||||
Reference in New Issue
Block a user