> 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/e/eset-protect.md).

# ESET Protect

ESET PROTECT stores its managed computers in a Microsoft SQL Server database. OctoXLabs connects to that database and runs a read only query to add the computers, with IP address, RAM and hardware summary, to the inventory.

## Use cases

* Find computers managed by ESET PROTECT that your CMDB lacks.

```
Adapters = eset-protect AND NOT Adapters = servicenow-cmdb
```

* Find computers in your inventory that ESET PROTECT does not manage.

```
Adapters = falcon-crowdstrike AND NOT Adapters = eset-protect
```

## Before you begin

### Network

| Source              | Destination                      | Port                | Protocol         |
| ------------------- | -------------------------------- | ------------------- | ---------------- |
| OctoXLabs connector | ESET PROTECT SQL Server          | 1433 (configurable) | TDS (SQL Server) |
| OctoXLabs connector | Kerberos KDC (only for Kerberos) | Not verified        | Kerberos         |

### Required permissions

| Scope or role                              | Permission         | Needed for                                                                                |
| ------------------------------------------ | ------------------ | ----------------------------------------------------------------------------------------- |
| Database user on the ESET PROTECT database | Read, Select, List | `tbl_computers`, `tbl_computers_aggr`, `vw_hwinventory_overview`, `tbl_database_metadata` |

Log in to the database once with the new user, to avoid an error.

## Create credentials in ESET PROTECT

{% stepper %}
{% step %}

### Open SQL Server Management Studio

Open MSSQL Server Management Studio and create a new login.
{% endstep %}

{% step %}

### Pick the authentication

Select the authentication type that the server uses.
{% endstep %}

{% step %}

### Set the default database

Fill in the details and select the ESET PROTECT database in **Default Database**.
{% endstep %}

{% step %}

### Save the user

Save the user.
{% endstep %}

{% step %}

### Log in once

Log in to the database with this user once.
{% endstep %}

{% step %}

### Kerberos (optional)

For Active Directory authentication, set Auth Type to `Kerberos`. In `password` mode, the user name and password get a ticket. In `keytab` mode, upload a keytab file made with `ktpass` on a domain controller.
{% endstep %}
{% endstepper %}

## Connection parameters

| Parameter                | Required                                 | Type              | Default        | Description                                                                                                     |
| ------------------------ | ---------------------------------------- | ----------------- | -------------- | --------------------------------------------------------------------------------------------------------------- |
| IP                       | Yes                                      | String            | None           | IP address of the SQL Server host.                                                                              |
| Port                     | No                                       | Integer           | `1433`         | Port.                                                                                                           |
| Domain                   | No                                       | String            | None           | Domain FQDN.                                                                                                    |
| Database                 | Yes                                      | String            | None           | Database name.                                                                                                  |
| Username                 | Yes                                      | String            | None           | Database user.                                                                                                  |
| Password                 | Yes for SQL auth and Kerberos `password` | String            | None           | Password. May be empty for Kerberos `keytab`.                                                                   |
| Custom Query             | No                                       | String            | Built-in query | Query to run instead of the built-in computers query.                                                           |
| Query Timeout            | No                                       | Integer (seconds) | `60`           | Maximum time for a query.                                                                                       |
| Use PyODBC Driver        | No                                       | Boolean           | `False`        | Use PyODBC instead of pymssql. ODBC Driver 17 or 18 for SQL Server must be installed. Driver 17 is tried first. |
| Batch Size               | No                                       | Integer           | `300`          | Rows fetched per batch.                                                                                         |
| Auth Type                | No                                       | String            | `SQL`          | `SQL` or `Kerberos`.                                                                                            |
| Kerberos Mode            | No                                       | String            | `password`     | `password` or `keytab`.                                                                                         |
| Kerberos Realm           | No                                       | String            | None           | AD realm in upper case, for example `CORP.LOCAL`. May be empty for a UPN user name.                             |
| KDC IP                   | No                                       | String            | None           | Host or IP of the KDC.                                                                                          |
| Kerberos SPN             | No                                       | String            | None           | SPN override, for example `MSSQLSvc/sqlserver.corp.local:1433`.                                                 |
| Keytab                   | Yes for Kerberos `keytab`                | File              | None           | Keytab file.                                                                                                    |
| Encrypt                  | No                                       | Boolean           | `True`         | TLS between client and SQL Server. Only applied for Kerberos.                                                   |
| Trust Server Certificate | No                                       | Boolean           | `True`         | Skip certificate chain validation. Only applied for Kerberos.                                                   |

## Troubleshooting

| Error message                                                                                                              | Cause                                                    | Fix                                                       |
| -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------- | --------------------------------------------------------- |
| `Password is required for SQL Server Authentication.`                                                                      | Password is empty with SQL auth.                         | Enter the password.                                       |
| `Keytab is required when kerberos_mode is 'keytab'.`                                                                       | No keytab file was given.                                | Upload the keytab.                                        |
| `Password is required when kerberos_mode is 'password'.`                                                                   | No password in Kerberos password mode.                   | Enter the password.                                       |
| `No ODBC Driver found. Install 'ODBC Driver 17' or 'ODBC Driver 18' for SQL Server.`                                       | PyODBC is on but no driver is installed.                 | Install ODBC Driver 17 or 18.                             |
| `Kerberos config failed: SQL Server reports auth_scheme='<scheme>'. Check SPN registration in AD and the Encrypt setting.` | The connection fell back to another scheme such as NTLM. | Check the SPN registration in AD and the Encrypt setting. |

## Change history

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