Commit graph

14923 commits

Author SHA1 Message Date
George Karr
38fcc30b5c
Feature: Scope Fleet-maintained apps and custom packages via labels (#24976)
Issue #22813

# 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] 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-12-23 11:38:39 -06:00
Ian Littman
329c283aa9
Don't show macOS hosts as disk encryption verifying when they're also in the action-required group (#24844)
This happens when the disk encryption profile has been sent successfully
and verified by MDM, but we haven't been sent the (encrypted) key via
Orbit yet because the end user needs to log out or restart their machine
to finish key rotation.

For #24244.

# 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-12-23 08:10:45 -06:00
Drew Baker
6348ba4c32
Create cloud-based-data-leader-choosed-fleet-for-telemetry.md (#24981) 2024-12-20 19:18:53 -05:00
Eric
9ee251ae3d
Website: Add embedded video to /start flow. (#24979)
Changes:
- Updated the 'Is it any good" step of the /start questionnaire to have
an embedded youtube video of mikermcneil demoing Fleet.
2024-12-20 17:48:11 -06:00
Victor Lyuboslavsky
ab95a0f107
Fix issue deleting DDM profiles with secret variables. (#24978)
#24548
Fix issue deleting DDM profiles with secret variables.

# Checklist for submitter
- [x] Added/updated tests
- [x] Manual QA for all new/changed functionality
2024-12-20 17:34:43 -06:00
Eric
d793cab510
Website: update slides on software management page. (#24980)
Closes: #24700
Closes: #24748

Changes:
 - updated the slides/hero content on the /software-management page.
2024-12-20 17:33:48 -06:00
gillespi314
c79875c963 Add changes file 2024-12-20 17:12:56 -06:00
gillespi314
c78002747f Merge branch 'main' into feat-labels-scoped-software 2024-12-20 17:06:48 -06:00
Victor Lyuboslavsky
ad6d473106
Added secret variables support for DDM. (#24969)
#24548 Adding secret variables support for DDM profiles.

# 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-12-20 16:32:09 -06:00
Dante Catalfamo
1ac4be3cc7
Update windows policy constants (#24971)
#24315

Closes #23970
2024-12-20 17:17:54 -05:00
Dante Catalfamo
effd3563c8
Add secrets software script support (#24912)
#24899
2024-12-20 17:17:18 -05:00
Jahziel Villasana-Espinoza
4a4ebfb156
fix: better filtering to handle de-scoping after uninstall edge case (#24963)
> Issue found during 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] 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-12-20 16:56:51 -05:00
Allen Houchins
db9258c9d0
Fix VPP error in new team and webhook errors (#24968)
Fix for this:
https://github.com/fleetdm/fleet/issues/24471#issuecomment-2557675654
Fix for this:
https://fleetdm.slack.com/archives/C071NNMSP2R/p1734726391490999
2024-12-20 15:54:29 -06:00
Victor Lyuboslavsky
ad6edec0c6
Full support of secret variables in Apple configuration profiles (#24925)
For secrets subtask #24548

Fixed secret variables support in Apple configuration profiles.

# 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-12-20 15:40:23 -06:00
Rachael Shaw
fe5834dbf6
Update CODEOWNERS while @rachaelshaw is OOO (#24965) 2024-12-20 16:23:33 -05:00
Janis Watts
6979fc128c
Updated MailHog/Mailpit instructions for current UI and consistency (#24954)
Updated instructions to reflect the current UI options and changed
formatting in "MailHog SMTP server without authentication" to match the
more organized "Mailpit SMTP server with plain authentication" section.
2024-12-20 14:29:41 -06:00
Noah Talerman
6cde77f5f9
Update story issue template (#24874)
- Link to handbook for new guidelines on API/YAML wireframes.
- New guidelines are in a PR here:
https://github.com/fleetdm/fleet/pull/24796
2024-12-20 15:26:49 -05:00
Allen Houchins
c50a096527
Add new "📱🔐 Personally-owned iPhones" team (#24952) 2024-12-20 14:24:59 -06:00
Ian Littman
1f3971701f
Bump max length for installer URLs supplied in GitOps to 4000 characters (#24942)
For #24917. Should be worth the extra byte per row for the varchar
field.

# 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] 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-12-20 11:58:21 -06:00
Sarah Gillespie
8694e981d5
Fix decoder for software installer label payloads; update tests (#24934)
Co-authored-by: Jahziel Villasana-Espinoza <jahziel@fleetdm.com>
2024-12-20 10:49:28 -06:00
Dante Catalfamo
ccb44a36d3
Use sync.Map to prevent race on map access in osquery-perf (#24501)
#24381
2024-12-20 11:28:45 -05:00
Sarah Gillespie
7aa0433f70
Fix UI pagination bug on manage controls page (#24928) 2024-12-20 10:00:12 -06:00
RachelElysia
d6b80c9c7b
FE: Update User menu to use react select 5 (#24281) 2024-12-20 10:39:06 -05:00
Harrison Ravazzolo
0ffa2cd918
Create deploying-cloudflare-warp-with-fleet.md (#24945) 2024-12-20 10:35:18 -05:00
Janis Watts
b5d17fca4d
Implement 1Password automatic updates via config profile using "Inclu… (#24887)
Implement 1Password automatic updates via config profile using "Include
any" labels

https://github.com/fleetdm/confidential/issues/9041

---------

Co-authored-by: Allen Houchins <allenhouchins@mac.com>
Co-authored-by: Allen Houchins <32207388+allenhouchins@users.noreply.github.com>
2024-12-19 17:41:58 -06:00
Drew Baker
1c478f58a3
Update fintech-company-migrates-to-fleet.md (#24940)
Fix typo

# 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://github.com/fleetdm/fleet/blob/main/docs/Contributing/Committing-Changes.md#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.
- [ ] Added/updated tests
- [ ] If paths of existing endpoints are modified without backwards
compatibility, checked the frontend/CLI for any necessary changes
- [ ] 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`).
- [ ] Manual QA for all new/changed functionality
- For Orbit and Fleet Desktop changes:
- [ ] 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-12-19 18:20:18 -05:00
Noah Talerman
e8a9c6654c
Update default.yml (#24921)
- The new config is flat. We just updated the docs here:
https://github.com/fleetdm/fleet/pull/24891
2024-12-19 17:19:33 -06:00
Drew Baker
df5e80ef1d
Create fintech-company-migrates-to-fleet.md (#24935) 2024-12-19 18:07:02 -05:00
Drew Baker
0477e059e0
Update fleet-4.61.0.md (#24937)
Fix typo
2024-12-19 17:58:52 -05:00
Gabriel Hernandez
863e680253
update the label error message (#24932)
relates to #24537

updates the delete label error when label is used for software

- [x] Manual QA for all new/changed functionality
2024-12-19 16:42:23 -06:00
Tim Lee
320ccaf01e
minio vulnerability (#24931) 2024-12-19 15:17:40 -07:00
Gabe Lopez
360e47da0d
Update release-qa.md (#24926)
updated a few sections and added iOS/iPadOS tests

# Checklist for submitter

---------

Co-authored-by: Janis Watts <184028114+jmwatts@users.noreply.github.com>
2024-12-19 14:16:19 -08:00
Scott Gress
6bd9cc8a44
Monitor and alert on errors in cron jobs (#24347)
for #19930 

# 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)
- [X] Added/updated tests
- [X] If database migrations are included, checked table schema to
confirm autoupdate
- [X] Manual QA for all new/changed functionality

# Details

This PR adds a new feature to the existing monitoring add-on. The add-on
will now send an SNS alert whenever a scheduled job like
"vulnerabilities" or "apple_mdm_apns_pusher" exits early due to errors.
The alert contains the job type and the set of errors (there can be
multiple, since jobs can have multiple sub-jobs). By default the SNS
topic for this new alert is the same as the one for the existing cron
system alerts, but it can be configured to use a separate topic (e.g.
dogfood instance will post to a separate slack channel).

The actual changes are:

**On the server side:**

- Add errors field to cron_stats table (json DEFAULT NULL)
- Added errors var to `Schedule` struct to collect errors from jobs
- In `RunAllJobs`, collect err from job into new errors var
- Update `Schedule.updateStats`and `CronStats.UpdateCronStats`to accept
errors argument
- If provided, update errors field of cron_stats table

**On the monitor side:**

- Add new SQL query to look for all completed schedules since last run
with non-null errors
- send SNS with job ID, name, errors

# Testing

New automated testing was added for the functional code that gathers and
stores errors from cron runs in the database. To test the actual Lambda,
I added a row in my `cron_stats` table with errors, then compiled and
ran the Lambda executable locally, pointing it to my local mysql and
localstack instances:

```
2024/12/03 14:43:54 main.go:258: Lambda execution environment not found.  Falling back to local execution.
2024/12/03 14:43:54 main.go:133: Connected to database!
2024/12/03 14:43:54 main.go:161: Row vulnerabilities last updated at 2024-11-27 03:30:03 +0000 UTC
2024/12/03 14:43:54 main.go:163: *** 1h hasn't updated in more than vulnerabilities, alerting! (status completed)
2024/12/03 14:43:54 main.go:70: Sending SNS Message
2024/12/03 14:43:54 main.go:74: Sending 'Environment: dev
Message: Fleet cron 'vulnerabilities' hasn't updated in more than 1h. Last status was 'completed' at 2024-11-27 03:30:03 +0000 UTC.' to 'arn:aws:sns:us-east-1:000000000000:topic1'
2024/12/03 14:43:54 main.go:82: {
  MessageId: "260864ff-4cc9-4951-acea-cef883b2de5f"
}
2024/12/03 14:43:54 main.go:198: *** mdm_apple_profile_manager job had errors, alerting! (errors {"something": "wrong"})
2024/12/03 14:43:54 main.go:70: Sending SNS Message
2024/12/03 14:43:54 main.go:74: Sending 'Environment: dev
Message: Fleet cron 'mdm_apple_profile_manager' (last updated 2024-12-03 20:34:14 +0000 UTC) raised errors during its run:
{"something": "wrong"}.' to 'arn:aws:sns:us-east-1:000000000000:topic1'
2024/12/03 14:43:54 main.go:82: {
  MessageId: "5cd085ef-89f6-42c1-8470-d80a22b295f8"
2024-12-19 15:55:29 -06:00
Luke Heath
50503f711c
Update engineering handbook (#24930) 2024-12-19 15:52:55 -06:00
Scott Gress
556b79e2d2
Prevent Axios from fully buffering files uploaded from MSP dashboard (#24927)
for #24829 

See https://github.com/axios/axios/issues/1045 -- by default Axios
buffers uploaded files into memory fully, to support redirects. For
large file uploads this means we get OOM errors, especially when sending
to multiple teams. There's a few other optimizations we can put in place
here but in the short term we can fix the buffering issue by setting
`maxRedirects: 0` on the requests.

I tested this by adding an `onUploadProgress` handler to the Axios
request that dumps memory usage, and uploading a 209mb software file to
3 teams. Before the update, the readout ticket up continuously (the
first number is the # of bytes uploaded):

```
1540129 {rss: 161652736, heapTotal: 65880064, heapUsed: 55625552, external: 28411157, arrayBuffers: 24338844}
edit-software.js:177
1554313 {rss: 149254144, heapTotal: 65880064, heapUsed: 52445200, external: 25193635, arrayBuffers: 21121327}
edit-software.js:177
2339833 {rss: 151703552, heapTotal: 66404352, heapUsed: 52269280, external: 12664377, arrayBuffers: 8592064}
...a minute later...
192708641 {rss: 619323392, heapTotal: 95240192, heapUsed: 55320960, external: 618952429, arrayBuffers: 614879965}
edit-software.js:177
201523233 {rss: 634613760, heapTotal: 95240192, heapUsed: 58514992, external: 636581613, arrayBuffers: 632509154}
edit-software.js:177
209326677 {rss: 637399040, heapTotal: 95240192, heapUsed: 56800016, external: 639441633, arrayBuffers: 635369173}
```

so we start at ~161mb, and by the time we're done, we're using 637mb of
RAM. Render's free tier has a 250mb limit on apps.

With `maxRedirects: 0`, we see:

```
2669337 {rss: 151846912, heapTotal: 66404352, heapUsed: 53297400, external: 26446868, arrayBuffers: 22374419}
edit-software.js:177
2279929 {rss: 152641536, heapTotal: 66404352, heapUsed: 53453664, external: 27233300, arrayBuffers: 23160851}
edit-software.js:177
2228585 {rss: 153038848, heapTotal: 66404352, heapUsed: 53537096, external: 27626516, arrayBuffers: 23554067}
...a minute later...
209326677 {rss: 146989056, heapTotal: 92094464, heapUsed: 53802856, external: 14617518, arrayBuffers: 10545071}
edit-software.js:177
209326677 {rss: 153051136, heapTotal: 92094464, heapUsed: 55376336, external: 22447478, arrayBuffers: 18375026}
edit-software.js:177
209326677 {rss: 152129536, heapTotal: 92094464, heapUsed: 51857632, external: 22447478, arrayBuffers: 16540013}
```

showing that we start and finish with around the same amount of RAM
used.
2024-12-19 15:51:47 -06:00
Gabriel Hernandez
e6efcf7238
finish UI api integration for editing a custom package (#24929)
relates to #24828

Finish up the UI integration for the API to edit a custom package

- [x] Manual QA for all new/changed functionality
2024-12-19 15:31:36 -06:00
Sarah Gillespie
1e949c8d5c
Add unit tests for software label validations (#24894) 2024-12-19 15:09:17 -06:00
Ian Littman
4f547902a6
Ignore iOS-only Firefox vulnerability (CVE-2024-10004) since we don't support iOS vulns (#24892)
For #23579

# 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

QA'd locally successfully. It just took a bit longer for the vuln showed
up.
2024-12-19 14:05:58 -06:00
Noah Talerman
5f9fcfc9f4
YAML files reference docs: windows_migration_enabled (#24891)
- Add missing reference docs for the following user story:
  - #22075
2024-12-19 14:37:49 -05:00
BCTBB
e472b801ae
Update communications.md - Removing Logica from glossary (#24838) 2024-12-19 12:39:20 -06:00
Katheryn Satterlee
d5ce6fa5d1
Clarify automation reset (#24884)
Updated /automations/reset description to reflect that this endpoint
does not immediately trigger automations, but resets the status of hosts
so that they are seen as newly failing on the next automation run.
2024-12-19 11:46:55 -06:00
Gabriel Hernandez
3681b8f7ac
Activities UI and api integation/tests for the scoped software via labels feature (#24888)
relates to #24828, #24792

This updates the UI activities software including a new software details
show details modal:

<img width="825" alt="image"
src="https://github.com/user-attachments/assets/3dd3019b-c94c-427b-9c52-d678a311c4bc"
/>

It also includes tests and api integration work for the creating and
reading of scoped software via labels.

> NOTE: still need to do the editing which we can do in another PR when
the API is ready.

- [x] Added/updated tests
- [x] Manual QA for all new/changed functionality
2024-12-19 11:09:38 -06:00
Martin Angers
b4516df1d3
SSVL: add timestamp-based check for the exclude-any case (#24889)
Co-authored-by: Jahziel Villasana-Espinoza <jahziel@fleetdm.com>
2024-12-19 11:03:44 -06:00
Dante Catalfamo
dd5cbf68ed
Remove unnecessary validation before secret expansion (#24903)
#24549

Remove redundant code introduced in original PR #24624
2024-12-19 11:55:47 -05:00
Eric
366ab642fe
MSP Dashboard: update entrypoint script. (#24911)
Changes:
- Updated the MSP dashboard's entrypoint.sh script to not rebuild the
database every time it starts with the --build flag.
2024-12-19 10:52:31 -06:00
Gabriel Hernandez
89862b012b Merge branch 'main' into feat-labels-scoped-software 2024-12-19 10:52:22 -06:00
Allen Houchins
9b6b21f3b7
Added settings for Windows MDM migration (#24865) 2024-12-19 10:31:31 -06:00
Allen Houchins
d79e26d488
Added multi-platform software to Workstations (canary) team (#24864) 2024-12-19 10:30:17 -06:00
Luke Heath
ace2fa3f9f
Adding changes for Fleet v4.61.0 (#24407) (#24904) 2024-12-19 10:09:22 -06:00
Noah Talerman
0065c92885
Update product-design.rituals.yml (#24902)
- Record KPI first before we move stories around
2024-12-19 09:10:55 -06:00