Skip to content

Commit 24fda4a

Browse files
tashianclaude
andcommitted
docs: osquery-based enrollment for Fleet, 2026-05-01 API, auto-approval curl
- Enrollment guide: add an osquery-based enrollment section for Fleet, and move the device API examples to the 2026-05-01 API version. - Fleet tutorial: describe Linux enrollment as ACME Device Attestation with the TPM, and show the curl flow for adding Fleet to autoApproveSources via the Device Enrollment Policy API, since the console doesn't expose it. - Agent guide and troubleshooting: tighten the wording around pre-registration and the duplicate-registration symptom. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017MzPzeUonmnLSsg2KvYgAK
1 parent c2f0c95 commit 24fda4a

4 files changed

Lines changed: 72 additions & 29 deletions

File tree

‎platform/enrollment-guide.mdx‎

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ into your Smallstep inventory:
3131
You can [manually invite users
3232
to join your Smallstep team](https://smallstep.com/app/?next=/users/invite),
3333
and they will be able to self-enroll devices
34-
using the [Smallstep Agent](./smallstep-agent.mdx).
34+
using the [Smallstep Agent](./smallstep-agent.mdx)'s `step-agent register` subcommand.
3535

3636
By default, administrators
3737
must approve a new device
@@ -69,32 +69,33 @@ until Smallstep receives an attestation from the device.
6969
For a concrete example,
7070
see [Connect Jamf Pro to Smallstep](../tutorials/connect-jamf-pro-to-smallstep.mdx)
7171

72+
### Use osquery-based enrollment
73+
74+
For [Fleet-managed](../tutorials/connect-fleet-dm-to-smallstep.mdx) Linux and Windows hosts, deploy the Smallstep osquery extension.
75+
The osquery extension will report each device's TPM Endorsement Key to Fleet.
76+
Smallstep then syncs the data into your inventory.
77+
7278
### Add devices via API
7379

7480
You can import devices from any source into Smallstep using our API.
81+
7582
Use this when your devices are inventoried in a system that Smallstep can't sync from.
76-
If Smallstep already syncs your inventory from an MDM,
77-
don't add the same devices via the API as well:
78-
the result is a duplicate entry that blocks agent enrollment.
79-
For Fleet-managed Linux and Windows hosts,
80-
deploy the [Smallstep osquery extension](../tutorials/connect-fleet-dm-to-smallstep.mdx#linux)
81-
so that Fleet reports each device's TPM Endorsement Key to Smallstep.
8283

8384
Devices added via API are automatically approved.
8485
but they will not be marked as high-assurance
8586
until Smallstep receives an attestation from the device.
8687

8788
You'll need [an API token](https://smallstep.com/app/?next=/settings/api/tokens/add) with all “device” scopes (put-device, patch-device, etc.).
8889

89-
Use the [Add Device](https://gateway.smallstep.com/v2025-01-01/operations/PostDevices) endpoint to create a device.
90+
Use the [Add Device](https://gateway.smallstep.com/v2026-05-01/operations/PostDevices) endpoint to create a device.
9091
- For Apple devices, the `permanentIdentifier` must be the device's 9-character serial number.
9192
- For TPM 2.0 devices, the `permanentIdentifier` must be the TPM Endorsement Key URI, in the format `urn:ek:sha256:ul3sYf6uQ6jVEXAMPLEXoAuHI10U8gTvEJ6bMj95LXI=`. (You can retrieve the EK URI by running `step agent tpm --fingerprint` on the device.)
9293
- To create and assign a user to a device, fill in the `user` fields.
9394

9495
Once added,
9596
the devices will be automatically approved.
9697

97-
You can see the device using the [List Devices](https://gateway.smallstep.com/v2025-01-01/operations/ListDevices) endpoint:
98+
You can see the device using the [List Devices](https://gateway.smallstep.com/v2026-05-01/operations/ListDevices) endpoint:
9899

99100
```bash
100101
set +o history
@@ -103,7 +104,7 @@ set -o history
103104
curl -sH @api_headers --request GET \
104105
--url https://gateway.smallstep.com/api/devices \
105106
--header 'Accept: application/json' \
106-
--header 'x-smallstep-api-version: 2025-01-01' | jq
107+
--header 'x-smallstep-api-version: 2026-05-01' | jq
107108
```
108109

109110
You'll also see new devices in the Smallstep console,

‎platform/smallstep-agent.mdx‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Using an MDM? See:
2222
- [Connect Jamf Pro to Smallstep](../tutorials/connect-jamf-pro-to-smallstep.mdx) (macOS)
2323
- [Connect Intune to Smallstep](../tutorials/connect-intune-to-smallstep.mdx) (Windows)
2424
- [Connect Workspace ONE to Smallstep](../tutorials/connect-workspace-one-to-smallstep.mdx) (Windows)
25-
- [Connect Fleet DM to Smallstep](../tutorials/connect-fleet-dm-to-smallstep.mdx) (macOS, Linux, Windows)
25+
- [Connect Fleet DM to Smallstep](../tutorials/connect-fleet-dm-to-smallstep.mdx)
2626
</Alert>
2727

2828
Running into trouble? See the [Smallstep Agent troubleshooting guide](./troubleshooting-agent.mdx).
@@ -356,7 +356,7 @@ so a host with no <code>/dev/tpmrm0</code> cannot enroll yet.
356356
```
357357
358358
359-
## Registering and approving endpoints
359+
## Registering and approving NixOS endpoints
360360
361361
### Self-registration
362362
@@ -388,8 +388,6 @@ If your devices are inventoried in a system that Smallstep can't sync from, you
388388
- Select the Smallstep Agents authority
389389
- Use the sha256 Root fingerprint displayed on this page
390390
391-
If Smallstep already syncs your inventory from an MDM that reports each device's TPM Endorsement Key, such as Fleet with the Smallstep osquery extension, skip step 1. The devices are already in your inventory, and adding them again via the API or with `step-agent register` creates a conflicting entry. Write `agent.yaml` as in step 2 and start the agent. It attests with its TPM and is matched to the synced entry. See [Connect Fleet DM to Smallstep](../tutorials/connect-fleet-dm-to-smallstep.mdx#linux) for the full Fleet flow.
392-
393391
## Start the agent
394392
395393
Finally, enable and start the agent:

‎platform/troubleshooting-agent.mdx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,10 +99,10 @@ The agent may not be installed or may not be running on the device.
9999

100100
**Symptom:** "`step-agent register` fails with `unprocessable entity`, or the browser prompts me to register a device that is already in my inventory"
101101

102-
The device already exists in your Smallstep inventory. This happens when the device was synced from an MDM that reports its TPM Endorsement Key (for example, Fleet with the Smallstep osquery extension) or was added via the API. `step-agent register` tries to create a second device entry, which conflicts with the existing one.
102+
This happens when the device was synced from an MDM that reports its TPM Endorsement Key or was added via the API. `step-agent register` tries to create a second device entry, which conflicts with the existing one.
103103

104104
**Troubleshooting steps:**
105-
1. Don't run `step-agent register` on the device. Write the agent configuration file directly and start the agent service. It attests with its TPM and is matched to the existing entry. See [Linux agent configuration](../tutorials/connect-fleet-dm-to-smallstep.mdx#step-5-linux-agent-configuration) in the Fleet tutorial, or [Pre-registration via API](./smallstep-agent.mdx#pre-registration-via-api) in the agent guide.
105+
1. Don't run `step-agent register` on the device. Write the agent configuration file directly and start the agent service. See [Pre-registration via API](./smallstep-agent.mdx#pre-registration-via-api).
106106
2. If a duplicate device was created, delete it in the [Smallstep console](https://smallstep.com/app/?next=/devices) and keep the entry that came from the MDM sync or the API.
107107
3. If the device shows as pending after the agent starts, approve it in the console.
108108

‎tutorials/connect-fleet-dm-to-smallstep.mdx‎

Lines changed: 57 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -404,10 +404,13 @@ Once the enrollment report is configured in Fleet, the Smallstep platform needs
404404
2. In the Smallstep console, edit your Fleet configuration
405405
3. Set the **Enrollment Query ID** to the numeric ID
406406

407+
Your fleet's TPM information will begin syncing to Smallstep.
407408

408409
## Step 5. Linux agent configuration
409410

410-
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.
411+
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.
412+
413+
After installing the agent package and the osquery extension, you must configure the agent with your Smallstep team slug and CA fingerprint.
411414

412415
When adding a Linux agent package in Fleet, add the following **post-install script** to configure and start the agent:
413416

@@ -426,14 +429,34 @@ systemctl daemon-reload
426429
systemctl enable --now step-agent
427430
```
428431

432+
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.
429433

430-
When the agent starts, it attests with the host's TPM, and Smallstep matches the attestation to the inventory entry that Fleet synced along with the TPM Endorsement Key. No registration step runs on the host. 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` using the [Device Enrollment Policy API](https://gateway.smallstep.com/v2026-05-01/operations/PutDeviceEnrollmentPolicy).
434+
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`:
431435

432-
<Alert severity="warning">
433-
<div>
434-
Do not run `step-agent register` or `step-agent start --login` on a host that Fleet has already synced to Smallstep, and do not add the host through the Smallstep API. The host is already in your inventory, and registering it again fails with `unprocessable entity` or prompts you to register a duplicate device. The agent configuration above is all the host needs.
435-
</div>
436-
</Alert>
436+
```bash
437+
set +o history
438+
echo "Authorization: Bearer [your API token]" > api_headers
439+
set -o history
440+
441+
# Fetch the current policy
442+
curl -sH @api_headers --request GET \
443+
--url https://gateway.smallstep.com/api/device-enrollment-policy \
444+
--header 'Accept: application/json' \
445+
--header 'x-smallstep-api-version: 2026-05-01' | jq
446+
447+
# Resubmit it with Fleet in autoApproveSources.
448+
# Adjust both lists to match the policy you fetched.
449+
curl -sH @api_headers --request PUT \
450+
--url https://gateway.smallstep.com/api/device-enrollment-policy \
451+
--header 'Accept: application/json' \
452+
--header 'Content-Type: application/json' \
453+
--header 'x-smallstep-api-version: 2026-05-01' \
454+
--data '{
455+
"allowedSources": ["Smallstep API", "Smallstep Agent", "Fleet"],
456+
"autoApproveSources": ["Fleet"],
457+
"requireUserBinding": true
458+
}' | jq
459+
```
437460

438461
## Step 6. Confirmation (Linux)
439462

@@ -565,13 +588,34 @@ Add the Smallstep agent MSI as Fleet software so it installs on enrollment:
565588
2. In the Fleet console, go to **Software**, choose **Add software → Custom package**, and upload the MSI
566589
3. Scope the install to your Windows hosts
567590

568-
The agent reads the registry values written in Step 3 on startup, attests with the host's TPM, and Smallstep matches the attestation to the inventory entry that Fleet synced along with the TPM Endorsement Key. 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` using the [Device Enrollment Policy API](https://gateway.smallstep.com/v2026-05-01/operations/PutDeviceEnrollmentPolicy).
591+
On startup, the agent reads the registry values to find the team information, then attests with the endpoint's TPM. Smallstep matches the attestation to the inventory data synced from Fleet.
569592

570-
<Alert severity="warning">
571-
<div>
572-
Do not run `step-agent register` or `step-agent start --login` on a host that Fleet has already synced to Smallstep, and do not add the host through the Smallstep API. The host is already in your inventory, and registering it again fails with `unprocessable entity` or prompts you to register a duplicate device. The agent configuration above is all the host needs.
573-
</div>
574-
</Alert>
593+
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`:
594+
595+
```bash
596+
set +o history
597+
echo "Authorization: Bearer [your API token]" > api_headers
598+
set -o history
599+
600+
# Fetch the current policy
601+
curl -sH @api_headers --request GET \
602+
--url https://gateway.smallstep.com/api/device-enrollment-policy \
603+
--header 'Accept: application/json' \
604+
--header 'x-smallstep-api-version: 2026-05-01' | jq
605+
606+
# Resubmit it with Fleet in autoApproveSources.
607+
# Adjust both lists to match the policy you fetched.
608+
curl -sH @api_headers --request PUT \
609+
--url https://gateway.smallstep.com/api/device-enrollment-policy \
610+
--header 'Accept: application/json' \
611+
--header 'Content-Type: application/json' \
612+
--header 'x-smallstep-api-version: 2026-05-01' \
613+
--data '{
614+
"allowedSources": ["Smallstep API", "Smallstep Agent", "Fleet"],
615+
"autoApproveSources": ["Fleet"],
616+
"requireUserBinding": true
617+
}' | jq
618+
```
575619

576620
## Step 6. Confirmation (Windows)
577621

0 commit comments

Comments
 (0)