# Edit Web Application/API Settings

Configuring [Web Application / API](https://waf-doc.inext.checkpoint.com/getting-started/protect-a-web-api) is easily done via the configuration wizard, and in the vast majority of the cases, is enough to fully protect the web assets without additional manual changes.

There are, however, advanced options that a security administrator can configure to modify the security to his specific requirements.

When making the first change to the default Web Application Best Practice's configuration such as configuring the advanced settings in this page, you will be prompted to change the name of the Practice to your own custom practice name.

![](https://2760087783-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEWA4nfgNrSRL8dA6Kap7%2Fuploads%2Fhu2Vump3xc5w8hiIAUcC%2Fappsec-assets-practice-custom-practice-message.PNG?alt=media\&token=f53efb3f-faa9-4d08-8aa9-5802a2066c5f)

## Web Application Protection Advanced Settings

### Threat Prevention Settings

Browse to **Policy->Assets**, edit the web application asset object you have created and click on the "e "**Web Attacks**" tab configuration.

![](https://2760087783-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEWA4nfgNrSRL8dA6Kap7%2Fuploads%2Fs2mfqkovWUa81deFA4AX%2FWebAttacks.png?alt=media\&token=f2e1e477-0e9e-4c3e-8a35-3d1d3ae48be4)

### Configuration Options

#### Mode override

Setting the Mode to **As Top Level** means inheriting the primary mode of the practice.

Otherwise you can override it only for this specific sub-practice to **Detect**/**Prevent**/**Disable**.

#### Confidence-dependent Prevent Mode

The option **Activate when confidence is** becomes available if practice or sub-practice are set to **Prevent**. The value determines the threshold in which CloudGuard WAF will block attacks and prevent them, rather than just send a log according to Log Trigger configuration.

<div align="left"><img src="https://2760087783-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEWA4nfgNrSRL8dA6Kap7%2Fuploads%2FKzKfVldQ97tH9RU3s4yC%2Fappsec-assets-web-attacks-activate-dependent-on-confidence.PNG?alt=media&#x26;token=e7fcf097-9281-46bb-b406-ec6240a6b5a0" alt=""></div>

#### Advanced settings window

When clicking on **Advanced** additional advanced settings appear:

<div align="left"><img src="https://2760087783-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEWA4nfgNrSRL8dA6Kap7%2Fuploads%2FD5FnRCSNV2qxfrgDvmPj%2Fappsec-assets-web-attacks-advanced-settings.PNG?alt=media&#x26;token=7f3f53ec-5a22-4f4b-aff8-ba728bc25763" alt=""></div>

For all Size Limits - CloudGuard WAF Web Attacks engine will accept traffic that exceeds the limits if set to **Detect/Learn** mode (and that traffic will bypass inspection), or block traffic that exceeds the limits if set to **Prevent** mode.

<table><thead><tr><th width="150">Advanced Setting</th><th>Meaning</th></tr></thead><tbody><tr><td>URL Size (Bytes)</td><td>Determines the URL size limit for inspection</td></tr><tr><td>Max Object Depth</td><td>Determines the depth limit of a JSON/XML object inspected in the HTTP request. This includes embedded XML in JSON and the opposite.</td></tr><tr><td>Body Size (Kilobytes)</td><td>Determines the HTTP body size limit for inspection</td></tr><tr><td>Header Size (Bytes)</td><td>Determines the HTTP header size limit for inspection</td></tr><tr><td>CSRF Protection</td><td>Determines the mode for the advanced CSRF protection, which blocks <a href="https://owasp.org/www-community/attacks/csrf">CSRF attacks</a>. <br><strong>Important</strong> - This protection has a performance impact.</td></tr><tr><td>Error Disclosure</td><td>Determines the mode for the advanced Error Disclosure protection, which replaces <a href="https://owasp.org/www-community/Improper_Error_Handling">internal error codes in the response</a> and injects a different response instead.<br><strong>Important</strong> - This protection has a performance impact.</td></tr><tr><td>Open Redirect</td><td>Determines the mode for the advanced Open Redirect protection, which prevents<a href="https://owasp.org/www-project-web-security-testing-guide/v41/4-Web_Application_Security_Testing/11-Client_Side_Testing/04-Testing_for_Client_Side_URL_Redirect"> client side redirection to other domains</a> (e.g. as used by Phishing attacks)<br><strong>Important</strong> - This protection has a performance impact.</td></tr><tr><td>Non-Valid HTTP methods</td><td><p>When set to <strong>No</strong> and practice is set to <strong>Prevent</strong>, non-valid HTTP methods are blocked.<br>Valid HTTP methods are:</p><ul><li>GET, POST, DELETE, PATCH, PUT, CONNECT, OPTIONS, HEAD, TRACE</li><li>MKCOL, COPY, MOVE, PROPFIND, PROPPATCH, LOCK, UNLOCK, VERSION-CONTROL, REPORT, INDEX, CHECKOUT, CHECKIN, UNCHECK, MKWORKSPACE, UPDATE, LABEL, MERGE, BASELINE-CONTROL, MKACTIVITY, ORDERPATCH, ACL, SEARCH, MKREDIRECTREF, BIND, UNBIND</li></ul></td></tr></tbody></table>

## Web API Protection Advanced Settings

The advanced configuration for API Attacks is very similar to Web Attacks.\
The differences being:

* The sub-practice is named **API Attacks** and not Web **Attacks**.
* API attacks do not include the advanced options of CSRF Protection, Error Disclosure and Open Redirect.
* See here how to configure the [**API Schema Enforcement Engine**](https://waf-doc.inext.checkpoint.com/additional-security-engines/api-protection/enforce-api-schema)

## Additional Security Engines

CloudGuard WAF includes additional security engines other in addition to the Machine Learning based-Web Attacks protection and API attacks protection:

{% content-ref url="../additional-security-engines/anti-bot" %}
[anti-bot](https://waf-doc.inext.checkpoint.com/additional-security-engines/anti-bot)
{% endcontent-ref %}

{% content-ref url="../additional-security-engines/api-protection/enforce-api-schema" %}
[enforce-api-schema](https://waf-doc.inext.checkpoint.com/additional-security-engines/api-protection/enforce-api-schema)
{% endcontent-ref %}

{% content-ref url="../additional-security-engines/intrusion-prevention-system-ips" %}
[intrusion-prevention-system-ips](https://waf-doc.inext.checkpoint.com/additional-security-engines/intrusion-prevention-system-ips)
{% endcontent-ref %}

{% content-ref url="../additional-security-engines/snort-rules" %}
[snort-rules](https://waf-doc.inext.checkpoint.com/additional-security-engines/snort-rules)
{% endcontent-ref %}
