Choose an F5 WAF for NGINX deployment
Two choices shape how F5 WAF for NGINX works with F5 NGINX Ingress Controller: the integration and the policy-management method. Together, they decide which image, Helm values, bundle folder, and guides apply to you.
Every deployment makes two choices:
- Integration: How NGINX Ingress Controller runs F5 WAF for NGINX in the pod. There’s a current integration and a legacy integration. Only the integration is legacy, not F5 WAF for NGINX.
- Policy-management method: How a compiled policy gets to the pod.
Older versions of these guides used v4 and v5 to describe both choices at once. Don’t rely on that. For example, Policy Lifecycle Management (PLM) uses Kubernetes resources for policies, but it runs only on the current integration.
Each NGINX Ingress Controller deployment uses one integration. NGINX Ingress Controller detects the integration from the image, not from a setting.
| Current integration | Legacy integration | |
|---|---|---|
| Formerly | F5 WAF for NGINX v5 | F5 WAF for NGINX v4 |
| Status | Recommended | Supported, but not recommended for new deployments |
| What runs in the pod | The nginx-ingress container, plus the waf-enforcer and waf-config-mgr containers. When you turn on IP intelligence, the waf-ip-intelligence container also runs. |
The nginx-ingress container, which includes the WAF engine and the policy compiler |
| Image in the F5 registry | nginx-ic-nap-v5/nginx-plus-ingress |
nginx-ic-nap/nginx-plus-ingress |
| Bundle folder | /etc/app_protect/bundles/, on the app-protect-bundles volume |
/etc/nginx/waf/bundles/, on a volume that you mount |
| Helm values | controller.appprotect.enable=true and controller.appprotect.v5=true |
controller.appprotect.enable=true and controller.appprotect.v5=false |
| Guides | Current integration guides | Legacy integration guides |
The controller.appprotect.v5 Helm value doesn’t choose the integration. It adds the waf-enforcer and waf-config-mgr containers and the app-protect-bundles volume. Set it to match your image, because the Helm chart can’t check that they match.
Each NGINX Ingress Controller Policy resource chooses one way to get its policy. The methods fall into two groups:
- CRD-based: You define the policy in the cluster as
APPolicy,APLogConf, andAPUserSigcustom resources. The group takes its name from the custom resource definitions (CRDs) behind these resources. - Bundle-based: You compile the policy outside NGINX Ingress Controller. NGINX Ingress Controller receives the compiled
.tgzbundle.
For CRD-based policies, the -plm-storage-url command-line argument sets the method for the whole deployment. If you set it, NGINX Ingress Controller uses PLM. If you don’t, it uses in-pod compilation. The Helm chart sets this argument from controller.appprotect.plmStorage.url.
| Group | Method | Policy fields | Who compiles the policy | How the policy reaches the pod |
|---|---|---|---|---|
| CRD-based | Policy Lifecycle Management (PLM) | apPolicy and securityLogs[].apLogConf, which name appprotect.f5.com/v1 resources |
The F5 WAF Policy Controller, which the PLM Helm chart installs | NGINX Ingress Controller downloads the bundles from PLM storage. |
| CRD-based | In-pod compilation | apPolicy and securityLogs[].apLogConf, which name appprotect.f5.com/v1beta1 resources. The appprotect.f5.com/app-protect-policy and appprotect.f5.com/app-protect-security-log Ingress annotations also use this method. |
The compiler in the nginx-ingress container |
NGINX Ingress Controller writes each resource’s spec to files in the pod, where the compiler compiles them. |
| Bundle-based | Bundle sources | apBundleSource and securityLogs[].apLogBundleSource |
NGINX One Console, NGINX Instance Manager, or your own pipeline | NGINX Ingress Controller downloads the bundle from NGINX One Console, NGINX Instance Manager, or an HTTPS server. It can poll for updates. |
| Bundle-based | Local bundles | apBundle and securityLogs[].apLogBundle |
You, with the F5 WAF compiler, NGINX Instance Manager, or NGINX One Console | You copy the .tgz file into the bundle folder. |
| Method | Current integration | Legacy integration |
|---|---|---|
| Policy Lifecycle Management (PLM) | Supported | Not supported |
| In-pod compilation | Not supported | Supported |
| Bundle sources | Supported | Not supported |
| Local bundles | Supported | Supported |
These guides use the following terms:
- NGINX Ingress Controller Policy resource: A
k8s.nginx.org/v1Policyresource with aspec.wafsection. - APPolicy resource: An
appprotect.f5.comAPPolicycustom resource. - Policy bundle and log bundle: Compiled
.tgzfiles that hold a security policy or a logging profile. - Logging profile: The contents of an
APLogConfresource or a log bundle. - Bundle folder: The directory that NGINX Ingress Controller reads bundles from. It depends on the integration.
- Policy Lifecycle Management (PLM): The feature that compiles
APPolicyandAPLogConfresources outside NGINX Ingress Controller. The F5 WAF Policy Controller, which the PLM Helm chart installs, does the compiling.
Older versions of these guides used version numbers for the integrations and other names for the product. Use this table to find the current name.
| Former name | Current name |
|---|---|
| F5 WAF for NGINX v5, NAP v5, WAF v5 | Current F5 WAF for NGINX integration |
| F5 WAF for NGINX v4, NAP v4, package-based installation | Legacy integration |
| F5 WAF for NGINX, as the name of the section for the v4 integration | Legacy integration |
| NGINX App Protect WAF, App Protect, NAP | F5 WAF for NGINX |
| Kubernetes operations improvements (early access) | Policy Lifecycle Management (PLM) |
Older guides also used CRD-based to mean v4 and bundle-based to mean v5. Both terms now describe policy management only. CRD-based covers PLM and in-pod compilation. Bundle-based covers bundle sources and local bundles.
Some literal names keep the former names. For example, the controller.appprotect.v5 Helm value, the nginx-ic-nap-v5 image, and Makefile targets such as debian-image-nap-v5-plus refer to the current F5 WAF for NGINX integration. Names such as appprotect.f5.com, -enable-app-protect, and the app_protect_* NGINX directives apply to both integrations.
A platform team adds WAF protection to a new cluster. They use the current integration, which F5 recommends. Then they choose a policy-management method:
- To define policies as Kubernetes resources, they use PLM.
- If their security team manages policies in NGINX One Console or NGINX Instance Manager, they use bundle sources.
- If they compile policies in their own pipeline, they host the bundles on an HTTPS server as a bundle source, or copy them to the pod as local bundles.
An operator runs the nginx-ic-nap image and defines policies as APPolicy resources. Their deployment runs the legacy F5 WAF for NGINX integration with in-pod compilation, so they follow the legacy integration guides. When they’re ready to move, they follow Migrate from in-pod compilation to Policy Lifecycle Management. Their APPolicy resources keep working under PLM.
An operator copies a compiled policy bundle into the pod, but NGINX Ingress Controller reports that the bundle doesn’t exist. The bundle folder depends on the integration. The operator checks which integration the pod uses, then copies the bundle to the bundle folder for that integration.
NGINX Ingress Controller decides the integration from a marker file, /opt/app_protect/VERSION.common. Only legacy images include this file.
-
Check whether the pod has the marker file:
kubectl exec <POD_NAME> --namespace <NAMESPACE> --container <CONTAINER_NAME> -- ls /opt/app_protect/VERSION.commonReplace the placeholders as follows:
<POD_NAME>: The name of an NGINX Ingress Controller pod.<NAMESPACE>: The namespace of the pod.<CONTAINER_NAME>:nginx-ingressif you installed with Helm, ornginx-plus-ingressif you installed with manifests. If you setnameOverridein your Helm values, use that value.
-
Read the result:
- If the command prints
/opt/app_protect/VERSION.common, the pod runs the legacy F5 WAF for NGINX integration. - If the command reports
No such file or directory, the pod runs the current F5 WAF for NGINX integration.
- If the command prints
-
List the containers in the pod to check that they match the integration:
kubectl get pod <POD_NAME> --namespace <NAMESPACE> --output jsonpath='{.spec.containers[*].name}'Pods that run the current integration include the
waf-enforcerandwaf-config-mgrcontainers. Legacy pods don’t. If the containers don’t match the result of step 2, thecontroller.appprotect.v5Helm value doesn’t match the image. Set it totruefor images for the current integration andfalsefor legacy images.
If you pull images from the F5 registry, the image name also shows the integration. nginx-ic-nap-v5/nginx-plus-ingress is the current F5 WAF for NGINX integration, and nginx-ic-nap/nginx-plus-ingress is the legacy F5 WAF for NGINX integration.
For more information, see: