Skip to content

Commit a41be86

Browse files
committed
Update docs
1 parent b933b52 commit a41be86

File tree

2 files changed

+47
-3
lines changed

2 files changed

+47
-3
lines changed

site/content/configuration/security.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@ By default, the ServiceAccount has access to all Secret resources in the cluster
3737
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/).
3838
{{< /caution >}}
3939

40-
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.
40+
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 containers to read-only, this includes `nginx-ingress-controller`, though also includes `waf-enforcer` and `waf-config-mgr` when NGINX App Protect WAFv5 is in use. This is so that the attack surface is further reduced by limiting changes to binaries and libraries.
4141

42-
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" >}}).
42+
This is not enabled by default, but can be enabled with **Helm** using the [**readOnlyRootFilesystem**]({{< relref "installation/installing-nic/installation-with-helm.md#configuration" >}}) argument in security contexts on all containers: `nginx-ingress-controller`, `waf_enforcer` and `waf_config_mgr`.
4343

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

site/content/installation/integrations/app-protect-waf-v5/installation.md

Lines changed: 45 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,26 @@ controller:
220220

221221
### Configuring `readOnlyRootFilesystem`
222222

223+
Create required volumes:
224+
225+
```yaml
226+
volumes:
227+
- name: nginx-etc
228+
emptyDir: {}
229+
- name: nginx-cache
230+
emptyDir: {}
231+
- name: nginx-lib
232+
emptyDir: {}
233+
- name: nginx-log
234+
emptyDir: {}
235+
- emptyDir: {}
236+
name: app-protect-bd-config
237+
- emptyDir: {}
238+
name: app-protect-config
239+
- emptyDir: {}
240+
name: app-protect-bundles
241+
```
242+
223243
Set `controller.securityContext.readOnlyRootFilesystem` to `true`.
224244

225245
Example Helm values:
@@ -384,8 +404,32 @@ Add `readOnlyRootFilesystem` to the NIC container and set valut to `true` as bel
384404
name: nginx-plus-ingress
385405
...
386406
securityContext:
407+
allowPrivilegeEscalation: false
408+
capabilities:
409+
add:
410+
- NET_BIND_SERVICE
411+
drop:
412+
- ALL
413+
readOnlyRootFilesystem: true
414+
runAsNonRoot: true
415+
runAsUser: 101
387416
readOnlyRootFilesystem: true
388-
...
417+
...
418+
volumeMounts:
419+
- mountPath: /etc/nginx
420+
name: nginx-etc
421+
- mountPath: /var/cache/nginx
422+
name: nginx-cache
423+
- mountPath: /var/lib/nginx
424+
name: nginx-lib
425+
- mountPath: /var/log/nginx
426+
name: nginx-log
427+
- mountPath: /opt/app_protect/bd_config
428+
name: app-protect-bd-config
429+
- mountPath: /opt/app_protect/config
430+
name: app-protect-config
431+
- mountPath: /etc/app_protect/bundles
432+
name: app-protect-bundles
389433
...
390434
```
391435

0 commit comments

Comments
 (0)