JDBC connections bypassing logon trigger—need a solution
Oracle Product: Oracle Database 19c Enterprise Edition
Version: 19.23.0.0.0
Hi,
I have an issue regarding JDBC connections bypassing a logon trigger that is supposed to block access to my non-prod database. My goal is to block all connections except for specific users required for monitoring and maintenance, allowing me to complete some business tasks without interruptions.
I implemented the following logon trigger to enforce this restriction:
CREATE OR REPLACE NONEDITIONABLE TRIGGER SYS.AFTER_LOGON_TRG_BC
AFTER LOGON on DATABASE
BEGIN
IF SYS_CONTEXT('USERENV','SESSION_USER')
NOT IN ('DBSNMP','SYSMAN','SYSRAC') THEN
RAISE_APPLICATION_ERROR (-20001, 'Logon on database is blocked');