Audit roles
I need to audit privileges within a specific role when issued only by a user granted with that role.
Eg:
create role sample1;
grant create session to sample1;
grant create any table to sample1;
grant create procedure to sample1;
grant sample1 to sampleuser identified by sampleuser;
grant create session, create procedure to sampleuser2 identified by sampleuser2;
So, what I need is to audit sampleuser whenever incurs in one of these privileges:
CREATE SESSION
CREATE ANY TABLE
CREATE PROCEDURE
sampleuser2 wouldn't generate audit record when creating procedures as has not benn granted with sample1 role.
Best regards,
Alex