You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: tutorials/connect-fleet-dm-to-smallstep.mdx
+91-3Lines changed: 91 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -354,9 +354,81 @@ If your fleet includes multiple Linux distributions or architectures, create sep
354
354
</div>
355
355
</Alert>
356
356
357
+
## Step 2. Deploy the osquery extension on Linux
358
+
359
+
Smallstep provides an osquery extension that registers additional device identity information, including the TPM Endorsement Key (EK)—directly in Fleet. When Smallstep syncs your device inventory from Fleet, it reads this data to enable a more seamless enrollment experience on Linux.
360
+
361
+
1. Download the `step-agent-osquery` package for your Linux distribution and target architecture from [Smallstep's releases](https://releases.smallstep.com).
362
+
1. In Fleet, go to **Software**
363
+
1. Click **Add software**. Ensure a fleet is selected; software is configured per-fleet
364
+
1. Select **Custom package**
365
+
1. Click **Choose file**, and select the `step-agent-osquery` package that was downloaded before
366
+
1. Enable **Deploy**
367
+
1. Click **Add software**.
368
+
369
+
A modal should appear, showing the package upload progress.
370
+
371
+
After upload, a Fleet policy is created that automatically triggers package installation if the package is not yet installed. This policy has no minimum version requirement—any version of `step-agent-osquery` is accepted. To force a new package version to be installed, upload the package to Fleet and edit the policy to include a condition like `and version >= '0.65.1-1'`.
372
+
373
+
See https://fleetdm.com/guides/deploying-custom-osquery-extensions-in-fleet-a-step-by-step-guide for additional guidance and some troubleshooting options when deploying osquery extensions.
374
+
375
+
376
+
## Step 3. Create a Smallstep enrollment report in Fleet
377
+
378
+
Once the extension is active on your Linux devices, create a Fleet report to collect the enrollment data. Smallstep reads this report during device sync to include the TPM EK and other enrollment details alongside the standard Fleet device inventory.
379
+
380
+
1. In Fleet, go to **Reports**
381
+
2. Ensure **All Fleets** is active. If not, the report won't apply to all your hosts.
382
+
3. Click **Add report**
383
+
4. Enter the following query:
384
+
385
+
```sql
386
+
SELECT*FROM smallstep_enrollment;
387
+
```
388
+
5. Click **Save**; a modal should appear
389
+
6. In the modal, enter the following details:
390
+
- A **Name** for the query, such as "Smallstep Enrollment"
391
+
- Optionally, a **Description**
392
+
- The **Interval** can be set to **Every hour**. While testing, a shorter interval can be helpful
393
+
- Optionally, enable the **Observers can run** checkbox
394
+
- Enable **Linux** as **Target**
395
+
- Select **All hosts**
396
+
7. Click **Save**
397
+
398
+
## Step 4. Link enrollment report in Smallstep
399
+
400
+
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.
401
+
402
+
1. Note the numeric ID of the Smallstep enrollment report that was just created
403
+
2. In the Smallstep console, edit your Fleet configuration
404
+
3. Set the **Enrollment Query ID** to the numeric ID
405
+
406
+
407
+
## Step 5. Linux agent configuration
408
+
409
+
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 registers directly using TPM attestation. After installing the agent package and the osquery extension, you must configure the agent with your Smallstep team slug and CA fingerprint.
410
+
411
+
When adding a Linux agent package in Fleet, add the following **post-install script** to configure and start the agent:
412
+
413
+
```bash
414
+
#!/bin/bash
415
+
416
+
# Configure the Smallstep agent
417
+
mkdir -p /etc/step-agent
418
+
cat > /etc/step-agent/agent.yaml <<EOF
419
+
team: "<your-team-slug>"
420
+
fingerprint: "<your-agents-ca-fingerprint>"
421
+
EOF
422
+
423
+
# Enable and start the agent service
424
+
systemctl daemon-reload
425
+
systemctl enable --now step-agent
426
+
```
427
+
428
+
357
429
After deployment, Linux devices will self-register with your Smallstep team via TPM attestation. By default, new devices require admin approval in the [Smallstep console](https://smallstep.com/app/?next=/devices). To automate approval, you can [pre-register devices via API](../platform/smallstep-agent.mdx#pre-registration-via-api).
358
430
359
-
## Step 2. Confirmation (Linux)
431
+
## Step 6. Confirmation (Linux)
360
432
361
433
On a Fleet-enrolled Linux host:
362
434
@@ -705,8 +777,8 @@ fleet-gitops/
705
777
```
706
778
707
779
-`default.yml` — Organization-wide settings, including certificate authorities
708
-
-`teams/team.yml` — Per-team configuration for profilesand software
709
-
-`lib/` — Configuration profile files and the Linux agent setup script
780
+
-`teams/team.yml` — Per-team configuration for profiles, software, and queries
781
+
-`lib/` — Configuration profile files and Linux agent setup script
710
782
711
783
## Add the certificate authorities
712
784
@@ -801,6 +873,22 @@ Adapt the label names to match your Fleet label configuration. Fleet includes bu
801
873
802
874
The PowerShell registry script from the Windows [Step 6](#step-6-configure-the-smallstep-agent-via-a-powershell-script) 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).
803
875
876
+
## Add the enrollment query
877
+
878
+
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:
879
+
880
+
```yaml
881
+
queries:
882
+
- name: Smallstep enrollment
883
+
description: Collects Smallstep enrollment data including TPM EK for device identity sync
0 commit comments