> 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/b/boldon-james.md).

# Boldon James

Boldon James Classifier labels documents and email. OctoXLabs reads the computers that appear in the Classifier events database and stores them as devices, with their last user and label policy.

## Use cases

* List computers that received a label policy.

```
Adapters = boldon-james
```

## Before you begin

### Network

| Source              | Destination                         | Port                | Protocol             |
| ------------------- | ----------------------------------- | ------------------- | -------------------- |
| OctoXLabs connector | Microsoft SQL Server (IP you enter) | 1433 (configurable) | TCP (SQL Server TDS) |

### Required permissions

| Scope or role                                                                                                                                   | Permission | Needed for                           |
| ----------------------------------------------------------------------------------------------------------------------------------------------- | ---------- | ------------------------------------ |
| SQL login with roles ClassifierConsumerRole, ClassifierMaintenanceRole, ClassifierMaskedConsumerRole, ClassifierSupplierRole and db\_datareader | Read       | Devices, database ClassifierEventsDB |

## Create credentials in Boldon James

{% stepper %}
{% step %}

### Open SQL Server Management Studio

Go to the **Security** folder, right-click **Login** and click **New Login**.
{% endstep %}

{% step %}

### Create the login

Select the authentication used by the server, fill in the details and select your database as **Default Database**. Save the user.
{% endstep %}

{% step %}

### Add the roles

The user needs the roles **ClassifierConsumerRole**, **ClassifierMaintenanceRole**, **ClassifierMaskedConsumerRole**, **ClassifierSupplierRole** and **db\_datareader**.
{% endstep %}

{% step %}

### Log in once

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

{% step %}

### Optional: Kerberos

To use Active Directory credentials, set Auth Type to Kerberos. Mode `password` uses the username and password to get a TGT. Mode `keytab` uses an uploaded keytab (generate it with `ktpass` on a domain controller). Check afterwards that `auth_scheme` in `sys.dm_exec_connections` is KERBEROS.
{% endstep %}
{% endstepper %}

## Connection parameters

| Parameter                | Required    | Type    | Default            | Description                                                                                                      |
| ------------------------ | ----------- | ------- | ------------------ | ---------------------------------------------------------------------------------------------------------------- |
| IP                       | Yes         | String  |                    | IP address of the SQL Server.                                                                                    |
| Port                     | No          | Integer | 1433               | SQL Server port.                                                                                                 |
| Domain                   | No          | String  |                    | Domain FQDN. When set, the login is `domain\username`.                                                           |
| Database                 | No          | String  | ClassifierEventsDB | Database name.                                                                                                   |
| Username                 | Yes         | String  |                    | SQL or AD user.                                                                                                  |
| Password                 | Conditional | String  |                    | Required for SQL authentication and Kerberos mode `password`. May be empty for mode `keytab`.                    |
| 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.                                                                                          |
| No Lock                  | No          | Boolean | False              | Add the `WITH (NOLOCK)` table hint.                                                                              |
| Query Timeout            | No          | Integer | 60                 | Query timeout in seconds.                                                                                        |
| Auth Type                | No          | String  | SQL                | `SQL` or `Kerberos`.                                                                                             |
| Kerberos Mode            | No          | String  | password           | `password` or `keytab`.                                                                                          |
| Kerberos Realm           | No          | String  |                    | AD realm in upper case, for example `CORP.LOCAL`. Can be empty if the user name is in UPN form.                  |
| KDC IP                   | No          | String  |                    | Key Distribution Center host or IP.                                                                              |
| Kerberos SPN             | No          | String  |                    | Service principal name override, for example `MSSQLSvc/sqlserver.corp.local:1433`.                               |
| Keytab                   | Conditional | String  |                    | Required for Kerberos mode `keytab`.                                                                             |
| Encrypt                  | No          | Boolean | True               | TLS between client and SQL Server. Applied only with Kerberos.                                                   |
| Trust Server Certificate | No          | Boolean | True               | Skip certificate chain validation. Applied only with Kerberos.                                                   |

## Troubleshooting

| Error message                                                                                                     | Cause                                                    | Fix                                                                     |
| ----------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------- | ----------------------------------------------------------------------- |
| Password is required for SQL Server Authentication.                                                               | Auth Type is SQL and the password is empty.              | Enter the password.                                                     |
| Keytab is required when kerberos\_mode is 'keytab'.                                                               | Kerberos keytab mode without a keytab.                   | Upload the keytab.                                                      |
| Kerberos config failed: SQL Server reports auth\_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 Active Directory and the Encrypt setting. |
| No ODBC Driver found. Install 'ODBC Driver 17' or 'ODBC Driver 18' for SQL Server.                                | pyodbc or Kerberos is used and no driver is installed.   | Install ODBC Driver 17 or 18 on the connector host.                     |

## Change history
