> 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/q/qualys-cloud.md).

# Qualys Cloud

Qualys Cloud is a cloud based vulnerability management service. OctoXLabs reads the hosts of your subscription with their detections and asset groups, plus the user accounts, and adds them to the inventory.

## Use cases

* **List hosts with vulnerabilities from Qualys.** Review the detections attached to hosts.

```
Adapters = qualys-cloud
```

* **Find Qualys hosts that your EDR does not see.** Replace the second adapter with your own tool. How devices are matched depends on your device merge settings.

```
Adapters = qualys-cloud AND NOT Adapters = crowdstrike
```

* **Review Qualys user accounts.** Use the user inventory to find accounts of people who left the company.

## Before you begin

### Network

| Source              | Destination                             | Port | Protocol |
| ------------------- | --------------------------------------- | ---- | -------- |
| OctoXLabs connector | qualysapi.qualys.com (Domain parameter) | 443  | HTTPS    |

HTTPS is used when Is Secure? is on. TLS certificates are not verified. If a proxy is set, requests go through it. Requests for hosts, users, asset groups, detections and the KnowledgeBase wait at least 120 seconds, according to the baseline.

### Required permissions

| Scope or role                                      | Permission | Needed for                             |
| -------------------------------------------------- | ---------- | -------------------------------------- |
| Account with access to the Qualys API              | Read       | Hosts, detections, asset groups, users |
| KnowledgeBase download enabled on the subscription | Read       | Vulnerability details                  |

The baseline says the subscription must be authorised for KnowledgeBase download. Contact Qualys Support to have it enabled.

## Create credentials in Qualys Cloud

{% stepper %}
{% step %}

### Choose an account

Use a Qualys account that can call the API. The baseline names no specific role.
{% endstep %}

{% step %}

### Find your API host

Use the Qualys API server of your platform as the Domain. The default is `qualysapi.qualys.com`.
{% endstep %}

{% step %}

### Enable KnowledgeBase download

Ask Qualys Support to enable KnowledgeBase download for the subscription if vulnerability details are missing.
{% endstep %}
{% endstepper %}

## Connection parameters

| Parameter     | Required | Type    | Default              | Description                                                                                        |
| ------------- | -------- | ------- | -------------------- | -------------------------------------------------------------------------------------------------- |
| Domain        | No       | String  | qualysapi.qualys.com | Base domain of the Qualys API, without a scheme.                                                   |
| Username      | Yes      | String  | None                 | Account user name.                                                                                 |
| Password      | Yes      | String  | None                 | Account password.                                                                                  |
| API Version   | No       | String  | 5                    | Qualys API version for host, detection and asset group calls. The baseline lists 2, 3, 4, 5 and 6. |
| Per Page      | No       | Integer | 1000                 | Devices per request (`truncation_limit`). The baseline gives a range of 1 to 1000000.              |
| KB Batch Size | No       | Integer | 100                  | Number of QIDs sent per KnowledgeBase request.                                                     |
| Is Secure?    | No       | Boolean | True                 | Use HTTPS.                                                                                         |
| Proxy         | No       | String  | None                 | Proxy address, used as `http://<value>` for HTTP and HTTPS.                                        |
| Timeout       | No       | Integer | 30                   | Seconds to wait for an API response.                                                               |

## Troubleshooting

| Error message                                  | Cause                                  | Fix                                            |
| ---------------------------------------------- | -------------------------------------- | ---------------------------------------------- |
| Request failed after {n} retries for url {url} | The API kept answering 429.            | Run discovery again later.                     |
| Failed to fetch users: {status}                | The user list call did not return 200. | Check that the account may list users.         |
| Failed to fetch devices: {status}              | The host list call did not return 200. | Check the credentials, API version and domain. |
| Invalid XML response while fetching users      | The response could not be parsed.      | Check the domain and any proxy in the path.    |
| Invalid XML response while fetching devices    | The response could not be parsed.      | Check the domain and any proxy in the path.    |

## Change history

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