this post was submitted on 07 Oct 2024
1 points (100.0% liked)
Programmer Humor
1350 readers
1 users here now
founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
You significantly cut down on SQLi vulnerability by obscuring the database behind multiple layers of API calls though
Do you really? If you have permissions set up properly, it really seems like an API over a read-only SQL server is just an unnecessary layer of abstraction.
If your database is really big and suffers from large volumes of queries in a short time, it's easier to implement rate limiting in the API than by configuring SQL server permissions.
It's also easier to interact with stored procedures across multiple databases, from multiple clients, if you have a 1-to-1 API wrapper for your database procedures. This also lets you serialize your database response in a potentially more portable format than what your database returns directly, such as JSON.
The API wrapper isn't a silver bullet for security and scalability, but it is a unified framework to configure better security policies and unify multiple databases.
I admit, however, that multiple layers of API abstraction is a bit of a meme, just to keep everyone on their toes.