If the 'Admin: Disable Security Model Filtering' privilege is checked, RLS is not applied. In this case the user will have full access to all data in the database. A JDBC connection is set up to the database and connects to the database as Owner. If the privilege is not checked, then RLS will be applied. The first time a user attempts to set up a JDBC connection to the database, the infrastructure needs to know which data the user can access. Oracle and SQL Server do this is slightly different ways:
Oracle uses a package called WGN_CLIENT_INFO. Functions within package populate between one and four (dependent on the RLS model the reviewer uses) global temporary tables (GTTs), TMP_WGN3RLS, TMP_WGN3ADDRRLS, TMP_WGN3EXADDRRLS and TMP_WGN3POLICYRLS, with all the information required to maintain RLS. These tables are described below and accessed by the views WGN_V_RLS_1, WGN_V_RLS_ADRR_1, WGN_V_RLS_EX_ADRR_1 and WGN_V_RLS_POLICY_1 respectively in all searches. The nature of GTTs means that only the current user will be able to see their own data although other users will be able to see the tables.
SQL Server uses a slightly different implementation as it is not possible to create a view on a temporary table within SQL Server. Instead, SQL Server uses permanent heap tables TMP_WGN3RLS, TMP_WGN3ADDRRLS, TMP_WGN3EXADDRRLS and TMP_WGN3POLICYRLS,. Here, stored procedures are used to populate these tables. There is also an additional column (SPID) used in both tables to be able to identify the specific users. This is hidden from the report writer by the views WGN_V_RLS_1, WGN_V_RLS_ADRR_1, WGN_V_RLS_EX_ADRR_1 and WGN_V_RLS_POLICY_1. Additionally because SQL Server uses permanent tables to store the RLS data there is an extra overhead required to remove the rows from the tables once the connection is no longer required.
Copyright © 2014 CA.
All rights reserved.
|
|