You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/waf/fundamentals/overview.md
+16-1Lines changed: 16 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,4 +20,19 @@ It is also an opportunity to explain the difference between NGINX App Protect ve
20
20
21
21
The text here will likely be synthesized from the Overview descriptions at the top of the [Administration Guides]({{< ref "/nap-waf/v4/admin-guide/install.md#overview" >}}), but there's also detail from [F5.com](https://www.f5.com/products/nginx/nginx-app-protect) that can be added.
22
22
23
-
{{</ call-out>}}
23
+
{{< /call-out >}}
24
+
25
+
[F5 WAF for NGINX](https://www.f5.com/products/nginx/nginx-app-protect) is an advanced, lightweight and high-performance web application firewall (WAF) for applications and APIs.
26
+
27
+
It provides protection for the OWASP Top 10, with additional functionality:
28
+
29
+
- HTTP response inspection and protocol compliance
30
+
- Data schema validation (JSON & XML)
31
+
- Meta character checking
32
+
- Disallowing file types
33
+
34
+
For full details, see the [Supported Security Policy features]({{< ref "/waf/policies/configuration.md">}}).
35
+
36
+
F5 WAF for NGINX is part of the [NGINX One](https://www.f5.com/products/nginx/one) premium packages and runs natively on [NGINX Plus](https://www.f5.com/products/nginx/nginx-plus) and [NGINX Ingress Controller](https://www.f5.com/products/nginx/nginx-ingress-controller).
37
+
38
+
It is platform-agnostic and supports deployment options ranging from edge load balancers to individual pods in Kubernetes clusters.
Copy file name to clipboardExpand all lines: content/waf/policies/configuration.md
+3-1Lines changed: 3 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,4 +18,6 @@ The design intention for this page is to as a single source of truth to replace
18
18
19
19
Outside of the overlapping information for Policy configuration, the existing pages also include general configuration information, such as for NGINX App Protect WAF itself. This detail can be added to a separate page, ensuring that each document acts as a solution for exactly one problem at a time.
Copy file name to clipboardExpand all lines: content/waf/tools/compiler.md
+259-3Lines changed: 259 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,10 +1,10 @@
1
1
---
2
2
# We use sentence case and present imperative tone
3
-
title: "Build and use the NGINX App Protect WAF Compiler"
3
+
title: "Build and use the F5 WAF for NGINX compiler"
4
4
# Weights are assigned in increments of 100: determines sorting order
5
5
weight: 200
6
6
# Creates a table of contents and sidebar, useful for large documents
7
-
toc: false
7
+
toc: true
8
8
# Types have a 1:1 relationship with Hugo archetypes, so you shouldn't need to change this
9
9
nd-content-type: how-to
10
10
# Intended for internal catalogue and search, case sensitive:
@@ -18,4 +18,260 @@ The design intention for this page is to act as a new place for the v5 [NGINX Ap
18
18
19
19
Information that isn't critically important to a specific task should be moved to its own page. This page is a good example of one that doesn't need to be broken up, but is still moved into a peripheral "Tools" section for when it is necessary.
20
20
21
-
{{</ call-out>}}
21
+
**13/08/2025:** What version of F5 WAF does this work with?
22
+
23
+
{{</ call-out>}}
24
+
25
+
This document describes how to use the F5 WAF for NGINX compiler, a tool for converting security policies and logging profiles from JSON to a bundle file that F5 WAF can process and apply.
26
+
27
+
You can use it to get the latest security updates for Attack Signatures, Threat Campaigns and Bot Signatures. The compiler is packaged as a Docker image and can executed using the Docker CLI or as part of a continuous integration/ continuous delivery (CI/CD) pipeline.
28
+
29
+
One or more bundle files can be referenced in the NGINX configuration file, and you can configure global settings such as the cookie seed and user-defined signatures.
30
+
31
+
32
+
## Before you begin
33
+
34
+
To complete this guide, you will need the following prerequisites:
You can can upgrade or downgrade one of the Signatures by specifying a specific version, such as _app-protect-attack-signatures-2020.04.30_.
103
+
104
+
{{< /call-out >}}
105
+
106
+
You can use the Docker registry API to list the available image tags.
107
+
108
+
Replace `<path-to-your-nginx-repo.key>` with the location of your client key and `<path-to-your-nginx-repo.crt>` with the location of your client certificate.
Never upload your F5 WAF for NGINX images to a public container registry such as Docker Hub. Doing so violates your license agreement.
141
+
142
+
{{< /call-out >}}
143
+
144
+
## Using the compiler
145
+
146
+
This section uses `version-tag` as a placeholder in its examples, following the previous section. Ensure that all input files are accessible to UID 101.
147
+
148
+
### Compile a security policy
149
+
150
+
To compile a security policy from a JSON file and create a policy bundle, run the following command:
You can incorporate the source of the policy (as `policy.json`) or logging profile (as `logging_profile.json`) into the final bundle using the `-include-source` parameter.
This will transform any configuration that relies on external references into an inline configuration within the bundled source.
200
+
201
+
Additionally, when `-include-source` is combined with `-full-export`, the policy.json within the bundle will contain the entire source policy, including any default settings from the base template.
202
+
203
+
### Compile a logging profile
204
+
205
+
To compile a logging profile, execute the command below:
206
+
207
+
```shell
208
+
docker run \
209
+
-v $(pwd):$(pwd) \
210
+
waf-compiler-<version-tag>:custom \
211
+
-l $(pwd)/log_01.json -o $(pwd)/log01.tgz
212
+
```
213
+
214
+
### View bundle information
215
+
216
+
To view information about a bundle file, such as attack signatures versions, use the following command:
217
+
218
+
```shell
219
+
docker run \
220
+
-v $(pwd):$(pwd) \
221
+
waf-compiler-<version-tag>:custom \
222
+
-dump -bundle $(pwd)/compiled_policy.tgz
223
+
```
224
+
225
+
## Global settings
226
+
227
+
The global settings allows configuration of the following items:
| seed | string | The seed value is used by F5 NGINX App Protect WAF to generate the encryption key for the cookies it creates. These cookies are used for various purposes such as validating the integrity of the cookies generated by the application. Use a random alphanumeric string of at least 20 characters length (but not more than 1000 characters). |
| $ref | Yes | string | Path to the file that contains the user defined signatures. |
243
+
{{</bootstrap-table>}}
244
+
245
+
#### Example
246
+
247
+
```json
248
+
{
249
+
"waf-settings": {
250
+
"cookie-protection": {
251
+
"seed": "80miIOiSeXfvNBiDJV4t"
252
+
},
253
+
"user-defined-signatures": [
254
+
{
255
+
"$ref": "file:///policies/uds.json"
256
+
}
257
+
]
258
+
}
259
+
}
260
+
```
261
+
262
+
{{< call-out "warning" >}}
263
+
264
+
When deploying multiple scalability instances (Such as Kubernetes deployment replicas), ensure that all policy bundles are compiled with the same global settings and security updates.
265
+
266
+
{{< /call-out >}}
267
+
268
+
269
+
## Using the compiler in a CI/CD process
270
+
271
+
When executing commands inside the compiler container, ensure that you use `/opt/app_protect/bin/apcompile` as the compiler binary.
272
+
273
+
This is particularly important if you're overriding the default entry point as part of a CI/CD process.
0 commit comments