Download presentation
Presentation is loading. Please wait.
Published byLynette Gibbs Modified over 8 years ago
1
Roles & privileges privilege A user privilege is a right to execute a particular type of SQL statement, or a right to access another user's object. The types of privileges are defined by Oracle. Role Role s, on the other hand, are created by users (usually administrators) and are used to group together privileges or other roles. They are a means of facilitating the granting of multiple privileges or roles to users.
2
System Privileges Over 100 system privileges very powerful System privileges can be very powerful ANY Oracle recommends that you configure your database to prevent regular (non-DBA) users exercising ANY system privileges System privileges providing access to objects in other schemas do not give other users access to objects in the SYS schema: but NOT in SYS schema For example, the SELECT ANY TABLE privilege allows users to access views and tables in other schemas, but NOT in SYS schema
3
Accessing Objects in the SYS Schema The SYS users and those who connect with administrative privileges (SYSDBA) can access objects in the SYS schema. Other means of allowing access to objects in the SYS schema is by granting users any of the following roles SELECT_CATALOG_ROLE SELECT_CATALOG_ROLE This role can be granted to users to allow SELECT privileges on all data dictionary views. EXECUTE_CATALOG_ROLE EXECUTE_CATALOG_ROLE This role can be granted to users to allow EXECUTE privileges for packages and procedures in the data dictionary.
4
Object Privileges Each type of object has different privileges associated with it Grant A Single Privilege CREATE TABLE test (testcol VARCHAR2(20)); GRANT SELECT ON test TO abc; Grant Multiple Privileges GRANT INSERT, DELETE ON test TO abc; Grant All Privileges GRANT ALL ON test TO abc; Grant Execute (procedures, functions, packages) GRANT EXECUTE ON getosuser TO abc;
5
Object Privileges Each type of object has different privileges associated with it Revoke A Single Privilege REVOKE SELECT ON test FROM abc; Revoke Multiple Privileges REVOKE INSERT, DELETE ON test FROM abc; Revoke All Privileges REVOKE ALL ON test FROM abc; Revoke Execute (procedures, functions, packages) REVOKE EXECUTE ON getosuser FROM abc;
6
Object Privileges Each type of object has different privileges associated with it grantor Check privileges from the grantor 's point of view Grantor Grantor is logged in SELECT grantee, table_name, privilege FROM user_tab_privs_made grantee Check privileges from the grantee 's point of view Grantee Grantee is logged in SELECT grantor, table_name, privilege FROM user_tab_privs_recd;
7
User Roles A role groups several privileges and roles, so that they can be granted to and revoked from users simultaneously. A role must be enabled for a user before it can be used by the user. CONNECT Crucial role = CONNECT Includes the following system privileges : ALTER SESSION, CREATE CLUSTER, CREATE DATABASE LINK, CREATE SEQUENCE, CREATE SESSION, CREATE SYNONYM, CREATE TABLE, CREATE VIEW
8
Creating a role CREATE ROLE CREATE ROLE You can create a role using the CREATE ROLE statement, but you must have the CREATE ROLE system privilege to do so. Typically, only security administrators have this system privilege CREATE ROLE manager IDENTIFIED BY morework; Password 'morework' is then needed in the SET ROLE statement There are other means how to authorize a role than password by an Application by an External Source by the Operating System
9
Granting a role GRANT new_dba TO michael [WITH ADMIN OPTION]; WITH ADMIN OPTION rarely granted
10
Auditing crime detection Auditing is a method of " crime detection " not "crime prevention." It simply allows the site to keep a record of actions taken with respect to the database. The level of detail can be controlled by specifying auditing BY [SESSION | ACCESS] BY [SESSION | ACCESS]. default is to audit an action only once per session. an action can be audited WHENEVER (NOT) SUCCESSFUL WHENEVER (NOT) SUCCESSFUL. Depending on the setting, you can request successes only, failures only, or both. 3 – level auditing 3 – level auditing
11
1)Statement level tracks usage of any of a related group of commands. For example the "table" statement would cause any of the following DDL commands to be audited: CREATE TABLE DROP TABLE TRUNCATE TABLE TRUNCATE TABLE. This level can be imposed across selected UserID's only, or the entire instance.
12
2)Privilege level specified system privilege tracks any command that relies on the specified system privilege. This level can also be imposed across selected UserID's only, or the entire instance
13
2)Object level given object tracks specified references to a given object (such as one table) will be imposed across all UserID's
14
Auditing options Assuming that the "fireid" user is to be audited CONNECT sys/password AS SYSDBA AUDIT ALL BY fireid BY ACCESS; AUDIT SELECT TABLE, UPDATE TABLE, INSERT TABLE, DELETE TABLE BY fireid BY ACCESS; AUDIT EXECUTE PROCEDURE BY fireid BY ACCESS;
15
Auditing data View DBA_AUDIT_TRAIL Username : Oracle Username. Terminal : Machine that the user performed the action from. Timestamp : When the action occured. Object Owner : The owner of the object that was interacted with. Object Name : The name of the object that was interacted with. Action Name : The action that occured against the object. (INSERT, UPDATE, DELETE, SELECT, EXECUTE)
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.