![]() Previous |
![]() Next |
This tutorial demonstrates the general concepts of using Oracle Label Security. In it, you will apply security labels to the HR.LOCATIONS table. Three users, sking, kpartner, and ldoran will have access to specific rows within this table, based on the cities listed in the LOCATIONS table.
With Oracle Label Security, you restrict user access to data by focusing on row data, and designing different levels of access based on the sensitivity of your data. If you must restrict user access by focusing on user privileges, or some other method such as the job title that the user in your organization has, you can create a PL/SQL function or procedure to use with a Virtual Private Database policy. See "Controlling Data Access with Oracle Virtual Private Database" for more information.
The schema for HR.LOCATIONS is as follows:
Name Null? Type ----------------------------------------- -------- ------------- LOCATION_ID NOT NULL NUMBER(4) STREET_ADDRESS VARCHAR2(40) POSTAL_CODE VARCHAR2(12) CITY NOT NULL VARCHAR2(30) STATE_PROVINCE VARCHAR2(25) COUNTRY_ID CHAR(2)
You will apply the following labels:
| Label | Privileges |
|---|---|
CONFIDENTIAL |
Read access to the cities Munich, Oxford, and Roma |
SENSITIVE |
Read access to the cities Beijing, Tokyo, and Singapore |
PUBLIC |
Read access to all other cities listed in HR.LOCATIONS |
In this tutorial:
Step 1: Register Oracle Label Security and Enable the LBACSYS Account
Step 2: Create a Role and Three Users for the Oracle Label Security Tutorial
Step 3: Create the ACCESS_LOCATIONS Oracle Label Security Policy
Step 6: Create the ACCESS_LOCATIONS Policy User Authorizations
Step 7: Apply the ACCESS_LOCATIONS Policy to the HR.LOCATIONS Table
Step 8: Add the ACCESS_LOCATIONS Labels to the HR.LOCATIONS Data
Step 10: Optionally, Remove the Components for This Tutorial