Re: ODBC & Client Access
Posted in 1996
Ray Riley wrote:
>
> Does anybody have an answer for ODBC client security?
>
> Once you open up ODBC to users, how do you keep them from modifying tables without the
> benefit of applications enforcing the database integrity?
>
This discussion has come up before, and there doesn't seem to be a really
good, elegant solution. However, the following does work:
The method assumes you have a particular set of user applications that are
supposed to modify and maintain your data, while any other programs (such as
dbaccess and the odd ODBC connected PC program) should only have read
access to data. The maintenance applications contain the necessary access
controls and even data integrity rules.
Create a single user e.g. "program" which has full SQL access to the database.
Grant only select access to all other users (i.e. public). Add code to yourmaintenance applications that connects to the database as user "program"
using the SQL connect statement. Note that the program must supply the
password for "program" which the user is oblivious to.
When the users connect to the database outside of the maintenance applications,
like with ODBC, they will connect as themselves and have only read access.
The main drawback with this method is that it is harder to distinguish between
users running the maintenance applications when monitoring the database, as
they all appear as user "program".
Maybe this will work for you. In any case I would be interested in other
possible solutions and let me know if you see any problems with this method.
Good luck,
----------------------------------------------------------------------
John H. Frantz Power-4gl: Extending Informix-4gl
frantz@centrum.is http://www.strengur.is/~frantz/pow4gl.html