|
| 1 | +--- |
| 2 | +title: "Add cookies, parameters and URLs" |
| 3 | +weight: 400 |
| 4 | +toc: true |
| 5 | +nd-content-type: how-to |
| 6 | +nd-product: NGINX One Console |
| 7 | +--- |
| 8 | + |
| 9 | +# Add cookies |
| 10 | + |
| 11 | +Cookie protections can be configured and managed directly within the policy editor by selecting the **Cookies** option. |
| 12 | + |
| 13 | +## Cookie properties and types |
| 14 | + |
| 15 | +Each cookie configuration includes: |
| 16 | +- `Cookie Type`: `Explicit` or `Wildcard`. For details on explicit and wildcard matching, see the [Matching Types: Explicit vs Wildcard]({{< ref "/nginx-one/nap-integration/waf-policy-matching-types.md" >}}) section. |
| 17 | +- `Cookie Name`: The name of the cookie to be monitored or protected |
| 18 | +- `Enforcement Type`: |
| 19 | + - **Allow**: Specifies that this cookie may be changed by the client. The cookie is not protected from modification |
| 20 | + - **Enforce**: Specifies that this cookie may not be changed by the client |
| 21 | +- `Attack Signatures`: Indicates whether attack signatures and threat campaigns are enabled, disabled, or not applicable |
| 22 | +- `Mask value in logs`: When enabled, the cookie's value will be masked in the request log for enhanced security and privacy |
| 23 | + |
| 24 | +For a complete list of configurable cookie properties and options, see the [Cookie Configuration Parameters]({{< ref "/waf/policies/parameter-reference.md" >}}) documentation under the `cookies` section. |
| 25 | + |
| 26 | +## Cookie violations |
| 27 | + |
| 28 | +Select **Edit Configuration** to configure cookie violations. The following violations can be configured for cookies: |
| 29 | + |
| 30 | +- `VIOL_COOKIE_EXPIRED`: Triggered when a cookie's timestamp is expired |
| 31 | +- `VIOL_COOKIE_LENGTH`: Triggered when cookie length exceeds the configured limit |
| 32 | +- `VIOL_COOKIE_MALFORMED`: Triggered when cookies are not RFC-compliant |
| 33 | +- `VIOL_COOKIE_MODIFIED`: Triggered when domain cookies have been tampered with |
| 34 | + |
| 35 | +For each violation type, you can: |
| 36 | +- Set the enforcement action |
| 37 | +- Toggle `Alarm`, `Alarm and Block`, or `Disabled` settings |
| 38 | + |
| 39 | +For more details about enforcement modes, see the [Glossary]({{< ref "/nginx-one/glossary.md#nginx-app-protect-waf-terminology" >}}), specifically the entry: **Enforcement mode**. |
| 40 | + |
| 41 | +See the [Supported Violations]({{< ref "/waf/policies/violations.md#supported-violations" >}}) for additional details. |
| 42 | + |
| 43 | +## Add a cookie to your policy |
| 44 | + |
| 45 | +1. Choose Cookie Type: |
| 46 | + - Select either `Explicit` for exact cookie matching or `Wildcard` for pattern-based matching |
| 47 | + |
| 48 | +1. Configure Basic Properties: |
| 49 | + - Enter the `Cookie Name` |
| 50 | + - Choose whether to mask the cookie value in logs |
| 51 | + |
| 52 | +1. Set Enforcement Type: |
| 53 | + - Choose either `Allow` or `Enforce` |
| 54 | + |
| 55 | +1. Optional: Configure Attack Signatures |
| 56 | + - If enabled, you can overwrite attack signatures for this specific cookie |
| 57 | + - For details on signature configuration, refer to the documentation on [Add Signature Sets]({{< ref "/nginx-one/nap-integration/add-signature-sets.md/" >}}) |
| 58 | + |
| 59 | +1. Select **Add Cookie** to save your configuration |
| 60 | + |
| 61 | +# Add parameters |
| 62 | + |
| 63 | +Parameter protections can be configured and managed directly within the policy editor by selecting the **Parameters** option. |
| 64 | + |
| 65 | +## Parameter properties and types |
| 66 | + |
| 67 | +Each parameter configuration includes: |
| 68 | +- `Parameter Type`: `Explicit` or `Wildcard`. For details on explicit and wildcard matching, see the [Matching Types: Explicit vs Wildcard]({{< ref "/nginx-one/nap-integration/waf-policy-matching-types.md" >}}) section. |
| 69 | +- `Parameter Name`: The name of the parameter |
| 70 | +- `Location`: Where the parameter is expected (URL query string, POST data, etc.) |
| 71 | +- `Value Type`: The expected type of the parameter value (e.g., alpha-numeric, integer, email) |
| 72 | +- `Attack Signatures`: Whether attack signature checking is enabled for this parameter |
| 73 | +- `Mask value in logs`: When enabled, the parameter's value will be masked in the request log for enhanced security and privacy. This sets `sensitiveParameter` property of the parameter item. |
| 74 | + |
| 75 | +For a complete list of configurable parameter properties and options, see the [Parameter Configuration Parameters]({{< ref "/waf/policies/parameter-reference.md" >}}) documentation under the `parameters` section. |
| 76 | + |
| 77 | +## Parameter violations |
| 78 | + |
| 79 | +Select **Edit Configuration** to configure parameter violations. The following violations can be configured for parameters: |
| 80 | + |
| 81 | +- `VIOL_PARAMETER`: Triggered when an illegal parameter is detected |
| 82 | +- `VIOL_PARAMETER_ARRAY_VALUE`: Triggered when an array parameter value is illegal |
| 83 | +- `VIOL_PARAMETER_DATA_TYPE`: Triggered when parameter data type doesn't match configured security policy |
| 84 | +- `VIOL_PARAMETER_EMPTY_VALUE`: Triggered when a parameter value is empty but shouldn't be |
| 85 | +- `VIOL_PARAMETER_LOCATION`: Triggered when a parameter is found in wrong location |
| 86 | +- `VIOL_PARAMETER_MULTIPART_NULL_VALUE`: Triggered when the multi-part request has a parameter value that contains the NULL character (0x00) |
| 87 | +- `VIOL_PARAMETER_NAME_METACHAR`: Triggered when illegal meta characters are found in parameter name |
| 88 | +- `VIOL_PARAMETER_NUMERIC_VALUE`: Triggered when numeric parameter value is outside allowed range |
| 89 | +- `VIOL_PARAMETER_REPEATED`: Triggered when a parameter name is repeated illegally |
| 90 | +- `VIOL_PARAMETER_STATIC_VALUE`: Triggered when a static parameter value doesn't match configured security policy |
| 91 | +- `VIOL_PARAMETER_VALUE_BASE64`: Triggered when the value is not a valid Base64 string |
| 92 | +- `VIOL_PARAMETER_VALUE_LENGTH`: Triggered when parameter value length exceeds limits |
| 93 | +- `VIOL_PARAMETER_VALUE_METACHAR`: Triggered when illegal meta characters are found in parameter value |
| 94 | +- `VIOL_PARAMETER_VALUE_REGEXP`: Triggered when parameter value doesn't match required pattern |
| 95 | + |
| 96 | +For each violation type, you can: |
| 97 | +- Set the enforcement action |
| 98 | +- Toggle `Alarm`, `Alarm and Block`, or `Disabled` settings |
| 99 | + |
| 100 | +For more details about enforcement modes, see the [Glossary]({{< ref "/nginx-one/glossary.md#nginx-app-protect-waf-terminology" >}}), specifically the entry: **Enforcement mode**. |
| 101 | + |
| 102 | +See the [Supported Violations]({{< ref "/waf/policies/violations.md#supported-violations" >}}) for additional details. |
| 103 | + |
| 104 | +## Add a parameter to your policy |
| 105 | + |
| 106 | +1. Choose Parameter Type: |
| 107 | + - Select either `Explicit` for exact parameter matching or `Wildcard` for pattern-based matching |
| 108 | + |
| 109 | +1. Configure Basic Properties: |
| 110 | + - Enter the parameter `Parameter Name` |
| 111 | + - Select the `Location` where the parameter is expected |
| 112 | + - Choose the `Value Type` (alpha-numeric, integer, email, etc.) |
| 113 | + - Set the `Data Type` if applicable |
| 114 | + |
| 115 | +1. Set Security Options: |
| 116 | + - Choose whether to enable attack signatures |
| 117 | + |
| 118 | + {{< call-out "important" >}} |
| 119 | + |
| 120 | + Attack Signatures are only applicable when the Value Type is `User Input` or `Array` **and** the Data Type is either `Alphanumeric` or `Binary` |
| 121 | + |
| 122 | + {{< /call-out >}} |
| 123 | + |
| 124 | + - Decide if parameter value should be masked in logs which sets `sensitiveParameter` in [Parameter Configuration Reference]({{< ref "/waf/policies/parameter-reference.md" >}}) |
| 125 | + |
| 126 | +1. Optional: Configure Attack Signatures |
| 127 | + - If enabled, you can overwrite attack signatures for this specific parameter |
| 128 | + - For details on signature configuration, refer to the documentation on [Add Signature Sets]({{< ref "/nginx-one/nap-integration/add-signature-sets.md/" >}}) |
| 129 | + |
| 130 | +1. Select **Add Parameter** to save your configuration |
| 131 | + |
| 132 | +# Add URLs |
| 133 | + |
| 134 | +URL protections can be configured and managed directly within the policy editor by selecting the **URLs** option. |
| 135 | + |
| 136 | +## URL properties and types |
| 137 | + |
| 138 | +Each URL configuration includes: |
| 139 | +- `URL Type`: `Explicit` or `Wildcard`. For details on explicit and wildcard matching, see the [Matching Types: Explicit vs Wildcard]({{< ref "/nginx-one/nap-integration/waf-policy-matching-types.md" >}}) section. |
| 140 | +- `Method`: Specifies the HTTP method(s) for the URL (`GET`, `POST`, `PUT`, etc.) |
| 141 | +- `Protocol`: The protocol for the URL (`HTTP`/`HTTPS`) |
| 142 | +- `Enforcement Type`: |
| 143 | + - **Allow**: Permits access to the URL with optional attack signature checks |
| 144 | + - **Disallow**: Blocks access to the URL entirely |
| 145 | +- `Attack Signatures`: Indicates whether attack signatures and threat campaigns are enabled, disabled, or not applicable |
| 146 | + |
| 147 | +{{< call-out "important" >}} |
| 148 | + |
| 149 | +**⚠️ Important:** Attack Signatures are automatically shown as "Not Applicable" when Enforcement Type is set to `Disallow` since the URL is explicitly blocked and signature checking is unnecessary. |
| 150 | + |
| 151 | +{{< /call-out >}} |
| 152 | + |
| 153 | +For a complete list of configurable URL properties and options, see the [URL Configuration Parameters]({{< ref "/waf/policies/parameter-reference.md" >}}) documentation under the `urls` section. |
| 154 | + |
| 155 | +## URL violations |
| 156 | + |
| 157 | +Select **Edit Configuration** to configure URL violations. The following violations can be configured for URLs: |
| 158 | + |
| 159 | +- `VIOL_URL`: Triggered when an illegal URL is accessed |
| 160 | +- `VIOL_URL_CONTENT_TYPE`: Triggered when there's an illegal request content type |
| 161 | +- `VIOL_URL_LENGTH`: Triggered when URL length exceeds the configured limit |
| 162 | +- `VIOL_URL_METACHAR`: Triggered when illegal meta characters are found in the URL |
| 163 | + |
| 164 | +For each violation type, you can: |
| 165 | +- Set the enforcement action |
| 166 | +- Toggle `Alarm`, `Alarm and Block`, or `Disabled` settings |
| 167 | + |
| 168 | +For more details about enforcement modes, see the [Glossary]({{< ref "/nginx-one/glossary.md#nginx-app-protect-waf-terminology" >}}), specifically the entry: **Enforcement mode**. |
| 169 | + |
| 170 | +See the [Supported Violations]({{< ref "/waf/policies/violations.md#supported-violations" >}}) for additional details. |
| 171 | + |
| 172 | +## Add a URL to your policy |
| 173 | + |
| 174 | +1. Choose URL Type: |
| 175 | + - Select either `Explicit` for exact URL matching or `Wildcard` for pattern-based matching |
| 176 | + |
| 177 | +1. Configure Basic Properties: |
| 178 | + - Enter the `URL` path (e.g., `/index.html`, `/api/data`) |
| 179 | + - The URL path must start with `/` |
| 180 | + - Select HTTP `Method(s)` (e.g., `GET`, `POST`, *) |
| 181 | + - Choose the `Protocol` (`HTTP`/`HTTPS`) |
| 182 | + |
| 183 | +1. Set Enforcement: |
| 184 | + - Choose whether to allow or disallow the URL |
| 185 | + - If `Allow URL` is selected, you can optionally enable attack signatures |
| 186 | + |
| 187 | + {{< call-out "important" >}} |
| 188 | + |
| 189 | + **⚠️ Important:** Attack signatures cannot be enabled for disallowed URLs. |
| 190 | + |
| 191 | + {{< /call-out >}} |
| 192 | + |
| 193 | +1. **Optional**: Configure Attack Signatures |
| 194 | + - If enabled, you can overwrite attack signatures for this specific URL |
| 195 | + - For details on signature configuration, refer to the documentation on [Add Signature Sets]({{< ref "/nginx-one/nap-integration/add-signature-sets.md/" >}}) |
| 196 | + |
| 197 | +1. Select **Add URL** to save your configuration |
0 commit comments