OBIEE and Virtual Private Database (VPD)




WHAT IS VPD?

Virtual Private Database is Oracle’s fine grain access control (FGAC) feature that was introduced in Oracle 8i. It helps control data level security on the database side by applying policies, thus data level security in the applications that read from the database is not necessary. The advantage is that if there are multiple applications accessing data from a database, it is not necessary to implement data level security in all those applications.

How does VPD work?

Policies are created in the database that would append a predicate (a WHERE clause) to the query in runtime. Consider a simple example – there exists a policy which would return only the rows attached to a particular user id on the table Orders. If a user “Kumar” were to query data from Orders table, Kumar would enter the following command:
Select * from Orders;
The policy that dictates what information a user can see would append a predicate to the query as follows:
Select * from Orders
where user_name = ‘KUMAR’;
This mechanism of appending the predicate is entirely transparent to the user.

CONFIGURING VPD IN OBIEE

To use the VPD feature in the Database and OBIEE along with its caching capabilities it is important to configure VPD in OBIEE. Failing to configure VPD in OBIEE while caching is enabled (in OBIEE), the request would bypass VPD policies by accessing data from cache and data level security will not be effectively handled by the database’s VPD. Thus, the users will see incorrect results.
To configure VPD in OBIEE, first enable the VPD option in the database’s general tab as shown:

Then enable the “Security Sensitive” option in the security variable:


NORMAL OBIEE CACHE BEHAVIOR

To be simple and brief, if caching is enabled, a query that is being run for the first time would create a cache. Subsequent requests that is similar to the query or its subset would hit the cache to retrieve the results. This is true even if the users are different.
Example:
Logged on as Kumar Kambam

Running a request…
… generates the following Query log
The cache is created….

Now any user that issues a similar request or a subset of the request will hit the cache.
Logged on as Power User1
Running a similar request, generates the following log. Notice that OBIEE server found a matching query in the cache that is created by Kumar.Kambam for the query issued by Poweruser1.




OBIEE CACHE BEHAVIOR WITH VPD CONFIGURED

When VPD option is configured in OBIEE, cache is created for each user even though a matching query exists in the cache. This ensures that the data retrieved for a user is not retrieved from the cache created by a different user, thereby ensuring the enforcement of VPD policies. In other words, if Kumar.Kambam were to run a query, the cache is created by the data visibility rules enforced by the VPD for Kumar.Kambam. If Poweruser1 runs a similar request it should bypass the query cache and hit the database to retrieve the data along the policies of the VPD for Poweruser1; if it were to hit the cache created by Kumar.Kambam, the results for Kumar Kambam will be presented to Poweruser1.

After configuring VPD, logged on as Kumar Kambam
Running a query for the first time…
…the following log is generated
The cache is created
Running the same query again, the following log is generated…
OBIEE found a matching query in the cache and uses it.

Now log on as Power User1
By running the same request, the following log is generated…
A new cache entry is created even though a similar request has been issued by a different user and a cache has been created for it
The subsequent requests by Poweruser1 that is similar to the query will hit its own cache. This ensures that a user will only see his/her data.

No comments:

Post a Comment

Popular Posts