Commit graph

796 commits

Author SHA1 Message Date
Sharon Katz
f75f0776e6
additional stats (#19078)
Additional telemetry stats to report to Heroku.
FYI - @eashaw, we could later add to datadog as well.

---------

Co-authored-by: Noah Talerman <47070608+noahtalerman@users.noreply.github.com>
2024-05-24 15:06:10 -04:00
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
Lucas Manuel Rodriguez
b7aac2cfab
Fix bundle_identifier for common software in osquery-perf (#19023)
bundle_identifier should be unique for the common software (should not
have hostname name in it).
2024-05-24 09:26:42 -03:00
Benjamin Edwards
677835e2c3
support external id in STS Assume Role calls (#18901) 2024-05-21 13:19:35 -04:00
Noah Talerman
54cca7b28a
Docs: Fix broken links & add redirects (#19066) 2024-05-17 11:24:33 -05:00
Roberto Dip
1ef19e4ff2 Merge remote-tracking branch 'origin/main' into feat-software-installers 2024-05-15 19:55:02 -03:00
Jahziel Villasana-Espinoza
40dc8e57ed
fix: add missing software_package field (#18998)
No related issue, just cleanup work on the feature

# 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
2024-05-15 13:41:35 -04:00
Martin Angers
1def5b2ddf
Add support for software installers in fleetctl gitops (#18990) 2024-05-14 16:58:58 -04: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
62361329ec
Allow applying built-in label specs without modifications. (#18804)
#18477 

Built-in labels can now be applied via `fleetctl apply` as long as no
changes are made to them. This allows the following workflow:
  1. `fleetctl get labels --yaml > labels.yml`
  2. (Optional) Edit/add non-built in labels in labels.yml
  3. fleetctl apply -f labels.yml

# 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

---------

Co-authored-by: Tim Lee <timlee@fleetdm.com>
2024-05-09 11:47:50 -05:00
Lucas Manuel Rodriguez
a1f77e01e5
Add support for escaping $ in gitops yamls (#18845)
#18467

- [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.
- ~[ ] Input data is properly validated, `SELECT *` is avoided, SQL
injection is prevented (using placeholders for values in statements)~
- ~[ ] Added support on fleet's osquery simulator `cmd/osquery-perf` for
new osquery data ingestion features.~
- [X] Added/updated tests
- ~[ ] If database migrations are included, checked table schema to
confirm autoupdate~
- ~For database migrations:~
- ~[ ] Checked schema for all modified table for columns that will
auto-update timestamps during migration.~
- ~[ ] Confirmed that updating the timestamps is acceptable, and will
not cause unwanted side effects.~
- ~[ ] 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:~
- ~[ ] 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-05-09 12:29:16 -03:00
Sarah Gillespie
2a4b00b349
Add software installer details to get software title API response and add software install status filter to list hosts API (#18748) 2024-05-08 15:52:35 -05:00
Martin Angers
4f9363fd78
Add cron job to cleanup unused software installers (#18812) 2024-05-07 16:50:44 -04:00
Roberto Dip
e5283ef2a8 Merge remote-tracking branch 'origin/main' into feat-software-installers 2024-05-07 13:37:29 -03:00
George Karr
db5d553545
Initial fleetctl api command works with GETS and fields (#17971) 2024-05-07 11:22:05 -05:00
George Karr
0b9ec5e322
Adding cli improvements for run-scripts (#18010) 2024-05-07 10:10:22 -05:00
Victor Lyuboslavsky
a3d94c8324
AI generated policy description/resolution (#18713)
Merging feature branch. Each commit into feature branch has already been
reviewed.
2024-05-03 15:23:27 -05: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
Victor Lyuboslavsky
4946c96e77
AI-generated calendar backend changes (#18571)
#18464

Added `/fleet/autofill/policy` endpoint to get autogenerated policy
description and resolution for a given SQL query.

Added `server_settings.ai_features_disabled` setting to disable the
above endpoint.

For Google calendar integration,
- changed the event title to: "💻 🚫 Scheduled maintenance"
- updated event description to include policy description and resolution
if only one policy is failing

# 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

---------

Co-authored-by: Luke Heath <luke@fleetdm.com>
2024-05-02 11:56:54 -05:00
Dante Catalfamo
2c6e7c71a8
Zsh script support (#18411)
#17321
2024-04-30 14:38:56 -04:00
Gabriel Hernandez
7983e91933 Merge branch 'main' into feat-software-installers 2024-04-30 11:40:55 +01:00
Dante Catalfamo
3aa9437d35
fleetctl get teams prints team id (#18395)
#18394
2024-04-29 09:56:04 -04:00
Rachael Shaw
8bcdd93f2c
Update fleetctl package usage description (#18545)
Slight verbiage change requested by @noahtalerman re: #16512
2024-04-26 15:10:28 -05:00
Roberto Dip
08b5e1c7b5
fixed a bug causing servers with Windows MDM only to crash (#18568) 2024-04-26 10:09:01 -05:00
Lucas Manuel Rodriguez
1b26129465
Delete expired activities in cleanup cron (#18441)
#16989

API draft PR: #17809.
UI draft PR: #18243.

- [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)
- ~[ ] Added support on fleet's osquery simulator `cmd/osquery-perf` for
new osquery data ingestion features.~
- [X] Added/updated tests
- ~[ ] If database migrations are included, checked table schema to
confirm autoupdate~
- ~For database migrations:~
- ~[ ] Checked schema for all modified table for columns that will
auto-update timestamps during migration.~
- ~[ ] Confirmed that updating the timestamps is acceptable, and will
not cause unwanted side effects.~
- ~[ ] 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:~
- ~[ ] 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-04-26 07:22:31 -03:00
Rachael Shaw
0ccc7f6244
Use "Fleet's agent (fleetd)" naming in the CLI (#18528)
For https://github.com/fleetdm/fleet/issues/16512
2024-04-25 10:32:49 -05:00
Jacob Shandling
d7821685a8
Migrate logic from nvdtools into Fleet (#18244)
## Addresses #15999

- [x] Added/updated tests
- [ ] Manual QA for all new/changed functionality

---------

Co-authored-by: Jacob Shandling <jacob@fleetdm.com>
2024-04-24 15:25:59 -07:00
Martin Angers
7e4bcae7c3
Implement software installer storage for S3 and local filesystem (#18493) 2024-04-24 10:18:58 -04:00
Tim Lee
79a5baa5a6
Add vuln clean option (#18457) 2024-04-22 12:57:00 -06:00
Roberto Dip
e39f5bce3b
implement logic to sign apple profiles (#16490)
#10418
2024-04-18 18:01:37 -03:00
Lucas Manuel Rodriguez
225a0f8a5c
Revert software failure prob for osquery-perf (#18357)
@xpkoala came across this issue while performing a load test for the
calendar backoff feature with rolling.
It changed our baseline mainly while performing the hosts enrollment
during load tests
2024-04-17 16:11:04 -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
Sarah Gillespie
3ea7a4ba63
Merge branch 'main' into feat-macos-software-updates 2024-04-16 11:30:02 -05:00
Gabriel Hernandez
2fc4e520b8
add ability to create manual labels (#18303)
relates to #17031

Adds functionality to create manual labels in fleet.

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

---------

Co-authored-by: Martin Angers <martin.n.angers@gmail.com>
2024-04-16 17:22:08 +01:00
gillespi314
3b3f815a42 Merge conflicts 2024-04-16 10:20:59 -05:00
Lucas Manuel Rodriguez
a86da9f74b
Fix enroll request retry in osquery-perf (#18227)
This was discovered by @xpkoala while performing a load test for the
calendar backoff feature.

Some enroll requests were failing due to enrolling hosts too fast (`-var
loadtest_containers` from `0` to `40` at once), and osquery-perf had a
bug in the enroll request where the `bytes.Buffer` was being incorrectly
reused thus sending an empty body on the enroll retries, getting 400s
from Fleet due to `Expected JSON Body`:
```
2024/04/11 18:57:49 request failed: 400
```
2024-04-16 08:39:34 -03:00
Sarah Gillespie
9897649696
Update osquery-perf with DDM functionality (#18273) 2024-04-15 15:56:25 -05:00
Martin Angers
47279ca2a9 Fix conflicts 2024-04-15 16:10:10 -04:00
Tim Lee
8194b6e379
Optimize cve/generate to use last release (#18269) 2024-04-15 13:17:28 -06:00
Victor Lyuboslavsky
7785aa5070
vulnerabilities.current_instance_checks=no is now an alias for vulnerabilities.disable_schedule=true (#18184)
#16661 
vulnerabilities.current_instance_checks=no is now an alias for
vulnerabilities.disable_schedule=true

PR for doc changes: https://github.com/fleetdm/fleet/pull/18186

# Checklist for submitter

- [x] Changes file added for user-visible changes in `changes/` or
`orbit/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-15 12:10:52 -05:00
Tim Lee
a47f59ef36
Implement NVD Feed with Vulncheck Data (#18168) 2024-04-15 09:44:44 -06: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
Victor Lyuboslavsky
3367b7e036
Added orbit_version, fleet_desktop_version, and scripts_enabled to host details. (#18123)
#17361
#17148

In GET fleet/hosts/:id response, added the following fields:
- orbit_version
  - `orbit_version == null` means this agent is not an orbit agent
- fleet_desktop_version
- `fleet_desktop_version == null` means this agent is not an orbit agent
or it is an older version which is not collecting the desktop version
- `fleet_desktop_version == ""` means this agent is an orbit agent but
does not have fleet desktop
- scripts_enabled
- `scripts_enabled == null` means this agent is not an orbit agent or it
is an older version which is not collecting scripts_enabled

In orbit_info table, added the following fields:
- desktop_version
- scripts_enabled

Updated docs for orbit_info PR:
https://github.com/fleetdm/fleet/pull/18135

Updated API docs: https://github.com/fleetdm/fleet/pull/17814

MDM lock/unlock/wipe error messages are not part of this PR. They will
be in a separate PR.

# Checklist for submitter
- [x] Changes file added for user-visible changes in `changes/` or
`orbit/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] If database migrations are included, checked table schema to
confirm autoupdate
- [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)).
2024-04-09 16:33:44 -05: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
Victor Lyuboslavsky
af80a7bff7
Reducing max bandwidth by 10% to prevent potential rate limit issues. 2024-04-01 16:31:38 -05:00