Commit graph

2017 commits

Author SHA1 Message Date
Victor Lyuboslavsky
8b9cef80bd
Fixed ingestion of private IPv6 address from agent. (#18738)
#18039 
Fixed ingestion of private IPv6 address from agent. Host details page
can now display private IPv6 address if private IPv4 does not exist.

How to set up an IPv6-only host:
https://www.loom.com/share/5e205549b6484df88702c27a5aa5a3ee

# Checklist for submitter
- [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 15:07:09 -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
Tim Lee
536ccc91c0
18601 add ubuntu sources (#18602) 2024-05-02 13:20:00 -06:00
Tim Lee
648628d3be
Update Windows OS Version Reporting (#17682) 2024-05-01 12:02:16 -06:00
RachelElysia
55f005c8e3
Fleet UI fix: Input is treated as strings but send number to API (#18652) 2024-05-01 09:17:08 -04:00
Dante Catalfamo
2c6e7c71a8
Zsh script support (#18411)
#17321
2024-04-30 14:38:56 -04:00
Roberto Dip
05719633a1
add consistent MDM host lifecycle management (#18510)
The mantra for MDM lifecycle events is:

> - Noah: When MDM is turned on, install fleetd, bootstrap package (if
DEP),
> and profiles. Don't clear host vitals (everything you see on the Host
>      details page)
>    - Noah: On re-enrollment, don't clear host vitals.
>    - Noah: On lock and wipe, don't clear host vitals.
>    - Noah: On delete, clear host vitals.

This addresses issues:

- https://github.com/fleetdm/fleet/issues/17243
- https://github.com/fleetdm/fleet/issues/17481
- https://github.com/fleetdm/fleet/issues/17292
- https://github.com/fleetdm/fleet/issues/18030
- https://github.com/fleetdm/fleet/issues/18031
2024-04-29 16:43:15 -03:00
Victor Lyuboslavsky
fa9373a68f
Updated host_operating_system INSERT. (#18556)
#16562 

Updated MySQL host_operating_system insert statement to reduce table
lock 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.
- [ ] Added/updated tests
  - Existing tests provide full coverage of the changes.
- [x] Manual QA for all new/changed functionality
2024-04-29 10:54:50 -05:00
Victor Lyuboslavsky
d0f0d3d017
When updating a policy's 'platform' field, the aggregated policy stats are now cleared. (#18415)
#18157
When updating a policy's 'platform' field, the aggregated policy stats
are now cleared.

# Checklist for submitter
- [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-29 10:20:59 -05:00
Jacob Shandling
ea86f9ed0f
UI –Restore missing tooltips (#18598) 2024-04-29 10:48:35 -04:00
Dante Catalfamo
3aa9437d35
fleetctl get teams prints team id (#18395)
#18394
2024-04-29 09:56:04 -04: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
26b83de925
Fix sending of "install Fleetd" commands repeatedly on Azure-enrolled Windows devices (#18453) 2024-04-29 08:48:54 -04:00
RachelElysia
13f4703f01
Fleet UI: Activity log expiry settings (#18243) 2024-04-26 15:14:49 -04:00
Lucas Manuel Rodriguez
3e5f7d5cf5
Fix users query for linux devices (#18454)
#18424

I believe the hosts users for linux broke when we added Chrome support
(https://github.com/fleetdm/fleet/pull/10281/files).

- [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-04-26 15:05:34 -03: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
RachelElysia
6dabcd524c
Frontend: Improve URL and email validation (#18445) 2024-04-25 13:03:30 -04:00
Gabriel Hernandez
c423f415a6
Fix uploading signed apple mobileconfig profiles (#18482)
relates to #18389

This fixes an issue with some signed apple mobileconfig profiles were
not able to be uploaded.

<!-- 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-04-25 17:09:53 +01:00
Jacob Shandling
3a6cf2e599
UI – render informative message when user tries to save query with invalid platform(s) (#18473)
## #17771 
![Screenshot 2024-04-22 at 1 10
06 PM](https://github.com/fleetdm/fleet/assets/61553566/6b92efbb-6a5c-49f3-b903-624c85fd2173)

- [x] Changes file added for user-visible changes in `changes/`
- [x] Manual QA for all new/changed functionality

---------

Co-authored-by: Jacob Shandling <jacob@fleetdm.com>
2024-04-24 15:25:33 -07:00
Luke Heath
2a1c19e26c
Adding changes for Fleet v4.49.0 (#18496) 2024-04-24 14:13:59 -05:00
Gabriel Hernandez
0474d72e9a
fix downloading manual enrollment profile (#18487)
relates to #18483

This fixes an issue with downloading a manual enrollment profile on the
device user page. This changes how we download the file to use an anchor
tag and default browser behaviour instead of doing it in JS with the
FileSaver library.

We will probably want to remove all FileSaver library implementations in
the future
2024-04-23 13:54:54 -03:00
RachelElysia
23fed89425
Fleet UI: Not show error state when enabling calendar events automation (#18396) 2024-04-19 09:40:36 -04:00
Victor Lyuboslavsky
72cc82f60d
Ignoring Valve Corporation's Steam client's vulnerabilities on Windows and macOS (#18380)
#18126
Ignoring Valve Corporation's Steam client's vulnerabilities on Windows
and macOS
- On Windows and macOS, the true version of the Steam client (like
2021-04-10) cannot be retrieved by standard methods used on other
software. We would need to create custom logic to retrieve the version
of the Steam client.
- Steam client automatically updates itself, so security risk is
somewhat mitigated.

QA note: Items from software_cve table are cleared after 2 hours.

# 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-04-18 10:12:49 -05:00
Gabriel Hernandez
de92d94dbd
update os settings table table cell layout (#18393)
relates to #18082

fixes the os settings modal table styling. We make all cells the same
width and truncate when necessary.


![image](https://github.com/fleetdm/fleet/assets/1153709/48714f3c-567a-4631-809b-c4348e9faa6e)

- [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-04-18 15:49:21 +01:00
RachelElysia
058de69bbd
Fleet UI: Equal padding above and below empty states on host details page (#18371) 2024-04-18 09:39:17 -04:00
Sharon Katz
420e2adb0f
Adding changes for patch 4.48.3 (#18306)
Co-authored-by: Luke Heath <luke@fleetdm.com>
2024-04-17 16:41:06 -04:00
RachelElysia
1d34d027e3
[small unreleased bug] Fleet UI: Fix Show schema button location (#18284) 2024-04-17 13:48:48 -04:00
Victor Lyuboslavsky
a5c107e082
For calendar integration, calendar event no longer created when policy has an invalid SQL query. (#18352)
For calendar integration, calendar event no longer created when policy
has an invalid SQL query.
#18350 

# Checklist for submitter
- [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 16:50:22 -05: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
Jacob Shandling
de94299b65
UI – Show percentages of passing and failing hosts when a live policy run completes (#18257)
## Addresses #16500
![Screenshot 2024-04-12 at 4 11
22 PM](https://github.com/fleetdm/fleet/assets/61553566/8f1cf17c-7378-4246-8f17-6f8fe3321b54)


- [x] Changes file added for user-visible changes in `changes/`
- [x] Manual QA for all new/changed functionality

---------

Co-authored-by: Jacob Shandling <jacob@fleetdm.com>
2024-04-16 09:00:23 -07:00
gillespi314
be415c1678 Merge branch 'main' into feat-macos-software-updates 2024-04-16 10:24:43 -05:00
gillespi314
3b3f815a42 Merge conflicts 2024-04-16 10:20:59 -05:00
Dante Catalfamo
48036577eb
Interpret windows exit codes as a signed integer (#18282)
#17695

The windows exit code is a 32-bit unsigned integer, but the command
interpreter treats it like a signed integer. When a process is killed,
it returns 0xFFFFFFFF (interpreted as -1). We convert the integer to an
signed 32-bit integer to flip it to a -1 to match our expectations, and
fit in our db column.

https://en.wikipedia.org/wiki/Exit_status#Windows

FIxed on both the client and server side.
2024-04-16 10:53:50 -04:00
RachelElysia
41ef4e3ac0
[Small released styling bugs] Fleet UI: Fix last activity's styling (#18279) 2024-04-16 10:43:06 -04:00
Victor Lyuboslavsky
f58947012b
In fleetctl debug db-locks and fleetctl debug db-innodb-status, fixed 500 errors (#18285) 2024-04-16 07:52:03 -05:00
Lucas Manuel Rodriguez
e7f61305a9
New APIs to add/remove manual labels to/from a host (#18283)
#16767

To create a manual label:
```sh
cat labels.yml
---
apiVersion: v1
kind: label
spec:
  name: Manually Managed Example
  label_membership_type: manual
  hosts:
    - lucass-macbook-pro.local
```

To add/delete a manual label to/from a host:
```
curl -k -v -X POST -H "Authorization: Bearer $TEST_TOKEN" https://localhost:8080/api/latest/fleet/hosts/1/labels -d '{"labels": ["Manually Managed Example"]}'

curl -k -v -X DELETE -H "Authorization: Bearer $TEST_TOKEN" https://localhost:8080/api/latest/fleet/hosts/1/labels -d '{"labels": ["Manually Managed Example"]}'
```

API draft changes: https://github.com/fleetdm/fleet/pull/16979/files
Figma with error strings:
https://www.figma.com/file/JiWoAiuHlkt76s3o3Uyz6h/%2316767-API-endpoint-for-updating-a-host's-manual-labels?type=design&node-id=2-130&mode=design&t=pxRPhrn6E1bOCrEd-0

- [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-16 06:37:58 -03:00
Tim Lee
46f7b6b043
Add Failing Policy Counts to Health API (#17758) 2024-04-15 16:14:21 -06:00
Martin Angers
775fa70c53
Fix Apple profile upload error message when identifier is a duplicate. (#18272)
#18081 

# Checklist for submitter

- [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] Manual QA for all new/changed functionality
2024-04-15 16:50:14 -05:00
George Karr
fa5e224a4a
Add feature to resend MDM configuration profiles (#18280)
Includes PRs #18111, #18212, and #18271
2024-04-15 16:48:42 -05:00
Martin Angers
47279ca2a9 Fix conflicts 2024-04-15 16:10:10 -04: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
Gabriel Hernandez
1e6839c004
Feat UI resend profile (#18111)
relates to #17896

UI implementation of the resend profile feature. This adds a resend
button on the OS Settings modal row items that will request the profile
is resent.


![image](https://github.com/fleetdm/fleet/assets/1153709/f9072ccc-2d28-4638-adea-da3cb25da33b)

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

---------

Co-authored-by: Roberto Dip <me@roperzh.com>
2024-04-15 14:17:08 +01:00
Gabriel Hernandez
5df04c8cca Merge branch 'main' into feat-resend-config-profile 2024-04-15 11:35:14 +01:00
Sarah Gillespie
03bd837c9c
Add backend to resend host MDM profiles (#18212)
Issue #17897 

# 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/` or
`orbit/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-04-12 14:34:54 -05:00
Dante Catalfamo
80c906aa69
Windows careful bitlocker selection (#18189)
#17796

Fixes an issue in windows server where selecting from `bitlocker_info`
will cause the query to abort. Bitlocker is not available by default
on some version of windows server, so we first check if the optional
component is enabled before making our query
2024-04-12 10:00:46 -04:00
RachelElysia
8fd807be55
Fleet UI: Adding a policy modal can filter by platform (#18006) 2024-04-11 16:30:12 -04:00