47
Add Feature to Test + Debug Row Level Security Policies
Source: supabase/supabase#12269 · opened by @Lior539
Currently when writing a RLS policy you have to manually test it. They're also very difficult to debug when things go wrong as there is no logging (the current postgres logs are very cryptic and not suitable for debugging RLS policies.)
Some suggestions I have around this (not sure if they're doable though?):
1. Add the ability for unit tests or test cases for RLS policies
2. Add (better?) logging for debugging RLS policies. e.g. when an API call is made, it would be great to view with what values the RLS policy was executed and what was the output
----
The context behind this request is that Im currently writing a RLS policy that is not behaving as expected and I have no idea how to debug it effectively. I'm just shooting in the dark and modifying my code and rerunning my api calls in the hopes that it works
Some suggestions I have around this (not sure if they're doable though?):
1. Add the ability for unit tests or test cases for RLS policies
2. Add (better?) logging for debugging RLS policies. e.g. when an API call is made, it would be great to view with what values the RLS policy was executed and what was the output
----
The context behind this request is that Im currently writing a RLS policy that is not behaving as expected and I have no idea how to debug it effectively. I'm just shooting in the dark and modifying my code and rerunning my api calls in the hopes that it works
No pledges yet. Be the first to back this.
No comments yet.