> ## Documentation Index
> Fetch the complete documentation index at: https://docs.arch.security/llms.txt
> Use this file to discover all available pages before exploring further.

# Qualys VMDR

> Prepare a Qualys VMDR subscription so Arch can read its hosts and the vulnerabilities found on them.

## Before you start

You need the Manager role in the Qualys VMDR subscription that scans your hosts, so you can create a user and
give it API access. Arch signs in as a dedicated local Qualys user: a user that signs in with SSO or SecureID
cannot use the Qualys API, so Arch cannot connect with it. Arch connects only to the Qualys shared platforms
offered in the Platform field; Qualys Private Cloud platforms cannot connect.

## Setup steps

1. Sign in to Qualys, choose VM/VMDR from the application picker, go to Users > Users and select New > User.
   Use the wizard to enter the user's settings. Qualys sends the new user a welcome email with login
   instructions. See [Add a New User (using VM/VMDR)](https://qualysguard.qualys.com/portal-help/en/admin/user/add_new_user_from_vm.htm).
2. Give the user the Manager role, so Arch sees every host in the subscription. A Unit Manager, Scanner or
   Reader works too, but Arch then sees only the hosts that role can see. See
   [User Roles and Permissions](https://docs.qualys.com/en/vm/latest/user_accounts/setting_user_permissions.htm).
3. Give the user API access. In the Administration module, search for the user, open Quick Actions, go to Roles
   and Scopes and select API Access. Then in the VMDR module, search for the same user, open Quick Actions and,
   under User Role, select API. A Manager has API access already. See
   [API Authentication](https://docs.qualys.com/en/csam/api/get_started/API_Authentication.htm).
4. If SSO is turned on for the user, turn it off. The Qualys API does not accept an SSO sign-in. See
   [API Authentication](https://docs.qualys.com/en/csam/api/get_started/API_Authentication.htm).
5. Sign in to Qualys once as the new user, with the login instructions from the welcome email, and accept the
   Qualys EULA.
6. Ask Qualys Support to turn on KnowledgeBase API access for your subscription, if it is not on already. Arch
   reads each vulnerability's title and CVEs from the KnowledgeBase. See
   [KnowledgeBase Download](https://docs.qualys.com/en/vm/qweb-all-api/mergedProjects/qapi-scan/kbase/knowledgebase.htm).
7. Note the user's login and password, and the address you sign in to Qualys at. You enter the login and the
   password in Arch, and you use the address to choose the platform.

## Fields

| Field | What to enter |
| - | - |
| Platform | The Qualys platform your subscription is on. Choose the option for the address you sign in to Qualys at: for example, if you sign in at qualysguard.qg2.apps.qualys.com, choose US2. Each option names the platform and its API server. |
| Username | The login of the dedicated local Qualys user from Setup steps. It is listed under Users in Qualys. It cannot contain a colon. |
| Password | The user's password. Arch never shows it again after you save. |

You do not type an address. The platform you choose fixes the API server Arch signs in to. To match your sign-in
address to a platform, see [Identify your Qualys platform](https://www.qualys.com/platform-identification/).

## Permissions

| Permission | What Arch reads with it |
| - | - |
| API access | Lets the user call the Qualys API at all. Arch reads the user's own role and asset groups with it, then the hosts and vulnerabilities. |
| The Manager, Unit Manager, Scanner or Reader role | The hosts the user can see and the vulnerabilities Qualys found on them. A Manager sees every host; any other role sees only its asset groups. |
| KnowledgeBase access for the subscription | Each vulnerability's title and CVEs. Without it, Arch cannot read vulnerability details. |

API access and the role are set on the user, as in Setup steps, steps 2 and 3. KnowledgeBase access belongs to the
subscription, not the user: ask Qualys Support to turn it on. Setup steps covers granting each one. See
[User Roles and Permissions](https://docs.qualys.com/en/vm/latest/user_accounts/setting_user_permissions.htm).

## Sign-in

Arch signs in by sending the username and password to the API server of the platform you chose, on every call.
When the sign-in works, the connection test goes on to read the user's role and asset groups, then asks the
KnowledgeBase for one vulnerability to check that the subscription has KnowledgeBase access.

If the sign-in fails, check that the user is active, is a local user rather than an SSO user, and has accepted
the Qualys EULA. If the user signs in with SecureID, turn SecureID off for this user. If the password changed or
expired, enter the user's current password in Arch, then test the connection again.

## Test answers

A passing test shows "Role" with the user's Qualys role and its number of asset groups, for hosts and for
vulnerabilities, and a "Knowledge base" line. With a role other than Manager, Arch reads only the hosts in
those asset groups.

| Message | What it means and what to do |
| - | - |
| These Qualys sign-in details are incomplete or cannot be sent. | A field is empty, or the username contains a colon. Choose your platform and enter the username and password. |
| Qualys refused this username and password. | Qualys did not accept the sign-in. Re-enter the user's password, and check that the user is a local Qualys user with API access. |
| Qualys says this user is inactive. | The user is turned off in Qualys. In Qualys, open Users, activate the user, then test the connection again. |
| This Qualys user has not accepted the Qualys EULA. | The user has never accepted the EULA. Sign in to Qualys once as this user and accept the EULA, then test the connection again. |
| This Qualys user must sign in with SecureID, which the Qualys API does not accept. | The user needs SecureID. In Qualys, turn off SecureID for this user, or connect a user without it, then test the connection again. |
| This Qualys user does not have API access. | The user cannot call the API. In Qualys, open Users, give the user API access as in Setup steps, step 3, then test the connection again. |
| This Qualys subscription has no KnowledgeBase access, so Arch cannot read vulnerability details. | The subscription lacks KnowledgeBase API access. Ask Qualys Support to turn it on for your subscription, then test the connection again. |
| Qualys did not report this user's role and asset groups. | Qualys did not list the user's own row. Use a user that can see its own row in the Qualys user list, then try again. |
| Qualys did not let this user read its user list. | The user lacks a permission the test needs. Give the user API access and accept the Qualys EULA for it, ideally with the Manager role, then try again. |
| Qualys is limiting API calls for this subscription right now. | The subscription reached its Qualys API limit. Wait a few minutes, then test the connection again. |
| Qualys is in scheduled maintenance. | Qualys is down for maintenance. Test the connection again after the maintenance ends. |
| Qualys is temporarily unavailable. | Qualys is busy or in maintenance. Try again in a few minutes. |
| Qualys could not be reached, or did not answer conclusively. | Arch could not reach Qualys or could not read its answer. Try again in a few minutes. |

## Limits

* Arch brings in every host the Qualys user can see, as a computer, a cloud virtual machine or a reachable
  address, and each vulnerability Qualys detected on those hosts that names a CVE, with its title and CVEs
  from the KnowledgeBase. A vulnerability Qualys marks Fixed is shown as resolved.
* Vulnerabilities that name no CVE are not brought in. With a role other than Manager, hosts outside the
  user's asset groups are not brought in. Qualys Private Cloud platforms cannot connect.
* Arch reads the data once a day. No other frequency is offered.
* Each run reads the whole host list and all their vulnerabilities again. When Qualys is limiting API calls,
  Arch waits as long as Qualys asks, then continues where it stopped.
* One Qualys user on one platform connects to Arch once. A second connection with the same user is refused.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.