What stops a user of your serverless app from fetching the secret used to connect with the database and using it for their own purposes?

The short answer is, nothing stops the user from doing that as long as that query is within the privileges that were defined in your roles, but you can stop the user by writing User Defined Functions (UDFs) and only allowing these to be called.

If you are concerned about the security aspect of having a token in the browser, there are long forum posts on that topic that could help you further.

1 Like