I need to (re)develop a tool for the users of the application I work on, which is in ASP.NET 4.5.2 / MVC 5.2.3 and uses Entity Framework 6.
This tool is supposed to allow authorized users to edit SQL queries, and lower-priviledged ones to run them as well. I'm worried about the security of such a tool, even if the web application should only be accessible as an intranet.
Any given query is only allowed to be a SELECT
and can have JOIN
s on multiple tables.
Is there any EF6 specific function that allows me to check or even restrict a sql string to only do one SELECT
?
Should I have a specific user inside the database that's only allowed to do SELECT
s and use a separate connection for those queries as this user?
Is there anything else about the security of such a tool I might have overlooked?
I know this tool is asinine and should not even exist, but I'm not in charge of the decisions, and we're planning to remove that tool as soon as we can.