Lets suppose we have a virtual www host in a cloud. We cannot install anything and cannot create new users. This host has MySQL and PHP/ASP/JSP pointed to some www_root_dir. We have all privileges to MySQL and can write to www_root_dir.
The database contains table "Companies" with N companies inside. We want to create N admins - each to a corresponding company. We cannot create them as database users, since each one has then full access to a table and can peek/modify other companies, which we try to restrict. So, we create a single database Manager account and a PHP/ASP/JSP Authorizer class that will approve or deny SQL requests from N admins and fetch requested information via Manager account.
The question is: how our Authorizer can authenticate itself by database? In the case of "with Manager account login/password" then Authorizer class needs to store this password somewhere. Where exactly? If within an encrypted file then the only file storage is the www_root_dir directory that is publicly available to anyone. So anyone can download this file and bruteforce it offline.
Any ideas?