Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updates to WAF v5 docs #6694

Merged
merged 27 commits into from
Nov 13, 2024
Merged
Show file tree
Hide file tree
Changes from 13 commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
5454a00
Add reference to WAFv5, enforcer and manager
jjngx Oct 21, 2024
713c270
Add manifest instructions
jjngx Oct 21, 2024
d1bf23c
Update containers' names
jjngx Oct 21, 2024
8170f8f
Update instructions for enforcer and manager
jjngx Oct 21, 2024
b5bae16
Add config snippets
jjngx Oct 21, 2024
0db7b5c
Merge branch 'main' into docs/waf-v5-docs
jjngx Oct 22, 2024
ddae488
Update naming
jjngx Oct 22, 2024
d067706
Merge branch 'main' into docs/waf-v5-docs
jjngx Oct 22, 2024
e5c65ab
Merge branch 'main' into docs/waf-v5-docs
jjngx Oct 22, 2024
0e9e57b
Update Helm and Manifest sections
jjngx Oct 23, 2024
6257317
Update Helm and Manifest sections
jjngx Oct 23, 2024
e0ddfac
Merge branch 'main' into docs/waf-v5-docs
jjngx Oct 23, 2024
b933b52
Merge branch 'main' into docs/waf-v5-docs
jjngx Oct 24, 2024
a41be86
Update docs
jjngx Oct 24, 2024
c279266
Merge branch 'main' into docs/waf-v5-docs
jjngx Oct 24, 2024
9c7bed3
Merge branch 'main' into docs/waf-v5-docs
jjngx Oct 25, 2024
d62e883
Remove empty lines
jjngx Oct 25, 2024
076ca4b
Merge branch 'main' into docs/waf-v5-docs
jjngx Oct 30, 2024
23e66e1
Merge branch 'main' into docs/waf-v5-docs
jjngx Oct 30, 2024
26eedfd
Merge branch 'main' into docs/waf-v5-docs
jjngx Oct 31, 2024
44912b7
Merge branch 'main' into docs/waf-v5-docs
jjngx Oct 31, 2024
31d643e
Merge branch 'main' into docs/waf-v5-docs
jjngx Nov 7, 2024
70c79a2
Merge branch 'main' into docs/waf-v5-docs
jjngx Nov 7, 2024
de4b697
Merge branch 'main' into docs/waf-v5-docs
jjngx Nov 11, 2024
67176a3
Merge branch 'main' into docs/waf-v5-docs
jjngx Nov 11, 2024
77a5062
Merge branch 'main' into docs/waf-v5-docs
jjngx Nov 12, 2024
4cf745d
Merge branch 'main' into docs/waf-v5-docs
jjngx Nov 13, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions site/content/configuration/security.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,14 @@ By default, the ServiceAccount has access to all Secret resources in the cluster
### Configure root filesystem as read-only

{{< caution >}}
This feature is not compatible with [NGINX App Protect WAF](https://docs.nginx.com/nginx-app-protect-waf/) or [NGINX App Protect DoS](https://docs.nginx.com/nginx-app-protect-dos/).
This feature is compatible with [NGINX App Protect WAFv5](https://docs.nginx.com/nginx-app-protect-waf-v5/). It is not compatible with [NGINX App Protect WAF](https://docs.nginx.com/nginx-app-protect-waf/) or [NGINX App Protect DoS](https://docs.nginx.com/nginx-app-protect-dos/).
{{< /caution >}}

NGINX Ingress Controller is designed to be resilient against attacks in various ways, such as running the service as non-root to avoid changes to files. We recommend setting filesystems to read-only so that the attack surface is further reduced by limiting changes to binaries and libraries.
NGINX Ingress Controller is designed to be resilient against attacks in various ways, such as running the service as non-root to avoid changes to files. We recommend setting filesystems on all three containers: `nginx-ingress-controller`, `waf-enforcer` and `waf-config-mgr` to read-only, so that the attack surface is further reduced by limiting changes to binaries and libraries.
jjngx marked this conversation as resolved.
Show resolved Hide resolved

This is not enabled by default, but can be enabled with **Helm** using the [**controller.readOnlyRootFilesystem**]({{< relref "installation/installing-nic/installation-with-helm.md#configuration" >}}) argument.
This is not enabled by default, but can be enabled with **Helm** using the [**controller.readOnlyRootFilesystem**]({{< relref "installation/installing-nic/installation-with-helm.md#configuration" >}}) argument, and in security contexts in both: `waf_enforcer` [**controller.appprotect.enforcer.securityContext{}**]({{ < relref "installation/installing-nic/installation-with-helm.md#configuration" >}}) and `waf_config_mgr` [**controller.appprotect.configManager.securityContext{}**]({{ < relref "installation/installing-nic/installation-with-helm.md#configuration" >}}).
jjngx marked this conversation as resolved.
Show resolved Hide resolved

For **Manifests**, uncomment the following sections of the deployment:
For **Manifests**, uncomment the following sections of the deployment and add sections for `waf-enforcer` and `waf-config-mgr` containers:

- `readOnlyRootFilesystem: true`
- The entire **volumeMounts** section
Expand Down Expand Up @@ -77,6 +77,10 @@ The block below shows the code you will look for:
# name: nginx-log
```

- Add **waf-enforcer** and **waf-config-mgr** container sections
- Add `readOnlyFilesystem: true` in both containers security context sections


### Prometheus

If Prometheus metrics are [enabled]({{< relref "/logging-and-monitoring/prometheus.md" >}}), we recommend [using HTTPS]({{< relref "configuration/global-configuration/command-line-arguments.md#cmdoption-prometheus-tls-secret" >}}).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ volumeMounts:

### Enabling WAF v5

Start by setting `controller.appprotect.enable` to `true` in your Helm values. This will the standard App Protect WAF fetatures.
Start by setting `controller.appprotect.enable` to `true` in your Helm values. This will the standard App Protect WAF features.
Afterwords, set `controller.approtect.v5` to `true`.
This ensures that both the `waf-enforcer` and `waf-config-mgr` containers are deployed alongside the NGINX Ingress Controller containers.
These two additional containers are required when using App Protect WAF v5.
Expand Down Expand Up @@ -218,6 +218,50 @@ controller:
```
{{< /note >}}

### Configuring `readOnlyRootFilesystem`

jjngx marked this conversation as resolved.
Show resolved Hide resolved
Set `controller.securityContext.readOnlyRootFilesystem` to `true`.

Example Helm values:

```yaml
controller:
...
securityContext:
readOnlyRootFilesystem: true
...
```

Set `controller.appprotect.enforcer.securityContext.readOnlyRootFilesystem` to `true`.

Example Helm values:

```yaml
controller:
...
appprotect:
...
enforcer:
securityContext:
readOnlyRootFilesystem: true
...
```

Set `controller.appprotect.configManager.securityContext.readOnlyRootFilesystem` to `true`.

Example Helm values:

```yaml
controller:
...
appprotect:
...
configManager:
securityContext:
readOnlyRootFilesystem: true
...
```

{{%/tab%}}

{{%tab name="With Manifest"%}}
Expand Down Expand Up @@ -329,6 +373,50 @@ Add `volumeMounts` as below:
...
```

### Configure `readOnlyRootFilesystem`

Add `readOnlyRootFilesystem` to the NIC container and set valut to `true` as below:

```yaml
...
- image: <my_docker_registery>:<version_tag>
imagePullPolicy: IfNotPresent
name: nginx-plus-ingress
...
securityContext:
readOnlyRootFilesystem: true
...
jjngx marked this conversation as resolved.
Show resolved Hide resolved
...
```

Add `readOnlyRootFilesystem` to the `waf-config-mgr` container and set value to `true` as below:

```yaml
...
- name: waf-config-mgr
image: private-registry.nginx.com/nap/waf-config-mgr:<version-tag>
imagePullPolicy: IfNotPresent
...
securityContext:
readOnlyRootFilesystem: true
...
...
```

Add `readOnlyRootFilesystem` to the `waf-enforcer` container and set value to `true` as below:

```yaml
...
- name: waf-enforcer
image: private-registry.nginx.com/nap/waf-enforcer:<version-tag>
imagePullPolicy: IfNotPresent
...
securityContext:
readOnlyRootFilesystem: true
...
...
```

### Using a Deployment

{{< include "installation/manifests/deployment.md" >}}
Expand Down