|
|
|
|||||||
|
|
|
|
| |||||
|
Previous ~ Up ~
Next
Views, Rules and Triggers on Object TablesViews are the mechanisim by which most SQL databases handle sub-table-level permissions. A view is a predefined selection of data from one or more tables. A view is created by defining a selection rule. This rule may select data in any manner that a SELECT statement may do so. What makes views valuable in the MIFAR framework is that user permissions may be assigned to a view that are different than the permissions on the underlying table. A user that normally would not have read permsissions on a table may be granted read permissions on a view. In this way the user gets permissions to view only a subset of the table's data. Since most database engines do not support row level permissions, views are the only game in town for fine grained access control.Setting up a view can allow a user to see data even if they have no select prividges on the underlying table, however; they do nothing to grant insert, update and delete rights. The companion to database views are a database rules. Rules allow incoming SQL queries to be rewritten before they are executed. The creator of a rule defines what operations will invoke the rule. These can be INSERT, UPDATE and DELETE. In addition rules can be attached to views or tables. To allow a user to be able to insert into a view, an insert rule can be created and associated with the view. When an incomming insert query is detected by the database engine on a view the rule will rewrite the query and instead insert into the underlying table.
View-Rule Creation FunctionsWritting and testing database rules is a labor intensive process. If every table in MIFAR required hand written rules each time a new set of permissions was needed, the system would be useless. To assist in setting permissions the following framework level stored proceedures automatically generate views and rules on a data table:
Two Levels of interactionOnce views have been constructed on a table there are two ways to operate on the table data. One way is to use the table name in SQL queries. The other is to access the data via the views and rules. Access permissions on MIFAR object tables adhear to the following conventions.
TriggersPrevious ~ Up ~ Next |
|