Class BeeperSqlFirewallTrigger

java.lang.Object
org.kawanfw.sql.api.server.firewall.trigger.BeeperSqlFirewallTrigger
All Implemented Interfaces:
SqlFirewallTrigger

public class BeeperSqlFirewallTrigger
extends Object
implements SqlFirewallTrigger
A trigger that simply beeps on the terminal if an attack is detected by a SqlFirewallManager.
Uses a slightly modified GitHub Gist created by Jacek Bzdak.
Since:
11.0
Author:
Nicolas de Pomereu
  • Constructor Details

    • BeeperSqlFirewallTrigger

      public BeeperSqlFirewallTrigger()
  • Method Details

    • runIfStatementRefused

      public void runIfStatementRefused​(SqlEvent sqlEvent, SqlFirewallManager sqlFirewallManager, Connection connection) throws IOException, SQLException
      Beeps on terminal if an attack is detected by a SqlFirewallManager
      Specified by:
      runIfStatementRefused in interface SqlFirewallTrigger
      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/JDBC Connection
      Throws:
      IOException - if an IOException occurs
      SQLException - if a SQLException occurs