Skip to content

Fix Fleet restructuring - #588

Open
hslatman wants to merge 9 commits into
mainfrom
herman/fix-fleet-restructuring
Open

hslatman wants to merge 9 commits into
mainfrom
herman/fix-fleet-restructuring

Conversation

@hslatman

@hslatman hslatman commented Dec 3, 2026 •

Copy link
Copy Markdown
Member

This PR fixes some issues with the current Fleet integration docs. The Windows and Fleet naming changes are related to remarks from @kitzy at Fleet. The other things surfaced through my agent. I haven't gone through the updated instructions yet, so they may need some practical tests first.

To be decided / done:

  • The doc is moved from -fleet-dm- to -fleet-. That may need a redirect. Related to / depends on Add a CI gate for removed docs pages #582.
  • It currently describes setting up a Fleet connection for each platform, but in practice that should be one. It requires rewriting a bit more related to the enrollment query ID.
  • Osquery extension releases for macOS are not yet available on releases.smallstep.com. They're part of the downloads at https://github.com/smallstep/step-agent/releases/, though.
  • Osquery extensions for Linux and Windows are not yet promoted to stable.

@hslatman
hslatman marked this pull request as ready for review December 3, 2026 12:23
@hslatman
hslatman requested a review from a team as a code owner December 3, 2026 12:23
@tashian

tashian commented Dec 3, 2026

Copy link
Copy Markdown
Member

@hslatman I notice that the instructions for adding the CA to Fleet via yaml were removed?

@kitzy kitzy left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two items outside the diff:

  • L256, L372: and version >= '0.65.1-1' compares strings, so 0.100.0 sorts below 0.65.1. Use version_compare(version, '0.65.1-1') >= 0, as Fleet's own patch policies do.
  • L376–382: the extensions agent option needs Fleet Premium and a self-hosted TUF server. Customers can't upload to Fleet's TUF server.


- 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

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fleet has no MDM for Linux, so this (and "devices must be MDM-enrolled" on L21) should be limited to macOS and Windows. Linux hosts only need fleetd.

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

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A regular user's API token expires with their session, so a sync that runs every 8 hours will stop working without warning. Worth saying here, not just "fine for testing."

@@ -87,16 +82,22 @@ You'll need the [fleetctl CLI](https://fleetdm.com/guides/fleetctl#installing-fl
Success! The API token for your new user is: <TOKEN>

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This changed. With --api-only, --password is ignored as of 4.96 and is an error on main, so the command above will fail after the next release. Use:

fleetctl user create --name 'Smallstep' --api-only

--email is optional. The output is now "Successfully created new user!", then a keypress prompt, then "The API token for your new user is: ". See Create an API-only user, which also covers creating one in the UI and, with Fleet Premium, limiting it to the endpoints Smallstep calls.

@@ -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.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On L153: Fleet renamed teams to fleets, so "Scope the profile to the fleets or labels containing your macOS hosts."

## 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.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fleet builds the macOS automatic-install policy from the app bundle ID in the .pkg. If the step-agent-osquery pkg doesn't contain an .app, the Deploy toggle can't create the policy.

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-<connection-id>.mobileconfig` file in your `lib/` directory. Then reference it from your team YAML file:

```yaml
controls:

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

controls.macos_settings.custom_settings is a deprecated alias in 4.96 and an error in Fleet 5. Use:

controls:
  apple_settings:
    configuration_profiles:
      - path: ../lib/fleet-<connection-id>.mobileconfig

@@ -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).

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GitOps does manage scripts, under controls.scripts. GitOps is declarative, so a script uploaded in the UI gets deleted on the next fleetctl gitops run. Suggest:

controls:
  scripts:
    - path: ../lib/smallstep-agent-config.ps1


## 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:

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Listing a package under software.packages only makes it available; nothing installs it. The UI's Deploy toggle creates an automatic-install policy, but GitOps has no equivalent here. Each agent and extension package needs a policy with install_software (see install software), or self_service / setup_experience.

- Ubuntu Linux
- url: <step-agent-osquery .rpm URL from releases.smallstep.com>
labels_include_any:
- RedHat Linux

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The built-in label is Red Hat Linux, with a space; fleetctl gitops will fail on an unknown label. Same on L584 and L589.

Suggested change
- RedHat Linux
- Red Hat Linux


## 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:

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fleet renamed queries to reports: the queries: key below (L617) should be reports:, since queries: is a deprecated alias. Also "team YAML" here should be "fleet YAML".

@hslatman

hslatman commented Dec 3, 2026

Copy link
Copy Markdown
Member Author

@hslatman I notice that the instructions for adding the CA to Fleet via yaml were removed?

Yes. We don't issue a SCEP cert for enrollment anymore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants