Posts

Showing posts with the label DBMS_PRIVILEGE_CAPTURE

Oracle 12c Capture Privilege Usage

Image
From Oracle 12.1 we have the ability to "record" the usage of permissions in our application and then we can narrow the permissions only to the minimal requirement. Installation CREATE USER YOSSI IDENTIFIED BY YOSSI; GRANT DBA, RESOURCE TO YOSSI; A user defined condition, when user is YOSSI (type = G_CONTEXT). BEGIN     DBMS_PRIVILEGE_CAPTURE.create_capture ( name => 'yossi_pol', TYPE => DBMS_PRIVILEGE_CAPTURE.g_context, condition => 'SYS_CONTEXT(''USERENV'', ''SESSION_USER'') = ''YOSSI''' );     DBMS_PRIVILEGE_CAPTURE.enable_capture ( 'yossi_pol' ); END; / Verify that the capture is defined and enabled COLUMN ROLES                FORMAT a20 COLUMN CONTEXT              FORMAT a30 COLUMN ENABLED              FORMAT a7   SELECT name ,        TYPE ,        enabled ,    ...