Jonathan Katz 915ba8a45c 🤖 Ignore DEP premium filters on Fleet Free tier (#43865)
## Summary

Fixes #43826.

Adds code to silently ignore `dep_profile_error` and
`dep_assign_profile_response` query parameters similar to other premium
only parameters on the list hosts endpoint. This PR does _NOT_ include
filtering out the `dep_profile_error` field from the host details object
since it doesn't seem like a common pattern to filter out individual
fields from a response object, but that can be changed if needed.


# Checklist for submitter

## Testing

- [x] Added/updated automated tests
- [ ] Where appropriate, [automated tests simulate multiple hosts and
test for host
isolation](https://github.com/fleetdm/fleet/blob/main/docs/Contributing/reference/patterns-backend.md#unit-testing)
(updates to one hosts's records do not affect another)

- [x] QA'd all new/changed functionality manually

### Before fix

On premium:
- UI: can see "AB issue" card 
- UI: can see MDM status with Profile assignment error: failed
- API: can curl `/fleet/hosts?dep_profile_error=true` and get the host
- API: can curl `/fleet/hosts` and see `"dep_profile_error":true` for
the failed host
- API: can curl `/fleet/hosts/7` and see `"dep_profile_error": true`
- API: can curl `/fleet/hosts?dep_assign_profile_response=FAILED`

On free:
- UI: can't see "AB issue" card
- UI: can see MDM status pending but no details, api response has
`"dep_profile_error": true`
- API: can curl `/fleet/hosts?dep_profile_error=true` and get the host
- API: can curl `/fleet/hosts` and see `"dep_profile_error":true` for
the failed host
- API: can curl `/fleet/hosts?dep_assign_profile_response=FAILED`


### After fix

On free:
- API: curl `/fleet/hosts?dep_profile_error=true` and the filter gets
ignored
- API: curl `/fleet/hosts?dep_assign_profile_response=FAILED` or other
statuses and the filter gets ignored
- API: can curl `/fleet/hosts` to show all hosts and it shows
`"dep_profile_error":true` since it is not filtered at the host details
level
- API: can curl `/fleet/hosts/7` and see dep_profile_error since it is
not filtered at the host details level

```
jonathan@jonathans-macbook-pro:~/fleet$ curl -k -X GET 'https://localhost:8080/api/v1/fleet/hosts?dep_assign_profile_response=FAILED'   -H "Authorization: Bearer $TOKEN" | wc -l
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  8878    0  8878    0     0   144k      0 --:--:-- --:--:-- --:--:--  146k
       5
jonathan@jonathans-macbook-pro:~/fleet$ curl -k -X GET 'https://localhost:8080/api/v1/fleet/hosts?dep_profile_error=true'   -H "Authorization: Bearer $TOKEN" | wc -l
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  8879    0  8879    0     0   298k      0 --:--:-- --:--:-- --:--:--  298k
       5
jonathan@jonathans-macbook-pro:~/fleet$ curl -k -X GET 'https://localhost:8080/api/v1/fleet/hosts'   -H "Authorization: Bearer $TOKEN" | wc -l
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  8879    0  8879    0     0   283k      0 --:--:-- --:--:-- --:--:--  289k
       5
jonathan@jonathans-macbook-pro:~/fleet$ curl -k -X GET 'https://localhost:8080/api/v1/fleet/hosts?dep_profile_error=true&dep_assign_profile_response=FAILED'   -H "Authorization: Bearer $TOKEN" | wc -l
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  8879    0  8879    0     0   311k      0 --:--:-- --:--:-- --:--:--  321k
       5
```

On premium:
- Everything works as expected, filters work

```
jonathan@jonathans-macbook-pro:~/fleet$ curl -k -X GET 'https://localhost:8080/api/v1/fleet/hosts?dep_assign_profile_response=FAILED'   -H "Authorization: Bearer $TOKEN" | wc -l
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  1696    0  1696    0     0  58681      0 --:--:-- --:--:-- --:--:-- 60571
       1
jonathan@jonathans-macbook-pro:~/fleet$ curl -k -X GET 'https://localhost:8080/api/v1/fleet/hosts?dep_profile_error=true'   -H "Authorization: Bearer $TOKEN" | wc -l
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  1696    0  1696    0     0  59613      0 --:--:-- --:--:-- --:--:-- 60571
       1
jonathan@jonathans-macbook-pro:~/fleet$ curl -k -X GET 'https://localhost:8080/api/v1/fleet/hosts'   -H "Authorization: Bearer $TOKEN" | wc -l
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  9055    0  9055    0     0   355k      0 --:--:-- --:--:-- --:--:--  368k
       5
jonathan@jonathans-macbook-pro:~/fleet$ curl -k -X GET 'https://localhost:8080/api/v1/fleet/hosts?dep_profile_error=true&dep_assign_profile_response=FAILED'   -H "Authorization: Bearer $TOKEN" | wc -l
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  1696    0  1696    0     0  60845      0 --:--:-- --:--:-- --:--:-- 62814
       1
```

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **Bug Fixes**
* Host listing and counts now ignore premium-only filters on non-premium
licenses, ensuring consistent results for free-tier users.

* **Tests**
* Added tests validating that host listing and counting behave
differently between free and premium license tiers when premium filters
are used.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-04-21 14:14:25 -04:00
2026-04-07 13:49:12 -03:00
2026-04-21 12:16:23 -05:00
2026-04-20 15:35:51 -03:00
2026-04-20 15:35:51 -03:00

Fleet logo, landscape, dark text, transparent background

News   ·   Report a bug   ·   Handbook   ·   Why open source?   ·   Art

Open-source platform for IT and security teams with thousands of computers. Designed for APIs, GitOps, webhooks, YAML, and humans.

A glass city in the clouds

What's it for?

Organizations like Fastly and Gusto use Fleet for vulnerability reporting, detection engineering, device management (MDM), device health monitoring, posture-based access control, managing unused software licenses, and more.

Explore data

To see what kind of data you can use Fleet to gather, check out the table reference documentation.

Out-of-the-box policies

Fleet includes out-of-the box support for all CIS benchmarks for macOS and Windows, as well as many simpler queries.

Take as much or as little as you need for your organization.

Supported platforms

Here are the platforms Fleet currently supports:

  • Linux (all distros)
  • macOS
  • Windows
  • Chromebooks
  • Amazon Web Services (AWS)
  • Google Cloud (GCP)
  • Azure (Microsoft cloud)
  • Data centers
  • Containers (kube, etc)
  • Linux-based IoT devices

Lighter than air

Fleet is lightweight and modular. You can use it for security without using it for MDM, and vice versa. You can turn off features you are not using.

Openness

Fleet is dedicated to flexibility, accessibility, and clarity. We think everyone can contribute and that tools should be as easy as possible for everyone to understand.

Good neighbors

Fleet has no ambition to replace all of your other tools. (Though it might replace some, if you want it to.) Ready-to-use, enterprise-friendly integrations exist for Snowflake, Splunk, GitHub Actions, Vanta, Elastic Jira, Zendesk, and more.

Fleet plays well with Munki, Chef, Puppet, and Ansible, as well as with security tools like Crowdstrike and SentinelOne. For example, you can use the free version of Fleet to quickly report on what hosts are actually running your EDR agent.

Free as in free

The free version of Fleet will always be free. Fleet is independently backed and actively maintained with the help of many amazing contributors.

Longevity

The company behind Fleet is founded (and majority-owned) by true believers in open source. The company's business model is influenced by GitLab (NYSE: GTLB), with great investors, happy customers, and the capacity to become profitable at any time.

In keeping with Fleet's value of openness, Fleet Device Management's company handbook is public and open source. You can read about the history of Fleet and osquery and our commitment to improving the product.

Is it any good?

Fleet is used in production by IT and security teams with thousands of laptops and servers. Many deployments support tens of thousands of hosts, and a few large organizations manage deployments as large as 400,000+ hosts.

Chat

Please join us in MacAdmins Slack or in osquery Slack.

The Fleet community is full of kind and helpful people. Whether or not you are a paying customer, if you need help, just ask.

Contributing   Go Report Card   CII Best Practices   Twitter Follow  

The landscape of cybersecurity and IT is too complex. Let's open it up.

Contributions are welcome, whether you answer questions on Slack / GitHub / StackOverflow / LinkedIn / Twitter, improve the documentation or website, write a tutorial, give a talk at a conference or local meetup, give an interview on a podcast, troubleshoot reported issues, or submit a patch. The Fleet code of conduct is on GitHub.

What's next?

To see what Fleet can do, head over to fleetdm.com and try it out for yourself, grab time with one of the maintainers to discuss, or visit the docs and roll it out to your organization.

Production deployment

Fleet is simple enough to spin up for yourself. Or you can have us host it for you. Premium features are available either way.

Documentation

Complete documentation for Fleet can be found at https://fleetdm.com/docs.

License

The free version of Fleet is available under the MIT license. The commercial license is also designed to allow contributions to paid features for users whose employment agreements allow them to contribute to open source projects. (See LICENSE.md for details.)

Fleet is built on osquery, nanoMDM, Nudge, and swiftDialog.

S
Description
No description provided
Readme MIT
1.6 GiB
Languages
Go 52.5%
TypeScript 37.5%
JavaScript 4.3%
PowerShell 1.4%
Augeas 0.9%
Other 3%