Commit graph

1978 commits

Author SHA1 Message Date
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
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
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
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
Jacob Shandling
3f32c870a6
Ignore leading/trailing whitespace when filtering entities; fix url param handling; test broad range of affected endpoints (#17455)
## Addresses #16615 and #18041

### #16615:
- Trim whitespace for backend filtered tables
- Trim whitespace in UI for Queries table search string
<img width="1271" alt="Screenshot 2024-03-06 at 11 46 56 AM"
src="https://github.com/fleetdm/fleet/assets/61553566/b818591c-a977-4203-8adb-3a0d909fcfbb">
<img width="1271" alt="Screenshot 2024-03-06 at 11 47 21 AM"
src="https://github.com/fleetdm/fleet/assets/61553566/3c95b992-31ed-4c12-9763-6f5fc7d78b1f">
<img width="1800" alt="Screenshot 2024-03-06 at 3 18 31 PM"
src="https://github.com/fleetdm/fleet/assets/61553566/05c677a4-80e8-4f94-8abc-235cab4145b7">
<img width="1800" alt="Screenshot 2024-03-06 at 5 05 25 PM"
src="https://github.com/fleetdm/fleet/assets/61553566/4a5529a4-dd5f-463c-97ae-6ceaaaff7f93">


_______________________
### #18041:
#### Global:
![Screenshot 2024-04-03 at 12 21
19 PM](https://github.com/fleetdm/fleet/assets/61553566/9a45a3a6-4136-4851-b887-bd176299d0c2)
 
#### Team:
![Screenshot 2024-04-03 at 12 56
36 PM](https://github.com/fleetdm/fleet/assets/61553566/793c70e7-384b-4705-a373-7e30a5188b03)

#### **Similar fix for `GET` ...`vulnerabilities`**


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

---------

Co-authored-by: Jacob Shandling <jacob@fleetdm.com>
2024-04-10 11:50:08 -07:00
Jacob Shandling
dfe51474cd
BadRequest when no payloads present; BadRequest for invalid payload types (#18169)
## Addresses #17157 
![Screenshot 2024-04-09 at 4 53
22 PM](https://github.com/fleetdm/fleet/assets/61553566/a6a57f55-275f-4a06-89e7-085262d2672c)

- [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-04-10 10:55:38 -07:00
RachelElysia
21d1d90e3c
Fleet UI: Select a query modal revamp (#18001) 2024-04-10 13:54:31 -04:00
RachelElysia
38e1307d6b
Fleet UI: Show hidden columns in schema with a note (#17983) 2024-04-10 13:23:22 -04:00
RachelElysia
0b5e0069d4
Revert "Fleet UI: Add advanced setting to set expiry window for activity log (#17989) (#18185)
## Issue
#17989 

## Description
-BE not finished, in progress, but @lucasmrod is starting oncall so
might not be part of sprint

This reverts commit e99eaf6cd3.

# 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/` or
`orbit/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.
- [ ] 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`).
- [ ] 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-10 12:30:39 -04:00
RachelElysia
e99eaf6cd3
Fleet UI: Add advanced setting to set expiry window for activity log (#17989) 2024-04-10 10:48:46 -04:00
Martin Angers
f4d6136236
Ignore pending DDM profiles when waiting to release a device (#18159)
#18160 

# Checklist for submitter

- [x] Changes file added for user-visible changes in `changes/` or
`orbit/changes/`.
- [x] Manual QA for all new/changed functionality
2024-04-09 17:12:51 -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
5d4bc856b9 Add changes file 2024-04-09 13:17:50 -04:00
Roberto Dip
f827a4727e
use license.IsPremium to check for premium licenses (#18141)
a license can be considered premium for trials, this replaces
occurrences that used comparison operators to check for premium
licences.
2024-04-09 11:15:22 -03:00
Sarah Gillespie
05ccf9ee23
Fix issues related to Fleet builtin labels and reserved MDM profile names (#18043) 2024-04-08 14:34:55 -05:00
Roberto Dip
bac13b4af2
Prevent MDM migration without assigned ADE profile (#17999)
for #15929 this prevents us sending the notification to start the MDM
migration if the device doesn't have the right JSON profile assigned.
2024-04-08 11:10:29 -03:00
Jacob Shandling
9e2be0028c
UI: Restore missing JavaScript context in HQR config (#18087)
## Addresses #18083 
![Screenshot 2024-04-05 at 9 37
20 AM](https://github.com/fleetdm/fleet/assets/61553566/b683d30c-9af2-4cbb-8cea-b4a6e2422464)



- [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-04-05 11:47:42 -07:00
Victor Lyuboslavsky
5a6c407e1b
Calendar webhook will retry if it receives response 429 (#18067)
#18044 
Calendar webhook will retry if it receives response 429 Too Many
Requests. Webhook request will retry for 30 minutes with a 1 minute max
delay between retries.

# 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/` 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-05 12:44:56 -05:00
Victor Lyuboslavsky
f476ddcfd6
Fix panic due to nil calendar config. (#18065)
#18063

Fixing potential server panic when events are created with calendar
integration, but then global calendar integration is disabled.

Could not do a PR directly from
[fleet-v4.48.0](https://github.com/fleetdm/fleet/releases/tag/fleet-v4.48.0)
due to merge conflicts.

# 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-04 16:18:41 -05:00
RachelElysia
b7296ce4f9
Fleet UI: Surface orbit version and fleetd version to host details page (#18013) 2024-04-04 15:18:04 -04:00
Jacob Shandling
74761b75d8
Update carve request block id mismatch error code from 500 –> 400 (#17974)
## Addresses #16951

# 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/`
- [x] Added/updated tests
- [ ] Manual QA for all new/changed functionality – @ksatter can you
please add reproduction steps to the issue to aid in manual QA?

---------

Co-authored-by: Jacob Shandling <jacob@fleetdm.com>
2024-04-04 09:38:10 -07:00
RachelElysia
0db1c225f4
Fleet UI: Fix several flows where team ID is not being preserved (#17968) 2024-04-04 11:34:07 -04:00
Sarah Gillespie
841350f556
Add cross-platform check for duplicate MDM profile names (#17916) 2024-03-29 14:55:03 -05:00
RachelElysia
0903381abe
[released bug] Fleet UI: Fix ability to bulk delete hosts (#17909) 2024-03-29 11:49:15 -04:00
Lucas Manuel Rodriguez
1833e1fc5b
Reset query report when platform/min_osquery_version is changed (#17847)
#17018

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

---------

Co-authored-by: RachelElysia <rachel@fleetdm.com>
Co-authored-by: RachelElysia <71795832+RachelElysia@users.noreply.github.com>
2024-03-29 12:17:52 -03:00
RachelElysia
ea874bc134
[styling bug] Fleet UI: Update live query disabled warning styling (#17929) 2024-03-29 10:38:13 -04:00
Jacob Shandling
dcc28002fb
UI – Fix alignment of a filter on the hosts page (#17822)
## Addresses #17265 
<img width="352" alt="Screenshot 2024-03-22 at 4 54 25 PM"
src="https://github.com/fleetdm/fleet/assets/61553566/aa804fde-b786-4b8f-be30-0d7c0da97e1f">

- [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-03-28 11:58:08 -07:00
Tim Lee
d984de41e7
Add batch gitops processing for policies and queries (#17714) 2024-03-28 11:39:27 -06:00
RachelElysia
a8f5bd9281
[released bug] Fleet UI: Fix numerical type sort on Query Report (#17891) 2024-03-27 12:38:49 -04:00
Roberto Dip
e34b320ed5 Merge remote-tracking branch 'origin/main' into feat-macos-ddm 2024-03-27 11:58:22 -03:00
Martin Angers
b449900602 Regenerate schema.sql 2024-03-27 08:19:21 -04:00
Jacob Shandling
0f74ae0109
UI – Handle missing / null smtp_settings (#17850)
## Addresses #17065

Settings cleanly renders as empty and disabled despite nonexistent
`smtp_settings` from config response:
![Screenshot 2024-03-25 at 3 52
05 PM](https://github.com/fleetdm/fleet/assets/61553566/85c2a9af-7cc2-48b7-9ecf-604496813204)

- [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-03-26 17:15:26 -07:00
Victor Lyuboslavsky
9bb1610408
Fleet in your calendar feature branch (#17584)
# 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] Manual QA for all new/changed functionality
2024-03-26 15:34:33 -05:00
Dante Catalfamo
0b04e7ea9f
Allow EnrollmentState to be in status '3' for MDM clients (#17868)
#17692

Recently there was a change that filtered out hosts in `EnrollmentState`
3. This change may cause some hosts that are in otherwise good health to
appear unresponsive to MDM in the management UI.

This change will allow hosts with `EnrollmentStatus` 3 show as enrolled.

The root cause of some hosts being in state 3 is still not entirely
clear, but may have to do with either trying to re-enroll once already
enrolled, or windows updates causing some sort of issue with fleet.

Despite the "failed" `EnrollmentState` 3, the host will still display
that the system is managed by Fleet, and will actively sync.
2024-03-26 16:33:52 -04:00
Victor Lyuboslavsky
9861f6eca6
Added Fleet in your calendar changes file. 2024-03-26 13:47:20 -05:00
Martin Angers
12d9377d68
Merge branch 'main' into feat-prefill-account-name 2024-03-26 14:01:22 -04:00
Gabriel Hernandez
bb63da41b7
add ddm activities to the UI (#17864)
relates to #17409

adds the ddm activities to the UI.

- [x] Changes file added for user-visible changes in `changes/` or
`orbit/changes/`.
- [x] Manual QA for all new/changed functionality
2024-03-26 17:54:23 +00:00
RachelElysia
6d965426e0
Fleet UI: Users can see a tooltip on a disabled checkbox (#17664) 2024-03-26 09:55:49 -04:00