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

Docs/waf v5 docs #6694

Open
wants to merge 21 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 6 commits
Commits
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 @@ -227,6 +227,51 @@ You have two options for deploying NGINX Ingress Controller:
- **Deployment**. Choose this method for the flexibility to dynamically change the number of NGINX Ingress Controller replicas.
- **DaemonSet**. Choose this method if you want NGINX Ingress Controller to run on all nodes or a subset of nodes.


### Configuring `readOnlyRootFilesystem`

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

Example helm values:
jjngx marked this conversation as resolved.
Show resolved Hide resolved

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

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

Example helm values:
jjngx marked this conversation as resolved.
Show resolved Hide resolved

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

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

Example helm values:
jjngx marked this conversation as resolved.
Show resolved Hide resolved

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

---

### Set up role-based access control (RBAC) {#set-up-rbac}
Expand Down