Hi! Could someone help me figure out what the best...
# help
r
Hi! Could someone help me figure out what the best way of protecting a table such that it can only be written to by my applications server?
n
Hello @reed! This thread has been automatically created from your message in #843999948717555735 a ``few seconds ago``. Pinging @User so that they see this as well! Want to unsubscribe from this thread? Right-click the thread in Discord (or use the ... menu) and select Leave Thread to unsubscribe from future updates. Want to change the title? Use the
/title
command! We have solved your problem? Click the button below to archive it.
r
Would it make sense to create a "server" user, and use RLS?
g
If your applications server uses service_key then it would bypass any RLS you have on for normal users.
n
reed (2022-03-17)
a
When you enable RLS, and you don't have any policies added, users won't be able to insert into it
s
If you're using Supabase on the server-side, use the service role key as gary mentions, and then set
false
for all RLS policies
r
got it thanks!