Commit graph

3580 commits

Author SHA1 Message Date
Ian Littman
62755cbd82
Bump Go to 1.25.5, Alpine to 3.23.0 where relevant, bump Trivy to current version (#36848)
Fixes vulns reported in
https://github.com/fleetdm/fleet/actions/runs/19999992703. We'll
definitely want to at least cherry-pick this.
2025-12-07 20:04:14 -06:00
Jahziel Villasana-Espinoza
eb87048714
34376 android sw gitops (#36595)
<!-- Add the related story/sub-task/bug number, like Resolves #123, or
remove if NA -->
**Related issue:** Resolves #34376

# Checklist for submitter

If some of the following don't apply, delete the relevant line.

- [x] Changes file added for user-visible changes in `changes/`,
`orbit/changes/` or `ee/fleetd-chrome/changes`.
See [Changes
files](https://github.com/fleetdm/fleet/blob/main/docs/Contributing/guides/committing-changes.md#changes-files)
for more information.

- [x] Input data is properly validated, `SELECT *` is avoided, SQL
injection is prevented (using placeholders for values in statements)

## Testing

- [x] Added/updated automated tests
- [x] 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

## New Fleet configuration settings

If you didn't check the box above, follow this checklist for
GitOps-enabled settings:

- [x] Verified that the setting is exported via `fleetctl
generate-gitops`
- [x] Verified that the setting is cleared on the server if it is not
supplied in a YAML file (or that it is documented as being optional)
2025-12-05 20:01:57 -05:00
jacobshandling
5cc79a5ca8
Update FileUploader button layout and styling (#36808)
<!-- Add the related story/sub-task/bug number, like Resolves #123, or
remove if NA -->
**Related issue:** Resolves #36804

- Update text/icon order when relevant, remove redundant `label` causing
padding inconsistencies

<img width="965" height="1521" alt="Screenshot 2025-12-05 at 2 10 14 PM"
src="https://github.com/user-attachments/assets/fb8df8f4-f98a-4a26-8c82-b846576529a9"
/>

- Confirm UI/UX everywhere it's used:
<img width="619" height="553" alt="Screenshot 2025-12-05 at 2 23 23 PM"
src="https://github.com/user-attachments/assets/87295511-e84b-4f68-8403-2fb1dc1c7ccf"
/>
<img width="1464" height="959" alt="Screenshot 2025-12-05 at 2 23 06 PM"
src="https://github.com/user-attachments/assets/e6f995af-ba77-477d-84ad-0acc4104314e"
/>
<img width="1464" height="959" alt="Screenshot 2025-12-05 at 2 19 59 PM"
src="https://github.com/user-attachments/assets/20bd6cd9-2340-4dbb-a9cc-8c46fe64a847"
/>
<img width="1464" height="959" alt="Screenshot 2025-12-05 at 2 20 25 PM"
src="https://github.com/user-attachments/assets/62c8694a-2380-47b9-b59b-6878a4f49d8e"
/>
<img width="1464" height="959" alt="Screenshot 2025-12-05 at 2 21 19 PM"
src="https://github.com/user-attachments/assets/7ec9487a-3387-4060-aebb-421c5e878329"
/>
<img width="1464" height="959" alt="Screenshot 2025-12-05 at 2 17 29 PM"
src="https://github.com/user-attachments/assets/f8509f38-a143-4a96-84f3-3c791cd5177c"
/>
<img width="1464" height="959" alt="Screenshot 2025-12-05 at 2 17 15 PM"
src="https://github.com/user-attachments/assets/acc42d69-8c79-4a11-a0eb-fadf4dc10523"
/>
<img width="1464" height="959" alt="Screenshot 2025-12-05 at 2 16 50 PM"
src="https://github.com/user-attachments/assets/eea89d0d-648c-4d1b-94e8-cba0226200fc"
/>
<img width="1464" height="959" alt="Screenshot 2025-12-05 at 2 21 35 PM"
src="https://github.com/user-attachments/assets/36dc034d-dfa8-4dd1-8b76-a282e4e52aca"
/>
<img width="1464" height="959" alt="Screenshot 2025-12-05 at 2 17 45 PM"
src="https://github.com/user-attachments/assets/a7050ad9-c0a2-42e0-a76f-15b9bb171d8b"
/>
<img width="1464" height="959" alt="Screenshot 2025-12-05 at 2 22 45 PM"
src="https://github.com/user-attachments/assets/cb3a0d7c-270a-46aa-ae6a-e2695e41c26a"
/>
<img width="1464" height="959" alt="Screenshot 2025-12-05 at 2 19 14 PM"
src="https://github.com/user-attachments/assets/982a072c-2523-4bf5-b67a-82506ac844cc"
/>


# Checklist for submitter

If some of the following don't apply, delete the relevant line.

- [x] Changes file added for user-visible changes in `changes/`
- [x] QA'd all new/changed functionality manually
2025-12-05 14:59:12 -08:00
jacobshandling
d6c1cd65ee
Add internal error state for file uploader, apply to Okta Conditional Access (#36798)
<!-- Add the related story/sub-task/bug number, like Resolves #123, or
remove if NA -->
**Related issue:** Resolves #36762 
<img width="852" height="624" alt="Screenshot 2025-12-05 at 1 07 26 PM"
src="https://github.com/user-attachments/assets/f8624566-faaf-4c56-a1b5-608ea2bb976d"
/>



# Checklist for submitter

If some of the following don't apply, delete the relevant line.

- [x] Changes file added for user-visible changes in `changes/
- [x] QA'd all new/changed functionality manually
2025-12-05 13:46:53 -08:00
Juan Fernandez
a098a6c9bc
Android certificate crud: validate variable replacement (#36648)
<!-- Add the related story/sub-task/bug number, like Resolves #123, or
remove if NA -->
**Related issue:** Resolves #36533 

If variables can't be interpolated return 400.

# Checklist for submitter

If some of the following don't apply, delete the relevant line.

- [X] Changes file added for user-visible changes in `changes/`,
`orbit/changes/` or `ee/fleetd-chrome/changes`.
See [Changes
files](https://github.com/fleetdm/fleet/blob/main/docs/Contributing/guides/committing-changes.md#changes-files)
for more information.

## Testing

- [X] Added/updated automated tests

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

## Summary by CodeRabbit

* **Bug Fixes**
* Corrected HTTP status code returned when certificate template variable
interpolation fails
* Certificate delivery status now properly reflects failed
interpolation, improving visibility into deployment issues

<sub>✏️ Tip: You can customize this high-level summary in your review
settings.</sub>

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Victor Lyuboslavsky <2685025+getvictor@users.noreply.github.com>
2025-12-05 12:14:14 -06:00
jacobshandling
26b33f37aa
Add missing website redirect (#36732)
<!-- Add the related story/sub-task/bug number, like Resolves #123, or
remove if NA -->
**Related issue:** Resolves #36731 

- [x] Changes file added for user-visible changes in `changes/`
- [x] QA'd all new/changed functionality manually
2025-12-05 08:54:10 -08:00
jacobshandling
2fd9a3f004
Improve login form tabbing (#36736)
**Related issue:** Resolves #36735 

Fixed the order of tabbing on the log in page while maintaining update
styling:

![ezgif-2a83bf92c68732c0](https://github.com/user-attachments/assets/f4a6b3ea-0e03-42c4-83da-407bf24eee8b)

- [x] Changes file added for user-visible changes in `changes/`
- [x] QA'd all new/changed functionality manually
2025-12-05 08:53:31 -08:00
RachelElysia
1922e772d7
Fleet UI: Disable host action buttons on click (noticeable on slow connections) (#36707) 2025-12-05 07:04:58 -05:00
jacobshandling
e7414a3c51
Error when trying to filter software_titles with platform without a team_id (#36658)
<!-- Add the related story/sub-task/bug number, like Resolves #123, or
remove if NA -->
**Related issue:** Resolves #34072 

# Checklist for submitter

If some of the following don't apply, delete the relevant line.

- [x] Changes file added for user-visible changes in `changes/`
- [x] Added/updated automated tests
- [x] QA'd all new/changed functionality manually

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

## Summary by CodeRabbit

* **Bug Fixes**
* Improved request validation: filtering software titles by platform now
requires a team_id. The system returns a clear error message if platform
filtering is attempted without specifying a team.

* **Tests**
* Added test coverage for platform-based software title filtering and
validation scenarios.

<sub>✏️ Tip: You can customize this high-level summary in your review
settings.</sub>

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-12-04 16:55:46 -08:00
jacobshandling
2521daa1fe
Allow saving Fleet Queries with invalid* SQL, update error text, some JS –> TS housekeeping (#36637)
<!-- Add the related story/sub-task/bug number, like Resolves #123, or
remove if NA -->
**Related issue:** Resolves #35058 

- Open the Query save or save-as-new-ing flows in the UI even when a
syntax error is found in the Query's SQL.
- Continue blocking save when the query is empty
- Update tests
- JS –> TS housekeeping

<img width="1162" height="1248" alt="Screenshot 2025-12-02 at 4 31
47 PM"
src="https://github.com/user-attachments/assets/23b4e70d-f104-4b0e-b316-c03fb6492f59"
/>

<img width="1162" height="1248" alt="Screenshot 2025-12-02 at 4 31
50 PM"
src="https://github.com/user-attachments/assets/5b5ad0b7-36f0-4c5e-a2ff-e9665263c8f1"
/>


# Checklist for submitter

If some of the following don't apply, delete the relevant line.

- [x] Changes file added for user-visible changes in `changes/`
- [x] Added/updated automated tests
- [x] QA'd all new/changed functionality manually

* "invalid" according to Fleet's UI. Though we make efforts to fix false
negatives here as we become aware of them, that parsing is imperfectly
aligned with SQL that osquery considers valid
2025-12-04 11:18:48 -08:00
Zach Wasserman
7c6484dd63
Redact API tokens in fleetctl config set (#36692)
**Related issue:** Resolves #34626

# Checklist for submitter

If some of the following don't apply, delete the relevant line.

- [x] Changes file added for user-visible changes in `changes/`,
`orbit/changes/` or `ee/fleetd-chrome/changes`.
See [Changes
files](https://github.com/fleetdm/fleet/blob/main/docs/Contributing/guides/committing-changes.md#changes-files)
for more information.
- [x] QA'd all new/changed functionality manually
2025-12-04 10:06:57 -08:00
RachelElysia
092b55a760
FE: Ensure ids are unique (#36124) 2025-12-04 09:54:52 -05:00
Juan Fernandez
068ffeaf40
Use auth header for android end-points (#36594)
**Related issue:** Resolves #36287 

Updated 'fleetd/certificates/<id>' and 'fleetd/certificates/<id>/status'
to authenticate using the orbit_node_key provided in the
'Authentication' header.
2025-12-03 15:42:03 -04:00
Martin Angers
5a8e2774bf
Feature branch: Android Setup Experience support (#35951)
Feature branch for
https://github.com/fleetdm/fleet/issues/33761#issuecomment-3548996114


---------

Co-authored-by: RachelElysia <71795832+RachelElysia@users.noreply.github.com>
2025-12-02 12:27:20 -05:00
Gabriel Hernandez
e16c3c7272
change TurnOnMDMMessage component to generic TurnOnMessage and use in end user auth page (#36477)
<!-- Add the related story/sub-task/bug number, like Resolves #123, or
remove if NA -->
**Related issue:** Resolves #35296

This makes the TurnOnMDMMessage component more generic and display a
configurage "Turn on" message. We then are able to use this in the End
user auth page on the controls page.

- [x] Changes file added for user-visible changes in `changes/`,
`orbit/changes/` or `ee/fleetd-chrome/changes`.
See [Changes
files](https://github.com/fleetdm/fleet/blob/main/docs/Contributing/guides/committing-changes.md#changes-files)
for more information.
- [x] QA'd all new/changed functionality manually
2025-12-02 12:11:10 +00:00
Gabriel Hernandez
f63ed0a4c6
make UI elements have consistant spacing on mdm page (#36487)
<!-- Add the related story/sub-task/bug number, like Resolves #123, or
remove if NA -->
**Related issue:** Resolves #35371

This makes the spacing between UI elements on the mdm page consistant.
Specifically we just remove margins around the video element in the end
user migration section

- [x] Changes file added for user-visible changes in `changes/`,
`orbit/changes/` or `ee/fleetd-chrome/changes`.
- [x] QA'd all new/changed functionality manually
2025-12-02 12:07:54 +00:00
Konstantin Sykulev
04e6f1b261
Notify android devices of certificate_template changes (#36258)
**Related issue:** Resolves #35465

# Checklist for submitter

If some of the following don't apply, delete the relevant line.

- [x] Changes file added for user-visible changes in `changes/`,
`orbit/changes/` or `ee/fleetd-chrome/changes`.
See [Changes
files](https://github.com/fleetdm/fleet/blob/main/docs/Contributing/guides/committing-changes.md#changes-files)
for more information.
- [x] Input data is properly validated, `SELECT *` is avoided, SQL
injection is prevented (using placeholders for values in statements)

## Testing

- [x] Added/updated automated tests
- [ ] QA'd all new/changed functionality manually

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

## Summary by CodeRabbit

## Release Notes

* **New Features**
* Added certificate template delivery support for MDM-enrolled Android
devices via managed configurations.
* Enhanced certificate templates with delivery status, challenge
information, and certificate authority type details.
* Improved host certificate template management with expanded database
operations for lookup, insertion, and status updates.

<sub>✏️ Tip: You can customize this high-level summary in your review
settings.</sub>

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-12-01 17:30:18 -06:00
jacobshandling
d87f69563f
Fix and improve handling of "installed" software scenarios (#36516)
**Related issue:** Resolves #31973 

Addresses a few closely related issues around determining the
appropriate UI to display for installed software

- Pass the inherited host's `softwareUpdatedAt` to the handler
responsible for determining the software's "UI display status" so it can
calculate whether it is "recently installed", as intended.
- In the scenario where the above is _not_ passed in for some reason,
default to "installed" ui display status any time the software's status
is "installed"
- Add a check that ensures the above default "installed" ui status is
captured even when `installed_versions` is `null`. This scenario
previously returned an "uninstalled" ui display status, which caused
this bug initially

<img width="1720" height="880" alt="Screenshot 2025-12-01 at 12 02
29 PM"
src="https://github.com/user-attachments/assets/20874ff5-133c-4b74-8634-2cdc2d3a1497"
/>

- [x] Changes file added for user-visible changes in `changes/
- [x] Added/updated automated tests
- [x] QA'd all new/changed functionality manually
2025-12-01 13:17:42 -08:00
Juan Fernandez
ec71fb814e
Added missing detail column to host_certificate_templates (#36397)
**Related issue:** Resolves #36292 

- Allow clients to specify details about the certificate template status
change.
- Allow clients to see the details of the certificate template status
change.

---------

Co-authored-by: Lucas Manuel Rodriguez <lucas@fleetdm.com>
2025-12-01 14:46:14 -04:00
Magnus Jensen
75a9170502
Always return fields for Windows MDM command result even if pending (#36483)
<!-- Add the related story/sub-task/bug number, like Resolves #123, or
remove if NA -->
**Related issue:** Resolves #31819 

I also ended up tweaking the return value for windows commands in the
`commands` endpoint, so it aligns everywhere.

# Checklist for submitter

If some of the following don't apply, delete the relevant line.

- [x] Changes file added for user-visible changes in `changes/`,
`orbit/changes/` or `ee/fleetd-chrome/changes`.
See [Changes
files](https://github.com/fleetdm/fleet/blob/main/docs/Contributing/guides/committing-changes.md#changes-files)
for more information.

## Testing

- [x] Added/updated automated tests
- [x] QA'd all new/changed functionality manually

MDM Command result with a pending command:
<img width="770" height="334" alt="Screenshot 2025-12-01 at 12 36 55"
src="https://github.com/user-attachments/assets/51adb4bd-cc07-455c-8255-e1ec654521d2"
/>

MDM comman result with a result:
<img width="764" height="517" alt="Screenshot 2025-12-01 at 12 36 07"
src="https://github.com/user-attachments/assets/dec2f1c1-e756-4170-a1d0-5496dc8039b9"
/>
2025-12-01 13:53:22 -03:00
Gabriel Hernandez
37985e3df6
feat activity audit fancy search activities (#35825)
<!-- Add the related story/sub-task/bug number, like Resolves #123, or
remove if NA -->
**Related issue:** Resolves #29727

**new filters:**

<img width="720" height="931" alt="image"
src="https://github.com/user-attachments/assets/bba33904-24ae-4c12-b2ed-49152588e636"
/>

**new type filter**

<img width="411" height="433" alt="image"
src="https://github.com/user-attachments/assets/14b060df-f01b-48ce-8dff-ca01e5fad6d6"
/>

> NOTE: i will be doing a follow up PR for keyboard navigation

- [x] Changes file added for user-visible changes in `changes/`,
`orbit/changes/` or `ee/fleetd-chrome/changes`.
See [Changes
files](https://github.com/fleetdm/fleet/blob/main/docs/Contributing/guides/committing-changes.md#changes-files)
for more information.
- [x] Added/updated automated tests
- [x] QA'd all new/changed functionality manually

---------

Co-authored-by: Magnus Jensen <magnus@fleetdm.com>
2025-12-01 16:48:43 +00:00
Magnus Jensen
06761243d7
Optimize clean up apple profiles query (#36405)
<!-- Add the related story/sub-task/bug number, like Resolves #123, or
remove if NA -->
**Related issue:** Resolves #35601 

# Checklist for submitter

If some of the following don't apply, delete the relevant line.

- [x] Changes file added for user-visible changes in `changes/`,
`orbit/changes/` or `ee/fleetd-chrome/changes`.
See [Changes
files](https://github.com/fleetdm/fleet/blob/main/docs/Contributing/guides/committing-changes.md#changes-files)
for more information.

## Testing

- [x] QA'd all new/changed functionality manually
2025-11-27 17:02:57 -03:00
Sarah Gillespie
5850840d04
Fix references to enable-scripts flag in error messages and comments (#36340) 2025-11-26 13:53:57 -06:00
Juan Fernandez
287710b1c5
Update queries APIs that drive the OS settings UI (#36018)
**Related issue:** Resolves #35532

Update queries APIs that drive the OS settings UI
2025-11-26 13:25:49 -04:00
Scott Gress
23d8a0715d
Make last_restarted_at more consistent (#36243)
<!-- Add the related story/sub-task/bug number, like Resolves #123, or
remove if NA -->
**Related issue:** Resolves #33922 

# Details

This PR addresses issues discovered with our on-the-fly calculations of
host `last_restarted_at` date, where it would drift slightly between
refreshes. Some users are relying on this value not changing between
restarts, so this PR moves to a strategy where we persist the date and,
when host details are refreshed, compare the new calculated date to the
persisted one and ignore changes < 30 seconds.

# Checklist for submitter

If some of the following don't apply, delete the relevant line.

- [X] Changes file added for user-visible changes in `changes/`,
`orbit/changes/` or `ee/fleetd-chrome/changes`.
See [Changes
files](https://github.com/fleetdm/fleet/blob/main/docs/Contributing/guides/committing-changes.md#changes-files)
for more information.

- [X] Input data is properly validated, `SELECT *` is avoided, SQL
injection is prevented (using placeholders for values in statements)

## Testing

- [X] Added/updated automated tests
- [X] QA'd all new/changed functionality manually

## Database migrations

- [X] Checked schema for all modified table for columns that will
auto-update timestamps during migration.
- [X] Confirmed that updating the timestamps is acceptable, and will not
cause unwanted side effects.
- [X] Ensured the correct collation is explicitly set for character
columns (`COLLATE utf8mb4_unicode_ci`).
2025-11-25 16:15:58 -06:00
Scott Gress
e9fc32763c
Add "Update certificate template status" endpoint (#36192)
<!-- Add the related story/sub-task/bug number, like Resolves #123, or
remove if NA -->
**Related issue:** Resolves #35452

# Details

This adds the `PUT /api/fleetd/certificates/:id/status` endpoint that a
host can use to tell the server the status of a certificate
installation. The endpoint uses `node_key` in the body for
authentication, `id` in the URL to specify the certificate template and
`status` to indicate the status (`pending`, `verifying`, `verified` or
`failed`).

# Checklist for submitter

If some of the following don't apply, delete the relevant line.

- [X] Changes file added for user-visible changes in `changes/`,
`orbit/changes/` or `ee/fleetd-chrome/changes`.
See [Changes
files](https://github.com/fleetdm/fleet/blob/main/docs/Contributing/guides/committing-changes.md#changes-files)
for more information.

- [X] Input data is properly validated, `SELECT *` is avoided, SQL
injection is prevented (using placeholders for values in statements)

## Testing

- [X] Added/updated automated tests
- [ ] QA'd all new/changed functionality manually

---------

Co-authored-by: Konstantin Sykulev <konst@sykulev.com>
2025-11-25 12:06:30 -06:00
Gabriel Hernandez
915f5291e6
move where we are creating the mdm enrollment activity into the turn on apple lifecycle (#35685)
**Related issue:** Resolves #32009

This updates where we fire off the mdm_enrolled activity. We had it in
the Authenticate method in the mdm checking and commands struct and move
it into our lifecycle module. In the lifecycle module we place it in the
turnOnApple method which already had checks to see if we were on the
first TokenUpdate command. This means this activity should only
fire on the initial TokenUpdate command the host gets.

- [x] Changes file added for user-visible changes in `changes/`,
`orbit/changes/` or `ee/fleetd-chrome/changes`.
- [x] Added/updated automated tests
- [ ] QA'd all new/changed functionality manually
2025-11-25 11:19:05 -03:00
Magnus Jensen
237105728e
Reduce API Android usage (#36209)
<!-- Add the related story/sub-task/bug number, like Resolves #123, or
remove if NA -->
**Related issue:** Resolves #36138 

# Checklist for submitter

If some of the following don't apply, delete the relevant line.

- [x] Changes file added for user-visible changes in `changes/`,
`orbit/changes/` or `ee/fleetd-chrome/changes`.
See [Changes
files](https://github.com/fleetdm/fleet/blob/main/docs/Contributing/guides/committing-changes.md#changes-files)
for more information.

## Testing

- [x] Added/updated automated tests
- [x] QA'd all new/changed functionality manually

---------

Co-authored-by: Jordan Montgomery <elijah.jordan.montgomery@gmail.com>
2025-11-25 09:39:06 -03:00
Konstantin Sykulev
cb26f43472
gitops, basic apis, and table for android certificate templates (#35788)
**Related issue:** Resolves #35460, #35462

# Checklist for submitter

- [x] Changes file added for user-visible changes in `changes/`,
`orbit/changes/` or `ee/fleetd-chrome/changes`.
See [Changes
files](https://github.com/fleetdm/fleet/blob/main/docs/Contributing/guides/committing-changes.md#changes-files)
for more information.

- [x] Input data is properly validated, `SELECT *` is avoided, SQL
injection is prevented (using placeholders for values in statements)

## Testing

- [x] Added/updated automated tests
- [x] 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

## Database migrations

- [x] Checked schema for all modified table for columns that will
auto-update timestamps during migration.
- [x] Confirmed that updating the timestamps is acceptable, and will not
cause unwanted side effects.
- [x] Ensured the correct collation is explicitly set for character
columns (`COLLATE utf8mb4_unicode_ci`).



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

## Release Notes

* **New Features**
* Added certificate templates for managing Android device certificates
at global and team levels
* Introduced API endpoints to create, list, retrieve, and delete
certificate templates
* Enabled GitOps workflow support for certificate template
specifications
* Implemented automatic variable substitution in certificate subjects
for host identifiers

<sub>✏️ Tip: You can customize this high-level summary in your review
settings.</sub>
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Scott Gress <scottmgress@gmail.com>
Co-authored-by: Scott Gress <scott@fleetdm.com>
2025-11-24 15:44:06 -06:00
Kevin M. Cox
cc244ba6df
Add Mosyle to well-known MDM list (#35482)
# Checklist for submitter

If some of the following don't apply, delete the relevant line.

- [X] Changes file added for user-visible changes in `changes/`,
`orbit/changes/` or `ee/fleetd-chrome/changes`.
See [Changes
files](https://github.com/fleetdm/fleet/blob/main/docs/Contributing/guides/committing-changes.md#changes-files)
for more information.

Co-authored-by: Jordan Montgomery <elijah.jordan.montgomery@gmail.com>
2025-11-24 15:01:25 -05:00
Ian Littman
c148b42f9b
Add support for $FLEET_VAR_HOST_HARDWARE_SERIAL in Windows profiles, $FLEET_VAR_HOST_PLATFORM in Windows/Apple profiles (#35812)
Fixes #34364, #34716.

# Checklist for submitter

If some of the following don't apply, delete the relevant line.

- [x] Changes file added for user-visible changes in `changes/`,
`orbit/changes/` or `ee/fleetd-chrome/changes`.
See [Changes
files](https://github.com/fleetdm/fleet/blob/main/docs/Contributing/guides/committing-changes.md#changes-files)
for more information.

- [x] Input data is properly validated, `SELECT *` is avoided, SQL
injection is prevented (using placeholders for values in statements)

## Testing

- [x] Added/updated automated tests

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

---------

Co-authored-by: Magnus Jensen <magnus@fleetdm.com>
2025-11-24 10:18:47 -06:00
Juan Fernandez
1078c277ab
Fixed invalid props on Custom EST certs edits (#36147)
**Related issue:** Resolves #35729 

- Fixed url prop mapping rule on Custom EST certs form.
- When editing the url field, include credentials to PATH end-point.

# Checklist for submitter

If some of the following don't apply, delete the relevant line.

- [X] Changes file added for user-visible changes in `changes/`,
`orbit/changes/` or `ee/fleetd-chrome/changes`.
See [Changes
files](https://github.com/fleetdm/fleet/blob/main/docs/Contributing/guides/committing-changes.md#changes-files)
for more information.

## Testing

- [X] QA'd all new/changed functionality manually
2025-11-21 18:36:10 -08:00
Scott Gress
2aac62259d
Fix issue where multiple queries can't be saved with the same label (#36121)
<!-- Add the related story/sub-task/bug number, like Resolves #123, or
remove if NA -->
**Related issue:** Resolves #34183 

# Checklist for submitter

If some of the following don't apply, delete the relevant line.

- [X] Changes file added for user-visible changes in `changes/`,
`orbit/changes/` or `ee/fleetd-chrome/changes`.
See [Changes
files](https://github.com/fleetdm/fleet/blob/main/docs/Contributing/guides/committing-changes.md#changes-files)
for more information.

- [X] Input data is properly validated, `SELECT *` is avoided, SQL
injection is prevented (using placeholders for values in statements)

## Testing

- [X] Added/updated automated tests
- [X] QA'd all new/changed functionality manually

---------

Co-authored-by: Ian Littman <iansltx@gmail.com>
2025-11-21 11:59:46 -06:00
Gabriel Hernandez
ee690aae9f
add UI for the new windows mdm enrollment options (#35605)
**Related issue:** Resolves #35310

This adds the UI for the new windows mdm page. This adds an option to
allow windows hosts to manually enroll into fleet mdm.

- [x] Changes file added for user-visible changes in `changes/`,
`orbit/changes/` or `ee/fleetd-chrome/changes`.
- [ ] Added/updated automated tests
- [ ] QA'd all new/changed functionality manually

---------

Co-authored-by: Jordan Montgomery <elijah.jordan.montgomery@gmail.com>
2025-11-21 11:33:39 -05:00
Magnus Jensen
91751d55b2
Fix apple profile resend race condition (#35897)
<!-- Add the related story/sub-task/bug number, like Resolves #123, or
remove if NA -->
**Related issue:** Resolves #34958 

[Slack
🧵](https://fleetdm.slack.com/archives/C03C41L5YEL/p1763409297125529) for
why this is the case.

# Checklist for submitter

If some of the following don't apply, delete the relevant line.

- [x] Changes file added for user-visible changes in `changes/`,
`orbit/changes/` or `ee/fleetd-chrome/changes`.
See [Changes
files](https://github.com/fleetdm/fleet/blob/main/docs/Contributing/guides/committing-changes.md#changes-files)
for more information.

## Testing

- [x] Added/updated automated tests
- [x] QA'd all new/changed functionality manually'
2025-11-21 11:13:36 -03:00
Sarah Gillespie
b7f1f479e0
Fix UI bug in OS settings modal that caused status tooltip to flicker when refetching host details (#36099) 2025-11-20 18:06:54 -06:00
Sarah Gillespie
ecac38f8ef
Add support for Android systemUpdate profile (#35791) 2025-11-20 11:43:28 -06:00
Victor Lyuboslavsky
37241666ee
Optimize software/versions queries. (#35670)
<!-- Add the related story/sub-task/bug number, like Resolves #123, or
remove if NA -->
**Related issue:** Resolves #34677 and Resolves #35349

Loadtest results:
```text
Description               Average  Worst    Results
-----------               -------  -----    -------
Page 0, DESC order        441ms    506ms    20 items
Page 0, ASC order         1.099s   1.8s     20 items
Page 1000, DESC order     484ms    641ms    20 items
100 per_page              426ms    450ms    100 items
With CVE scores           467ms    630ms    20 items
Order by name, page 0     7.589s   7.812s   20 items
Order by name, page 1000  9.103s   9.656s   20 items
Vulnerable only           6.098s   6.34s    20 items
Search 'chrome'           14.305s  14.868s  20 items
Known exploit filter      20.253s  21.238s  20 items
Min CVSS score 7.0        33.743s  35.169s  20 items
Max CVSS score 8.0        39.825s  41.83s   20 items
CVSS range 7.0-9.0        42.556s  43.267s  20 items
```

Follow-up issue: https://github.com/fleetdm/fleet/issues/35799

# Checklist for submitter

- [x] Changes file added for user-visible changes in `changes/`,
`orbit/changes/` or `ee/fleetd-chrome/changes`.
See [Changes
files](https://github.com/fleetdm/fleet/blob/main/docs/Contributing/guides/committing-changes.md#changes-files)
for more information.

## Testing

- [x] Added/updated automated tests
- [x] 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

## Database migrations

- [x] Checked schema for all modified table for columns that will
auto-update timestamps during migration.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **Refactor**
* Improved software listing and counting performance via database index
and query optimizations, resulting in faster retrieval and reduced load
times for software lists across team and global views.
* **Chores**
* Added a migration to apply the index changes and updated migration
tracking.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-11-19 14:50:30 -06:00
Scott Gress
06d7169acb
Install setup-experience VPP apps on manually-enrolled iOS/iPadOS devices (#35906)
<!-- Add the related story/sub-task/bug number, like Resolves #123, or
remove if NA -->
**Related issue:** Resolves #34042

# Checklist for submitter

If some of the following don't apply, delete the relevant line.

- [X] Changes file added for user-visible changes in `changes/`,
`orbit/changes/` or `ee/fleetd-chrome/changes`.
See [Changes
files](https://github.com/fleetdm/fleet/blob/main/docs/Contributing/guides/committing-changes.md#changes-files)
for more information.

## Testing

- [X] Added/updated automated tests
- [X] QA'd all new/changed functionality manually

Tested on iPad and iOS.

Full disclosure, VPP installs on my devices seemed to sometimes (not not
always) fail silently the first time I tried them, with no `error`
showing in the setup experience results. This could be due to the
vagaries of user-based vpp licensing vs. device-based, which is perhaps
not a real-world situation, or something else I'm not following with
[how VPP license assignments
work](10889199a1/ee/server/service/software_installers.go (L1299-L1310)).
I'll continue trying to reproduce it but it's difficult since it only
seems to happen once per app at most, and I can't remove the user
licenses from a device without wiping it (I don't have any physical
devices I can do this on).
2025-11-19 13:34:10 -06:00
Victor Lyuboslavsky
767c594ad8
Updating UI for Okta config (#35204)
<!-- Add the related story/sub-task/bug number, like Resolves #123, or
remove if NA -->
**Related issue:** Resolves #34539

Figma:
https://www.figma.com/design/OgQ8SyLK8Sw5thXtF1eiNP/-31909-Conditional-access-w--Okta

Requires backend PR https://github.com/fleetdm/fleet/pull/35526 to view
Apple profile.

# Checklist for submitter

- [x] Changes file added for user-visible changes in `changes/`,
`orbit/changes/` or `ee/fleetd-chrome/changes`.
- [x] Input data is properly validated, `SELECT *` is avoided, SQL
injection is prevented (using placeholders for values in statements)

## Testing

- [x] Added/updated automated tests
- [x] QA'd all new/changed functionality manually

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

## Summary by CodeRabbit

* **New Features**
* Added Okta as a conditional access provider alongside Microsoft Entra
* Users can now configure both identity providers simultaneously or use
either independently
  * Updated configuration interface with new Okta-specific settings
  * Redesigned UI with separate provider cards for improved clarity

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Jacob Shandling <jacob@shandling.dev>
2025-11-18 19:34:59 -06:00
Jordan Montgomery
25d9420c31
Add config for Windows MDM manual turn on (#35789)
<!-- Add the related story/sub-task/bug number, like Resolves #123, or
remove if NA -->
**Related issue:** Resolves #35307

# Checklist for submitter

If some of the following don't apply, delete the relevant line.

- [x] Changes file added for user-visible changes in `changes/`,
`orbit/changes/` or `ee/fleetd-chrome/changes`.
See [Changes
files](https://github.com/fleetdm/fleet/blob/main/docs/Contributing/guides/committing-changes.md#changes-files)
for more information.

- [x] Input data is properly validated, `SELECT *` is avoided, SQL
injection is prevented (using placeholders for values in statements)
- [x] If paths of existing endpoints are modified without backwards
compatibility, checked the frontend/CLI for any necessary changes

## Testing

- [x] Added/updated automated tests
- [x] 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

## Database migrations

- [x] Checked schema for all modified table for columns that will
auto-update timestamps during migration.

## New Fleet configuration settings

- [ ] Setting(s) is/are explicitly excluded from GitOps

If you didn't check the box above, follow this checklist for
GitOps-enabled settings:

- [x] Verified that the setting is exported via `fleetctl
generate-gitops`
- [x] Verified the setting is documented in a separate PR to [the GitOps
documentation](https://github.com/fleetdm/fleet/blob/main/docs/Configuration/yaml-files.md#L485)
- [x] Verified that the setting is cleared on the server if it is not
supplied in a YAML file (or that it is documented as being optional)
- [x] Verified that any relevant UI is disabled when GitOps mode is
enabled
2025-11-18 17:32:13 -05:00
Scott Gress
be5048c63b
Make host counts optional in "list labels" API (#35831)
<!-- Add the related story/sub-task/bug number, like Resolves #123, or
remove if NA -->
**Related issue:** Resolves #35376 

# Details

This PR updates the "list labels" (`GET /labels`) API by adding an
optional `include_host_counts` parameter, which defaults to `true`. If
explicitly set to `false`, the underlying db code will skip doing an
expensive subquery which returns the number of hosts that are members of
each label. The UI will now default to setting this to `false` in its
calls, because:

1. This is an N+1 query pattern which scales poorly as the # of labels
and hosts increases (see associated ticket as well as
https://github.com/fleetdm/fleet/issues/4890)
1. _We don't use this data anywhere._ At least no where I could find in
the front end or back end (besides a test specifically for this
functionality). So we're doing this work for nothing.

Since this is a public API we can't just [drop the functionality
entirely](https://github.com/fleetdm/fleet/pull/35763) as that would be
a breaking change.

# Checklist for submitter

If some of the following don't apply, delete the relevant line.

- [X] Changes file added for user-visible changes in `changes/`,
`orbit/changes/` or `ee/fleetd-chrome/changes`.
See [Changes
files](https://github.com/fleetdm/fleet/blob/main/docs/Contributing/guides/committing-changes.md#changes-files)
for more information.

- [X] Input data is properly validated, `SELECT *` is avoided, SQL
injection is prevented (using placeholders for values in statements)

## Testing

- [X] QA'd all new/changed functionality manually
The only place that I could find that lists host counts for labels is
the Packs UI, which uses a different endpoint and database method (`GET
/targets` and `SearchLabels()`
2025-11-18 12:17:43 -06:00
Ian Littman
fbb37de0eb
Use lighter Team call when it's obviously safe to do so, comment potential areas for further improvement (#35587)
**Related issue:** Resolves #35357

# Checklist for submitter

If some of the following don't apply, delete the relevant line.

- [x] Changes file added for user-visible changes in `changes/`,
`orbit/changes/` or `ee/fleetd-chrome/changes`.
See [Changes
files](https://github.com/fleetdm/fleet/blob/main/docs/Contributing/guides/committing-changes.md#changes-files)
for more information.

- [x] Input data is properly validated, `SELECT *` is avoided, SQL
injection is prevented (using placeholders for values in statements)
## Testing

- [x] Added/updated automated tests

- [ ] QA'd all new/changed functionality manually
2025-11-17 17:25:45 -06:00
Jordan Montgomery
80ec7d4ede
Remove PUT endpoint, update to always use POST for setup experience scripts (#35818)
<!-- Add the related story/sub-task/bug number, like Resolves #123, or
remove if NA -->
**Related issue:** Resolves #35309 

Followup changes, see
https://fleetdm.slack.com/archives/C019WG4GH0A/p1763137466439419 for
more context. We decided not to use the initially proposed PUT endpoint
at all and update the existing POST endpoint to have the desired
behavior

# Checklist for submitter

If some of the following don't apply, delete the relevant line.

- [x] Changes file added for user-visible changes in `changes/`,
`orbit/changes/` or `ee/fleetd-chrome/changes`.
See [Changes
files](https://github.com/fleetdm/fleet/blob/main/docs/Contributing/guides/committing-changes.md#changes-files)
for more information.

- [x] Input data is properly validated, `SELECT *` is avoided, SQL
injection is prevented (using placeholders for values in statements)
- [x] If paths of existing endpoints are modified without backwards
compatibility, checked the frontend/CLI for any necessary changes

## Testing

- [x] Added/updated automated tests
- [x] 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
2025-11-17 11:29:23 -05:00
Nathan Cochran
e5f46dd4b1
Fix android profile download (#35196)
This commit fixes two related bugs with Android MDM:

1. Android profiles now download correctly as .json files instead of
.xml
   - Before: profiles downloaded as .xml with content '[object Object]'
- After: profiles download as .json with properly formatted JSON content
- Fixed by adding Android platform check in createProfileExtension() and
createFileContent()

2. Custom Settings page now recognizes Android MDM
- Before: showed 'MDM must be turned on' error even when Android MDM was
enabled
   - After: properly detects Android MDM and allows profile management
   - Fixed by adding android_enabled_and_configured check to mdmEnabled
   - Backend middleware now supports Android MDM for profile endpoints
a) Added VerifyAnyMDMConfigured() to support Apple, Windows, and Android
MDM
       b) Updated profile endpoints to use VerifyAnyMDM() middleware

**Related issue:** Resolves #35023

# Checklist for submitter

- [x] Changes file added for user-visible changes in `changes/`
- [x] Input data is properly validated, `SELECT *` is avoided, SQL
injection is prevented (using placeholders for values in statements)
- [x] If paths of existing endpoints are modified without backwards
compatibility, checked the frontend/CLI for any necessary changes

## Testing

- [x] Added/updated automated tests
- [x] QA'd all new/changed functionality manually

## Database migrations

_No database migrations in this PR_

## New Fleet configuration settings

_No new Fleet configuration settings in this PR_

## fleetd/orbit/Fleet Desktop

_This PR does not affect fleetd/orbit/Fleet Desktop_
2025-11-17 11:52:59 -03:00
RachelElysia
0dd7b6ce87
Fleet UI: Add, view, install Google Play Apps (#35177) 2025-11-14 13:24:41 -05:00
RachelElysia
4939979f55
Fleet UI: Return pre-install query output in Install Details modal (#35754) 2025-11-14 11:35:03 -05:00
Magnus Jensen
4a416722a4
DUSW: Allow user-scoped SCEP profiles on Windows (#35672)
<!-- Add the related story/sub-task/bug number, like Resolves #123, or
remove if NA -->
**Related issue:** Resolves #35503 

For this one I opted for a simple approach of just duplicating the
arrays one for user, and one for device, then with the first loc uri
that checks in of either device or user, sets the respective arrays, I
thought while this was more LOC's it was easier to look at and maintain
compared to regex matches etc, let me know if you think otherwise.

# Checklist for submitter

If some of the following don't apply, delete the relevant line.

- [x] Changes file added for user-visible changes in `changes/`,
`orbit/changes/` or `ee/fleetd-chrome/changes`.
See [Changes
files](https://github.com/fleetdm/fleet/blob/main/docs/Contributing/guides/committing-changes.md#changes-files)
for more information.

## Testing

- [x] Added/updated automated tests
- [x] QA'd all new/changed functionality manually
2025-11-14 12:44:14 -03:00
Jordan Montgomery
1a61b29092
Add PUT endpoint for setup experience script (#35651)
<!-- Add the related story/sub-task/bug number, like Resolves #123, or
remove if NA -->
**Related issue:** Resolves #35309

Related doc update #35736 

Adds a PUT endpoint for setting setup experience scripts, as opposed to
the current POST implementation(which errors if the script is already
set, which is why gitops calls DELETE first every time). If the contents
change, the new endpoint has the same effect as DELETE then POST today,
however if the contents are unchanged no changes occur, allowing gitops
runs to avoid cancelling script executions.

Also switched gitops over to the new PUT endpoint and removed the DELETE
in the "set" path.

# Checklist for submitter

If some of the following don't apply, delete the relevant line.

- [x] Changes file added for user-visible changes in `changes/`,
`orbit/changes/` or `ee/fleetd-chrome/changes`.
See [Changes
files](https://github.com/fleetdm/fleet/blob/main/docs/Contributing/guides/committing-changes.md#changes-files)
for more information.

- [x] Input data is properly validated, `SELECT *` is avoided, SQL
injection is prevented (using placeholders for values in statements)
- [x] If paths of existing endpoints are modified without backwards
compatibility, checked the frontend/CLI for any necessary changes

## Testing

- [x] Added/updated automated tests
- [x] 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)
- [ ] QA'd all new/changed functionality manually
2025-11-14 10:22:36 -05:00
Juan Fernandez
de2329e87e
Failed profiles unable to filter by platform (#35628)
Resolves #34907

When filtering hosts by OS Settings status, allow the user to scope the host list by platform.
2025-11-13 16:16:56 -04:00