Class JdbcLoggerSqlFirewallTrigger
java.lang.Object
org.kawanfw.sql.api.server.firewall.trigger.JdbcLoggerSqlFirewallTrigger
- All Implemented Interfaces:
SqlFirewallTrigger
public class JdbcLoggerSqlFirewallTrigger extends Object implements SqlFirewallTrigger
A trigger that will
Table structure is:
INSERT the SqlEvent info and the
sqlFirewallManager class name into a aceql_denied_request SQL table.
Table structure is:
create table aceql_denied_request
(
date_event timestamp not null,
username varchar(254) not null,
ip_address varchar(254) not null,
sql_database varchar(254) not null,
sql_firewall_manager varchar(254) not null,
sql_statement varchar(4000) not null,
is_metadata integer ,
is_prepared_statement integer ,
parameter_values varchar(4000) not null
);
- Since:
- 11.0
- Author:
- Nicolas de Pomereu
-
Constructor Summary
Constructors Constructor Description JdbcLoggerSqlFirewallTrigger() -
Method Summary
Modifier and Type Method Description voidrunIfStatementRefused(SqlEvent sqlEvent, SqlFirewallManager sqlFirewallManager, Connection connection)LInsert into the aceql_denied_request SQL tableClientEventand theSqlFirewallManagerclass name
-
Constructor Details
-
JdbcLoggerSqlFirewallTrigger
public JdbcLoggerSqlFirewallTrigger()
-
-
Method Details
-
runIfStatementRefused
public void runIfStatementRefused(SqlEvent sqlEvent, SqlFirewallManager sqlFirewallManager, Connection connection) throws IOException, SQLExceptionLInsert into the aceql_denied_request SQL tableClientEventand theSqlFirewallManagerclass name- Specified by:
runIfStatementRefusedin interfaceSqlFirewallTrigger- Parameters:
sqlEvent- the SQL event asked by the client side. Contains all info about the SQL call (client username, database name, IP Address of the client, and SQL statement details).sqlFirewallManager- the instance that triggers this call.connection- The current SQL/JDBCConnection- Throws:
IOException- if an IOException occursSQLException- if a SQLException occurs
-