Commit graph

500 commits

Author SHA1 Message Date
Victor Lyuboslavsky
addbceece0
Activity feed webhooks backend (#19261)
This is a redo of the already-approved PR
https://github.com/fleetdm/fleet/pull/19125

The difference is that this merge is into main as opposed to the feature
branch.
2024-05-24 11:25:27 -05:00
Noah Talerman
54cca7b28a
Docs: Fix broken links & add redirects (#19066) 2024-05-17 11:24:33 -05:00
Roberto Dip
75e86ff321
Merge branch 'main' into feat-software-installers 2024-05-16 19:43:55 -03:00
Sarah Gillespie
8cc3d7dd4f
Update list host software to omit software installers for other platforms (#19088) 2024-05-16 17:09:41 -05:00
Victor Lyuboslavsky
4d671e63d4
fleetd-chrome v1.3.1 release (#19087)
#18811

* Fixed bug where fleetd-chrome sent multiple read requests to Fleet
server at the same time.

* Improved console log output messages when Fleet server is down.
2024-05-16 16:39:36 -05:00
Roberto Dip
1ef19e4ff2 Merge remote-tracking branch 'origin/main' into feat-software-installers 2024-05-15 19:55:02 -03:00
Martin Angers
62adb46a36
Partial fix: fix empty software title when metadata doesn't find one (#19047)
#19041 (it falls back on filename)

# Checklist for submitter

- [x] Input data is properly validated, `SELECT *` is avoided, SQL
injection is prevented (using placeholders for values in statements)
2024-05-15 18:27:04 -03:00
Eric
34c1b1d291
Vulnerability dashboard: Batch logged warnings, update vulnerable and critical software processing. (#19030)
Related to https://github.com/fleetdm/confidential/issues/6523

Changes:
- Updated the update-reports batch warnings and surface them after the
script runs.
- Updated logged warning messages to include what the impact of the
warning is.
- Updated the script to only check for duplicate uninstalled vulnerable
install records when it processes vulnerable software.
2024-05-15 15:12:05 -05:00
Eric
3b586cc7db
Vulnerability dashboard: Update session config (#19040)
https://github.com/fleetdm/confidential/issues/6577

Changes:
- Updated the vulnerability dashboard's session configuration
2024-05-15 14:15:03 -05:00
Martin Angers
79a121256e
Software installers: backend cleanup tasks part 2 (#18982) 2024-05-15 08:40:06 -04:00
Martin Angers
1def5b2ddf
Add support for software installers in fleetctl gitops (#18990) 2024-05-14 16:58:58 -04:00
Dante Catalfamo
71c0026168
Orbit software installer flow (#18797)
# 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
  - For Orbit and Fleet Desktop changes:
- [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)).

---------

Co-authored-by: Roberto Dip <rroperzh@gmail.com>
2024-05-14 17:25:35 -03:00
Roberto Dip
f0e3903585
add boilerplate to host installation result outputs (#18988)
Specified by Marko, this should be returned by the API:

<img width="642" alt="image"
src="https://github.com/fleetdm/fleet/assets/4419992/945e899e-9527-43cb-ac42-88b02d4bc844">


# 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] Added/updated tests
- [x] Manual QA for all new/changed functionality
2024-05-14 17:03:44 -03:00
Roberto Dip
3a31262353
add CLI and endpoints to set software via fleetctl apply (#18876)
for #18325

# 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: Martin Angers <martin.n.angers@gmail.com>
2024-05-14 15:06:33 -03:00
Victor Lyuboslavsky
27127ff396
Improved console log output messages when Fleet server is down. (#18942)
#18940

# 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.
- [ ] Added/updated tests
- [x] Manual QA for all new/changed functionality
2024-05-13 16:38:36 -05:00
Eric
999f3cd97c
Vulnerability dashboard: Update update-reports script to continue when the Fleet API returns a 404 error (#18949)
Related to: https://github.com/fleetdm/confidential/issues/6523

Changes:
- (Vulnerability dashboard) Updated the `update-reports` script to log a
warning and continue running if the Fleet API returns a 404 response
when we expect to receive an array of hosts.
2024-05-13 13:07:26 -05:00
Eric
4b9f561332
Vulnerability dashboard: Update update-reports script. (#18919)
Related to: https://github.com/fleetdm/confidential/issues/6523

Changes:
- Updated the vulnerability dashboard's update-reports script to
continue if a Fleet instance returns a 404 response when a request is
sent to get a filtered array of hosts with a vulnerable software item
installed.
2024-05-10 17:16:40 -05:00
Victor Lyuboslavsky
ab3f7ec08f
Fixed bug where fleetd-chrome sent multiple read requests to Fleet server at the same time. (#18777)
#18775 
Fixed bug where fleetd-chrome sent multiple read requests to Fleet
server at the same time.

# 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] Manual QA for all new/changed functionality
2024-05-10 15:52:04 -05:00
Roberto Dip
71437a8a8b
back-end fixes for software installers (#18908)
- Use `title_id` + `team_id` for package endpoints instead of the
software title
- Add ability to filter software titles by software available for
install

# 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: Gabriel Hernandez <ghernandez345@gmail.com>
2024-05-10 14:47:59 -03:00
Jahziel Villasana-Espinoza
c88a7cf6b0
feat: software added and deleted global activities (#18798)
> Related issue: #18330 

# 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

## Notes
- ~I added an `includeTitle bool` parameter to
`ds.GetSoftwareInstallerMetadata`. This allows for the title of the
software (from the `software_titles` page) to be fetched in
`svc.DeleteSoftwareInstaller` without an additional call to the DB.~ We
wound up deciding to just fetch the title every time.

---------

Co-authored-by: Martin Angers <martin.n.angers@gmail.com>
2024-05-08 10:08:28 -04:00
Roberto Dip
e5283ef2a8 Merge remote-tracking branch 'origin/main' into feat-software-installers 2024-05-07 13:37:29 -03:00
Roberto Dip
37fe905f96
missing validations and tweaks to default scripts (#18780)
This adds two things:

- when implementing the CLI, I found [a
panel](https://www.figma.com/file/oQl2oQUG0iRkUy0YOxc307/%2314921-Deploy-security-agents-to-macOS%2C-Windows%2C-and-Linux-hosts?type=design&node-id=779-29335&mode=design&t=Y27cbj7DdhUEGJko-4)
in the Figma file with validations that I missed
- explicit shebang for bash scrips (requested by product) and removed a
comment that will be user facing for exe files.
2024-05-07 13:02:08 -03:00
Jahziel Villasana-Espinoza
f85eb0aaff
feat: get install results endpoint (#18751)
> Related issue: #18335
2024-05-06 16:09:25 -03:00
Roberto Dip
bd3c0a1e9a
adjust logic to get default scripts (#18719)
This tweaks the logic to get default install/remove scripts to delegate
the variable replacement to `fleetd`
2024-05-06 11:41:31 -03:00
Victor Lyuboslavsky
4f4800be19
GitOps remove teams (#18640)
#16677 

Improvements to `fleetctl gitops` command:
- Added the ability to pass multiple files, like `fleetctl gitops -f
file1 -f file2`, where the first file must be the global configuration
- Added the ability to remove teams that were not specified in team
configs using the switch `--delete-other-teams`
- When passing a global config and team config during initial
configuration, the `org_settings.mdm.apple_bm_default_team` value can be
set to match the team that will be created by the provided team config.

After these changes are released to prod, we can update
https://github.com/fleetdm/fleet-gitops to use the new switches: #18692

# 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-05-03 08:03:00 -05:00
Sarah Gillespie
5d2d94401e
Add backend to download software installers (#18693) 2024-05-02 19:08:20 -05:00
Roberto Dip
123fdc72b0
add endpoint to send software installer requests (#18711)
#18334

# 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-05-02 18:00:06 -03:00
Sarah Gillespie
8f5b3a872d
Add backend to upload/delete software installers (#18660)
Issue #18320
2024-05-02 10:20:54 -03:00
Gabriel Hernandez
7983e91933 Merge branch 'main' into feat-software-installers 2024-04-30 11:40:55 +01:00
Luke Heath
a38fa0d517
Change calendar event name (#18579)
Co-authored-by: Rachael Shaw <r@rachael.wtf>
2024-04-29 15:51:16 -05:00
Victor Lyuboslavsky
51f8e1de67
fleetd-chrome 1.3.0 release (#18546)
#18466 

The beta release is already available at:
https://chrome-beta.fleetdm.com/updates.xml
2024-04-29 10:55:37 -05:00
Dante Catalfamo
9b3d6e590d
Linux Wipe Async (#18372)
#18173

Creates a detached child shell process to wipe the host. This lets the
main shell script return and tells the server the command has completed,
clearing it from the run queue.

Now shuts the host down after being wiped instead of leaving it running
without files like a zombie
2024-04-29 09:55:05 -04:00
Martin Angers
7e4bcae7c3
Implement software installer storage for S3 and local filesystem (#18493) 2024-04-24 10:18:58 -04:00
Jacob Shandling
d98d5e9ee4
fleetd-chrome: Remove spot conversions to string; all results are now converted in o… (#18223)
Follow-up cleanup for #18210

Merging during freeze with approval from @sharon-fdm and @lukeheath as this code only affects `fleetd-chrome`, which is released on its own schedule.

---------

Co-authored-by: Jacob Shandling <jacob@fleetdm.com>
2024-04-23 10:23:41 -07:00
Victor Lyuboslavsky
0aca98fdba
Reinitialize DB and recover after a rare RuntimeError coming from sqlite web assembly code. (#18339)
Reinitialize DB and recover after a rare RuntimeError coming from sqlite
web assembly code.
#18337 

# 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.
- [ ] Added/updated tests
- [x] Manual QA for all new/changed functionality
2024-04-19 06:56:56 -05:00
Roberto Dip
e39f5bce3b
implement logic to sign apple profiles (#16490)
#10418
2024-04-18 18:01:37 -03:00
George Karr
999e200992
Add feature to manage macOS software updates via DDM (#18281)
Feature branch for #17295
2024-04-16 15:18:40 -05:00
Victor Lyuboslavsky
6b2ab24aeb
Fixed fleetctl gitops dry-run validation issues when enabling calendar integration for the first time. (#18301)
#18299
Fixed fleetctl gitops dry-run validation issues when enabling calendar
integration for the first time.

# 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-04-16 15:15:08 -05:00
Martin Angers
47279ca2a9 Fix conflicts 2024-04-15 16:10:10 -04:00
Sharon Katz
b3c2e25794
Separate the chrome extension changelog (#18080)
Separating the chrome extension changelog.

---------

Co-authored-by: Lucas Manuel Rodriguez <lucas@fleetdm.com>
2024-04-15 09:09:40 -04:00
Jacob Shandling
02563ffef9
Convert all values to string where possible, even if not derived from a table (#18210)
## Addresses #17946
results from querying chrome extension on macOS Chrome browser:
![Screenshot 2024-04-10 at 4 39
13 PM](https://github.com/fleetdm/fleet/assets/61553566/d67901f3-6e20-4190-8dbb-26e93361555b)

- [x] Changes file added for user-visible changes in `changes/`
- [x] Updated tests
- [x] Manual QA for all new/changed functionality
- [ ] TODO - Manual QA on actual Chromebook

---------

Co-authored-by: Jacob Shandling <jacob@fleetdm.com>
2024-04-10 18:38:41 -07:00
Victor Lyuboslavsky
3859c971cf
Added error messages when scripts are disabled. (#18174)
#17148

Added error messages to lock/unlock/wipe when scripts are disabled.

# Checklist for submitter
- [x] Added/updated tests
- [x] Manual QA for all new/changed functionality
2024-04-10 11:29:46 -05:00
Martin Angers
47b310000d Add integration test to check update of the payload 2024-04-09 09:47:46 -04:00
Martin Angers
0ca2a45cd4 Use a static identifier, use actual deadline value in payload 2024-04-09 09:18:44 -04:00
Martin Angers
8a0f87ef3d Rename the builtin label constant 2024-04-08 15:01:22 -04:00
Martin Angers
f5129bfa1a Fix the fix for tests 2024-04-08 11:34:31 -04:00
Martin Angers
f9e1bc2e97 Fix tests 2024-04-08 11:14:30 -04:00
Roberto Dip
f1b45a3865
friday tidy up party (#18106)
- add missing tests
- remove unused code
- remove unnecessary nested branches
2024-04-08 08:42:42 -03:00
Lucas Manuel Rodriguez
e8ca959888
Add enterprise integration test for calendar events (#17900)
Integration tests for the calendar feature: #17441.

Adding coverage screenshots for the calendar cron and the osquery
distributed/write coverage:

![Screenshot 2024-03-27 at 14 20
44](https://github.com/fleetdm/fleet/assets/2073526/40d394ab-2208-4bec-981b-fe22fae8b5c1)
![Screenshot 2024-03-27 at 14 21
20](https://github.com/fleetdm/fleet/assets/2073526/1e4c8611-21ba-48a6-82f8-a163594f7f01)
2024-04-04 14:58:31 -03:00
Martin Angers
17f76087c2 Call update of mdm ddm profile after macos updates change 2024-04-03 16:08:22 -04:00