Commit graph

1421 commits

Author SHA1 Message Date
Victor Lyuboslavsky
ca4c2cea72
Update label name in configuration profile (#21246)
#21163 
Fixed bug where configuration profile was still showing the old label
name after the name was updated.

# 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-08-13 13:57:32 +02:00
Gabriel Hernandez
6799cdcb6a
fix to return software titles url for all teams context (#21222)
relates to #21058

Makes a change to `GET /software/titles/:id` response so that we return
the data needed to display the VPP app icon for the **All Teams**
context.


![image](https://github.com/user-attachments/assets/6cf48c04-5713-4b9e-b310-cee91367c37f)

- [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

---------

Co-authored-by: Roberto Dip <rroperzh@gmail.com>
2024-08-12 17:23:44 -03:00
Sharon Katz
8fdfb9a004
Add AI features, maintenance window, and Fleet Desktop to usage statistics Story #19693 (#21131)
Additional statistics as described in
https://github.com/fleetdm/fleet/pull/20091 :

`aiFeaturesDisabled`:
Whether server_settings.ai_features_disabled is set to true in the
config.

`maintenanceWindowsEnabled`:
Whether at least one team has
integrations.google_calendar.enable_calendar_events set to true

`maintenanceWindowsConfigured`:
Maintenance windows are considered "configured" if:
configuration has value set for integrations.google_calendar[0].domain
configuration has value set for
integrations.google_calendar[0].api_key_json

`numHostsFleetDesktopEnabled`:
The number of hosts with Fleet desktop installed.
2024-08-12 15:12:28 -04:00
Roberto Dip
a794bd29a5
Fixed a bug when a cached prepared statement gets deleted in the MySQL server (#21219)
for #20781, I found this hard to reproduce, but apparently can happen in
AWS Aurora when the server is upgraded under the hood.

# 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-08-09 11:59:24 -03:00
Victor Lyuboslavsky
b67017398b
Added known_vulnerability to vulnerabilities endpoint. (#21136)
#19857 
For `GET /api/v1/fleet/vulnerabilities` endpoint, added
`known_vulnerability` field to the response. This field is present when
query is a valid CVE format and returns no results. It indicates whether
the vulnerability is in Fleet's DB.

# 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-08-08 21:37:25 +02:00
Dante Catalfamo
90f0414e21
Add self_service column to vpp_apps_teams (#21106)
Migration for #19882

Making the migration its own PR so it doesn't become stale.
2024-08-07 09:51:24 -04:00
Lucas Manuel Rodriguez
fb4292ce08
Fix many issues with VPP apps select queries and host counts (#21039)
Fix for #21013 and other fixes found while testing VPP apps with
iOS/iPadOS/macOS devices.

Regarding the change in ListSoftwareTitles with `TeamID=nil`, from Noah:
https://github.com/fleetdm/fleet/issues/19447#issuecomment-2270006803
2024-08-06 18:00:52 -03:00
Benjamin Edwards
60a0609ef7
add index to jobs table (#21090) 2024-08-06 14:49:01 -04:00
Martin Angers
e65d6cfa06
Bugfix: don't show as available for install a software with an install request once host is moved/installer is deleted (#21064) 2024-08-06 12:31:01 -04:00
Martin Angers
ef07a406cc
Bugfix: list host software "Available for install" filter must show installers that have an install request on the host (#21083) 2024-08-06 10:14:01 -04:00
Jahziel Villasana-Espinoza
18977f324b
fix: panic during migration (#21031)
> Related issue: #21030

# 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] Manual QA for all new/changed functionality

---------

Co-authored-by: Sarah Gillespie <73313222+gillespi314@users.noreply.github.com>
2024-08-05 09:23:15 -04:00
Jahziel Villasana-Espinoza
5f7a644e3c
fix software array migration (#21010)
> Related issue: #20978 

# 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] 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] Manual QA for all new/changed functionality
2024-08-02 18:50:03 -04:00
Lucas Manuel Rodriguez
ab7df5155d
Use docker compose on CI instead of docker-compose (#21017)
After this is merged I'll cherry pick to `minor-fleet-4.55.0`.
2024-08-02 18:12:36 -03:00
Dante Catalfamo
0a15647e10
Host software deleted at remigration (#20996)
# Recreate out of order migration, replace `docker-compose` with `docker compose` in db test runner
2024-08-02 10:47:40 -04:00
Dante Catalfamo
bf3d849bd0
Fix Deleted Host Software Installs Details (#20820)
#20271

This fix requires an accompanying front end fix to pass the
`display_name` from the activity feed to the modal when displaying the
install results.
2024-08-01 15:41:37 -04:00
Victor Lyuboslavsky
580a81ded5
Fixed duplicate app install activity on host (#20944)
Unreleased bug for iOS/iPadOS VPP #19447

# Checklist for submitter
- [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] Ensured the correct collation is explicitly set for character
columns (`COLLATE utf8mb4_unicode_ci`).
- [x] Manual QA for all new/changed functionality
2024-08-01 20:32:45 +02:00
Roberto Dip
7a080a9b36
use Escrow Buddy to rotate FileVault keys on macOS (#20842)
back-end and agent part of #13157

# 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
- 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`).
- [x] Manual QA must be performed in the three main OSs, macOS, Windows
and Linux.
- [x] Auto-update manual QA, from released version of component to new
version (see [tools/tuf/test](../tools/tuf/test/README.md)).
2024-07-31 16:59:30 -03:00
Sarah Gillespie
a33bd65272
Revert "Add minimum os version requirements to DEP enrollment flow" (#20878) 2024-07-31 11:34:01 -05:00
Victor Lyuboslavsky
438b0ff4d6
Added available_for_install query parameter to host details (#20876)
Missing part of #19447
Added `available_for_install` query parameter to `GET
/api/v1/fleet/hosta/:id/software`

# Checklist for submitter

- [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-07-31 16:27:43 +02:00
Tim Lee
bda812c329
Hotfix: Pass sql test dump in via stdin (#20871) 2024-07-31 05:09:52 -06:00
Victor Lyuboslavsky
31224ccd34
Added VPP support for iOS/iPadOS (#20837)
#19447 
iOS and iPadOS apps can be installed using Apple's VPP (Volume Purchase
Program)

VPP apps are now using a composite primary key (Adam ID and platform)
because we want to keep iOS/iPadOS/macOS separate. It is possible for
one app to be installable on all Apple platforms.

# 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.
- [x] Ensured the correct collation is explicitly set for character
columns (`COLLATE utf8mb4_unicode_ci`).
- [x] Manual QA for all new/changed functionality
2024-07-30 22:43:51 +02:00
Tim Lee
0e9705fdf7
Add No Team to Software Backend (#20822) 2024-07-30 11:19:05 -06:00
Sarah Gillespie
53ba476516
Fix unreleased bug: API error message for duplicate VPP apps (#20808) 2024-07-29 15:46:27 -05:00
Sarah Gillespie
0f98e84bc8
Add minimum os version requirements to DEP enrollment flow (#20722) 2024-07-29 11:02:27 -05:00
Martin Angers
cc4c34ce8a
Unreleased bug fix: use of db.writer inside a transaction (#20803) 2024-07-29 11:56:01 -04:00
Victor Lyuboslavsky
671fc628e7
Fetch installed apps from iPhone/iPad devices. (#20733)
Part 2 of https://github.com/fleetdm/fleet/issues/19447
- iOS and iPadOS user-installed apps are loaded into Fleet
- Added an additional identifier into software_titles table to
differentiate between iOS/iPadOS apps
- Updated nano queue timestamp precision

Note: TestIntegrationsMDM/TestVPPApps fails when run as part of the
suite, but passes standalone. I'd like to proceed with merging this PR,
and figure out the issue next week.

# Checklist for submitter

<!-- 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://fleetdm.com/docs/contributing/committing-changes#changes-files)
for more information.
- [x] Added support on fleet's osquery simulator `cmd/osquery-perf` for
new osquery data ingestion features.
- [x] Added/updated tests
- [x] Manual QA for all new/changed functionality

---------

Co-authored-by: Roberto Dip <rroperzh@gmail.com>
2024-07-28 16:17:27 +02:00
Jahziel Villasana-Espinoza
dd3967c4ec
feat: enforce FileVault during Setup Assistant (#20759)
> Related issue: #16866

# 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://fleetdm.com/docs/contributing/committing-changes#changes-files)
for more information.
- [x] Added/updated tests
- [x] Manual QA for all new/changed functionality
2024-07-26 15:50:31 -04:00
Jahziel Villasana-Espinoza
5b97d01982 chore: merge main 2024-07-24 16:50:43 -04:00
Jahziel Villasana-Espinoza
fda37851c1
fix: move last install data into apps and packages (#20664)
> Related issue: #20662

# 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] Manual QA for all new/changed functionality
2024-07-24 13:39:23 -04:00
Lucas Manuel Rodriguez
70d4558448
Backend support for iOS/iPadOS OS updates (#20649)
#20469 and #20471

- [X] Changes file added for user-visible changes in `changes/`,
`orbit/changes/` or `ee/fleetd-chrome/changes`.
See [Changes
files](https://fleetdm.com/docs/contributing/committing-changes#changes-files)
for more information.
- [X] Added/updated tests
- [X] Manual QA for all new/changed functionality
2024-07-24 14:34:23 -03:00
Roberto Dip
e4d8fcc3a5
fix: adjust host filters for VPP software (#20663)
this allows to filter hosts with pending, failed and installed VPP apps.

# 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] Manual QA for all new/changed functionality
2024-07-23 16:56:24 -03:00
Roberto Dip
845bfc7e38
rearrange migrations and generate dump (#20652)
this re-arranges migrations so the VPP schema changes happen after
already merged migrations and commits the result of running `make
dump-test-schema` using mysql 8.

note that there are a bunch of seemingly unrelated changes in the diff,
but that's just the mysql 8 bump, the diff against `main` should be
smaller.
2024-07-23 11:01:23 -03:00
Jahziel Villasana-Espinoza
e3e7b6a115 chore: merge main 2024-07-22 17:25:42 -04:00
Dante Catalfamo
5e1a3d03ae
MySQL 8.0 Migration (#20225)
#17249
2024-07-22 16:27:36 -04:00
Lucas Manuel Rodriguez
1a512b2792
Do not set last_enrolled_at when re-enrolling orbit (#20620)
Server fix for #20397. (I incorrectly added that `last_enrolled_at =
NOW()` on the first iOS/iPadOS support PR.)

- [X] Changes file added for user-visible changes in `changes/`,
`orbit/changes/` or `ee/fleetd-chrome/changes`.
See [Changes
files](https://fleetdm.com/docs/contributing/committing-changes#changes-files)
for more information.
- [x] Added/updated tests.
- [ ] Manual QA for all new/changed functionality.
2024-07-22 14:26:03 -03:00
Dante Catalfamo
9ec52cea9c
VPP Batch API (#20351)
#20278
2024-07-22 13:19:19 -04:00
jacobshandling
2282c495c2
Correctly handle NULL timezones (#20605)
## Addresses #20618 
- Update `CalendarEvent.TimeZone` type to be `*string`
- Consider any Fleet calendar event with `NULL` timezone to need an
update, and write the latest google calendar timezone
- [x] Changes file added for user-visible changes in `changes/`, 
- [x] Added/updated tests
- [x] Manual QA for all new/changed functionality

---------

Co-authored-by: Jacob Shandling <jacob@fleetdm.com>
2024-07-22 10:04:29 -07:00
Jahziel Villasana-Espinoza
caa7fd74e4
fix: remove temporary functions in tests (#20615)
> Related issue: #20229

# 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://fleetdm.com/docs/contributing/committing-changes#changes-files)
for more information.
- [x] Added/updated tests
- [x] Manual QA for all new/changed functionality
2024-07-19 17:10:03 -04:00
Sarah Gillespie
80faef8327
Set source = 'apps' when creating software titles for vpp apps (#20622)
Issue #20229
2024-07-19 15:35:10 -04:00
Gabriel Hernandez
b5f64b7d95 Merge branch 'main' into feat-vpp-apps-18867 2024-07-19 14:33:56 +01:00
Roberto Dip
87f9a9a3e7
feat: VPP app installation flow (#20448)
> Related issue: #19868 

# 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://fleetdm.com/docs/contributing/committing-changes#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

---------

Co-authored-by: Jahziel Villasana-Espinoza <jahziel@fleetdm.com>
2024-07-18 18:35:26 -04:00
Martin Angers
b8b03b1e5a
VPP: update list software titles/list host's software response payloads (#20553)
#20536 

# Checklist for submitter

- [ ] Changes file added for user-visible changes in `changes/`,
`orbit/changes/` or `ee/fleetd-chrome/changes`.
See [Changes
files](https://fleetdm.com/docs/contributing/committing-changes#changes-files)
for more information.
- [ ] Added/updated tests

---------

Co-authored-by: Roberto Dip <rroperzh@gmail.com>
Co-authored-by: Roberto Dip <dip.jesusr@gmail.com>
2024-07-18 14:33:07 -07:00
Martin Angers
e115516e8c
VPP: fix matching software title to existing one if one exists (#20534) 2024-07-17 15:41:51 -04:00
Martin Angers
74b1dc4f0d
VPP: Add PK to vpp_apps_teams to avoid migration issues (#20542) 2024-07-17 15:22:22 -04:00
Martin Angers
1c85c34216
VPP: fix download package path, implement delete VPP app support (#20530) 2024-07-17 14:19:13 -04:00
Martin Angers
75bdc05f5d
VPP: unify List host's software and List my device's software response payload (#20519) 2024-07-16 16:52:04 -04:00
Martin Angers
0f9a549ed4
VPP: add VPP apps to list host's software endpoint (#20483) 2024-07-16 16:18:44 -04:00
Sarah Gillespie
7dda2e9f84
Revert changes to DEP enrollment flow (#20506)
Reverts #20162 and #20355 per [QA
findings](https://github.com/fleetdm/fleet/issues/19185#issuecomment-2229544188)
2024-07-16 11:44:48 -05:00
Martin Angers
464c248f30
VPP: List/Get software title endpoints to return VPP apps (#20445) 2024-07-15 15:06:30 -04:00
Roberto Dip
f20e4037b2
send an APNs push to hosts with pending commands every minute (#19941)
Initial naive implementation that sends push notifications to hosts with
pending enqueued commands every 1 minute.

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

- [ ] Changes file added for user-visible changes in `changes/`,
`orbit/changes/` or `ee/fleetd-chrome/changes`.
See [Changes
files](https://fleetdm.com/docs/contributing/committing-changes#changes-files)
for more information.
- [x] Added/updated tests
- [x] Manual QA for all new/changed functionality
2024-07-12 15:39:59 -03:00