Row-level Security over Multiple Tables

Working on Oracle Database 10g Enterprise Edition 10.2.0.4.0 - 64bit
Say you have the following tables:
CREATE TABLE    faculty_course_term
    crn             CHAR(8),
    term            DATE,
    course_college  VARCHAR2(20 Char),
    course_depart   VARCHAR2(20 Char),
    faculty_id      NUMBER,
    fac_college     VARCHAR2(20 Char),
    fac_department  VARCHAR2(20 Char),
    fac_fname       VARCHAR2(20 Char),
    fac_lname       VARCHAR2(20 Char),
    CONSTRAINT      faculty_course_term_uk
        UNIQUE      (crn, term, faculty_id)
CREATE TABLE    course_term
    crn             CHAR(8),
    term            DATE,
    course_subject  VARCHAR2(20 Char),
    course_number   CHAR(4),
    course_section  VARCHAR2(5 Char),
    college         VARCHAR2(20 Char),
    department      VARCHAR2(20 Char),
    course_credits  NUMBER,
    CONSTRAINT      course_term_uk
        UNIQUE      (crn, term)
CREATE TABLE    student_course_term
    crn             CHAR(8),
    term            DATE,
    course_college  VARCHAR2(20 Char),
    course_depart   VARCHAR2(20 Char),
    student_id      NUMBER,
    stu_college     VARCHAR2(20 Char),
    stu_department  VARCHAR2(20 Char),
    earned_credit   NUMBER,
    CONSTRAINT      student_course_term_uk
        UNIQUE      (crn, term, student_id)
);These tables are summary tables that represent multiple other tables. These tables can be joined by the CRN and Term columns. There is not, however, any foreign keys between them.
You have made these tables available within a Subject Area on a repository. You now want to increase your user base for faculty, department heads, and college heads to access this data, but only the data that they have access to via their position.
So you have the following Requirements for your security:
Requirement 1:     Users with a Group_ID of 1 can see all data.
Requirement 2:     Users with a Group_ID of 2 can see all Faculty, Course
          and Student records within their College.
Requirement 3:  Users with a Group_ID of 2 can see Students records
          that are not in their College but are taking Courses in their
          College.
Requirement 4:     Users with a Group_ID of 3 can see all Faculty, Course
          and Student records within their Department.
Requirement 5:  Users with a Group_ID of 3 can see Students records
          that are not in their Department but are taking Courses in their
          Department.
Requirement 6:     All Users can see Course records that they teach (even if it is
          outside their Department or College), as well as all Students
          within those Courses.To meet this criteria, you setup a new table on the database:
CREATE TABLE    faculty_groups
    faculty_id      NUMBER,
    group_id        NUMBER,
    username        VARCHAR2(20 Char),
    fac_college     VARCHAR2(20 Char),
    fac_department  VARCHAR2(20 Char)
);And you setup your Session Initialization Blocks and Variables like this:
SELECT 'GROUP_ID', group_id
FROM faculty_groups
WHERE UPPER (username) = UPPER( 'VALUEOF(NQ_SESSION.USER)')
SELECT 'COLLEGE', fac__college
FROM faculty_groups
WHERE UPPER (username) = UPPER( 'VALUEOF(NQ_SESSION.USER)')
AND group_id = 2And so on for Department and Faculty_ID.
Now, meeting Requirement 1 is easy enough starting all your data filters with:
VALUEOF(NQ_SESSION."GROUP_ID") = 1
ORRequirements 2 and 4 are also easily met in the manner of:
VALUEOF(NQ_SESSION."GROUP_ID") = 2
AND
     "Courses Term"."FACULTY_COURSE_TERM"."COURSE_COLLEGE" =  VALUEOF(NQ_SESSION."COLLEGE")
     OR
     "Courses Term"."FACULTY_COURSE_TERM"."FAC_COLLEGE" =  VALUEOF(NQ_SESSION."COLLEGE")
)However, the hard part comes up with Requirements 3, 5 and 6. Using Requirement 6 on Student_Course_Term as an example, you need to identify the Faculty member that is teaching the Course using the Faculty_Course_Term table, then connect all related records to the Student_Course_Term table using the CRN and Term fields. But attempting the following data filter on the Student_Course_Term table results in a "No fact table exists at the requested level of detail" error:
OR
"Courses Term"."FACULTY_COURSE_TERM"."FACULTY_ID" = VALUEOF(NQ_SESSION."Faculty_ID")As well as trying:
OR
     "Courses Term"."FACULTY_COURSE_TERM"."FACULTY_ID" = VALUEOF(NQ_SESSION."Faculty_ID")
     AND
     "Courses Term"."FACULTY_COURSE_TERM"."CRN" = "Course Term"."STUDENT_COURSE_TERM"."CRN"
     AND
     "Courses Term"."FACULTY_COURSE_TERM"."TERM" = "Course Term"."STUDENT_COURSE_TERM"."TERM"
)Any suggestions? Does what I am attempting require physical foreign keys between the tables?
Edited by: Nick Clinite on May 21, 2013 1:34 PM

I'm not sure how that would help; by using the Faculty_ID Session Variable I can identify the CRN and Term of all courses a faculty member is teaching. But I don't think that has to do with the problem I am having?

Similar Messages

  • Crystal Reports - ECC Tables - Row level security on Multiple tables

    Hi Experts,
    We are implementing Crystal Reports directly reporting on ECC Tables.  Lot of information on row-level security has been provided by experts Ingo Hilgefort, Don Williamsand Mike Seblani, but not related to multiple tables or Wild cards
    Requirement:
    Crystal Users should have access to ALL the tables in ECC, but restricted by Company code, plant, Sales Organization, Purchasing Organization fields to what ever table it applies to. Example: MARC table should be restricted by Plant, BSEG table should be restricted by Plant and company code, GLT0 table should be restricted by Company code..etc
    Users should ONLY see their Organization related data.
    Solution Developed:
    1. We created custom authorization object with BUKRS and WERKS
    2. In  /CRYSTAL/RLS  we used Wild Cards *, +  rather than specific table  and referenced the custom authorization object with =BUKRS and =WERKS  in the Field Value
    3. Enabled global lock
    4. Custom Authorization object was added to user-profiles with corresponding restrictions
    *Observation:*
    1. This security works when a crystal report was developed on a ECC table which has both BUKRS and WERKS
    2. This setup DOES NOT work when a crystal report developed on a table with either one of BUKRS or WERKS
        Example: Does not work on MARC table - error message "Database connection error: /CRYSTAL/OSQL_EXECUTE_QUERY Message: field T0~BUKRS" unknown"
       Does not work on GLT0 table - error message "Database connection error: /CRYSTAL/OSQL_EXECUTE_QUERY Message: field T0~WERKS unknown"
    Trouble Shooting:
    In the "where clause" of the internal ABAP code generated for MARC, system is checking for BUKRS - which  should not be the expected result
    ANYTHING WRONG IN THE SECURITY SETUP ? PLEASE ADVICE
    Note: Document "BusinessObjects XI Release 2, Integration Kit for SAP, Installation Guide" does not talk much about this multiple table restriction. Any other document to be referred to ?

    I'm not sure how that would help; by using the Faculty_ID Session Variable I can identify the CRN and Term of all courses a faculty member is teaching. But I don't think that has to do with the problem I am having?

  • How to implement row level security using external tables

    Hi All Gurus/ Masters,
    I want to implement row level security using external tables, as I'm not sure how to implement that. and I'm aware of using it by RPD level authentication.
    I can use a filter condition in my user level so that he can access his data only.
    But when i have 4 tables in external tables
    users
    groups
    usergroups
    webgrups
    Then in which table I need to give the filter conditions..
    Pl let me know this ...

    You pull the Group into a repository variable using a session variable init block, then reference that variable in the data filters either in the LTS directly or in the security management as Filters. You reference it with the syntax VALUEOF("NQ_SESSION.Variable Name")
    Hope this helps

  • Row Level Security Not working for the ECC table.

    Hi All,
    We have created a crystal report using SQL Driver.
    We have set the row level security on PA0001 table so that we can restrict the query based on Company Code.
    But when I run the report, it bypasses the row level security and gives access.
    Am I missing some configuration?

    Hi Ingo,
    Security is set up using /crystal/rls transaction. A custom auth object is used for checking the company code with a single field "BUKRS".
    This custom auth object is maintained for the PA0001 table.
    This object is added at the role level with the restricted access to the Company Code..

  • How To Setup User Row Level Security In Answers From Values In Table

    I am trying to setup row level security when a user logs into BI Answers. Basically I want the user to create any report that they would like but only see the data that they are associated to being retrieved in the Answer Report results. I have users stored in an Oracle authentication table where they have multiple values for schools that they can view. I have data in my RPD file that contain tables with multiple rows for schools. What I would like is to capture the associated school values for the user logged into BI Answers and place a filter on the data being retrieved in the RPD file to only show rows for the user's associated schools. Can I add a WHERE clause on the Business Model and Mapping layer of the RPD that would retrieve the multiple associated schools in my authentication table and filter/match them (IN clause maybe) to the school values in the RPD data being retrieved?
    Thank you in advance for any information you my have to help me along,
    Kyle

    Turribeach,
    I appologize, I did not use those exact words to search on in the forum. I should have and what I did use didn't turn anything up for my situation.
    Thank you for the link. It helped me find the below link which describes the setup in detail and resolved my issue:
    http://oraclebizint.wordpress.com/2008/06/30/oracle-bi-ee-1013332-row-level-security-and-row-wise-intialized-session-variables/
    What I needed was a row-wise variable/initialization block that stored the multiple school values for my logged in user. I then edited the "Content" tab of the Logical Table Source with a WHERE/IN clause that filtered down the result set based on my variable/initialization block SQL query.
    This solution works great!
    Thanks again!

  • Row-level Security Filters applied to Columns and Tables only? no Areas?

    Good day all,
    Just quick question (obiee 10.3.3.2) - Is there a way to edit row-level security using Whole subject areas (instead of bringing in the individual Fact tables and applying filters by copying/pasting them).
    Follow up question - if I have nested facts in presentation layer (ones preceding with "-" - do I specifically add them to conditions, or would they be inherited by only including parent fact)?
    Thanks!
    Message was edited by:
    wildmight

    I'm not sure how that would help; by using the Faculty_ID Session Variable I can identify the CRN and Term of all courses a faculty member is teaching. But I don't think that has to do with the problem I am having?

  • OBIEE Row-Level Security Inquiry

    I had discussed a security requirement with one of our resources and it seems like a simple concept but for some reason I can’t think of simple way to implement in OBIEE.
    If we have a fact table with a security column that has values which state what groups can see the data in that row (Multiple groups separated by semi-colons). The data in the row is layed out like this:
    Group 1;Group 2;Group 3;Group 4
    There is a user and group mapping table as well where if I pull a user (Say User1) the data in the column for their group assignments would look like:
    Group 3;Group 10; Group 11
    Since this user is in Group 3 they can see the values in that row of the fact table above (Because Group 3 appears in both).
    Now I can run a session variable to get the user groups but how to then correlate to what rows they can see in that fact table is where I am stuck.
    Can I solicit any suggestions?

    They are various problems with your approach. To start with let's how OBIEE would like you to have the data:
    State Sales
    1 99
    2 30
    3 50
    Then your user to group table should be like this:
    User State
    1 1
    1 2
    1 3
    2 1
    3 3
    You would then do an row-wise Init Block to populate the GROUP variable. Then you simply do a filter in your BMM layer State = VALUEOF(NQ_SESSION.GROUP). Note that GROUP is that a list of groups so OBIEE will take care to convert this to SQL correctly. Now the way you have your data I don't think you can easily do row-level security. Basically what you need is to have your Group as dimension in your fact. What you have a is concatenated value which is useless. Also your user to group mapping table needs to be flat so you can do the row-wise init block. Hope it helps.

  • VPD (Row Level Security) Implementation at Middle Layer

    Hi All,
    Is there any provison to implement Row Level Security at the Entity Object level?
    We have a table where in some rows need to be displayed based on the user logged in.
    We are aware of the VPD implementation using a function and adding a policy.
    We are looking for implementing VPD at the Middle Tier.
    Any help in this regard will be greatly appreciated.
    Thanks in Advance,
    Raghu

    Raghu,
    Assuming you are talking about ADF Entity Objects - yes. The standard way of doing this would be to over-ride prepareSession() in your Application Module to set whatever information you may need in the database session in order to identify your user and use that information in your VPD policy. If you Google about, you can find some good information, including [url http://blogs.oracle.com/jheadstart/2007/11/row_level_security_using_vpd_a.html]this (it's for JHeadstart, but the concept applies just fine).
    John

  • Row Level Security not working for SAP R/3

    Hi Guys
    We have an environment where the details are as mentioned below:
    1. Crystal Reports are created using Open SQL driver to extract data from SAP R/3 using the SAP Integration Kit.
    2. The SAP roles are imported in Business Objects CMC.
    3. Crystal Reports are published on the Enterprise as well.
    3. Authorization objects are created in SAP R/3 and added as required for the row level security as mentioned in the SAP Installation guide as well. The aim is when the user logs into the Infoview and refreshes the report he should only see data that he is meant to so through the authorization objects.The data security works very much fine when the reports are designed directly on the table but when the reports are built on the Business View it doesnt work hence the user is able to see all data.
    Any help in this issue is greatly appreciated.
    Thanks and Regards
    Kamal

    Hi,
    In order for row level security to work for you using the OpenSql driver, you need to configure the Security Definition Editor on your SAP server.  This is a server side tool which the Integration solution for SAP offers as a transport.
    This tool defined which tables are to be restricted based on authorizations.
    However since you are seeing the issue on reports based on Business Views, you need to identify whether the Business View is configured in such a way where the user refreshing the report is based on the user logging into Infoview.  If the connection to your SAP server is always established with the same user when BV is used then you security definition is pointless.
    You can confirm this by tracing your SAP server to identify what user is being used to logon to SAP to refresh the reports.
    thanks
    Mike

  • Setting up Row Level Security in EPM 11.1.1.3

    I have been following the Administration guide but failed to setup row level security in EPM 11.1. Please advise which part of my steps are wrong. (note I am using MS SQL Server for the EPM Shared Services and Workspace database, everything under Windows env)
    i) Enable row level security in Workspace.
    Step 1) Define a ODBC Data Source named "EPM_WS" in Windows. The ODBC Data Source points to the MS SQL Server database of EPM Workspace since it contains the 3 tables (BRIOSECG, BRIOSECP, BRIOSECR) related to row-level-security.
    Step 2) Login to workspace, select "Administer"->"Configuration Console". Edit "Interactive Reporting Data Access Services" and add a data source with ODBC->MS SQL Server -> "EPM_WS" as the name of datasource. Restart "Interactive Reporting Data Access Services".
    Step 3) Login to workspace, select "Administer"->"Row Level Security". Check "Enable Row Level Security", Choose ODBC->MS SQL Server-> fill in "EPM_WS" as Data Source Name"-> Provide correct user name and password. Click "Save Properties"
    Step 4) It always prompt "Server error setting the Connectivity. Recommended Action: Logoff and logon again. If problem persists contact your local security administrator."
    Any log I can inspect for the connectivity error?
    ii) Configure Row Level Security setting
    I know that for Hyperion IR, there is a file row_level_security.bqy comes with the installation. User can use this bqy file to configure the actual row level security setting. However, I cannot locate this bqy file in the EPM 11.1 installation. What is the proper step for setting up the row level security configuration?
    thank you very much.

    I have been following the Administration guide but failed to setup row level security in EPM 11.1. Please advise which part of my steps are wrong. (note I am using MS SQL Server for the EPM Shared Services and Workspace database, everything under Windows env)
    i) Enable row level security in Workspace.
    Step 1) Define a ODBC Data Source named "EPM_WS" in Windows. The ODBC Data Source points to the MS SQL Server database of EPM Workspace since it contains the 3 tables (BRIOSECG, BRIOSECP, BRIOSECR) related to row-level-security.
    Step 2) Login to workspace, select "Administer"->"Configuration Console". Edit "Interactive Reporting Data Access Services" and add a data source with ODBC->MS SQL Server -> "EPM_WS" as the name of datasource. Restart "Interactive Reporting Data Access Services".
    Step 3) Login to workspace, select "Administer"->"Row Level Security". Check "Enable Row Level Security", Choose ODBC->MS SQL Server-> fill in "EPM_WS" as Data Source Name"-> Provide correct user name and password. Click "Save Properties"
    Step 4) It always prompt "Server error setting the Connectivity. Recommended Action: Logoff and logon again. If problem persists contact your local security administrator."
    Any log I can inspect for the connectivity error?
    ii) Configure Row Level Security setting
    I know that for Hyperion IR, there is a file row_level_security.bqy comes with the installation. User can use this bqy file to configure the actual row level security setting. However, I cannot locate this bqy file in the EPM 11.1 installation. What is the proper step for setting up the row level security configuration?
    thank you very much.

  • How to check the row level security in TOAD for oracle

    Hi ,
    for ex, i have 2 types of users
    normal user and super user
    super user can see the group set (some column name) created by normal user
    but normal user can not see the set created by super user
    this set crestion aslso has 3 types "U','P',S'
    P & S can be viewed by even normal user
    but U should not
    so here we are having some row level security for the normal user .....
    So, in TOAD for oracle how to check that......
    Let me know if i'm not clear

    Like
    I'm the super user....
    And some records are inserted to a table by different users ('a' , 'b', etc....)
    So,if user 'a' logins then he can be able to see only the records inserted by 'a' only...
    how to see in TOAD where such type of scripts (filter conditions) are written.....

  • Row level security in Hyperion System 9 - 9.3.1

    Hi Gurus,
    I have a requirement where the users get to see records in a table based on their localization code. This is currently implemented using views.
    The view has a set of conditions which checks the localization table with te employee table. For example, if any of the first manager, second manager etc.. localization code
    matches then they get to see records for that location.
    The RLS in Hyperion uses Groups to assign security rules. But in my case, the determination is dynamic based on the localization code. And these things change depending on employee movement, transfer, promotion etc..
    In such a scenario, can I use RLS only if I know a set Groups of users and where they belong to? Can RLS accomodate my above said requirement?
    z

    Follow the steps in the following link to set up OID and Row level security:
    http://www.rittmanmead.com/2007/05/21/using-initialization-blocks-with-ldap-and-database-queries-to-control-authentication-and-authorization/
    Instructions for the link above:
    1.In place of Edit Data Source as database you have to select LDAP,define the groups and default initializer as filter expression.
    2.A more simpler approach ,is to create the groups explicitely using the Security Manager in BI Administrator, add filters to those groups, and assign users to those groups.
    Otherwise follow Matt's view
    Thanks,
    Amrita

  • Row level security not working if I hit the aggregate

    I have applied row level security on presentation layer , however it does not work if the report hit the aggregate any idea on this...

    Hi Ingo,
    Security is set up using /crystal/rls transaction. A custom auth object is used for checking the company code with a single field "BUKRS".
    This custom auth object is maintained for the PA0001 table.
    This object is added at the role level with the restricted access to the Company Code..

  • Row level security in OBIEE 11g: Which is better: VPD or RPD

    We can apply row level security in OBIEE by 2 ways.
    1. by Creating Initialize Block in RPD
    2. or Applying VPD in Database, which restricts source tables
    Which one is more efficient and why?
    Thanks,
    Sunil Jena

    you will have some degree of performance degradation with either approach since you are adding additional filters so I would not use that as the main factor to decide. You need to assess your actual requirements. What is the basis by which you are planning on doing the security. Is LDAP the main basis for the security? Do you plan to use certain roles? if your security is more based on roles at the application level, then it may be easier to define at the Application level (OBIEE)...if its just based on a certain user ID for a set of tables, then perhaps VPD can work. If helpful, pls mark.

  • Row level security with session variables, not a best practice?

    Hello,
    We are about to implement row level security in our BI project using OBIEE, and the solution we found most convenient for our requirement was to use session variables with initalization blocks.
    The problem is that this method is listed as a "non best practice" in the Oracle documentation.
    Alternative Security Administration Options - 11g Release 1 (11.1.1)
    (This appendix describes alternative security administration options included for backward compatibility with upgraded systems and are not considered a best practice.)
    Managing Session Variables
    System session variables obtain their values from initialization blocks and are used to authenticate Oracle Business Intelligence users against external sources such as LDAP servers or database tables. Every active BI Server session generates session variables and initializes them. Each session variable instance can be initialized to a different value. For more information about how session variable and initialization blocks are used by Oracle Business Intelligence, see "Using Variables in the Oracle BI Repository" in Oracle Fusion Middleware Metadata Repository Builder's Guide for Oracle Business Intelligence Enterprise Edition.
    How confusing... what is the best practice then?
    Thank you for your help.
    Joao Moreira

    authenticating / authorizing part is take care by weblogic and then USER variable initialized and you may use it for any initblocks for security.
    Init block for authenticating / authorizing and session variables are different, i guess you are mixing both.

Maybe you are looking for

  • How to get each value from a parameter passed like this '(25,23,35,1)'

    Hi One of the parameter passed to the function is FUNCTION f_main_facility(pi_flag_codes VARCHAR2) return gc_result_set AS pi_flag_codes will be passed a value in this way '(25,23,35,1)' How to get each value from the string like 25 first time 23 sec

  • What kind of USB devices?

    Hi, folks. What kind of USB devices can I plug to TC? Only HDDs and printers? If I plug USB speakers, will my Mac stream sound (something like AirTunes in AirPort Express)? Can I sync my iPhone if I hook my dock to TC? Any other ideas I could use TC

  • Idoc in status 12 doesnt reach sap pi

    Hi folks, I have an Idoc2file scenario which is working fine in most cases but occasionnaly a message gets lost: SAP is sending the Idoc to port (goes to stat 03). There is no rfc error, SM58 and table ARFCSSTATE is empty. I run RBDMOIND and status g

  • Where is my back and printer buttons

    All of a sudden, I no longer have my back , printer or file. how do I get them back

  • Imac 11.3 mirroring

    the specs say mid 2011. Will the imac 11.3 work for mirroring