About Data Security
Data security refers to the ability to control application user access to data in an Oracle database throughout all components of an Oracle Enterprise, using a uniform methodology. In Oracle Database Real Application Security, to secure a database table or view, you must specify the rows that you want to secure by creating a data realm (see also, data realm).
To restrict access to the data realm, you associate one or more access control lists (ACLs) that list the application users or application roles and their application privileges for each data realm. A data realm together with its associated ACL is known as a data realm constraint.
You can further restrict access to specific columns by applying one or more application privileges to each column. This is useful in situations where you want only privileged application users to see the data in that column.
Data security is an extension of Oracle Virtual Private Database (VPD). VPD adds a WHERE predicate to restrict data access each time an application user selects or modifies a database table. For more information about VPD, see Oracle AI Database Security Guide. Oracle Database Real Application Security extends VPD concepts further by implementing an authorization model that can further restrict access at both the row and column by means of associating ACLs to these objects. In addition, the application session and session context (through user roles and session namespace) are made more secure. Furthermore Real Application Security provides its own data dictionaries.
To configure data security in Oracle Database Real Application Security, you must follow these steps:
-
Create a data security policy. The data security policy defines one or more data realms and associates ACLs for each data realm to create data realm constraints. The data security policy can also contain column-specific attributes to further control data access. Multiple tables or views can share the same data security policy. This lets you create a uniform security strategy that can be used across a set of tables and views.
Example: Structure of a Data Security PolicyExample: Structure of a Data Security Policy shows the structure a data security policy.
-
Associate the data security policy with the table or view you want to secure.
You can run the
XS_DATA_SECURITY.APPLY_OBJECT_POLICYPL/SQL procedure to enable the data security policy for the table or view that contains the data realms and columns that you want to secure.Note that if your application security requires that you update table rows and also restrict read access to certain columns in the same table, you must use two
APPLY_OBJECT_POLICYprocedures to enforce both data security policies. For example, oneAPPLY_OBJECT_POLICYprocedure would enforce the DMLstatement_typesrequired for updating table rows (for example,INSERT,UPDATE,DELETE), while the otherAPPLY_OBJECT_POLICYprocedure would enforce only thestatement_typesofSELECTfor the column constraint.Example: Using XS_DATA_SECURITY.APPLY_OBJECT_POLICYExample: Using XS_DATA_SECURITY.APPLY_OBJECT_POLICY shows how to use the APPLY_OBJECT_POLICY procedure. See “APPLY_OBJECT_POLICY Procedure” for more information.
-
Validate the data security policy. See “About Validating the Data Security Policy” for more information.