Golang module install

Download and install prerequisites

The Golang module requires two prerequisite packages to be installed: MessagePack Code Generator and the Signal Sciences custom tlstext package.

Install these packages using the go get command to download and install these packages directly from their GitHub repositories:

$ go get -u -t github.com/tinylib/msgp/msgp
$ go get -u -t github.com/signalsciences/tlstext

Download and extract the Golang module

  1. Download the latest version of the Golang module from one of our websites:

    1. dl.security.fastly.com
    2. dl.signalsciences.net
    $ curl -O -L https://dl.security.fastly.com/sigsci-module-golang/sigsci-module-golang_latest.tar.gz
  2. Extract the Golang module to $GOPATH/src/github.com/signalsciences:

    $ sudo mkdir -p $GOPATH/src/github.com/signalsciences
    $ sudo tar -xf sigsci-module-golang_latest.tar.gz -C $GOPATH/src/github.com/signalsciences

Wrap your application

You will need to wrap your application in the Next-Gen WAF Golang module handler for the module to process requests and secure your application. For examples of how this could work, refer to our hello world and Gin applications with the Next-Gen WAF Golang module successfully integrated.

HINT: How to best wrap your application will depend on how your application is designed. The examples shown on our public repository are provided as an example, but the methods listed may not be ideal for your specific application.