-
Notifications
You must be signed in to change notification settings - Fork 266
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Row level security policies #1071
Comments
Hey @fenos |
Any updates on this feature? |
Probably it's worth mentioning @supabase here and try to draw attention of anyone interested in this feature and possible integration 🤔 |
@rotemtam |
We're also missing this, keeping us from migrating to atlas |
I would prefer a format like this which more accurately represents how policies are implemented in Postgres: table "users" {
...
policy "user_selects_users" {
for = [SELECT]
role = "user"
using = "id = current_user_id()"
}
} |
One further possible tweak here is it might be worth looking at the pattern for triggers as an excellent template. It's fairly frequently the case that you have a relatively consistent RLS policy across tables so being able to do policy "user_selects_users" {
for_each = [table.public.products, table.public.customers, table.public.projects]
on = each.value
for = [SELECT]
role = "user"
using = "user_id = current_user_id()"
} would be really nice. |
From the RLS docs:
Not enforcing a naming convention here would be great for supporting existing databases with RLS. |
Hey! This was added in the latest release and should be officially out later today/tomorrow. Please, see: https://atlasgo.io/atlas-schema/hcl#row-level-security-policy and https://atlasgo.io/atlas-schema/hcl#row-level-security for examples. |
Hello!
I would love to see RLS added to Atlas!
I currently make a lot of use of them, especially when using Supabase!
The proposal would be to have the following spec:
row_level_security (bool)
would allow us to enable / disable RLS on the tablepolicy
would be an object that represents the policy rules. There can be many policies on a tablethe name of the policy for each operation would be
{table_name}_{policyname}_operation
for instance, given the example above atals should migrate:Any thoughts?
The text was updated successfully, but these errors were encountered: