Implement annotation validation (#9673)
* Add validation to all annotations * Add annotation validation for fcgi * Fix reviews and fcgi e2e * Add flag to disable cross namespace validation * Add risk, flag for validation, tests * Add missing formating * Enable validation by default on tests * Test validation flag * remove ajp from list * Finalize validation changes * Add validations to CI * Update helm docs * Fix code review * Use a better name for annotation risk
This commit is contained in:
parent
86c00a2310
commit
c5f348ea2e
109 changed files with 4320 additions and 586 deletions
|
|
@ -15,6 +15,7 @@ They are set in the container spec of the `ingress-nginx-controller` Deployment
|
|||
| `--default-backend-service` | Service used to serve HTTP requests not matching any known server name (catch-all). Takes the form "namespace/name". The controller configures NGINX to forward requests to the first port of this Service. |
|
||||
| `--default-server-port` | Port to use for exposing the default server (catch-all). (default 8181) |
|
||||
| `--default-ssl-certificate` | Secret containing a SSL certificate to be used by the default HTTPS server (catch-all). Takes the form "namespace/name". |
|
||||
| `--enable-annotation-validation` | If true, will enable the annotation validation feature. This value will be defaulted to true on a future release. |
|
||||
| `--disable-catch-all` | Disable support for catch-all Ingresses. (default false) |
|
||||
| `--disable-full-test` | Disable full test of all merged ingresses at the admission stage and tests the template of the ingress being created or updated (full test of all ingresses is enabled by default). |
|
||||
| `--disable-svc-external-name` | Disable support for Services of type ExternalName. (default false) |
|
||||
|
|
|
|||
|
|
@ -29,7 +29,9 @@ The following table shows a configuration option's name, type, and the default v
|
|||
|:---|:---|:------|:----|
|
||||
|[add-headers](#add-headers)|string|""||
|
||||
|[allow-backend-server-header](#allow-backend-server-header)|bool|"false"||
|
||||
|[allow-cross-namespace-resources](#allow-cross-namespace-resources)|bool|"true"||
|
||||
|[allow-snippet-annotations](#allow-snippet-annotations)|bool|true||
|
||||
|[annotations-risk-level](#annotations-risk-level)|string|Critical||
|
||||
|[annotation-value-word-blocklist](#annotation-value-word-blocklist)|string array|""||
|
||||
|[hide-headers](#hide-headers)|string array|empty||
|
||||
|[access-log-params](#access-log-params)|string|""||
|
||||
|
|
@ -239,6 +241,20 @@ Sets custom headers from named configmap before sending traffic to the client. S
|
|||
|
||||
Enables the return of the header Server from the backend instead of the generic nginx string. _**default:**_ is disabled
|
||||
|
||||
## allow-cross-namespace-resources
|
||||
|
||||
Enables users to consume cross namespace resource on annotations, when was previously enabled . _**default:**_ true
|
||||
|
||||
**Annotations that may be impacted with this change**:
|
||||
* `auth-secret`
|
||||
* `auth-proxy-set-header`
|
||||
* `auth-tls-secret`
|
||||
* `fastcgi-params-configmap`
|
||||
* `proxy-ssl-secret`
|
||||
|
||||
|
||||
**This option will be defaulted to false in the next major release**
|
||||
|
||||
## allow-snippet-annotations
|
||||
|
||||
Enables Ingress to parse and add *-snippet annotations/directives created by the user. _**default:**_ `true`
|
||||
|
|
@ -246,6 +262,16 @@ Enables Ingress to parse and add *-snippet annotations/directives created by the
|
|||
Warning: We recommend enabling this option only if you TRUST users with permission to create Ingress objects, as this
|
||||
may allow a user to add restricted configurations to the final nginx.conf file
|
||||
|
||||
**This option will be defaulted to false in the next major release**
|
||||
|
||||
## annotations-risk-level
|
||||
|
||||
Represents the risk accepted on an annotation. If the risk is, for instance `Medium`, annotations with risk High and Critical will not be accepted.
|
||||
|
||||
Accepted values are `Critical`, `High`, `Medium` and `Low`.
|
||||
|
||||
Defaults to `Critical` but will be changed to `High` on the next minor release
|
||||
|
||||
## annotation-value-word-blocklist
|
||||
|
||||
Contains a comma-separated value of chars/words that are well known of being used to abuse Ingress configuration
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue