> 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/documentation/adapters/how-adapters-work.md).

# How adapters work

What an adapter is, how connections and connectors fit together, and what happens to your data from the first fetch to a merged asset.

An adapter is the integration that connects OctoXLabs to one product in your environment, such as a directory, an endpoint tool, a cloud account or a vulnerability scanner. OctoXLabs ships with 800+ adapters. This page explains the pieces you work with and what happens to the data after you connect a product.

### Adapter, connection and connector

Three terms come up every time you connect a product.

| Term       | What it is                                                                                                                                                                                  | Example                                                         |
| ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------- |
| Adapter    | The integration for one product. It defines which details you must enter, which asset types it collects and how the product's fields map to OctoXLabs fields. You do not create or edit it. | Microsoft Active Directory                                      |
| Connection | One configured use of an adapter: the adapter plus the details you entered for it (address, credentials, API key). One adapter can have many connections.                                   | One connection per domain, site or cloud account                |
| Connector  | The service that runs the adapter and talks to the product. Every connection uses exactly one connector.                                                                                    | The default connector, or a remote connector in another network |

A connection has a **Name**, an optional **Description**, the **Connector** that runs it, and the fields that the adapter asks for. You can switch a connection off with its **Enabled** toggle without deleting it: discovery skips connections that are not enabled.

#### Local and remote connectors

A new installation includes a default connector that runs next to the platform. If a product sits in a network that the main server cannot reach, install a remote connector there. It collects the data locally and sends it to the main server. You pick the connector on each connection, so the same adapter can collect from several networks.

{% hint style="info" %}
The connection test and the data fetch both run on the connector you selected, not on the main server. The product must be reachable from the connector's network. To set up a remote connector, see Install a remote connector.
{% endhint %}

### What happens during discovery

A discovery fetches data from every enabled connection and then builds your inventories. You can start it on demand or on a schedule. The same flow applies to every adapter.

{% stepper %}
{% step %}

#### Test

Before fetching, OctoXLabs runs the connection test of each enabled connection. Connections that pass are fetched. Connections that fail are marked with the Error status, a notification lists them, and the rest of the discovery continues.
{% endstep %}

{% step %}

#### Fetch

Each connector calls its products and returns the raw records. Records are cleaned and validated, then stored by the platform.
{% endstep %}

{% step %}

#### Map

For every asset type the adapter provides, the vendor's fields are mapped to OctoXLabs global fields, for example a vendor's computer name to `Hostname`. Fields that have no global equivalent are kept as adapter specific fields.
{% endstep %}

{% step %}

#### Aggregate

When fetching and validation are complete, the platform merges the records into one asset per real-world asset. If the same device is reported by Active Directory and by an endpoint tool, you see one device that lists both adapters. For devices, the platform matches records on hostname, MAC address or IP address.
{% endstep %}

{% step %}

#### Enrich and index

Enrichment adds data that no single adapter reported, such as vulnerabilities matched to installed software. Then the inventories are prepared for search, so you can query them, tag assets and build dashboards.
{% endstep %}
{% endstepper %}

The inventories only change when the whole run finishes. For the full list of post-discovery steps, see Discovery and Aggregation.

### Asset types an adapter can feed

Each adapter declares which asset types it provides and which fields it fills for each one. An adapter can feed one type or several. For example, Microsoft Active Directory feeds devices and users.

| Asset type    | Inventory                              |
| ------------- | -------------------------------------- |
| Device        | Device Inventory (Devices in the menu) |
| User          | User Inventory                         |
| Software      | Software Inventory                     |
| Vulnerability | Vulnerability Inventory                |
| Certificate   | Certificate Inventory                  |
| Service       | Service Inventory                      |
| Source Code   | Source Code Inventory                  |
| AI            | AI Services Inventory                  |
| Domain        | Domain Inventory                       |
| License       | License Inventory                      |
| Policy        | Policy Inventory                       |
| Web App       | Web Application Inventory              |

On an adapter card, the **Mapping** list shows the fields that adapter fills for each type it feeds.

### Find an adapter

The **Adapters** page lists every adapter as a card with its name, description and two indicators, **Memory Efficiency** and **Fetch Speed**. You can narrow the list with these filters:

* **Search Adapter**, by name.
* **Status**, and the **All**, **Configured** and **Non Configured** tabs.
* **Type**: the asset types the adapter feeds (table above).
* **Group**: the product category of the adapter, for example IAM, Endpoint Security, Vulnerability Management, Cloud or SIEM & SOAR.
* **Mapping**: a specific field the adapter provides.
* **Connector**: adapters that have a connection on a given connector.

### Connection and adapter status

Two statuses tell you whether collection works.

* **Connection status** is shown in the **Status** column of the connection list. It reads **Success** after a connection passes its test and **Error** when the test fails. A connection that has not passed a test yet shows **Error**.
* **Adapter status** is the combined result of its connections. The adapter card is green when every connection works, warning when some fail, error when all fail, and has no status when it has no connection yet.

The status updates when you run a test and at the start of each discovery.

### How credentials are handled

Adapters ask for different details: a host and a username and password, an API key, a client ID and secret, or a certificate file. Only the fields that an adapter marks as sensitive, such as passwords, secrets and API keys, are encrypted before they are stored. After you save a connection, sensitive fields show as asterisks and the stored value is never displayed again. To keep the stored value when you edit a connection, leave the asterisks as they are. To change it, type the new value.

Use a dedicated read-only account or API key for each connection, with only the permissions the adapter needs. The per-adapter pages list the permissions.

### Where to find details for one adapter

This documentation describes what applies to all adapters. The requirements for a single adapter (fields, permissions, ports, what it collects) are on its own page in the [Adapters space](https://docs.octoxlabs.com/adapters). Many adapters also show a short instruction panel next to the connection form in the console.

### What's next?

<table data-view="cards"><thead><tr><th></th><th></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><strong>Connect an adapter</strong></td><td>Create a connection, test it and fetch your first assets.</td><td></td></tr><tr><td><strong>File-based adapters</strong></td><td>Bring in assets from files when a product has no API to connect to.</td><td></td></tr><tr><td><strong>Data Rules</strong></td><td>Assign field values to assets with rules or a CSV file.</td><td></td></tr><tr><td><strong>Discovery and Aggregation</strong></td><td>See every step of a discovery run and how assets are merged.</td><td></td></tr></tbody></table>
