Kong Application Security Using Lua PlugIn

CloudGuard WAF for Kong is deployed using a Helm chart that includes a namespace-level webhook. This webhook monitors changes to the Kong IngressGateway deployment and automatically adds the necessary agent and attachment to the deployment. The configuration of the Kong Ingress controller follows standard practices for setting up gateway and virtual service resources to expose your applications.

This diagram shows an example of a Kubernetes service exposed outside the Kubernetes cluster with an Istio Ingress controller protected with CloudGuard WAF.

Prerequisites

  • Kong version 1.22.0+ cluster with RBACarrow-up-right enabled with Cluster admin permissions

  • Helm 3 Package Managerarrow-up-right installed on your local machine

  • The kubectl and wget command-line tools installed on your bastion or platform that you use to access the Kubernetes cluster

Installation

Step 1: Update your Helm chart to use the Kong image that includes the open-appsec plugin:

Add the following section to your helm install or upgrade command, do update your Kong helm chart.

For Kong OSS:

For Kong Enterprise Gateway:

Step 2: Create a KongPlugin and apply a resource to activate the plugin:

Step 3: Deploy the CloudGuard WAF Helm Chart:

Make sure you obtained the token from the Enforcement Profile page first, you will need it in the command to deploy the Helm chart.

circle-info

Obtain the <token> from the Profile page, Authentication section.

Step 4: Label your namespace and deployment:

CloudGuard WAF webhook will function only when this flag is added to the Kong Ingress Controller environment. To add the flag, run the following command:

Restart your ingress gateway deployment:

Last updated

Was this helpful?