Installing the Java Module as a Netty Handler

The Next-Gen WAF Netty module is implemented as a handler which inspects HttpRequest events before forwarding the event to the next handler in the pipeline.


Download the Next-Gen WAF Java module manually or access it with Maven.

Download manually

  1. Download the Java module archive from
  2. Extract sigsci-module-java_latest.tar.gz.
  3. Deploy the jars using one of the following options:
    • Copy sigsci-module-java-{version}-shaded.jar (an uber jar with all the dependencies bundled) to your application’s classpath (e.g., %CATALINA_HOME%\webbapps\<APP_FOLDER>\WEB-INF\lib).
    • Copy sigsci-module-java-{version}.jar and its dependencies in the lib folder to your application’s classpath (e.g., %CATALINA_HOME%\webbapps\<APP_FOLDER>\WEB-INF\lib). If you already have any of the dependency jar files in your application classpath folder (i.e., for Tomcat in the WEB-INF\lib) then it is not necessary to copy them, even if the version numbers are different. The logging jars are optional based on how slf4j is configured.

Access with Maven

For projects using Maven for build or deployment, the latest version of Next-Gen WAF Java modules can be installed by adding XML to the project pom.xml file. For example:

2 <repository>
3 <id>sigsci-stable</id>
4 <url></url>
5 </repository>
9 <groupId>com.signalsciences</groupId>
10 <artifactId>sigsci-module-java</artifactId>
11 <version>LATEST_MODULE_VERSION</version>

Be sure to replace LATEST_MODULE_VERSION with the latest release of the Java module. You can find the latest version in our version file at

Install and configure

Create a new instance of WafHandler for every new connection.

  • WafHandler must be added after FlowControlHandler.
  • HttpObjectAggregator handler should be added before FlowControlHandler to inspect HTTP Post body.
  • WafHandler may send HttpResponse for blocked request.

Example deployment

1// Update configuration
4// start server and handle requests
5new ServerBootstrap(), workerGroup)
9 new ChannelInitializer<SocketChannel>() {
10 @Override
11 public void initChannel(SocketChannel ch) throws Exception {
12 ch.pipeline()
13 .addLast(new HttpServerCodec())
14 .addLast(new HttpObjectAggregator(6 * (1 << 20)))
15 .addLast(new FlowControlHandler())
16 .addLast("waf", new WafHandler())
17 .addLast(new SimpleChannelInboundHandler<FullHttpRequest>() {
19 // send response
21 });
22 }
23 })
Was this guide helpful?

Do not use this form to send sensitive information. If you need assistance, contact support. This form is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.