User Tools

Site Tools


privilegeanalysis

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
privilegeanalysis [2015/07/22 11:17] – created z0hpvkprivilegeanalysis [2025/03/08 22:24] (current) – external edit 127.0.0.1
Line 1: Line 1:
 ===== Privilege Analysis ===== ===== Privilege Analysis =====
 +It is possible to use privilege analysis without having Database Vault configured.\\
 +==== Define Policy ====
 +Below shows an example of a Role and Context Policy
 +<code>BEGIN
 +  DBMS_PRIVILEGE_CAPTURE.CREATE_CAPTURE (
 +    name      => 'rolecontext_policy',
 +    type      => DBMS_PRIVILEGE_CAPTURE.g_role_and_context,
 +    roles     => role_name_list('DBA', 'EXP_FULL_DATABASE')
 +    condition => 'SYS_CONTEXT(''USERENV'', ''SESSION_USER'') = ''SYSTEM''');
 +END;</code>
 +
 +Other types available are ...
 +  * g_database
 +  * g_role
 +  * g_context
 +
 +Use the view DBA_PRIV_CAPTURES to view details on existing privilege capture policies.\\
 +
 +==== Enable Policy ====
 +<code>BEGIN
 +  DBMS_PRIVILEGE_CAPTURE.enable_capture('rolecontext_policy');
 +END;</code>
 +
 +==== Disable Policy ====
 +After a few days have passed you must disable the capture before you can see the results
 +<code>BEGIN
 +  DBMS_PRIVILEGE_CAPTURE.disable_capture('rolecontext_policy');
 +END;</code>
 +
 +==== Generate Results ====
 +<code>BEGIN
 +  DBMS_PRIVILEGE_CAPTURE.generate_result('rolecontext_policy');
 +END;</code>
 +The following views can now be used to see the results ...
 +  * DBA_USED_SYSPRIVS
 +  * DBA_USED_SYSPRIVS_PATH 
 +  * DBA_USED_OBJPRIVS
 +  * DBA_USED_OBJPRIVS_PATH                      
privilegeanalysis.1437563829.txt.gz · Last modified: 2025/03/08 22:23 (external edit)