Commit Graph

767 Commits

Author SHA1 Message Date
Zach Wasserman
974c8e008d
Improve logging for fleetctl with permissions errors (#6460) 2022-06-30 13:24:19 -07:00
RachelElysia
fd3300a962
Host Details UI: Fix software table column width, caret alignment (#6411) 2022-06-30 10:46:05 -04:00
RachelElysia
be2c65ebe1
Login UI: Center vertical alignment, align with forgot password box (#6397) 2022-06-30 10:44:05 -04:00
RachelElysia
9367464d20
Fleet Desktop Device User Page: Remove unnecessary API call (#6427) 2022-06-30 10:42:41 -04:00
RachelElysia
9bfb43b2cf
Fix alignment for dropdown's placeholder and search text (#6395) 2022-06-29 09:49:27 -04:00
Martin Angers
b9930930f5
Document the device-authenticated endpoints in API for Contributors (#6406) 2022-06-29 08:12:20 -04:00
Roberto Dip
b2d07e56b5
report error analytics (#6341)
Related to #5898, this reports an anonymized summary of errors stored in Redis into the analytics payload.

For each error stored, this includes:

- A `count` attribute with the number of occurrences of the error
- A `loc` attribute with the 3 topmost lines in the stack trace. Note that stack traces only contain package name + line number (example: github.com/fleetdm/fleet/server.go:12

This also includes a minor refactor around error types.
2022-06-28 16:31:14 -03:00
Martin Angers
539be8ee09
Add battery info in host details response (#6394) 2022-06-28 14:11:49 -04:00
gillespi314
58892fee2e
Fix false negatives for os version policies generated by UI (#6375) 2022-06-24 12:42:51 -05:00
gillespi314
b6a816fe52
Remove last keyword from UI SQL parser config (#6362) 2022-06-24 10:19:06 -05:00
Juan Fernandez
79bf51b03c
Feature 6242: Use oval to detect vulnerabilities on Fedora hosts (#6330)
* Feature 6242: Scan Fedora hosts using OVAL definitions
2022-06-24 11:02:51 -04:00
Juan Fernandez
9d01ba33c6
Feature 6096: Scan RHEL/CentOS hosts using OVAL definitions (#6241)
Extended the OVAL parser/analyzer so that we can scan RHEL based systems.
2022-06-23 16:44:45 -04:00
gillespi314
15de4f3e65
Update Fleet host detail query so os_version for Ubuntu hosts reflects accurate patch number in point release (#6360) 2022-06-23 15:24:18 -05:00
Luke Heath
e16010f1f9
Improve SSO error messaging (#6339) 2022-06-23 10:32:20 -07:00
gillespi314
2715f8eb32
Add fixtures for software and vulnerabilities end-to-end tests (#6337) 2022-06-23 10:01:37 -05:00
Martin Angers
8f66a50f2b
Add hosts enrolled by operating system to anonymous usage stats (#6329) 2022-06-22 16:38:11 -04:00
Roberto Dip
2948e112f6
ensure software_host_counts is cleaned when software is deleted (#6270)
Related to #5982, this ensures we clean up software_host_counts rows referencing software that is not longer present in the software table.
2022-06-22 17:35:53 -03:00
Martin Angers
dc9e158153
Add weekly active users count in anonymous usage stats (#6317) 2022-06-22 15:20:57 -04:00
Martin Angers
7bfe93f5d7
Include an error code as query string in /sso/callback response in case of failure (#6286) 2022-06-21 09:04:50 -04:00
Roberto Dip
984605f630
store count alongside unique error instances in Redis (#6232)
Related to #4972, this adds a new key, error:<hash>:count to Redis in order to keep track of how many times each instance of an error occurred.
2022-06-21 08:43:53 -03:00
Katheryn Satterlee
865ab32d03
Prepare for 4.16.0 release (#6256) 2022-06-20 20:55:33 -07:00
Luke Heath
546ef0746a
Fix actions popup alignment on user management page (#6246) 2022-06-16 08:29:27 -07:00
Desmi-Dizney
845e9e6e0e
Editor pass - Track active hosts count and enforce limit (#6224)
This has been edited for copy.
2022-06-14 14:58:34 -04:00
Desmi-Dizney
55d1e338cb
Editor pass - Improve live query UX (#6201)
Editor pass for:
-  https://github.com/fleetdm/fleet/pull/5749
2022-06-14 14:55:59 -04:00
gillespi314
21837ed8ac
Enable ticket workflow for failing policies automation (#6066) 2022-06-13 18:21:24 -05:00
gillespi314
7621a0b290
Show count of visible results after a column is filtered on live query page (#6199) 2022-06-13 18:20:57 -05:00
Martin Angers
81f0e0ccfa
Track active hosts count and enforce limit (#6099) 2022-06-13 16:29:32 -04:00
Roberto Dip
19c5e3545b
add a dedicated endpoint that redirects to fleet_desktop.transparency_url (#6204)
As part of https://github.com/fleetdm/fleet/issues/5947, and in order to have a simplified workflow in Fleet Desktop, we defined https://github.com/fleetdm/fleet/issues/6200 to add a new endpoint that redirects to the transparency url as defined in the config (for premium users only)

```
~/projects/fleet $ curl -v -s https://localhost:8080/api/latest/fleet/device/bf34ab98-23b0-48bc-8e82-8c0143cba11c/transparency
* Connection state changed (MAX_CONCURRENT_STREAMS == 250)!
< HTTP/2 307
< content-type: application/json; charset=utf-8
< location: https://fleetdm.com/transparency
< content-length: 0
< date: Mon, 13 Jun 2022 18:09:29 GMT
<
* Connection #0 to host localhost left intact
```
2022-06-13 16:07:08 -03:00
Luke Heath
7822666603
Improve password recovery flow (#6185) 2022-06-13 07:51:37 -07:00
Lucas Manuel Rodriguez
515454e47f
Fix no such table errors for mdm & munki_info in vanilla osquery macOS hosts (#6170)
* Add discovery queries for mdm and munki_info

* Add changes file

* Amend discovery table tests
2022-06-13 08:52:33 -03:00
gillespi314
c146ea4aa4
Add new "Fleet Desktop" section to global settings page (#6161) 2022-06-11 12:23:02 -05:00
Roberto Dip
18de43f35b
fix fleetctl debug commands on Windows (#6186)
As reported in #6127, the `fleetctl debug` `archive` and `errors` commands were failing on Windows because filenames are not allowed to contain colons `:`.

This changeset removes colina from the filename of the archives generated by both commands.
2022-06-10 21:59:44 -03:00
gillespi314
44f902218c
Improve live query UX (#5749) 2022-06-10 13:29:45 -05:00
gillespi314
a3ab5646f5
Add new fleet_desktop property to config object (#6151) 2022-06-10 10:39:02 -05:00
Tomas Touceda
a15101601c
Use the improved users query everywhere (#6126)
* Use the improved users query everywhere

* Filter out users without a home dir
2022-06-09 17:18:28 -03:00
Tomas Touceda
fc215610a4
Allow users to customize detail queries for troubleshooting purposes (#6150)
* Allow users to customize detail queries for troubleshooting purposes

* Address review comments
2022-06-09 10:33:49 -03:00
gillespi314
db7424282b
Add software details page (#6089) 2022-06-08 14:01:38 -05:00
Juan Fernandez
ef73039559
Improve vulnerability detection for Ubuntu (#6102)
Feature: Improve our capability to detect vulnerable software on Ubuntu hosts

To improve the capability of detecting vulnerable software on Ubuntu, we are now using OVAL definitions to detect vulnerable software on Ubuntu hosts. If data sync is enabled (disable_data_sync=false) OVAL definitions are automatically kept up to date (they are 'refreshed' once per day) - there's also the option to manually download the OVAL definitions using the 'fleetctl vulnerability-data-stream' command. Downloaded definitions are then parsed into an intermediary format and then used to identify vulnerable software on Ubuntu hosts. Finally, any 'recent' detected vulnerabilities are sent to any third-party integrations.
2022-06-07 21:09:47 -04:00
Martin Angers
0b5fcd8e27
Add support for custom headers in fleetctl (#6118) 2022-06-07 16:00:09 -04:00
Roberto Dip
19f995d3b5
only include policies in device endpoints for premium users (#6077)
This removes policy information from `GET /api/_version_/fleet/device/{token}` from non-premium Fleet instances.

Starting the server with `./build/fleet serve --dev --dev_license`

```bash
$ curl -s https://localhost:8080/api/latest/fleet/device/1804e808-171f-4dda-9bec-f695b2f2371a | jq '.host.policies // "not present"'
[
  {
    "id": 3,
    "name": "Antivirus healthy (Linux)",
    "query": "SELECT score FROM (SELECT case when COUNT(*) = 2 then 1 ELSE 0 END AS score FROM processes WHERE (name = 'clamd') OR (name = 'freshclam')) WHERE score == 1;",
    "description": "Checks that both ClamAV's daemon and its updater service (freshclam) are running.",
    "author_id": 1,
    "author_name": "Roberto",
    "author_email": "test@example.com",
    "team_id": null,
    "resolution": "Ensure ClamAV and Freshclam are installed and running.",
    "platform": "darwin,linux",
    "created_at": "2022-05-23T20:53:36Z",
    "updated_at": "2022-06-03T13:17:42Z",
    "response": ""
  }
]
```

Starting the server with `./build/fleet serve --dev`

```bash
$ curl -s https://localhost:8080/api/latest/fleet/device/1804e808-171f-4dda-9bec-f695b2f2371a | jq '.host.policies // "not present"'
"not present"
```
2022-06-07 13:27:13 -03:00
Martin Angers
a23e0c41ff
Support failing policies integrations (#5973) 2022-06-06 10:41:51 -04:00
Luke Heath
9651539f75
Update API token modal to include more information (#5994) 2022-06-02 18:03:03 -05:00
Luke Heath
0530a86b7c
Fix device page redirect on expired token (#5976) 2022-06-02 17:56:26 -05:00
gillespi314
5d68a1fead
Add probability of exploit (EPSS score) to Software page in Fleet Premium (#5925) 2022-06-02 17:32:13 -05:00
Lucas Manuel Rodriguez
33bb7886b6
Add automation for orbit shell (with TUF) (#5856)
* fix old root dir in orbit

* add changes

* Add automation for orbit shell (with TUF)

* Fix workflow syntax

* Add logging to latest fleetctl preview action

* Add changes to fix workflow

* Use macOS host for TUF server and package generation

* Remove copy/paste if clause

* Fix orbit logs on macOS, Ubuntu

* Simplify TUF and generation of packages

* Set enroll secret instead of getting it

* Increase timeouts

* Add step id

* Fixes to the upload/download of artifacts

* Rearrange steps to not lose the downloads

* Fix copy/paste

* Add fleetctl login step

* Add missing config set

* Fix quotes on Windows

* Increase timeout

* Fix job termination

* Disable FLEET_DESKTOP for now

* Checkout repository on macOS

* Fix logs path

* Enable fleet desktop

* Use cancel, nitpick

Co-authored-by: Michal Nicpon <michal@fleetdm.com>
2022-06-01 13:54:16 -03:00
Michal Nicpon
30a864c8d2
Sync CVE scores periodically (#5838) 2022-06-01 10:06:57 -06:00
Roberto Dip
eb8defdcbe
add premium, device authed endpoint to retrieve policies (#5967)
This adds a new device authenticated endpoint, `/api/_version_/fleet/device/{token}/policies` to retrieve the device policies.

An example request / response looks like:

```bash
curl  https://localhost:8080/api/latest/fleet/device/1804e808-171f-4dda-9bec-f695b2f2371a/policies
```

```json
{
  "policies": [
    {
      "id": 3,
      "name": "Antivirus healthy (Linux)",
      "query": "SELECT score FROM (SELECT case when COUNT(*) = 2 then 1 ELSE 0 END AS score FROM processes WHERE (name = 'clamd') OR (name = 'freshclam')) WHERE score == 1;",
      "description": "Checks that both ClamAV's daemon and its updater service (freshclam) are running.",
      "author_id": 1,
      "author_name": "Admin",
      "author_email": "admin@example.com",
      "team_id": null,
      "resolution": "Ensure ClamAV and Freshclam are installed and running.",
      "platform": "darwin,windows,linux",
      "created_at": "2022-05-23T20:53:36Z",
      "updated_at": "2022-05-23T20:53:36Z",
      "response": "fail"
    }
  ]
}
```

Related to [#5685](https://github.com/fleetdm/fleet/issues/5685), in another changeset I will be adding "client" endpoints so we can consume this endpoint from Fleet Desktop
2022-05-31 14:54:43 -03:00
Lucas Manuel Rodriguez
98be6cfc29
Improve Fleet Desktop "My Device" menu item UX at install time (#5915)
* Improve Fleet Desktop My Device link availability

* Use svc.clock and add test

* Revert change and add check for LastEnrolledAt on tests
2022-05-31 12:56:51 -03:00
Michal Nicpon
a652292d0f
Don't return orphaned software from the API (#5840) 2022-05-30 09:23:27 -06:00
Roberto Dip
fc7a045209
ensure previous host membership policies are deleted on enrollment (#5890)
Related to #5776, this ensures that when a host is re-enrolled on a different team we cleanup existing policy memberships in the same way we do when a host is assigned a team through the API.
2022-05-30 10:30:15 -03:00
Roberto Dip
5b1ea0f079
update changelog for v4.15.0 (#5951) 2022-05-27 17:52:06 -03:00
Noah Talerman
d17a8151b4
Prepare for 4.15.0 (#5858)
Co-authored-by: Katheryn Satterlee <me@ksatter.com>
Co-authored-by: Zach Wasserman <zach@fleetdm.com>
2022-05-27 16:50:20 -03:00
gillespi314
baeff6e893
Add validation for pack scheduled query interval (#5918) 2022-05-26 16:54:21 -05:00
Michal Nicpon
6083b180a6
fix duplicate hosts in vuln webhook (#5843) 2022-05-25 11:40:12 -06:00
gillespi314
85c6ca0e5f
Improve precision in reporting of unseen hosts via host status webhook automations (#5889) 2022-05-25 10:54:56 -05:00
Sharvil Shah
0e01b11994
osquery changelog (#5853)
Co-authored-by: Noah Talerman <noahtal@umich.edu>
2022-05-24 19:16:21 +05:30
Luke Heath
b1028465e1
Export hosts to CSV with selected columns (#5841) 2022-05-23 22:46:40 -05:00
gillespi314
78b1a60a0d
Add bundle identifier to Software page UI (#5868) 2022-05-23 17:08:44 -05:00
gillespi314
546986787a
Remove iptables from UI (#5869) 2022-05-23 17:08:30 -05:00
Michal Nicpon
4398644185
Fix root dir detection when using orbit shell (#5844)
* fix old root dir in orbit

* add changes
2022-05-23 16:47:46 -03:00
Martin Angers
56ce1649ee
Add issues and device_mapping output to CSV export (#5864) 2022-05-23 15:35:05 -04:00
gillespi314
bbc1891420
Add ability to see Google Chrome profiles on the Hosts page (#5839) 2022-05-23 14:27:30 -05:00
gillespi314
2db2c16511
Include MIA hosts under total count for Offline hosts (#5854) 2022-05-23 14:11:02 -05:00
Desmi-Dizney
fc3b887481
Editor pass - Include CVE scores when listing software (#5834)
* Editor pass - Include CVE scores when listing software

Editor pass for:
-  https://github.com/fleetdm/fleet/pull/5673

* Update REST-API.md
2022-05-23 10:22:58 -05:00
Michal Nicpon
983f9e59b3
Include CVE scores when listing software (#5673) 2022-05-20 10:58:40 -06:00
Desmi-Dizney
a5ae8dce0e
Editor pass (#5809)
Comma no longer fits our style guide.
2022-05-20 09:32:46 -04:00
gillespi314
8e333509b1
Add license object to GET /fleet/device/{token} response (#5820) 2022-05-19 16:28:49 -05:00
gillespi314
4a4e832d3a
Increase minimum password length to 12 characters (#5712) 2022-05-18 12:03:00 -05:00
Desmi-Dizney
c4962a2463
Editor pass - Add label information to host summary response (#5753)
* Editor pass - Add label information to host summary response

Editor pass for:
-  https://github.com/fleetdm/fleet/pull/5573

* Update issue-4738-host-summary
2022-05-18 10:52:29 -05:00
Luke Heath
c52604cfb7
Add policies to my device page (#5787) 2022-05-18 10:27:03 -05:00
Luke Heath
8eeeebb19f
Add more loading spinners to async actions (#5742) 2022-05-17 14:14:09 -05:00
Desmi-Dizney
34dccc7b16
Editor pass - Support async saving of hosts' last seen time (#5751)
Editor pass for:
-  https://github.com/fleetdm/fleet/pull/5640
2022-05-17 13:59:51 -05:00
Desmi-Dizney
a9c3b55db6
Editor pass - don't clear errors automatically when reading them from Redis (#5748)
This has been edited for content and copy.
2022-05-17 11:44:15 -04:00
Desmi-Dizney
a595ed8dca
Editor pass - Changes - issue-3399-last-used-column (#5763)
This has been edited for content and copy.
2022-05-17 09:56:37 -04:00
Desmi-Dizney
0346c1d392
Editor pass - Changes - issue-4738-host-summary (#5764)
This has been edited for content and copy.
2022-05-17 09:56:16 -04:00
Desmi-Dizney
a703ffeb15
Editor pass - Changes - issue-5103-export-hosts-csv-columns (#5765)
This has been edited for content and copy.
2022-05-17 09:55:55 -04:00
Desmi-Dizney
1bbdbd3a65
Editor pass - Changes - issue-5188-zendesk-ui-added (#5766)
This has been edited for content and copy.
2022-05-17 09:55:32 -04:00
Desmi-Dizney
26d1ae3a39
Editor pass - Changes - issue-5493-5497-safari-table-bugs (#5767)
This has been edited for content and copy.
2022-05-17 09:55:07 -04:00
Desmi-Dizney
698093a1bc
Editor pass - Changes - issue-5504-improve-debug-output (#5768)
This has been edited for content and copy.
2022-05-17 09:54:35 -04:00
Desmi-Dizney
376d10b4c1
Editor pass - Changes - issue-5536-async-host-last-seen (#5769)
This has been edited for content and copy.
2022-05-17 09:53:56 -04:00
Desmi-Dizney
1f5274d8de
Editor pass - Changes - issue-5536-configure-async-tasks-per-task (#5770)
This has been edited for content and copy.
2022-05-17 09:53:29 -04:00
Desmi-Dizney
8c79422a33
Editor pass - Changes - issue-5625-create-new-user-password (#5771)
This has been edited for content and copy.
2022-05-17 09:52:39 -04:00
Desmi-Dizney
42f47e5606
Editor pass - Changes - issue-use-local-system-user-on-msi (#5772)
This has been edited for content and copy.
2022-05-17 09:51:49 -04:00
Roberto Dip
a6a97f31cf
add documentation for debug tools (#5737)
This adds documentation about our debugging endpoints and a brief excerpt about the fleetctl debug command with instructions to generate the archive so we have a place with instructions to which we can direct people.

It also adds the .prof file extension to profiling files, which hopefully clarifies that they are meant to be used by go tool pprof.
2022-05-17 10:00:47 -03:00
Roberto Dip
32cc4c4641
allow fleetctl preview to work with docker compose v1 and v2 (#5755)
This adds compatibility in `fleetctl preview` to work with docker compose (version 2). Since this version was released this April, we are still keeping backwards compatibility and using docker-compose as a fallback.

As v2 is now the recommended version and v1 is deprecated, this also rewords all prompts and help messages to say "docker compose".

Rel: #5746
2022-05-16 18:06:29 -03:00
Martin Angers
e6b90ca8b9
Support per-task configuration for async host processing configuration (#5700) 2022-05-16 09:44:50 -04:00
Lucas Manuel Rodriguez
961f0ffc10
Use LocalSystem user instead of nt authority/system on MSI (#5729) 2022-05-13 06:42:40 -03:00
Luke Heath
a6b2d2413a
Add last used column to host details software table (#5681) 2022-05-12 11:34:46 -05:00
Luke Heath
9b857d0233
Set selection header width on tables, fix queries icon (#5703) 2022-05-12 09:23:06 -05:00
RachelElysia
34a2d3e483
UI Zendesk integrations (#5356) 2022-05-10 21:33:30 -05:00
Martin Angers
f05d2be767
Produce hosts' CSV report based on requested columns (#5656) 2022-05-10 14:25:53 -04:00
gillespi314
d172128183
Add label information to host summary response (#5573) 2022-05-10 10:32:55 -05:00
Martin Angers
1fa7bb7a19
Support async saving of hosts' last seen time (#5640) 2022-05-10 11:29:17 -04:00
Roberto Dip
cba78bdcd1
don't clear errors automatically when reading them from Redis (#5623)
this change prevents errors from being automatically cleared once they are read. A new flag `-flush` is introduced to flush errors on read if necessary.
2022-05-10 11:44:43 -03:00
Roberto Dip
33a482448b
improve messaging of fleetctl debug errors and archive commands (#5590)
Related to https://github.com/fleetdm/fleet/issues/5504, this change attempts to improve the output of the `fleetctl debug errors` command by:

- Adding a warning message to redact sensitive data
- Adding a `json` extension to the output file
- Allowing to stream the output to stdout via the `-stdout` flag or the `STDOUT` env var

The output after this changes is:

```
~/projects/fleet $ ./build/fleetctl debug errors
################################################################################
# WARNING:
#   The generated file may contain sensitive data.
#   Please review the file before sharing.
#
#   Output written to: fleet-errors-2022-05-05T12:46:42-03:00.json
################################################################################
```

It also modifies the output of `fleetctl debug archive`

```
################################################################################
# WARNING:
#   The files in the generated archive may contain sensitive data.
#   Please review them before sharing.
#
#   Archive written to: fleet-profiles-archive-2022-05-05T12:46:59-03:00.tar.gz
################################################################################
```
2022-05-10 10:44:06 -03:00
Noah Talerman
12b1a159b5
Prepare for 4.14.0 (#5589)
* Add changelog and bump versions

* Update changelog

* Bump version in example Kubernetes YAML

* Add last_opened_at entry to changelog
2022-05-09 18:14:01 -03:00
RachelElysia
e3c0e2d3b5
Fix password reset redux auth token issue (#5630)
Co-authored by: Sarah Gillespie <sarahgillespi314@gmail.com>
2022-05-09 10:16:35 -05:00
RachelElysia
55d2cf1f10
Integrations Page: Remove edit integration from UI, Render duplicate error message, Unique integration naming convention (#5577) 2022-05-06 12:31:11 -04:00
RachelElysia
36feff8456
App Settings Page: fix checkbox/dropdown validations (#5602) 2022-05-06 08:41:39 -04:00
RachelElysia
974d1fed42
Create integration UI: FE validation for https protocol (#5586) 2022-05-05 17:08:18 -04:00