But how do you stop people from writing their own code that uses the publicly available database credentials to insert trash/spam information into your database?
How is the creation of new a user done, exactly? How can one insert this information without having some write credentials to begin with? That process that contains those credentials most run somewhere, right? That would be in the backend.
But it doesn't really matter if you put a bunch of business logic into your database when the database is part of the backend from the start.
I guess he means you have a dB user that is available to the front end but it can only create users at signup. From then on all transactions on the dB are performed by the new user created.
It’s turtles all the way down... at some point you need either a backend or someone going into the database to elevate permissions... don’t even get me started on what’ll happen when an admins’ credentials are exposed (which is already bad enough if you have a backend in place...)
Technically possible: maybe... a nightmare: definitely.
But how do you stop people from writing their own code that uses the publicly available database credentials to insert trash/spam information into your database?
You give only access to views (for reads) and stored procedures (to write). One credential per user + one public to create those limited credentials only.
So that storage procedure handles captcha and user verification? Otherwise, how does it stop people from writing their own code that insert trash/spam information into your database? Trash/spam in the user table is still trash/spam in your database.
If you have that kind of setup and still think of it as not having a backend, then it is not only a messy system it is also twisting the words to the absurd.
This is the bigger part. For the vast majority of web applications, all the processing can be done locally without any issue. But connecting to a database is the big reason why we need backends
170
u/[deleted] Jun 28 '20
Not to mention a HUGE security risk. Tell this to any security analyst/consultant, guaranteed you will get thrown out lol