Hi,
I’m not super familiar with security, and not super familiar with Supabase and WeWeb, so I’m hoping you could help point me in the right direction. If anyone wants to jump on a call or discuss this with me, It would be greatly appreciated.
__
So I’m creating an app consisting of a few different elements. A bit meta, but think of it as a blog creator:
- Administration Pages
- User Page (Public)
- User Pages (Private / Internal / Organization level)
–
The types of content would typically be:
*Company
*Categories
*Articles
*Authors.
Users that are registered will have access to administration pages. The blog that users can create can either be Public or Private/Internal. If the blog is internal/private they have to be logged in, and have been given access to these pages.
–
WeWeb:
I’m using Supabase Collections to fetch currentUserProfile. It seems that the collection doesn’t return more than “my Current user” even though its only a filter. Is this bad practice? I use this on currentCompany as well.
I am having third party API calls, and thus i believe my keys are exposed in the dev tools. How would I best do REST calls to third party without exposing my key?
The plan is to create subdomain.domain.com for each “user facing” site, and then connect company id to each of these sites (although public…), so that currentCompanyArticles will always be “only our articles”… But it feels a bit flimsy.
Supabase:
I will enable the RLS policies for the tables. But, I’m not 100% how i want to move forward.
a) For public blogs, everyone should be able to see articles, authors and so on - as long as it is connected to the same Company as the page it is viewing. Is this company uuid = article.company_uuid?
b) For private blogs, i have to limit access. For articles, this would mean hiding all articles from users who do not have company uuid = article company uuid? + user.company_id = article_company_uuid?
The articles reside in the same table, and right now there is no difference in pubic/internal articles. I’m struggling to understand how I should pass the correct information to Supabase to authenticate. I am also not sure what WeWeb does for me, so I don’t know the level of security here.
Although building fast is great, I want to ensure it’s not gonna break if someone blows on it!