> 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/v/veriket.md).

# Veriket

Veriket is an endpoint security and management product. OctoXLabs reads device rows from the Veriket MSSQL database. This adds host names, IP and MAC addresses and operating system details to the inventory.

## Use cases

* List all devices that Veriket knows.

```
Adapters = veriket
```

* Find devices that are in your inventory but missing in Veriket. Replace `active-directory` with any other source that lists your devices.

```
Adapters = active-directory AND NOT Adapters = veriket
```

## Before you begin

### Network

| Source              | Destination                       | Port                         | Protocol         |
| ------------------- | --------------------------------- | ---------------------------- | ---------------- |
| OctoXLabs connector | Veriket MSSQL server              | 1433 (default, configurable) | TDS (SQL Server) |
| OctoXLabs connector | Domain controller (Kerberos only) | Not verified                 | Kerberos         |

### Required permissions

| Scope or role | Permission            | Needed for                                                        |
| ------------- | --------------------- | ----------------------------------------------------------------- |
| Database user | Read, Select and List | The view `CuentVersions_View`, your own view or your custom query |

## Create credentials in Veriket

{% stepper %}
{% step %}

### Create the user

Open SQL Server Management Studio. Select the authentication method the server uses.
{% endstep %}

{% step %}

### Set the default database

Fill in the user details and select your database as the **Default Database**.
{% endstep %}

{% step %}

### Save the user

Save the user.
{% endstep %}

{% step %}

### Sign in once

Sign in to the database with this user once. This avoids a first login error.
{% endstep %}
{% endstepper %}

## Connection parameters

| Parameter                | Required                                    | Type    | Default  | Description                                                                                                      |
| ------------------------ | ------------------------------------------- | ------- | -------- | ---------------------------------------------------------------------------------------------------------------- |
| IP or Domain             | Yes                                         | Text    |          | Host name or IP address of the MSSQL server.                                                                     |
| Port                     | No                                          | Integer | 1433     | SQL Server port.                                                                                                 |
| Domain                   | No                                          | Text    |          | Active Directory domain. When set, the login is sent as `domain\username`.                                       |
| Database                 | Yes                                         | Text    |          | Database to connect to.                                                                                          |
| Username                 | Yes                                         | Text    |          | Login name.                                                                                                      |
| Password                 | Yes for SQL auth and Kerberos password mode | Text    |          | Password of the login. Can be empty in Kerberos keytab mode.                                                     |
| View Name                | No                                          | Text    |          | View to query instead of the default `CuentVersions_View`.                                                       |
| Custom Query             | No                                          | Text    |          | SQL query that replaces the default query. It takes priority over View Name.                                     |
| Use PyODBC Driver        | No                                          | Boolean | False    | Use pyodbc instead of pymssql. Needs ODBC Driver 17 or 18 for SQL Server. The connector tries 17 first, then 18. |
| Batch Size               | No                                          | Integer | 300      | Rows fetched per batch.                                                                                          |
| Query Timeout            | No                                          | Integer | 60       | Query timeout in seconds.                                                                                        |
| Auth Type                | No                                          | Text    | SQL      | `SQL` or `Kerberos`.                                                                                             |
| Kerberos Mode            | No                                          | Text    | password | `password` gets a ticket with the username and password. `keytab` uses an uploaded keytab.                       |
| Kerberos Realm           | No                                          | Text    |          | Realm in uppercase, for example `CORP.LOCAL`. Can be empty if the username is in UPN format.                     |
| KDC IP                   | No                                          | Text    |          | Host or IP of the Key Distribution Center.                                                                       |
| Kerberos SPN             | No                                          | Text    |          | Service principal name override, for example `MSSQLSvc/sqlserver.corp.local:1433`.                               |
| Keytab                   | Yes in keytab mode                          | File    |          | Keytab generated with `ktpass` on a domain controller.                                                           |
| Encrypt                  | No                                          | Boolean | True     | TLS between connector and SQL Server. Applied only for Kerberos.                                                 |
| Trust Server Certificate | No                                          | Boolean | True     | Skip certificate chain validation. Applied only for Kerberos.                                                    |

## Troubleshooting

| Error message                                                                                                     | Cause                                                            | Fix                                                       |
| ----------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------- | --------------------------------------------------------- |
| No ODBC Driver found. Install 'ODBC Driver 17' or 'ODBC Driver 18' for SQL Server.                                | The pyodbc option or Kerberos is on, and no driver is installed. | Install ODBC Driver 17 or 18 for SQL Server.              |
| Kerberos config failed: SQL Server reports auth\_scheme=''. Check SPN registration in AD and the Encrypt setting. | The connection fell back from Kerberos.                          | Check the SPN registration in AD and the Encrypt setting. |
| Password is required for SQL Server Authentication.                                                               | No password with SQL auth.                                       | Enter the password.                                       |
| Keytab is required when kerberos\_mode is 'keytab'.                                                               | Keytab mode without a keytab.                                    | Upload the keytab.                                        |
| Password is required when kerberos\_mode is 'password'.                                                           | Kerberos password mode without a password.                       | Enter the password.                                       |

## Change history

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