Commit graph

2953 commits

Author SHA1 Message Date
Ian Littman
12b29143c5
Merge duplicate package entries for deb-installed Python packages for Debian (#23325)
#22219

Note caveats in added tests; we may need to add more matching logic here
based on the Debian Bookworm repro I did.

# 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/Committing-Changes.md#changes-files)
for more information.
- [x] Added/updated tests
- [x] Manual QA for all new/changed functionality
2024-10-29 11:16:09 -05:00
Dante Catalfamo
6e9955d7c7
Add clause to exclude VPP apps from host software list (#23207) 2024-10-28 15:48:54 -04:00
Victor Lyuboslavsky
59a26db1f8
Limit OpenTelemetry span name length. (#23281)
Minor tweak to OpenTelemetry SQL config.

- [x] Manual testing
2024-10-28 10:50:35 -05:00
Martin Angers
d5c9a165e5
Bugfix and SE: support VPP apps and (install during setup of VPP apps) in gitops for no-team (#23160) 2024-10-28 10:35:57 -04:00
Jahziel Villasana-Espinoza
862585447d fix: migration order 2024-10-25 18:11:56 -04:00
Jahziel Villasana-Espinoza
3bc1d50456 fix: migration order 2024-10-25 18:05:48 -04:00
Jahziel Villasana-Espinoza
0bf331786e chore: dump sql schema 2024-10-25 18:01:19 -04:00
Victor Lyuboslavsky
722608318e
Minor fixes from analyzing test results (#23260)
Newlines improve test result parsing.

Extra `t.Parallel()` calls removed in subtest since parent test and
package are already parallelized.
2024-10-25 15:57:51 -05:00
William Theaker
86713f1b71
Improve gitops dry run logging for query deletion (#23202) 2024-10-25 13:35:53 -05:00
Victor Lyuboslavsky
6bc0b5dcd9
Updated OpenTelemetry dependencies to latest. (#23186)
#23183 
Updated OpenTelemetry libraries as part of research into error logging
for orbit.

# Checklist for submitter
- [x] Changes file added for user-visible changes in `changes/`,
`orbit/changes/` or `ee/fleetd-chrome/changes`.
- [x] Manual QA for all new/changed functionality
2024-10-25 09:43:32 -05:00
Dante Catalfamo
33eea5695e
Reintroduce missing tests, fix empty slice case (#23206)
<!-- Note that API documentation changes are now addressed by the
product design team. -->

- [x] Input data is properly validated, `SELECT *` is avoided, SQL
injection is prevented (using placeholders for values in statements)
- [x] Added/updated tests
2024-10-25 10:21:27 -04:00
Lucas Manuel Rodriguez
f16c941d89
Fix PATCH /api/latest/fleet/config to not clear VPP token/team associations when not set (#23175)
#23174

PS: Make sure to render the diff without whitespace changes.
![Screenshot 2024-10-24 at 10 58
47 AM](https://github.com/user-attachments/assets/fb36c995-206c-4a15-8bf2-6b375c5cc565)


- [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/Committing-Changes.md#changes-files)
for more information.
- [x] Added/updated tests
- [x] Manual QA for all new/changed functionality
2024-10-25 10:01:18 -03:00
Victor Lyuboslavsky
0a612a06b4
Remove pending MDM device from Fleet (#23067)
#22331

# Demo of fix
<div>
<a href="https://www.loom.com/share/6bc958c626d04f2b84c0eedba59db78b">
<p>[Demo] Remove pending device from Fleet when removed from ABM #22331
- Watch Video</p>
    </a>
<a href="https://www.loom.com/share/6bc958c626d04f2b84c0eedba59db78b">
<img style="max-width:300px;"
src="https://cdn.loom.com/sessions/thumbnails/6bc958c626d04f2b84c0eedba59db78b-8109a9f07d46ad52-full-play.gif">
    </a>
  </div>

# 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/Committing-Changes.md#changes-files)
for more information.
- [x] Added/updated tests
- [x] If database migrations are included, checked table schema to
confirm autoupdate
- For database migrations:
- [x] Ensured the correct collation is explicitly set for character
columns (`COLLATE utf8mb4_unicode_ci`).
- [x] Manual QA for all new/changed functionality

---------

Co-authored-by: Sarah Gillespie <73313222+gillespi314@users.noreply.github.com>
2024-10-24 16:42:30 -05:00
Jahziel Villasana-Espinoza
25ecc72ab9
fix: update integration tests to use state machine, fix 402 error (#23181)
> No issue, just some cleanup/bugfix

# Checklist for submitter

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

<!-- Note that API documentation changes are now addressed by the
product design team. -->

See [Changes
files](https://github.com/fleetdm/fleet/blob/main/docs/Contributing/Committing-Changes.md#changes-files)
for more information.
- [x] Added/updated tests
- [x] Manual QA for all new/changed functionality
2024-10-24 16:27:55 -04:00
Ian Littman
4e38e8e5c5
s/urf-8/utf-8 on manual config profile download (#23169)
# Checklist for submitter

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

<!-- Note that API documentation changes are now addressed by the
product design team. -->

- [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/Committing-Changes.md#changes-files)
for more information.
- [x] Manual QA for all new/changed functionality
2024-10-24 09:54:24 -07:00
Martin Angers
d1c3b5b28e
SE: CLI setup experience changes (#22956) 2024-10-23 14:51:02 -04:00
Jahziel Villasana-Espinoza
aaea56de2b
fix: various setup experience bugs (#23091)
> No issue, just stuff I noticed while testing

# Checklist for submitter

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

<!-- Note that API documentation changes are now addressed by the
product design team. -->

- [x] Manual QA for all new/changed functionality
- For Orbit and Fleet Desktop changes:
- [x] Orbit runs on macOS, Linux and Windows. Check if the orbit
feature/bugfix should only apply to one platform (`runtime.GOOS`).
- [ ] Manual QA must be performed in the three main OSs, macOS, Windows
and Linux.
- [ ] Auto-update manual QA, from released version of component to new
version (see [tools/tuf/test](../tools/tuf/test/README.md)).
2024-10-23 13:06:54 -04:00
Gabriel Hernandez
68cdcde4eb
fix to PUT /setup_experience/software and GET /setup_experience/software endpoints (#23074)
This PR fixes two issues:

1. `PUT /setup_experience/software` will now take the correct json body
of `software_title_ids` to update the software to install during setup
experience

2. include the `install_during_setup` attribute on the software titles
software package results from `GET /setup_experience` endpoint
2024-10-23 15:57:02 +01:00
Gabriel Hernandez
8838630b2f Merge branch 'main' into feat-setup-experience 2024-10-23 12:20:41 +01:00
Jahziel Villasana-Espinoza
4ee4243f9f
feat: add pattern for transaction functions (#23087)
> No issue, just a doc update

# Checklist for submitter

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

<!-- Note that API documentation changes are now addressed by the
product design team. -->

- [x] Manual QA for all new/changed functionality
2024-10-22 14:46:59 -04:00
Ian Littman
3e8f68f80d
Pass through original status of an install when the removed flag is set when GETing the install result (#23072)
#23070 // https://www.loom.com/share/6ac7260712c94d4890f67fe8d5a26ea1

Also removes the unused, undocumented Detail field on software install
results

# Checklist for submitter

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

<!-- Note that API documentation changes are now addressed by the
product design team. -->

- [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/Committing-Changes.md#changes-files)
for more information.
- [x] Added/updated tests
- [x] If paths of existing endpoints are modified without backwards
compatibility, checked the frontend/CLI for any necessary changes
- [x] If database migrations are included, checked table schema to
confirm autoupdate
- For 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`).
- [x] Manual QA for all new/changed functionality
2024-10-22 12:47:46 -05:00
Tim Lee
d69100940e
Add config for custom MDM URL (#22878) 2024-10-22 11:05:35 -06:00
Ian Littman
bbac39f22a
Ensure software installs aren't deleted, and have enough info to display, even if associated installer or title are deleted (#22996)
#21654 #22087

Also persists title/installer filename/version to the install record in
case those are edited, though we'll continue showing the current title
name when pulling the install record at this point, and don't expose
installed version anywhere for now.

# 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/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] Added/updated tests
- [x] If database migrations are included, checked table schema to
confirm autoupdate
- For 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. (**force-set updated_at to avoid**)
- [x] Ensured the correct collation is explicitly set for character
columns (`COLLATE utf8mb4_unicode_ci`).
- [x] Manual QA for all new/changed functionality
2024-10-21 17:46:50 -05:00
Jahziel Villasana-Espinoza
0da28fd255
feat: swift dialog UI for setup experience (#22972)
> Related issues: #22383, #22384

# Checklist for submitter

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

<!-- Note that API documentation changes are now addressed by the
product design team. -->

- [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/Committing-Changes.md#changes-files)
for more information.
- [x] Manual QA for all new/changed functionality
- For Orbit and Fleet Desktop changes:
- [x] Orbit runs on macOS, Linux and Windows. Check if the orbit
feature/bugfix should only apply to one platform (`runtime.GOOS`).
- [ ] Manual QA must be performed in the three main OSs, macOS, Windows
and Linux.
- [ ] Auto-update manual QA, from released version of component to new
version (see [tools/tuf/test](../tools/tuf/test/README.md)).
2024-10-21 16:58:12 -04:00
Gabriel Hernandez
d5689dd0fe Merge branch 'main' into feat-setup-experience 2024-10-21 12:36:50 +01:00
Jahziel Villasana-Espinoza
050e771635
fix: remove declarations that haven't been sent yet (#22993)
> Related issue: #22976

# Checklist for submitter

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

<!-- Note that API documentation changes are now addressed by the
product design team. -->

- [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/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] Added/updated tests
- [x] Manual QA for all new/changed functionality
2024-10-18 15:16:58 -04:00
Sarah Gillespie
65e374c85c
Fix bug in ABM token renewal flow (#22988) 2024-10-18 13:16:04 -05:00
Victor Lyuboslavsky
f85b6f776f
Updating golangci-lint to 1.61.0 (#22973) 2024-10-18 12:38:26 -05:00
Dante Catalfamo
6646c6d429
Setup experience state machine (#22845) 2024-10-18 12:01:53 -04:00
Gabriel Hernandez
497a0f036e
fix for the enrollment page to not send back a 404 page (#22981)
makes a fix to the enroll byod handler. The hander use to be set once
when the server started but this lead to a user receiving a 404 page
after the fleet instance setup was complete but was not restarted.

now the `/enroll` handler will check for the setup requirement itself.
There is some error handling when the setup is required. if the fleet
instance has been setup, they will get the enroll byod 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/Committing-Changes.md#changes-files)
for more information.
2024-10-18 11:10:17 +01:00
Sarah Gillespie
54438a6a7e
Update backend handlers to record setup experience results (#22911) 2024-10-17 11:48:42 -05:00
Dante Catalfamo
2861f79941
Update apps.json bundle identifiers (#22967)
I installed each of the apps and checked the bundle identifiers
2024-10-16 15:07:55 -04:00
Victor Lyuboslavsky
383d03cd6d
GitOps support for NDES SCEP proxy config. (#22918)
#22124

# Demo
<div>
<a href="https://www.loom.com/share/ad30efda816e4bf3abca0eab92b6e928">
      <p>[Demo] NDES SCEP proxy gitops #21955 - Watch Video</p>
    </a>
<a href="https://www.loom.com/share/ad30efda816e4bf3abca0eab92b6e928">
<img style="max-width:300px;"
src="https://cdn.loom.com/sessions/thumbnails/ad30efda816e4bf3abca0eab92b6e928-33b1f073da294133-full-play.gif">
    </a>
  </div>

# Checklist for submitter
- [x] Added/updated tests
- [x] Manual QA for all new/changed functionality
2024-10-16 11:12:48 -05:00
Ian Littman
d0040e7622
Add platform filtering to Software > OS table (#21797)
#20385

See notes on that issue for API limitations (which is why Windows and
macOS are the only platforms listed).

Will move out of draft after adding the changes file and tests.

# 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/Committing-Changes.md#changes-files)
for more information.
- [x] Added/updated tests
- [x] Manual QA for all new/changed functionality
2024-10-16 10:02:06 -05:00
Martin Angers
9d7f51ec5b
SE: prevent deletion of software package/VPP app used in setup experience (#22937) 2024-10-16 08:26:23 -04:00
Tim Lee
8a467fd462
Host issues query optimization (#22946) 2024-10-15 15:48:31 -06:00
Jahziel Villasana-Espinoza
b6cb8bcb47
feat: orbit notification for indicating setup experience should run (#22843)
> Related issue: #22662

# Checklist for submitter

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

<!-- Note that API documentation changes are now addressed by the
product design team. -->

- [x] Input data is properly validated, `SELECT *` is avoided, SQL
injection is prevented (using placeholders for values in statements)
- [x] Added/updated tests
- [x] If database migrations are included, checked table schema to
confirm autoupdate
- For 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`).
- [x] Manual QA for all new/changed functionality
- For Orbit and Fleet Desktop changes:
- [x] Orbit runs on macOS, Linux and Windows. Check if the orbit
feature/bugfix should only apply to one platform (`runtime.GOOS`).
- [ ] Manual QA must be performed in the three main OSs, macOS, Windows
and Linux.
- [ ] Auto-update manual QA, from released version of component to new
version (see [tools/tuf/test](../tools/tuf/test/README.md)).

---------

Co-authored-by: dantecatalfamo <dante.catalfamo@gmail.com>
Co-authored-by: Dante Catalfamo <43040593+dantecatalfamo@users.noreply.github.com>
2024-10-14 17:15:42 -04:00
Victor Lyuboslavsky
808d6a0007
Added activity feed items for NDES SCEP proxy config. (#22902)
For #21955 (the story has a video demo of core functionality)

Follow up for PR #22542

# Checklist for submitter

- [x] Added/updated tests
- [x] Manual QA for all new/changed functionality
2024-10-14 15:55:52 -05:00
Martin Angers
b42f5ffbd0
Add integration tests for the setup experience flow with automatic and forced release (#22909) 2024-10-14 16:41:06 -04:00
Victor Lyuboslavsky
de54588d99
Fixed NDES bug where command UUID was not unique between 2 hosts. (#22910)
Unreleased bug related to NDES backend work #22123 

# Checklist for submitter

- [x] Added/updated tests
- [x] Manual QA for all new/changed functionality
2024-10-14 15:11:34 -05:00
Gabriel Hernandez
5228a5fc64 Merge branch 'main' into feat-setup-experience 2024-10-14 13:02:20 +01:00
Ian Littman
dcf7185567
Populate created_at and updated_at for newly created (non-invited) users (#22870)
#22387 

# Checklist for submitter

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

<!-- Note that API documentation changes are now addressed by the
product design team. -->

- [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/Committing-Changes.md#changes-files)
for more information.
- [x] Added/updated tests
- [x] Manual QA for all new/changed functionality
2024-10-11 18:13:04 -05:00
Victor Lyuboslavsky
d083033361
Added fleet variable validation at profile upload. (#22864)
For #21955 (the story has a video demo of core functionality)

Follow up for PR #22542

# Checklist for submitter
- [x] Added/updated tests
- [x] Manual QA for all new/changed functionality
2024-10-11 11:15:11 -05:00
Victor Lyuboslavsky
0f251036b3
Resend profile if NDES SCEP challenge has expired. (#22841)
For #21955 (the story has a video demo of core functionality)

Follow up for PR #22542

# Checklist for submitter
- [x] Added/updated tests
- [x] If database migrations are included, checked table schema to
confirm autoupdate
- For database migrations:
- [x] Ensured the correct collation is explicitly set for character
columns (`COLLATE utf8mb4_unicode_ci`).
- [x] Manual QA for all new/changed functionality
2024-10-11 09:20:19 -05:00
Gabriel Hernandez
db407d5e64 Merge branch 'main' into feat-setup-experience 2024-10-11 15:11:04 +01:00
Gabriel Hernandez
199f4c4683
fix the GET /fleet_maintained_apps endpoint query param and count value (#22857)
relates to #22826

fix to the `GET /fleet_maintained_apps` endpoint so it returns correct
results is given a `query` query param. Also the total count takes into
account the query in the request.
2024-10-11 15:07:02 +01:00
Sarah Gillespie
6a25d6917a
Update batch software upload API to support increased max file size (#22839) 2024-10-11 08:38:08 -05:00
Gabriel Hernandez
fc697a2bef Merge branch 'main' into feat-setup-experience 2024-10-11 13:37:33 +01:00
Ian Littman
b31e8420ac
Strip RSR suffixes prior to handing off OS version from Nudge check to Semver comparison (#22830)
#22829

Fixes 500s in config endpoint when a machine with an RSR version
installed is in a team with enforced macOS updates

# Checklist for submitter

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

<!-- Note that API documentation changes are now addressed by the
product design team. -->

- [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/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] Added/updated tests
- [ ] Manual QA for all new/changed functionality
2024-10-10 12:15:53 -05:00
Dante Catalfamo
6af7c23a5b
Start/Enqueue setup experience (#22664)
#22379
2024-10-10 11:46:23 -04:00