Commit 5e82563
committed
feat(synth): enable RLS support on views with security_invoker
Set security_invoker = true on generated views so that Row-Level
Security policies on backing tables are evaluated as the querying
user, not the view owner. Without this, RLS is silently bypassed
when queries go through the view.
This is safe for all deployments: when RLS is not enabled on the
backing table, security_invoker has no effect. Backing tables are
standard PostgreSQL tables (not hypertables), so RLS is fully
supported on all data tables.1 parent a1c484f commit 5e82563
2 files changed
Lines changed: 10 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
75 | 82 | | |
76 | | - | |
| 83 | + | |
77 | 84 | | |
78 | 85 | | |
79 | 86 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
248 | 248 | | |
249 | 249 | | |
250 | 250 | | |
251 | | - | |
252 | | - | |
| 251 | + | |
| 252 | + | |
253 | 253 | | |
254 | 254 | | |
255 | 255 | | |
| |||
0 commit comments