Hello, I am implementing Supabase with Angular and...
# help
a
Hello, I am implementing Supabase with Angular and I use the Supabase API from Typescript, the problem that I am seeing is that when I want to use a Postgresql function that receives parameters, since the format of the parameters is a JSON, I observe that in the payload of the call to the API end-point that data is totally visible, therefore totally insecure... do you know if there is something that can be done so that it travels encrypted or something similar. Thanks for your time
n
Hello @alejojm1201! This thread has been automatically created from your message in #843999948717555735 a few seconds ago. We have already mentioned the @User so that they can see your message and help you as soon as possible! 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.
g
Is https encryption not enough for the data transfer from client to SB and back? You could encrypt your parameters and return data with rpc functions further if you desired.
a
If I encrypt my parameters, how do I decrypt it in the postgresql function?
that is the beginning of my function
and that is the JSON that I sent in the parameter... in the Angular App I have an AES cipher... but how do I implement it on the Postrgresql side?
@User I need your help
g
You don't need to call out support here, it is poorly named as SB support is not directly connected to this Discord, this is mainly users helping users with some SB staff jumping in.
The only thing I know of is pgcrypto on the postgres side.
I've only seen some users trying to store encrypted info from client back to client, mainly so it is not visible on database side. I've not seen anyone trying to do more that https for network encryption. What are you trying to protect from?
a
sorry i didn't know i couldn't call support
g
Not your fault, it is poorly named...
a
I am concerned about this situation... when uploading my Angular App to netlify.com (it uses HTTPS) to test how it behaves... I go to the functionality that makes use of the call of the function via API from Supabase to Postrgresql and I observe in the Chrome DevTools what I show in the image
I am concerned that anyone with the knowledge to do F12 and go to the Network tab, can see the information... and for now it is not sensitive, but it will be in future new functions that I must continue to implement
g
I don't know anything about Angular, but with browser code like javascript, anything in your code is visible to someone on the client with effort. It is not just in the developer console.
Devtools just shows what the browser has before it encrypts and sends out with https. You would have to look at your router or some such to see the encryption leaving the client.
a
yes, you are right and I understand that, that is why in almost all the Typescript code in Angular that is later transcribed to obfuscated javascript, I add an encryption layer and in turn obfuscate it using variable and function naming methods. Before I was doing the same project but using FIrebase as BaaS and at no time did I detect that the data travels in a visible way...
I honestly didn't know this, I don't have much knowledge about what happens in https and all that stuff.
g
You could also try asking on Supabase github discussions. Or wait if others have answers for you. I don't recall Firebase being any different. I assume any data on the client is the users data and if they want to hack or see it that is fine. I just don't want someone not that user/client to see it once it leaves and https does that. That was the big push for https and why banks went to it first. Also, that is part of why SB uses jwt's for security info so the user/client can not change it.
a
Thank you very much for your time and comments, I am clearly realizing that I need to do more research on how JWT and SB work together.