proxy users - DBA_AUDIT_TRAIL [message #634043] |
Tue, 03 March 2015 09:08  |
 |
candi
Messages: 39 Registered: July 2012
|
Member |
|
|
Does anyone have any ideas for a query for audit of proxy users? For audit reasons generic logins no longer allowed. Querying DBA_AUDIT_TRAIL - as in report showing proxy user activity - PROXY_SESSION_ID = SESSION_ID.
not getting results required from joining table to itself i.e.
select A.OS_USERNAME, A.USERNAME,A.TIMESTAMP, A.ACTION, A.ACTION_NAME, A.COMMENT_TEXT, A.SESSIONID, A.PROXY_SESSIONID
FROM DBA_AUDIT_TRAIL A, DBA_AUDIT_TRAIL B
WHERE A.PROXY_SESSIONID = B.SESSIONID
thanks in advance!
|
|
|
|
|
|
|
|
|
|
|
|
|
Re: proxy users - DBA_AUDIT_TRAIL [message #634059 is a reply to message #634043] |
Tue, 03 March 2015 12:49   |
John Watson
Messages: 8803 Registered: January 2010 Location: Global Village
|
Senior Member |
|
|
You just need to enable te audit of the proxy. For example,
audit select table on emp by scott on behalf of fred;
--update: sorry, I had slightly wrong syntax. You can't audit access to a table, only use of a privilege.
So it would have to be:
audit select table by scott on behalf of fred;
[Updated on: Tue, 03 March 2015 17:12] Report message to a moderator
|
|
|
Re: proxy users - DBA_AUDIT_TRAIL [message #634250 is a reply to message #634059] |
Fri, 06 March 2015 08:43  |
 |
candi
Messages: 39 Registered: July 2012
|
Member |
|
|
John Watson wrote on Tue, 03 March 2015 12:49You just need to enable te audit of the proxy. For example,
audit select table on emp by scott on behalf of fred;
--update: sorry, I had slightly wrong syntax. You can't audit access to a table, only use of a privilege.
So it would have to be:
audit select table by scott on behalf of fred;
This is not an option as proxy user will be creating tables etc.
I just want to show, in a view on DBA_AUDIT_TRAIL, that the login/actions is a proxy and not the schema name.
The username field of dba_audit_trail just shows the schema name once the proxy has logged in.
So proxy logs in - 2 entries in dba_audit_trail for login and authentication by proxy. Then all subsequent tasks (create/truncate etc.) are shown as the schema (generic) user in dba_audit_trail.
|
|
|