HOME / SUPPORT / Integrate NTA with Kong in Docker

Integrate NTA with Kong in Docker

This feature is available with Invicti API Security Standalone or Bundle

The Docker installation method is perfect for testing or running the Kong API Gateway in isolated environments. It offers a fast and flexible setup, allowing you to easily deploy and manage Kong and the plugin within separate containers. This makes it an ideal solution for development and small-scale production environments, where NTA runs in its own Docker container alongside Kong Gateway, which also runs in a separate container.

IMPORTANT:

Our support team will provide the Docker images to you upon request.

This document navigates you through the configuration process of Kong into your development environment. The integration process is divided into three key steps:

Prerequisites

  • Kong API Gateway: Ensure Kong API Gateway v 3.0 or newer is installed and configured.
  • Docker: Have Docker installed and running.

Step 1: Download nta.zip and copy the plugin

  • To add our plugin to your environment, copy it into the Docker container using the following command:

docker cp ./nta kong-gateway:nta

  • Replace kong-gateway with the actual container name or container ID used in your Docker setup.
  • To locate the container ID navigate to your container and use the copy button to copy the ID.

  • To find the container name and ID in the terminal, run docker ps.

  • The terminal will confirm that the operation was successful. You can also verify this in Docker Desktop under Containers > Files.
  • In Container > Exec, run bash followed by ls -l, to display the nta executable in the root directory.

Step 2: Set environment variables

After copying the plugin to the Kong container, set the required environment variables to enable it by navigating to Containers > Exec in Docker Desktop and pasting the following commands one by one.

  • It is recommended to run bash, first.

export KONG_PLUGINS="bundled,nta"

export KONG_PLUGINSERVER_NAMES="nta"

export KONG_PLUGINSERVER_NTA_START_CMD="/nta"

export KONG_PLUGINSERVER_NTA_QUERY_CMD="/nta -dump"

  • For the first command — export KONG_PLUGINS="bundled,nta" — be sure to include all your existing plugins in the list. Since we don't know which plugins you currently have, you will need to modify the command to include them all, separated by commas, and then add nta to the list.
  • The remaining commands are to be used as they are.

Step 3: Restart Kong

To apply the changes, restart Kong using one of the following commands:

kong reload

Or

kong restart