Kong
This page documents an inbound integration with your Kong API Gateway.
We currently support both Kong OS and Kong Enterprise deployments by the use of a custom plugin. This plugin may be attached to either a Service or a Route within your system, we do not currently support protection of Consumers.
Install the Spherical Defense plugin
To install the custom Spherical Defense plugin, we need to be inside your Kong docker container. Our plugin is hosted on the official Luarocks
package manager and can easily be installed. Afterwards Kong must be restarted with the plugin enabled.
Adding to your Kong deployment
Our plugin can be added to either a Route
or Service
. This can be done either via the Kong Enterprise GUI or if using Kong through curl commands, all that is required is the knowledge of the exposed IP address for your Spherical Defence Instance SPHERICAL_DEFENCE_IP
. Below we list an example of either curl command to add the plugin to your services:
Adding to a Service
Adding a plugin to service is easy. All you need is the exposed IP address KONG
for the container and the name of the SERVICE
you send the following command. Note, that Kong defaults the port to 8001 to be open.
Adding to a Route
To add a plugin to a route, we require both the exposed IP address KONG
for the container and name of the ROUTE
Additional Documentation
Below we've listed the parameters associated with the plugin:
form parameter | default | description |
|
| The name of the plugin in use |
| The address of a Spherical Defence instance to which the plugin will validate before proxying the original request (required) | |
config.blocking | False | Whether malicious requests should be blocked from moving through to the service/route |
| 10000 | Timeout (milliseconds) for the request to the URL specified above. |
| 60000 | Keepalive time (milliseconds) for the request to the URL specified above. |
The plugin will execute a JSON POST
request to the Spherical instance with the following body:
Form Parameter | Description |
| The body of the original request |
| The url arguments of the original request |
| The headers of the original request |
| The uri of the original request |
| The method of the original request |
Last updated