> For the complete documentation index, see [llms.txt](https://docs.octoxlabs.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.octoxlabs.com/adapters/f/fortiweb.md).

# FortiWeb

FortiWeb is a web application firewall that protects web applications and APIs. OctoXLabs reads the virtual IPs used by server policies as devices. It can also collect the protected host names, the server policies and one web application record per policy and served host name.

## Use cases

* List the virtual IPs that FortiWeb publishes.

```
Adapters = fortiweb
```

* Find FortiWeb virtual IPs that are not scanned by a vulnerability scanner.

```
Adapters = fortiweb AND NOT Adapters = tenable-sc
```

## Before you begin

### Network

| Source              | Destination                              | Port                        | Protocol                           |
| ------------------- | ---------------------------------------- | --------------------------- | ---------------------------------- |
| OctoXLabs connector | FortiWeb management interface (REST API) | 443 (default, configurable) | HTTPS (HTTP when Is secure is off) |

### Required permissions

| Scope or role         | Permission                                                                                    | Needed for                                   |
| --------------------- | --------------------------------------------------------------------------------------------- | -------------------------------------------- |
| Administrator account | Read access to server policy, server pool, protection profile, certificate and system objects | Devices, Domains, Policies, Web applications |

The exact access profile is Not verified. If multiple VDOMs are enabled, the account must be able to sign in to the VDOM you enter.

## Create credentials in FortiWeb

{% stepper %}
{% step %}

### Prepare an account

Use a FortiWeb administrator account with read access. Note the username and password.
{% endstep %}

{% step %}

### Note the VDOM

If multiple VDOMs are enabled, note the VDOM the account signs in to. Leave it empty otherwise.
{% endstep %}
{% endstepper %}

## Connection parameters

| Parameter              | Required | Type             | Default | Description                                                                                                                                                                                      |
| ---------------------- | -------- | ---------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Ip                     | Yes      | Text             | None    | IP address or host name of FortiWeb.                                                                                                                                                             |
| Port                   | No       | Integer          | 443     | Port number.                                                                                                                                                                                     |
| Username               | Yes      | Text             | None    | Account name.                                                                                                                                                                                    |
| Password               | Yes      | Text (sensitive) | None    | Account password.                                                                                                                                                                                |
| Vdom                   | No       | Text             | Empty   | Needed only if multiple VDOMs are enabled.                                                                                                                                                       |
| Is secure              | No       | Boolean          | True    | Use HTTPS.                                                                                                                                                                                       |
| Timeout                | No       | Integer          | 30      | Seconds to wait for API responses.                                                                                                                                                               |
| Thread count           | No       | Integer          | 32      | Parallel threads. Minimum 1, maximum 32. Advanced.                                                                                                                                               |
| Sleep time             | No       | Integer          | 0       | Seconds between thread batches. Increase it on rate limit errors. Advanced.                                                                                                                      |
| Fetch domains          | No       | Boolean          | True    | Collect protected host names into the Domain inventory. Sources: Protected Hostnames, HTTP content routing rules, SNI certificate members, the listener certificate and One-Click GSLB settings. |
| Fetch policies         | No       | Boolean          | True    | Collect each server policy as two network policies: the listener (client to virtual server) and the server pool (FortiWeb to backend members).                                                   |
| Fetch web applications | No       | Boolean          | True    | Collect one web application per server policy and served host name, with listener, TLS, protection profile posture and backends.                                                                 |

## Troubleshooting

| Error message                                                                | Cause                                 | Fix                                                                                 |
| ---------------------------------------------------------------------------- | ------------------------------------- | ----------------------------------------------------------------------------------- |
| `FortiWeb table read failed for <url>: <error>` (log warning)                | A supporting table could not be read. | Check the account's read access to that object. The related details are left empty. |
| `FortiWeb sub-table read failed for <url> mkey=<key>: <error>` (log warning) | A per-policy table could not be read. | Same as above.                                                                      |

## Change history

{% hint style="info" %}
Available starting from version 5.6.1.
{% endhint %}
