Skip to content

Commit 7e38416

Browse files
jputrinoADubhlaoichshaun-nx
authored
fix links and product name usage in NAP WAF config guide (#3972)
- fixes broken links to NAP WAF docs - fixes product name usage for NIC and NAP WAF throughout the doc Signed-off-by: Jodie Putrino <[email protected]> Co-authored-by: Alan Dooley <[email protected]> Co-authored-by: Shaun <[email protected]>
1 parent f6f0715 commit 7e38416

File tree

1 file changed

+36
-37
lines changed

1 file changed

+36
-37
lines changed

docs/content/app-protect-waf/configuration.md

Lines changed: 36 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,47 @@
11
---
22
title: Configuration
3-
4-
description: "This document describes how to configure the NGINX App Protect WAF module."
3+
description: "Learn how to use NGINX Ingress Controller to configure NGINX App Protect WAF."
54
weight: 1900
65
doctypes: [""]
76
toc: true
87
docs: "DOCS-578"
98
aliases: ["/app-protect/configuration/"]
109
---
1110

12-
> Check out the complete NGINX Ingress Controller with App Protect WAF example resources on GitHub [for VirtualServer resources](https://github.com/nginxinc/kubernetes-ingress/tree/v3.1.1/examples/custom-resources/app-protect-waf) and [for Ingress resources](https://github.com/nginxinc/kubernetes-ingress/tree/v3.1.1/examples/ingress-resources/app-protect-waf).
11+
> Check out the complete NGINX Ingress Controller with NGINX App Protect WAF example resources on GitHub [for VirtualServer resources](https://github.com/nginxinc/kubernetes-ingress/tree/v3.1.1/examples/custom-resources/app-protect-waf) and [for Ingress resources](https://github.com/nginxinc/kubernetes-ingress/tree/v3.1.1/examples/ingress-resources/app-protect-waf).
1312
1413
## Global Configuration
1514

16-
The NGINX Ingress Controller has a set of global configuration parameters that align with those available in the NGINX App Protect WAF module. See [ConfigMap keys](/nginx-ingress-controller/configuration/global-configuration/configmap-resource/#modules) for the complete list. The App Protect parameters use the `app-protect*` prefix.
15+
NGINX Ingress Controller has a set of global configuration parameters that align with those available in NGINX App Protect WAF. See [ConfigMap keys](/nginx-ingress-controller/configuration/global-configuration/configmap-resource/#modules) for the complete list. The NGINX App Protect WAF parameters use the `app-protect*` prefix.
1716

18-
## Enabling App Protect
17+
## Enable NGINX App Protect WAF
1918

2019
You can enable and configure NGINX App Protect WAF on the Custom Resources (VirtualServer, VirtualServerRoute) or on the Ingress-resource basis.
2120

22-
To configure NGINX App Protect WAF on a VirtualServer resource, you would create a Policy Custom Resource referencing the APPolicy Custom Resource, and add this to the VirtualServer definition. See the documentation on the [App Protect WAF Policy](/nginx-ingress-controller/configuration/policy-resource/#waf).
21+
To configure NGINX App Protect WAF on a VirtualServer resource, you would create a Policy Custom Resource referencing the APPolicy Custom Resource, and add this to the VirtualServer definition. See the documentation on the [NGINX App Protect WAF Policy](/nginx-ingress-controller/configuration/policy-resource/#waf).
2322

24-
To configure NGINX App Protect WAF on an Ingress resource, you would apply the [App Protect annotations](/nginx-ingress-controller/configuration/ingress-resources/advanced-configuration-with-annotations/#app-protect) to each desired resource.
23+
To configure NGINX App Protect WAF on an Ingress resource, you would apply the [`app-protect` annotations](/nginx-ingress-controller/configuration/ingress-resources/advanced-configuration-with-annotations/#app-protect) to each desired resource.
2524

2625

27-
## App Protect WAF Policies
26+
## NGINX App Protect WAF Policies
2827

29-
You can define App Protect WAF policies for your VirtualServer, VirtualServerRoute, or Ingress resources by creating an `APPolicy` [Custom Resource](https://kubernetes.io/docs/concepts/extend-kubernetes/api-extension/custom-resources/).
28+
You can define NGINX App Protect WAF policies for your VirtualServer, VirtualServerRoute, or Ingress resources by creating an `APPolicy` [Custom Resource](https://kubernetes.io/docs/concepts/extend-kubernetes/api-extension/custom-resources/).
3029

31-
> **Note**: The fields `policy.signature-requirements[].minRevisionDatetime` and `policy.signature-requirements[].maxRevisionDatetime` are not currently supported.
30+
> **Note**: The fields `policy.signature-requirements[].minRevisionDatetime` and `policy.signature-requirements[].maxRevisionDatetime` are not supported.
3231
33-
> **Note**: [The Advanced gRPC Protection for Unary Traffic](/nginx-app-protect/configuration/#advanced-grpc-protection-for-unary-traffic) only supports providing an `idl-file` inline. The fields `policy.idl-files[].link`, `policy.idl-files[].$ref`, and
32+
> **Note**: [The Advanced gRPC Protection for Unary Traffic](/nginx-app-protect-waf/configuration-guide/configuration/#grpc-protection-for-unary-traffic) only supports providing an `idl-file` inline. The fields `policy.idl-files[].link`, `policy.idl-files[].$ref`, and
3433
`policy.idl-files[].file` are not supported. The IDL file should be provided in field `policy.idl-files[].contents`. The value of this field can be base64 encoded. In this case the field `policy.idl-files[].isBase64` should be set to `true`.
3534

36-
> **Note**: [External References](/nginx-app-protect/configuration-guide/configuration/#external-references) in the Ingress Controller are deprecated and will not be supported in future releases.
35+
> **Note**: [External References](/nginx-app-protect-waf/configuration-guide/configuration/#external-references) in the Ingress Controller are deprecated and will not be supported in future releases.
3736
38-
To add any [App Protect WAF policy](/nginx-app-protect/declarative-policy/policy/) to an Ingress resource:
37+
To add any [NGINX App Protect WAF policy](/nginx-app-protect-waf/declarative-policy/policy/) to an Ingress resource:
3938

4039
1. Create an `APPolicy` Custom resource manifest.
4140
2. Add the desired policy to the `spec` field in the `APPolicy` resource.
4241

4342
> **Note**: The relationship between the Policy JSON and the resource spec is 1:1. If you're defining your resources in YAML, as we do in our examples, you'll need to represent the policy as YAML. The fields must match those in the source JSON exactly in name and level.
4443
45-
For example, say you want to use the [DataGuard policy](/nginx-app-protect/declarative-policy/policy/#policy/data-guard) shown below:
44+
For example, say you want to use the [DataGuard policy](/nginx-app-protect-waf/declarative-policy/policy/#policy/data-guard) shown below:
4645

4746
```json
4847
{
@@ -100,22 +99,22 @@ To add any [App Protect WAF policy](/nginx-app-protect/declarative-policy/policy
10099
enforcementUrls: []
101100
```
102101
103-
> Notice how the fields match exactly in name and level. The Ingress Controller will transform the YAML into a valid JSON App Protect WAF policy config.
102+
> Notice how the fields match exactly in name and level. NGINX Ingress Controller will transform the YAML into a valid JSON WAF policy config.
104103
<br>
105104
106-
## App Protect WAF Logs
105+
## NGINX App Protect WAF Logs
107106
108-
You can set the [App Protect WAF log configurations](/nginx-app-protect/troubleshooting/#app-protect-logging-overview) by creating an `APLogConf` [Custom Resource](https://kubernetes.io/docs/concepts/extend-kubernetes/api-extension/custom-resources/).
107+
You can set the [NGINX App Protect WAF log configurations](/nginx-app-protect-waf/logging-overview/logs-overview/) by creating an `APLogConf` [Custom Resource](https://kubernetes.io/docs/concepts/extend-kubernetes/api-extension/custom-resources/).
109108

110-
To add the [App Protect WAF log configurations](/nginx-app-protect/configuration/#security-logs) to a VirtualServer or an Ingress resource:
109+
To add the [log configurations](/nginx-app-protect-waf/logging-overview/security-log/) to a VirtualServer or an Ingress resource:
111110

112111
1. Create an `APLogConf` Custom Resource manifest.
113112
2. Add the desired log configuration to the `spec` field in the `APLogConf` resource.
114113
3. Add the `APLogConf` reference to the [VirtualServer Policy resource](/nginx-ingress-controller/configuration/policy-resource/#waf) or the [Ingress resource](/nginx-ingress-controller/configuration/ingress-resources/advanced-configuration-with-annotations/#app-protect) as per the documentation.
115114

116-
> **Note**: The fields from the JSON must be presented in the YAML *exactly* the same, in name and level. The Ingress Controller will transform the YAML into a valid JSON App Protect WAF log config.
115+
> **Note**: The fields from the JSON must be presented in the YAML *exactly* the same, in name and level. NGINX Ingress Controller will transform the YAML into a valid JSON WAF log config.
117116

118-
For example, say you want to [log state changing requests](/nginx-app-protect/configuration/#security-log-configuration-file) for your VirtualServer or Ingress resources using App Protect WAF. The App Protect WAF log configuration looks like this:
117+
For example, say you want to [log state changing requests](/nginx-app-protect-waf/logging-overview/security-log/#security-log-configuration-file) for your VirtualServer or Ingress resources using NGINX App Protect WAF. The log configuration looks like this:
119118

120119
```json
121120
{
@@ -145,20 +144,20 @@ spec:
145144
max_request_size: any
146145
max_message_size: 5k
147146
```
148-
## App Protect WAF User Defined Signatures
147+
## NGINX App Protect WAF User Defined Signatures
149148

150-
You can define App Protect WAF [User Defined Signatures](https://docs.nginx.com/nginx-app-protect/configuration/#user-defined-signature-definitions) for your VirtualServer or Ingress resources by creating an `APUserSig` [Custom Resource](https://kubernetes.io/docs/concepts/extend-kubernetes/api-extension/custom-resources/).
149+
You can define NGINX App Protect WAF [User-Defined Signatures](/nginx-app-protect-waf/configuration-guide/configuration/#user-defined-signatures) for your VirtualServer or Ingress resources by creating an `APUserSig` [Custom Resource](https://kubernetes.io/docs/concepts/extend-kubernetes/api-extension/custom-resources/).
151150

152151
> **Note**: The field `revisionDatetime` is not currently supported.
153152

154153
> **Note**: `APUserSig` resources increase the reload time of NGINX Plus compared with `APPolicy` and `APLogConf` resources. Refer to [NGINX Fails to Start or Reload](/nginx-ingress-controller/app-protect/troubleshooting/#nginx-fails-to-start-or-reload) for more information.
155154

156-
To add the [User Defined Signatures](https://docs.nginx.com/nginx-app-protect/configuration/#user-defined-signature-definitions) to a VirtualServer or Ingress resource:
155+
To add the [User Defined Signatures](https://docs.nginx.com/nginx-app-protect-waf/configuration-guide/configuration/#user-defined-signatures) to a VirtualServer or Ingress resource:
157156

158157
1. Create an `APUserSig` Custom resource manifest.
159158
2. Add the desired User defined signature to the `spec` field in the `APUserSig` resource.
160159

161-
> **Note**: The fields from the JSON must be presented in the YAML *exactly* the same, in name and level. The Ingress Controller will transform the YAML into a valid JSON App Protect WAF User Defined signature. There is no need to reference the user defined signature resource in the Policy or Ingress resources.
160+
> **Note**: The fields from the JSON must be presented in the YAML *exactly* the same, in name and level. The Ingress Controller will transform the YAML into a valid JSON User-Defined signature. There is no need to reference the user defined signature resource in the Policy or Ingress resources.
162161

163162
For example, say you want to create the following user defined signature:
164163

@@ -211,7 +210,7 @@ spec:
211210

212211
## OpenAPI Specification in NGINX Ingress Controller
213212

214-
The OpenAPI Specification defines the spec file format needed to describe RESTful APIs. The spec file can be written either in JSON or YAML. Using a spec file simplifies the work of implementing API protection. Refer to the [OpenAPI Specification](#https://github.com/OAI/OpenAPI-Specification) (formerly called Swagger) for details.
213+
The OpenAPI Specification defines the spec file format needed to describe RESTful APIs. The spec file can be written either in JSON or YAML. Using a spec file simplifies the work of implementing API protection. Refer to the [OpenAPI Specification](https://github.com/OAI/OpenAPI-Specification) (formerly called Swagger) for details.
215214

216215
NGINX Ingress Controller supports OpenAPI Specification versions 2.0 and 3.0.
217216

@@ -227,15 +226,15 @@ It contains violations related to OpenAPI set to blocking (enforced).
227226

228227
### Types of OpenAPI References
229228

230-
There are different ways of referencing OpenAPI Specification files. The configuration is similar to [External References](/nginx-app-protect/configuration-guide/configuration/#external-references).
229+
There are different ways of referencing OpenAPI Specification files. The configuration is similar to [External References](/nginx-app-protect-waf/configuration-guide/configuration/#external-references).
231230

232231
**Note**: Any update of an OpenAPI Specification file referenced in the policy will not trigger a policy compilation. This action needs to be done actively by reloading the NGINX configuration.
233232

234233
#### URL Reference
235234

236235
URL reference is the method of referencing an external source by providing its full URL.
237236

238-
Make sure to configure certificates prior to using the HTTPS protocol - see the [External References](/nginx-app-protect/configuration-guide/configuration/#types-of-references) for details.
237+
Make sure to configure certificates prior to using the HTTPS protocol - see the [External References](/nginx-app-protect-waf/configuration-guide/configuration/#types-of-references) for details.
239238

240239
## Configuration in NGINX Ingress Controller
241240

@@ -245,7 +244,7 @@ These are the typical steps to deploy an OpenAPI protection Policy in NGINX Ingr
245244
2. Add the reference to the desired OpenAPI file.
246245
3. Make other custom changes if needed (e.g. enable Data Guard protection).
247246
4. Use a tool to convert the result to YAML. There are many, for example: [`yq` utility](https://github.com/mikefarah/yq).
248-
5. Add the YAML properties to create an `APPolicy` Custom Resource putting the policy itself (as in step 4) within the `spec` property of the Custom Resource. Refer to [App Protect Policies](#app-protect-policies) section above.
247+
5. Add the YAML properties to create an `APPolicy` Custom Resource putting the policy itself (as in step 4) within the `spec` property of the Custom Resource. Refer to the [NGINX App Protect Policies](#nginx-app-protect-waf-policies) section above.
249248
6. Create a `Policy` object which references the `APPolicy` Custom Resource as in [this example](https://github.com/nginxinc/kubernetes-ingress/blob/v3.1.1/examples/custom-resources/app-protect-waf/waf.yaml).
250249
7. Finally, attach the `Policy` object to a `VirtualServer` resource as in [this example](https://github.com/nginxinc/kubernetes-ingress/blob/v3.1.1/examples/custom-resources/app-protect-waf/virtual-server.yaml).
251250

@@ -375,25 +374,25 @@ http://localhost/query?query_int=abc
375374

376375
The request will be blocked.
377376

378-
The `link` option is also available in the `openApiFileReference` property and is synonymous with the `open-api-files` property as seen in the App Protect WAF policy example above.
377+
The `link` option is also available in the `openApiFileReference` property and is synonymous with the `open-api-files` property as seen in the policy example above.
379378

380379
**Note**: `openApiFileReference` is not an array.
381380

382381

383382
## Configuration in NGINX Plus Ingress Controller using Virtual Server Resource
384-
In this example we deploy the NGINX Plus Ingress Controller with NGINX App Protect WAF, a simple web application and then configure load balancing and WAF protection for that application using the VirtualServer resource.
383+
In this example we deploy NGINX Ingress Controller with NGINX Plus and NGINX App Protect WAF, deploy a simple web application, and then configure load balancing and WAF protection for that application using the VirtualServer resource.
385384

386385
**Note:** You can find the example, and the files referenced, on [GitHub](https://github.com/nginxinc/kubernetes-ingress/tree/v3.1.1/examples/custom-resources/app-protect-waf).
387386

388387
## Prerequisites
389388

390-
1. Follow the installation [instructions](https://docs.nginx.com/nginx-ingress-controller/installation) to deploy the Ingress Controller with NGINX App Protect WAF.
391-
2. Save the public IP address of the Ingress Controller into a shell variable:
389+
1. Follow the installation [instructions](https://docs.nginx.com/nginx-ingress-controller/installation) to deploy NGINX Ingress Controller with NGINX Plus and NGINX App Protect WAF.
390+
2. Save the public IP address of NGINX Ingress Controller into a shell variable:
392391
```
393392
$ IC_IP=XXX.YYY.ZZZ.III
394393
```
395394

396-
3. Save the HTTP port of the Ingress Controller into a shell variable:
395+
3. Save the HTTP port of NGINX Ingress Controller into a shell variable:
397396
```
398397
$ IC_HTTP_PORT=<port number>
399398
```
@@ -407,12 +406,12 @@ Create the application deployment and service:
407406

408407
### Step 2. Deploy the AP Policy
409408

410-
1. Create the syslog service and pod for the App Protect security logs:
409+
1. Create the syslog service and pod for the NGINX App Protect WAF security logs:
411410
```
412411
$ kubectl apply -f https://raw.githubusercontent.com/nginxinc/kubernetes-ingress/v3.1.1/examples/custom-resources/app-protect-waf/syslog.yaml
413412
```
414413

415-
2. Create the User Defined Signature, App Protect WAF policy, and log configuration:
414+
2. Create the User-Defined Signature, WAF policy, and log configuration:
416415

417416
```
418417
$ kubectl apply -f https://raw.githubusercontent.com/nginxinc/kubernetes-ingress/v3.1.1/examples/custom-resources/app-protect-waf/ap-apple-uds.yaml
@@ -426,7 +425,7 @@ Create the WAF policy
426425
```
427426
$ kubectl apply -f https://raw.githubusercontent.com/nginxinc/kubernetes-ingress/v3.1.1/examples/custom-resources/app-protect-waf/waf.yaml
428427
```
429-
Note the App Protect configuration settings in the Policy resource. They enable WAF protection by configuring App Protect with the policy and log configuration created in the previous step.
428+
Note the NGINX App Protect WAF configuration settings in the Policy resource. They enable WAF protection by configuring NGINX App Protect WAF with the policy and log configuration created in the previous step.
430429
431430
### Step 4 - Configure Load Balancing
432431
@@ -458,7 +457,7 @@ To access the application, curl the coffee and the tea services. We'll use the -
458457
$ curl --resolve webapp.example.com:$IC_HTTP_PORT:$IC_IP -X POST -d "apple" http://webapp.example.com:$IC_HTTP_PORT/
459458
<html><head><title>Request Rejected</title></head><body>
460459
```
461-
As you can see, the suspicious requests were blocked by App Protect
460+
As you can see, the suspicious requests were blocked by NGINX App Protect WAF.
462461
463462
4. To check the security logs in the syslog pod:
464463
```

0 commit comments

Comments
 (0)