Row Level Security With BI Publisher Enterprise: An Oracle White Paper January 2009
Row Level Security With BI Publisher Enterprise: An Oracle White Paper January 2009
Row Level Security With BI Publisher Enterprise: An Oracle White Paper January 2009
BI Publisher Enterprise
An Oracle White Paper
January 2009
Prepared by
Kanichiro Nishida, Oracle EPM & BI Consulting, Technical Manager
Shankar Duvvuri, Oracle EPM & BI Consulting, Snr Principal Consultant
NOTE:
The following is intended to outline our general product direction. It is intended
for information purposes only, and may not be incorporated into any contract. It is
not a commitment to deliver any material, code, or functionality, and should not
be relied upon in making purchasing decisions. The development, release, and
timing of any features or functionality described for Oracle’s products remains at
the sole discretion of Oracle.
This paper provides an outline of Oracle BI Publisher’s row level security support
framework and illustrates the implementation procedures required both at the data
source and at Oracle BI Publisher Enterprise.
Business Challenge
While this allows administrators to control who can access to which report, it is
not sufficient when you need to control the data inside the report to manage what
data to be displayed based on a each user who open the report.
What we want here is to have one single report that can serve different users but
depending on which user opens the report it automatically retrieves an appropriate
set of data for this user and display it within the generated report.
The best way to achieve this is to implement such data access control policy at the
data source level and enable BI Publisher Enterprise to be aware of the policy so
that BI Publisher Enterprise automatically retrieves an appropriate data based on
the policy and present the data in a generated report.
Solution
In order to address the above mentioned challenge we can take advantage of one
of the Oracle database features, Virtual Private Database (VPD), which offers a
row level security about the data in the database. BI Publisher Enterprise supports
a proxy authentication mechanism, with which it passes session user information
down to the database layer and takes advantage of the row level security policy that
is implemented at the database to return an appropriate set of data.
What is VPD?
The Virtual Private Database (VPD) enables data access control by user or by
The Virtual Private Database (VPD) enables
data access control by user or by customer
customer with the assurance of physical data separation. For Internet access, the
with the assurance of physical data Virtual Private Database can ensure that online banking customers see only their
separation. own accounts. The Web-hosting companies can maintain data of multiple
companies in the same Oracle database, while permitting each company to see
only its own data.
Within the enterprise, the Virtual Private Database results in lower costs of
ownership in deploying applications. Security can be built once, in the data server,
rather than in each application that accesses data. Security is stronger, because it is
enforced by the database, no matter how a user accesses data. Security is no longer
bypassed by a user accessing a reporting tool or new report writer.
Once the row level security policy with the VPD is implemented for the target
BI Publisher supports a proxy
tables or views then we can enable BI Publisher Enterprise to be aware of the
authentication mechanism that it passes
the online user (end user) information policy hence it would display only the appropriate data for each user’s report
down to the data source. access.
BI Publisher supports a proxy authentication mechanism that it passes the online
user (end user) information down to the data source so that you can take
advantage of such data source level row level security policy implementation.
Not just database but also some other types of data sources support such row level
security. For example, Oracle BI Server also supports the row level security so that
developers can implement such policies in the business model (or RPD).
In this paper we illustrate the row level security implementation steps with the
VPD assuming the data source is Oracle database.
Business Scenario
Let’s assume that we have this company which has 3000 employees. End of each
month the company sends an email with a link to a report called, Employee Salary.
When an employee opens the report he or she should see only their salary related
information for the current month period.
Also there is another type of salary related report called, Management Salary
report, which only managers can access to and display the salary data for the
employees who report to the managers. Therefore, each manager can access to
only their employees’ salary data.
The VPD policy can be implemented as a PL/SQL function. All the incoming
queries on a table enabled with VPD, are intercepted by the policy function and
the incoming query’s WHERE clause is altered based on the logic in the policy
function. The policy function typically determines the application context and
based on that the security requirement is implemented. Once the policy is created
you can add it to a target database table to take the policy in effect.
Here is a sample of a VPD policy function that automatically adds WHERE clause
to an incoming SELECT query to limit the data based on an employee name.
The policy can be applied to SELECT, INSERT, UPDATE and DELETE
statements. Also, one table can have multiple policies associated with it.
v_empno number;
BEGIN
FROM empadmin.managers
RETURN '1=1';
ELSE
END IF;
END;
If you need to exempt certain users from the policy mechanism you can grant EXEMPT
ACCESS POLICY to the respective user. In this case the policy function itself will not be
executed for the users with the privilege. But this is not recommended for the data governance
issue.
Once you have created required VPD policies now you need to apply them to a
target table that you want to apply the policy, in this case it is EMP table. Here is
an example of how to add the policy.
BEGIN
DBMS_RLS.add_policy
END;
Once all the required policies have been applied to the EMP table it’s
recommended that you verify the policies work appropriately within the database
by using a SQL tool such as Oracle SQL Developer.
Setup at BI Publisher
You need to update your data source setting within the BI Publisher Enterprise
administrator page in order to enable BI Publisher Enterprise to be aware of the
row level security policies at the database. Also, you need to review your data
model that contains SQL queries to adjust with the new row level security setting.
You can login to BI Publisher Enterprise Administrator page and access to the
Data Source page where you can enable the Proxy Authentication for each data
source. You can simply check the ‘Use Proxy Authentication’ check box to enable
the setting and click the ‘Apply’ button to take the new setting in effect.
Ensure Proxy
Authentication
is enabled.
Since the row level security policies are already in place, any query goes to the
EMP table in the database will automatically be updated with an appropriate
WHERE condition by the VPD. If your query for the reports contains any
WHERE clause that used to limit the data based on the user information then you
can now delete it.
Now you can view the report and see a certain set of data based on whom you’ve
logged in as. For example, if you have logged in as an employee, Smith, when you
open Employee Salary report you should see only Smith’s salary information and
not anybody else’s.
As the same way, if you logged in as Miller you should see only Miller’s salary
information.
Employee Salary Report for Miller
Also, when you logged in as a manager, Blake, who has five employees reporting to
him, then you would see all the five employees’ salary information when you view
the Management Salary report.
And when you logged in as another manager, Jones, you would see his only
employee information.
Management Salary Report for Jones
Conclusion
The row level security implementation with Oracle VPD strengthens Oracle BI
Publisher Enterprise reporting by providing a tighter data access security and
higher data governance in order to deliver a secured and compliant enterprise
reporting solution. Not only it shows a different set of data automatically to each
user, but also it prevents report developers from viewing any reporting data that
they are not supposed see.
Our example showed only the row level security with the VPD. But there is
another type of data security feature called, Oracle Label Security (OLS), which
achieves a similar business goal. With a combination of VPD and OLS you can
implement even tighter data access security and higher and more flexible data
governance control at the data base level.
Oracle consulting has had many experiences in both row level security
implementation and BI Publisher optimized report development. If you’re
interested in Oracle consulting to discuss more in detail about the implementation
and review your reporting data governance and architecture, please contact
Kanichiro Nishida (kanichiro.nishida@oracle.com), Consulting Manager, Oracle
EPM & BI Advanced Reporting group.
Oracle Corporation
World Headquarters
500 Oracle Parkway
Redwood Shores, CA 94065
U.S.A.
Worldwide Inquiries:
Phone: +1.650.506.7000
Fax: +1.650.506.7200
oracle.com