Answered step by step
Verified Expert Solution
Question
1 Approved Answer
CST 8 2 7 6 - Advanced Database Topics Assignment 3 : Implementing Data Integrity and Security ( 1 0 % ) This assignment relates
CST Advanced Database Topics
Assignment : Implementing Data Integrity and Security
This assignment relates to the following Course Learning Requirements:
CLR Administer a DBMS using knowledge of SQL database security features, globalization and database architecture storage memory and processes
CLR Manage database system security and privacy controls
CLR Build database systems that directly support internationalization and globalization
CLR Explore and gain practical experience in current advanced database technology
Objectives of the Assignment
You will draft a script to create a table and restrict its access at the table and row level. You will then setup an audit on the table to track CRUD operations on that table.
Resources
Review the following Oracle resources before starting the assignment.
Creating ORACLE Virtual Private Database Policies
Auditing CDB and PDB level in Oracle Multitenant managescriptcom
Instructions
Copypaste all screenshots within their designated areas in the assignment instructions.
Using SQLPLUS connect to SYS and create a new USER for this assignment named USERA Connect to that user and create a table called ASSIGN with one column. Name that column after your own first name eg Bob, Sarah, Mehmet and make it a primary key.
Create a series of FOR..LOOPs and the operator to populate the table with test data
rows where the first letter in the column is A Have A be followed by a number.
rows where the first letter in the column is M Have M be followed by a number.
rows where the first letter in the column is Z Have Z be followed by a number.
rows where the first letter in the column is B Have B be followed by a number.
all rows must be unique
Run SELECT FROM ASSIGN to confirm your table was populated.
Provide screenshots showing your SQL statements used that were successfully ran to create the user, create the table, populate the table, and the SELECT showing the population was successful.
Use SQLPLUS, connect as SYS and create the following roles and grant them the tablelevel privileges to the ASSIGN table
RLREADONLY access
RLCRUD access
RLROWA access
RLROWM access
RLROWZ access
Do not use views. Provide screenshots showing your SQL statements used that were successfully ran to create each role and apply each grant.
Use SQLPLUS, connect to SYS and create the users USERA USERB USERC USERD USER E with the needed privileges to access tables owned by the ASSIGN user. Then assign the roles to the corresponding user.
grant RLROWA to USERA
grant RLROWM to USERB
grant RLROWZ to USERC
grant RLREADONLY to USERD
grant RLCRUD to USERE
Provide a screenshot showing your SQL statements used that were successfully ran to create each role and apply each grant.
Using SQLPLUS, connect to USERA and create a VPD policy that checks the role of the user accessing the table. To determine the role in your VPD function, use SELECT INTO, the SYSDBAROLES table, the SYSCONTEXT function, and the COUNT function. To avoid a compile error, you will need to grant select access on DBAROLES to USERA Code the following logic
IF the role is RLREADONLY or RLCRUD then return a blank predicate
IF the role is anything else, return the predicate
Connect to USERC USERD and USERC to test your VPD policy. For each user, run the access test SELECT FROM USERAASSIGN
Provide screenshots showing your SQL statements used that were successfully ran to create the function, create the policy, and shows the testing SELECT with its results for each user.
Modify the function in Step IF the role is RLROWA then return a predictate that would filter out and only return rows that start start with an A Do not use double quotes. Using SQLPLUS, create your function and policy then test your modification by connecting to USERA and running the access test. Provide screenshots showing your SQL statements used that were successfully ran to create the function, create the policy, and shows the testing SELECT with its results.
Modify the function in Step IF the role is RLROWM then return a predictate that would filter out and only return rows that start start with an M Using SQLPLUS, create your function and policy then test your modification by connecting to USERB and running the access test. Provide screenshots showing your SQL statements used that were successfully ran to create the function, create the policy, and shows the testing SELECT with its results.
Modify the function in Step IF the role is RLROWZ then return a predictate that would filter out and only return rows that start sta
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started