-
In an effort to look at securing my integration with Supabase and making it harder for someone to use my anon APIKEY and blast thousands of INSERTS to my Supabase DB I have been playing with RLS, but still no clear path. I have a website where visitors can take a quiz and we keep a copy of answers in Supabase by calling API to INSERT from supabase-js client in our ReactJS app. Yes, ideally I would also stand a backend and have front end talk to backend instead and do other kind of auth there (ex. domain/ip origin). So as to only accept inserts when they come from my frontend. inet_server_addr()
What about inet_client_addr()
Questions
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
I ended up going to Vercel for a Serveless function to act as my backend.
Yes, an attacker could still run this Serveless function from Vercel thousands of times, but at least it won't compromise my data on Supabase as ip will not match. I was also considering AWS Lambda and using an IAM Policy to restrict execution of an AWS Lambda based on ip. But Vercel should do for now until I can find another way to do this simply with Supabase 🤠 |
Beta Was this translation helpful? Give feedback.
I ended up going to Vercel for a Serveless function to act as my backend.
req
and the data that I will send to Supabasereq
with my known ip address of machine where my frontend residessupabase-js
client. If it does not match I simply send back a 404 responseYes, an attacker could still run this Serveless function from Vercel thousands of times, but at least it won't compromise my data on Supabase as ip will not match. I was also considering AWS Lambda and using an IAM Policy to restrict execution of an AWS Lambda based on ip. …