Skip to content

Commit 3732fc6

Browse files
authored
added warning for configuration-snippets usage (#10492)
1 parent cbed4c6 commit 3732fc6

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed

docs/user-guide/nginx-configuration/annotations.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,8 @@ nginx.ingress.kubernetes.io/configuration-snippet: |
316316
more_set_headers "Request-Id: $req_id";
317317
```
318318
319-
Since version 1.9.0 this annotation is disabled by default and has to be explicitly enabled, see [allow-snippet-annotations](./configmap.md#allow-snippet-annotations). Enabling it can be dangerous in multi-tenant clusters, as it can lead to people with otherwise limited permissions being able to retrieve all secrets on the cluster. See CVE-2021-25742 and the [related issue on github](https://github.com/kubernetes/ingress-nginx/issues/7837) for more information.
319+
!!! attention
320+
Since version 1.9.0, `"configuration-snippet"` annotation is disabled by default and has to be explicitly enabled, see [allow-snippet-annotations](./configmap.md#allow-snippet-annotations). Enabling it can be dangerous in multi-tenant clusters, as it can lead to people with otherwise limited permissions being able to retrieve all secrets on the cluster. See CVE-2021-25742 and the [related issue on github](https://github.com/kubernetes/ingress-nginx/issues/7837) for more information.
320321
321322
### Custom HTTP Errors
322323
@@ -428,6 +429,9 @@ metadata:
428429
}
429430
```
430431

432+
!!! attention
433+
Since version 1.9.0, `"server-snippet"` annotation is disabled by default and has to be explicitly enabled, see [allow-snippet-annotations](./configmap.md#allow-snippet-annotations). Enabling it can be dangerous in multi-tenant clusters, as it can lead to people with otherwise limited permissions being able to retrieve all secrets on the cluster. See CVE-2021-25742 and the [related issue on github](https://github.com/kubernetes/ingress-nginx/issues/7837) for more information.
434+
431435
!!! attention
432436
This annotation can be used only once per host.
433437

@@ -505,6 +509,9 @@ nginx.ingress.kubernetes.io/auth-snippet: |
505509
```
506510
> Note: `nginx.ingress.kubernetes.io/auth-snippet` is an optional annotation. However, it may only be used in conjunction with `nginx.ingress.kubernetes.io/auth-url` and will be ignored if `nginx.ingress.kubernetes.io/auth-url` is not set
507511

512+
!!! attention
513+
Since version 1.9.0, `"auth-snippet"` annotation is disabled by default and has to be explicitly enabled, see [allow-snippet-annotations](./configmap.md#allow-snippet-annotations). Enabling it can be dangerous in multi-tenant clusters, as it can lead to people with otherwise limited permissions being able to retrieve all secrets on the cluster. See CVE-2021-25742 and the [related issue on github](https://github.com/kubernetes/ingress-nginx/issues/7837) for more information.
514+
508515
!!! example
509516
Please check the [external-auth](../../examples/auth/external-auth/README.md) example.
510517

@@ -895,6 +902,9 @@ nginx.ingress.kubernetes.io/modsecurity-snippet: |
895902
Include /etc/nginx/owasp-modsecurity-crs/nginx-modsecurity.conf
896903
```
897904

905+
!!! attention
906+
Since version 1.9.0, `"modsecurity-snippet"` annotation is disabled by default and has to be explicitly enabled, see [allow-snippet-annotations](./configmap.md#allow-snippet-annotations). Enabling it can be dangerous in multi-tenant clusters, as it can lead to people with otherwise limited permissions being able to retrieve all secrets on the cluster. See CVE-2021-25742 and the [related issue on github](https://github.com/kubernetes/ingress-nginx/issues/7837) for more information.
907+
898908
### Backend Protocol
899909

900910
Using `backend-protocol` annotations is possible to indicate how NGINX should communicate with the backend service. (Replaces `secure-backends` in older versions)
@@ -984,3 +994,6 @@ metadata:
984994
proxy_pass 127.0.0.1:80;
985995
}
986996
```
997+
998+
!!! attention
999+
Since version 1.9.0, `"stream-snippet"` annotation is disabled by default and has to be explicitly enabled, see [allow-snippet-annotations](./configmap.md#allow-snippet-annotations). Enabling it can be dangerous in multi-tenant clusters, as it can lead to people with otherwise limited permissions being able to retrieve all secrets on the cluster. See CVE-2021-25742 and the [related issue on github](https://github.com/kubernetes/ingress-nginx/issues/7837) for more information.

docs/user-guide/nginx-configuration/configmap.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ Enables Ingress to parse and add *-snippet annotations/directives created by the
263263
Warning: We recommend enabling this option only if you TRUST users with permission to create Ingress objects, as this
264264
may allow a user to add restricted configurations to the final nginx.conf file
265265

266-
**This option will be defaulted to false in the next major release**
266+
**This option is defaulted to false since v1.9.0**
267267

268268
## annotations-risk-level
269269

0 commit comments

Comments
 (0)