Skip to content

Fleet DM Integration

BastionXP Enterprise connects to Fleet to learn about your devices. It downloads the hosts from Fleet's Host inventory, and it keeps its list up to date when you add or remove hosts in Fleet.

The devices appear on the Devices page of the portal, with the source Fleet. A device from Fleet often arrives with few details. BastionXP shows what it knows. For the full details of a host, use Fleet.

Being in the list does not give a device an identity. A device gets an identity, a certificate, when it enrolls. The list tells BastionXP which devices belong to your company, so that BastionXP issues certificates only to them. See Device identity.

What you need

  • The base URL of your Fleet instance. If you use the cloud-hosted Fleet, it generally looks like this: https://<your-org-name>.fleetdm.cloud.
  • An API token from Fleet. In the Fleet UI, choose My account, and then Get API token.

Connect Fleet to BastionXP

  1. In the portal, choose Settings at the bottom of the menu, and then MDM integrations.

    The MDM integrations page

  2. Choose Add connector.

  3. For MDM provider name, choose Fleet DM.
  4. Fill in:

    • Base URL: the base URL of your Fleet instance.
    • API token: the token from Fleet.

    The Add an MDM connector dialog, for Fleet

  5. Choose Add connector.

BastionXP connects to Fleet with the API token, and starts to download the hosts. The download happens in batches, so it can take a few minutes.

The column Device sync shows how it goes:

State What it means
Starting BastionXP is about to start the download.
Syncing The download is running.
Synced The download is complete.
Failed The download failed. See If the sync fails.

Open the Devices page. You will see the devices appear, one batch after the other.

Register the webhook

After the first full download, BastionXP does not ask Fleet for the hosts again and again. Instead, Fleet tells BastionXP when a host is added or removed. For this, you register BastionXP's webhook in Fleet.

  1. On the MDM integrations page, choose the connector's ID, mdm-2 in the example, or its three dots and then Edit.

    The details of the Fleet connector, with its webhook

  2. Copy the Webhook URL, with its copy button.

  3. In Fleet, go to the home page. In the Activities section, choose Manage automations. A dialog opens.
  4. Turn on Enable, and give the webhook URL as the Destination URL.
  5. Choose Save.

The webhook URL looks like this:

https://ca.example.com/v1/mdm/fleetdm/webhook/9a7e3c52-1b84-4d6f-8e20-5c3f7a9b1d46

Keep the webhook URL private

Fleet does not send a password with its webhook. The random part of the URL is the secret that proves to BastionXP that a message comes from your Fleet. Do not share the URL. If it leaks, remove the connector, and add it again. BastionXP then makes a new URL.

BastionXP must be reachable from Fleet on its HTTPS address, for the webhook. If your BastionXP is on a private network, Fleet Cloud cannot reach it.

Change or remove the connector

On the MDM integrations page, choose the three dots at the end of the row:

  • Edit changes the base URL and the API token. Do this when you rotate the token in Fleet.
  • Delete removes the connector, after you confirm. BastionXP stops syncing devices from this Fleet. The devices that it already knows stay in the Devices list. Delete the connector only when you stop using that Fleet.

If the sync fails

If Device sync says Failed:

  • Check the Base URL. It must start with https://, and it must be the address of your Fleet instance.
  • Check the API token. Edit the connector, and enter it again. A token can expire or be revoked in Fleet.
  • Check that BastionXP can reach your Fleet on the network.

The log of BastionXP has the details of the failure.