We're working on an API to allow clients access to bits of data from a series of tables. We've come up with a JSON based API which works well but it could definitely be improved upon.
It has come to a point where we want to update the API to make it easier to use and an idea was presented of allowing raw SQL queries to be passed to the API for filtering and finding data. To counter the glaringly obvious insecurities involved we would...
- Restrict the mysql user that will be executing the queries to
SELECT
only - Restrict the user with access to those tables that they need
- ...?
Would there be any other major concerns with this method?