diff --git a/manifest.json b/manifest.json index df2916b4..f8339c94 100644 --- a/manifest.json +++ b/manifest.json @@ -81,8 +81,8 @@ "path": "/tutorials/connect-jumpcloud-to-smallstep.mdx" }, { - "title": "Connect Fleet DM", - "path": "/tutorials/connect-fleet-dm-to-smallstep.mdx" + "title": "Connect Fleet", + "path": "/tutorials/connect-fleet-to-smallstep.mdx" } ] }, diff --git a/platform/enrollment-guide.mdx b/platform/enrollment-guide.mdx index 863f2718..a2f49e84 100644 --- a/platform/enrollment-guide.mdx +++ b/platform/enrollment-guide.mdx @@ -71,7 +71,7 @@ see [Connect Jamf Pro to Smallstep](../tutorials/connect-jamf-pro-to-smallstep.m ### Use osquery-based enrollment -For [Fleet-managed](../tutorials/connect-fleet-dm-to-smallstep.mdx) macOS, Linux, and Windows hosts, deploy the Smallstep osquery extension alongside the agent. +For [Fleet-managed](../tutorials/connect-fleet-to-smallstep.mdx) macOS, Linux, and Windows hosts, deploy the Smallstep osquery extension alongside the agent. The osquery extension reports each device's identity to Fleet: the TPM Endorsement Key on Linux and Windows, and the serial number and agent attestation key on macOS. diff --git a/platform/smallstep-agent.mdx b/platform/smallstep-agent.mdx index c35a691f..1595347c 100644 --- a/platform/smallstep-agent.mdx +++ b/platform/smallstep-agent.mdx @@ -22,7 +22,7 @@ Using an MDM? See: - [Connect Jamf Pro to Smallstep](../tutorials/connect-jamf-pro-to-smallstep.mdx) (macOS) - [Connect Intune to Smallstep](../tutorials/connect-intune-to-smallstep.mdx) (Windows) - [Connect Workspace ONE to Smallstep](../tutorials/connect-workspace-one-to-smallstep.mdx) (Windows) -- [Connect Fleet DM to Smallstep](../tutorials/connect-fleet-dm-to-smallstep.mdx) +- [Connect Fleet to Smallstep](../tutorials/connect-fleet-to-smallstep.mdx) Running into trouble? See the [Smallstep Agent troubleshooting guide](./troubleshooting-agent.mdx). diff --git a/tutorials/connect-fleet-dm-to-smallstep.mdx b/tutorials/connect-fleet-to-smallstep.mdx similarity index 81% rename from tutorials/connect-fleet-dm-to-smallstep.mdx rename to tutorials/connect-fleet-to-smallstep.mdx index eca054d1..4845e381 100644 --- a/tutorials/connect-fleet-dm-to-smallstep.mdx +++ b/tutorials/connect-fleet-to-smallstep.mdx @@ -1,11 +1,11 @@ --- -updated_at: September 8, 2026 -title: Connect Fleet DM to Smallstep -html_title: Integrate Fleet DM with Smallstep Tutorial -description: Connect Fleet DM with Smallstep for device security. Complete guide for deploying certificates and syncing device inventory using Fleet's device management platform. +updated_at: December 3, 2026 +title: Connect Fleet to Smallstep +html_title: Integrate Fleet with Smallstep Tutorial +description: Connect Fleet with Smallstep for device security. Complete guide for deploying certificates and syncing device inventory using Fleet's device management platform. --- -Smallstep can integrate with [Fleet DM](https://fleetdm.com/) to deploy certificates to your Fleet-managed devices. +Smallstep can integrate with [Fleet](https://fleetdm.com/) to deploy certificates to your Fleet-managed devices. In this document, we will configure your Fleet instance for use with your Smallstep team. @@ -14,7 +14,7 @@ In this document, we will configure your Fleet instance for use with your Smalls You will need: - A [Smallstep team](https://smallstep.com/signup) with Pro features enabled -- A [Fleet DM](https://fleetdm.com/) instance with MDM enabled for your target platforms +- A [Fleet](https://fleetdm.com/) instance with MDM enabled for your target platforms Client requirements: @@ -35,26 +35,21 @@ Supported platforms: - macOS — Smallstep agent and osquery extension for full device identity sync, with configuration provided through a `.mobileconfig` profile - Linux (via agent software deployment) -- Windows Pro or Enterprise — Fleet does not yet support its native Smallstep CA type on Windows, so Windows enrollment goes through Smallstep's NDES-compatible endpoints, configured in Fleet as a Dynamic SCEP CA. +- Windows Pro or Enterprise — Smallstep agent and osquery extension, with the agent configured through a PowerShell script that writes registry values -# macOS - -macOS enrollment combines two pieces: - -- A `.mobileconfig` profile, generated by Smallstep and imported into Fleet, that bootstraps the Smallstep agent, which then takes over enrollment. -- The Smallstep osquery extension registers additional device identity information directly in Fleet, for a richer device inventory and seamless enrollment experience. +# Get a Fleet API token -## Step 1. Get a Fleet API token +Smallstep needs a Fleet API token to sync your device inventory, whichever platforms you manage. Create the token once, before you follow the setup for your platforms. You'll paste it into Smallstep when you connect Fleet to Smallstep. -Smallstep needs a Fleet API token to sync your device inventory. You can use a personal API token for testing, or create a dedicated API-only user for production use. +You can use a personal API token for testing, or create a dedicated API-only user for production use. -### Option A: Use a personal API token +## Option A: Use a personal API token 1. In Fleet, click your profile icon in the top right and select **My account** 2. Click **Get API token** -3. Copy the token — you'll need it for the next step +3. Copy the token -### Option B: Create an API-only user (recommended for production) +## Option B: Create an API-only user (recommended for production) For production use, we recommend creating a dedicated API-only user for the Smallstep integration rather than using a personal account token. An API-only user cannot log into the Fleet UI and is intended for automated integrations. @@ -87,7 +82,7 @@ You'll need the [fleetctl CLI](https://fleetdm.com/guides/fleetctl#installing-fl Success! The API token for your new user is: ``` - Copy this token — you'll need it for the next step. + Copy this token.
@@ -95,8 +90,14 @@ The default role for API-only users is **Observer**, which grants read-only acce
+# macOS -## Step 2. Create a Smallstep enrollment report in Fleet +macOS enrollment combines two pieces: + +- A `.mobileconfig` profile, generated by Smallstep and imported into Fleet, that bootstraps the Smallstep agent, which then takes over enrollment. +- The Smallstep osquery extension registers additional device identity information directly in Fleet, for a richer device inventory and seamless enrollment experience. + +## Step 1. Create a Smallstep enrollment report in Fleet Create a Fleet report to collect the enrollment data. Smallstep reads this report during device sync to include additional device identity details alongside the standard Fleet device inventory. @@ -119,7 +120,7 @@ Create a Fleet report to collect the enrollment data. Smallstep reads this repor 7. Click **Save** 8. Note the numeric ID of the Smallstep enrollment report that was just created -## Step 3. Connect Fleet to Smallstep +## Step 2. Connect Fleet to Smallstep Now you'll add your Fleet API credentials to Smallstep. @@ -128,15 +129,13 @@ Now you'll add your Fleet API credentials to Smallstep. 3. Fill in the fields: - **Name/Alias**: An optional identifier for this connection (for example, `Production Fleet`) - **API Base URL**: Your Fleet server URL (for example, `https://fleet.example.com`) - - **API Token**: Paste the API token from the previous step - - **Enrollment Query ID**: The numeric ID of the Fleet enrollment report from the previous step + - **API Token**: Paste the [Fleet API token](#get-a-fleet-api-token) you created earlier + - **Enrollment Query ID**: The numeric ID of the Fleet enrollment report from the previous step. 4. Click **Connect MDM** -5. After connecting, temporarily save the following values: - - Under **Authority Certificates**, download the Root CA certificate. -Within a few minutes, you will see your Fleet devices in the [Devices](https://smallstep.com/app/?next=/devices/all) tab. Your Smallstep device inventory syncs from Fleet approximately every eight hours. +Within a few minutes, you will see your Fleet devices in the [Devices](https://smallstep.com/app/?next=/devices/all) tab. Your (full) Smallstep device inventory syncs from Fleet approximately every eight hours. -## Step 4. Download the configuration profile +## Step 3. Download the configuration profile Fleet deploys certificates and configuration to devices using a configuration profile. You can download this from the Smallstep dashboard and upload it to Fleet. No need to build the payloads or paste certificate data by hand. @@ -146,7 +145,7 @@ Fleet deploys certificates and configuration to devices using a configuration pr The downloaded profile bundles everything required to enroll a device: your root and intermediate CA certificates, the Smallstep agent settings, and the Login Items entry for the agent. -## Step 5. Upload the configuration profile to Fleet +## Step 4. Upload the configuration profile to Fleet 1. In the Fleet console, go to **Controls → OS settings → Configuration profiles** 2. Click **Add profile** @@ -155,7 +154,7 @@ The downloaded profile bundles everything required to enroll a device: your root The profile will be deployed to devices at their next MDM check-in. -## Step 6. Deploy the Smallstep agent +## Step 5. Deploy the Smallstep agent The macOS Smallstep agent picks up the configuration that Fleet deployed to the device, and uses it to register the device with Smallstep. @@ -167,7 +166,7 @@ Deploy the agent using Fleet's [software deployment](https://fleetdm.com/guides/ Alternatively, you can use a separate software management system such as [Munki](https://github.com/munki/munki) to deploy the agent. See the [Smallstep Agent manual installation guide](../platform/smallstep-agent.mdx#macos-installation) for detailed instructions. -## Step 7. Deploy the osquery extension +## Step 6. Deploy the osquery extension Smallstep provides an osquery extension that registers additional device identity information directly in Fleet. When Smallstep syncs your device inventory from Fleet, it reads this data to enable a seamless enrollment experience on macOS. @@ -187,7 +186,7 @@ See https://fleetdm.com/guides/deploying-custom-osquery-extensions-in-fleet-a-st Alternatively, you can use a separate software management system such as [Munki](https://github.com/munki/munki) to deploy the osquery extension. -## Step 8. Confirmation +## Step 7. Confirmation To confirm certificate deployment: @@ -201,7 +200,7 @@ On the device itself: # Linux -Linux does not support MDM configuration profiles, so the SCEP flow used for Apple and Windows devices does not apply. Instead, the Smallstep agent on Linux registers directly with your Smallstep team using TPM attestation. There is no certificate authority to configure in Fleet — you only need to deploy and configure the agent. +Linux does not support MDM configuration profiles, so there is no profile to deploy. Instead, the Smallstep agent on Linux registers directly with your Smallstep team using ACME Device Attestation with the system's TPM. There is no certificate authority to configure in Fleet — you only need to deploy and configure the agent. ## Step 1. Deploy the Smallstep agent @@ -236,7 +235,7 @@ Replace `` with your Smallstep team slug (found in [**Settings
-If your fleet includes multiple Linux distributions or architectures, create separate software entries for each package variant. Use [Fleet labels](https://fleetdm.com/guides/managing-labels-in-fleet) to target `.deb` packages to Debian/Ubuntu hosts and `.rpm` packages to RHEL/Fedora hosts. See the [GitOps section](#gitops-configure-fleet-with-fleetctl) for a complete example with label targeting. +If your fleet includes multiple Linux distributions or architectures, create separate software entries for each package variant. Use [Fleet labels](https://fleetdm.com/guides/managing-labels-in-fleet) to target `.deb` packages to Debian/Ubuntu hosts and `.rpm` packages to RHEL/Fedora hosts. See the [GitOps section](#gitops-with-fleetctl) for a complete example with label targeting.
@@ -280,41 +279,26 @@ Once the extension is active on your Linux devices, create a Fleet report to col - Enable **Linux** as **Target** - Select **All hosts** 7. Click **Save** +8. Note the numeric ID of the Smallstep enrollment report that was just created -## Step 4. Link enrollment report in Smallstep - -Once the enrollment report is configured in Fleet, the Smallstep platform needs to know about its existence, so that it can gather the data reported through it. - -1. Note the numeric ID of the Smallstep enrollment report that was just created -2. In the Smallstep console, edit your Fleet configuration -3. Set the **Enrollment Query ID** to the numeric ID - -Your fleet's TPM information will begin syncing to Smallstep. - -## Step 5. Linux agent configuration - -Linux does not support MDM configuration profiles, so the SCEP enrollment flow used for macOS and Windows does not apply. Instead, the Smallstep agent on Linux uses ACME Device Attestation with the system's TPM. - -After installing the agent package and the osquery extension, you must configure the agent with your Smallstep team slug and CA fingerprint. +## Step 4. Connect Fleet to Smallstep -When adding a Linux agent package in Fleet, add the following **post-install script** to configure and start the agent: +Now you'll add your Fleet API credentials to Smallstep. -```bash -#!/bin/bash +1. In the Smallstep console, go to [**Settings → Device Management**](https://smallstep.com/app/?next=/settings/devices) +2. Under Available Providers, find **Fleet** and click **Connect** +3. Fill in the fields: + - **Name/Alias**: An optional identifier for this connection (for example, `Production Fleet`) + - **API Base URL**: Your Fleet server URL (for example, `https://fleet.example.com`) + - **API Token**: Paste the [Fleet API token](#get-a-fleet-api-token) you created earlier + - **Enrollment Query ID**: The numeric ID of the Fleet enrollment report from the previous step. +4. Click **Connect MDM** -# Configure the Smallstep agent -mkdir -p /etc/step-agent -cat > /etc/step-agent/agent.yaml << EOF -team: "" -fingerprint: "" -EOF +Within a few minutes, you will see your Fleet devices in the [Devices](https://smallstep.com/app/?next=/devices/all) tab, and their TPM information will begin syncing to Smallstep. Your (full) Smallstep device inventory syncs from Fleet approximately every eight hours. -# Enable and start the agent service -systemctl daemon-reload -systemctl enable --now step-agent -``` +## Step 5. Approve the device -When the agent starts, it attests with the endpoint's TPM. Smallstep matches the attestation to the inventory data you just synced. By default, devices synced from Fleet need admin approval: if the host shows as `pending` in the [Smallstep console](https://smallstep.com/app/?next=/devices), approve it there. +The agent you deployed in Step 1 attests with the endpoint's TPM. Smallstep matches the attestation to the TPM information synced from Fleet. By default, devices synced from Fleet need admin approval: if the host shows as `pending` in the [Smallstep console](https://smallstep.com/app/?next=/devices), approve it there. To approve Fleet-synced devices automatically, add `Fleet` to `autoApproveSources` in your team's device enrollment policy. This setting isn't exposed in the Smallstep console. Use the [Device Enrollment Policy API](https://gateway.smallstep.com/v2026-05-01/operations/PutDeviceEnrollmentPolicy) with an [API token](https://smallstep.com/app/?next=/settings/api/tokens/add) that has the `get-device-enrollment-policy` and `put-device-enrollment-policy` scopes. The `PUT` replaces the whole policy, so fetch the current policy first and resubmit it with `Fleet` added to `autoApproveSources`: @@ -369,9 +353,13 @@ The osquery extension can be installed by distributing the MSI to your devices, ### MSI -NOTE: the osquery extension MSI distribution is currently work in progress. + +
+The osquery extension MSI distribution is currently work in progress. +
+
-1. Download the `step-agent-osquery.ext.exe` MSI for your Windows target architecture(s) from [Smallstep's releases](https://releases.smallstep.com) +1. Download the `step-agent-osquery` extension MSI for your Windows target architecture(s) from [Smallstep's releases](https://releases.smallstep.com) 2. In Fleet, go to **Software** 3. Click **Add software**. Ensure a fleet is selected; software is configured per-fleet 4. Select **Custom package** @@ -417,16 +405,31 @@ Once the extension is active on your Windows devices, create a Fleet report to c 8. Note the numeric ID of the Smallstep enrollment report that was just created -## Step 3. Configure the Smallstep agent via a PowerShell script +## Step 3. Connect Fleet to Smallstep + +1. In the Smallstep console, go to [**Settings → Device Management**](https://smallstep.com/app/?next=/settings/devices) +2. Under Available Providers, find **Fleet** and click **Connect** +3. Fill in the fields: + - **API Base URL**: Your Fleet server URL (for example, `https://fleet.example.com`) + - **API Token**: Paste the [Fleet API token](#get-a-fleet-api-token) you created earlier + - **Name/Alias**: An optional identifier for this connection (for example, `Production Fleet`) + - **Enrollment Query ID**: The numeric ID of the Fleet enrollment report from the previous step. +4. Click **Connect MDM** +5. After connecting, temporarily save the following values: + - Under **Authority Certificates**, copy the SHA256 fingerprint of the Agents Root CA certificate. + +Within a few minutes, you will see your Fleet devices in the [Devices](https://smallstep.com/app/?next=/devices/all) tab. Your (full) Smallstep device inventory syncs from Fleet approximately every eight hours. + +## Step 4. Configure the Smallstep agent via a PowerShell script The Windows Smallstep agent reads its configuration from `HKLM:\Software\Policies\Smallstep`. Fleet does not have native registry-management, so we set those values with a PowerShell script run by Fleet's [Scripts](https://fleetdm.com/guides/scripts) feature. -The agent needs three values: +The agent needs two values: - `TeamSlug` — your Smallstep team slug (found in [**Settings → Team**](https://smallstep.com/app/?next=/settings/team)) - `CAFingerprint` — the SHA-256 root fingerprint of your Smallstep Agents authority (found in [**Certificate Manager → Authorities**](https://smallstep.com/app/?next=/cm/authorities) under the Agents authority) -Save the following as `smallstep-agent-config.ps1`, replacing `` and `` with your values: +Save the following as `smallstep-agent-config.ps1`, replacing `` and `` with your values: ```powershell $RegistryPath = "HKLM:\Software\Policies\Smallstep" @@ -447,21 +450,6 @@ Upload the script to Fleet and run it against your Windows hosts: For self-healing enforcement, you can pair this with a [policy automation](https://fleetdm.com/guides/policy-automation-run-script) that checks whether the registry values exist and re-runs the script if they're missing — Fleet documents this pattern in [Prevent tampering of Fleet Orbit](https://fleetdm.com/guides/prevent-tampering-of-fleet-agent). -## Step 4. Connect Fleet to Smallstep - -1. In the Smallstep console, go to [**Settings → Device Management**](https://smallstep.com/app/?next=/settings/devices) -2. Under Available Providers, find **Fleet** and click **Connect** -3. Fill in the fields: - - **API Base URL**: Your Fleet server URL (for example, `https://fleet.example.com`) - - **API Token**: Paste the API token from the previous step - - **Name/Alias**: An optional identifier for this connection (for example, `Production Fleet`) - - **Enrollment Query ID**: The numeric ID of the Fleet enrollment report -4. Click **Connect MDM** -5. After connecting, temporarily save the following values: - - Under **Authority Certificates**, copy the SHA256 fingerprint of the Agents Root CA certificate. - -Within a few minutes, you will see your Fleet devices in the [Devices](https://smallstep.com/app/?next=/devices/all) tab. Your Smallstep device inventory syncs from Fleet approximately every four hours. - ## Step 5. Deploy the Smallstep agent Add the Smallstep agent MSI as Fleet software so it installs on enrollment: @@ -506,25 +494,25 @@ curl -sH @api_headers --request PUT \ On a Fleet-enrolled Windows test host: -1. Trigger a sync: either reboot, or run `gpupdate /force` then wait for the MDM scheduler, or use the **Sync** button on the device under **Settings → Accounts → Access work or school** -2. Open **certlm.msc** (local machine, since this profile uses Device scope) -3. Under **Personal → Certificates**, confirm a certificate issued by your Smallstep Agents Intermediate CA with `CN=` -4. Under **Trusted Root Certification Authorities → Certificates**, confirm the Smallstep Agents Root CA is present -5. Confirm the registry values were written: +1. Confirm the registry values were written: ```powershell Get-ItemProperty -Path HKLM:\Software\Policies\Smallstep ``` -6. Confirm the agent service is running: +2. Confirm the agent service is running: ```powershell sc query "Smallstep Agent" ``` +3. Open **certlm.msc** (the local machine certificate store) +4. Under **Personal → Certificates**, confirm a certificate issued by your Smallstep Agents Intermediate CA with `CN=` +5. Under **Trusted Root Certification Authorities → Certificates**, confirm the Smallstep Agents Root CA is present +6. In the Smallstep console, check [**Devices**](https://smallstep.com/app/?next=/devices/all) for the host. Approve it if approval is required. 7. In the Smallstep console, check **Certificate Manager → Inventory** for a freshly issued certificate matching the device, and confirm the device appears in [**Devices**](https://smallstep.com/app/?next=/devices/all) with an **Enrolled At** timestamp. -If enrollment fails, check Fleet's host detail page for profile errors and `Event Viewer → Applications and Services Logs → Microsoft → Windows → DeviceManagement-Enterprise-Diagnostics-Provider → Admin` on the host for the underlying CSP error. +If enrollment fails, check the Fleet host detail page to confirm the agent MSI installed and the PowerShell script ran successfully, then see the [Smallstep Agent troubleshooting guide](../platform/troubleshooting-agent.mdx). # GitOps with `fleetctl` @@ -544,37 +532,13 @@ fleet-gitops/ └── smallstep-agent-setup.sh ``` -- `default.yml` — Organization-wide settings, including certificate authorities +- `default.yml` — Organization-wide settings - `teams/team.yml` — Per-team configuration for profiles, software, and queries - `lib/` — Configuration profile files and Linux agent setup script -## Add the certificate authorities - -In `default.yml`, declare the Smallstep CA (Apple) under `org_settings`: - -```yaml -org_settings: - certificate_authorities: - smallstep: - - name: SMALLSTEP_AGENT - url: - challenge_url: - username: $SMALLSTEP_CHALLENGE_USERNAME - password: $SMALLSTEP_CHALLENGE_PASSWORD -``` - -Omit the block you don't need if you're only targeting one OS family. - -Set the credential environment variables before running `fleetctl gitops`: - -```bash -export SMALLSTEP_CHALLENGE_USERNAME='your-challenge-username' -export SMALLSTEP_CHALLENGE_PASSWORD='your-challenge-password' -``` - ## Add configuration profiles -Download the configuration profile for your Fleet connection from the Smallstep dashboard, as described in **Step 4** of the macOS section above, and place the `fleet-.mobileconfig` file in your `lib/` directory. Then reference it from your team YAML file: +Download the configuration profile for your Fleet connection from the Smallstep dashboard, as described in **Step 3** of the macOS section above, and place the `fleet-.mobileconfig` file in your `lib/` directory. Then reference it from your team YAML file: ```yaml controls: @@ -629,6 +593,22 @@ Adapt the label names to match your Fleet label configuration. Fleet includes bu The PowerShell registry script above is run from the Fleet UI rather than GitOps. If you want it under version control, manage it through Fleet's [scripts API](https://fleetdm.com/docs/rest-api/rest-api#scripts). +## Add the osquery extension + +In the same `software.packages` list, add the Smallstep osquery extension packages. Download links for each platform and architecture are on [Smallstep's releases](https://releases.smallstep.com) page: + +```yaml + - url: + labels_include_any: + - Ubuntu Linux + - url: + labels_include_any: + - RedHat Linux + - url: +``` + +Add an entry for each operating system and architecture you deploy the extension to, and use `labels_include_any` to target each package to the right hosts, as with the agent packages above. + ## Add the enrollment query Add the Smallstep enrollment query to your team YAML. Fleet will collect results from all hosts on a schedule and expose them as a report: