Hi,
i'm trying to write a logon trigger that would refuse incoming connection from user externally authenticated from a non trusted server list: there are too many risks that someone root on a machine can create an account scott on that machine to logon externally as scott on oracle.
My problem is that I don't know how to "kill" or exit current session in the pl/sql trigger ...
I've been looking in the packages dbms*, I've tried to create an application error in that trigger, but nothing does it.
Does anyone knows how to manage this ?
Here is my trigger:
create or replace trigger
system.logon_audit_trigger
after LOGON ON DATABASE
BEGIN
if(sys_context('USERENV','AUTHENTICATION_TYPE') <>'DATABASE' AND user = 'STEPHANE') then
-- during test, I do it on myself
-- kill me !!!
end if;
insert into system.stats_user_log values(
user,
sys_context('USERENV','SESSIONID'),
sys_context('USERENV','HOST'),
null,
sysdate,
null,
null
);
--COMMIT;
END;
/
Dekeyzer Stephane.
Belgium
i'm trying to write a logon trigger that would refuse incoming connection from user externally authenticated from a non trusted server list: there are too many risks that someone root on a machine can create an account scott on that machine to logon externally as scott on oracle.
My problem is that I don't know how to "kill" or exit current session in the pl/sql trigger ...
I've been looking in the packages dbms*, I've tried to create an application error in that trigger, but nothing does it.
Does anyone knows how to manage this ?
Here is my trigger:
create or replace trigger
system.logon_audit_trigger
after LOGON ON DATABASE
BEGIN
if(sys_context('USERENV','AUTHENTICATION_TYPE') <>'DATABASE' AND user = 'STEPHANE') then
-- during test, I do it on myself
-- kill me !!!
end if;
insert into system.stats_user_log values(
user,
sys_context('USERENV','SESSIONID'),
sys_context('USERENV','HOST'),
null,
sysdate,
null,
null
);
--COMMIT;
END;
/
Dekeyzer Stephane.
Belgium