Commit Graph

9935 Commits

Author SHA1 Message Date
Tim Lee
e981b7be84
hotfix: fix return codes on enterprise tests (#15578) 2023-12-12 07:58:47 -07:00
Mike Thomas
b33a579c4f
Website fleet mdm landpage update (#15549)
- Updated device management content
- Add new images
- Removed the "ClickOps or DevOps" section from the home page

---------

Co-authored-by: Eric <eashaw@sailsjs.com>
2023-12-12 15:08:58 +09:00
Eric
bc3ace02b4
Website: Update macOS link on /try-fleet (#15573)
Changes:
- Updated the link to the macOS host on /try-fleet/explore-data to go to
results for the `account_policy_data` table.
2023-12-11 15:53:25 -06:00
Eric
2db26cd44e
Website: Add "Explore data" (#15400)
Closes: #14847

Changes:
- Added two new pages:
- `/try-fleet/explore-data`: A page where users can select a host, and
be taken to a page where they can see query results for that host.
- `try-fleet/explore-data/:platformName/:tableName`: A page where users
can see the contents of osquery tables on hosts.
     - The view-action for this page will:
- Redirect unauthenticated users to the /try-fleet/login page. (With a
query parameter that will tell the login/register pages to redirect
users back to this page)
        - Get information for hosts on a specified team.
- Build a filtered list of osquery tables that are compatible with the
host and have queries that will run on a specified host.
- Get the latest query results for a specified query/osquery table for
the specified host, and reorder the results to match the order of the
columns in the osquery schema.
- Updated build-static-content to add information about osquery tables
for the /explore-data pages to
`sails.config.builtStaticContent.osqueryTables`.
- Added 5 new config variables:
- `sails.config.custom.fleetBaseUrlForQueryReports`: The URL of the
Fleet instance used for the /explore-data pages
- `sails.config.custom.fleetTokenForQueryReports`: An API token for the
Fleet instance used for the /explore-data pages
- `sails.config.custom.teamApidForQueryReports`: the API ID of the team
that the hosts listed on the explore-data page are in.
- `sails.config.custom.queryIdsByTableName`: A dictionary containing
key:value pairs where each key is the name of an osquery table, and the
value is the API ID of the query that gets results for this table in a
Fleet instance. This is stored in the custom configuration to make it
easily editable (If we ever need to add or remove queries
- `sails.config.custom.hostIdsByHostPlatform`: A dictionary containing
key:value pairs where each key is a type of operating system, and the
value is the API ID of a Host.
- Updated the `/try-fleet` redirect to go to `/try-fleet/explore-data`
- Updated the "try it out" button links to go to `/try-fleet`
- Updated /try-fleet/login and /try-fleet/register to send users who are
redirected to the page via the /explore-data page to the page they had
tried to navigate to when they log in/create an account.


I'm creating this as a PR as a draft. It will be ready to merge when we:
- [x] Add hosts to the "Explore data (fleetdm.com) [DO NOT DELETE]" team
- [x] Create queries for every compatible osquery table for the "Explore
data (fleetdm.com) [DO NOT DELETE]" team.
- [ ] Add a `sails.config.custom.queryIdsByTableName` config variable
with the query IDs for the queries created in the previous step
- [ ] Add `sails.config.custom.hostIdsByHostPlatform` config variable
with the real host IDs/platforms
2023-12-11 15:29:30 -06:00
Andrew Baker
08b9f58c68
Drew bakerfdm podcast episode 7 (#15568) 2023-12-11 16:24:40 -05:00
Luke Heath
ccea52897a
Add new open/close bugs and product group KPIs (#15554) 2023-12-11 14:38:51 -06:00
Luke Heath
b6ec1f7786
Enforce codecov requirements (#13931) 2023-12-11 13:23:42 -06:00
Sharon Katz
da755ea2ea
Bug-15430 change timeout errror code to 408 (#15552) 2023-12-11 12:34:59 -05:00
Victor Lyuboslavsky
9236a19342
Changed query performance statistics to uint64 to match osquery reports. (#15505)
#15472

# Checklist for submitter
- [x] Changes file added for user-visible changes in `changes/` or
`orbit/changes/`.
- [x] Added/updated tests
- [x] Manual QA for all new/changed functionality
2023-12-11 11:29:17 -06:00
Noah Talerman
883652cac6
Update setup instructions for macOS MDM (#15518)
- Clarify instructions
- Add bold text style to UI elements
2023-12-11 10:02:50 -05:00
Victor Lyuboslavsky
eb155d17d3
Reducing the number of fleetd calls to fleet/orbit/config endpoint. (#15545)
Reducing the number of fleetd calls to fleet/orbit/config endpoint by
caching the config for 3 seconds.
#15541

# Checklist for submitter
- [x] Changes file added for user-visible changes in `changes/` or
`orbit/changes/`.
- [x] Added/updated tests
- [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)).
2023-12-11 07:04:24 -06:00
Victor Lyuboslavsky
a99bf1563e
Fixing fleetd to NOT make unnecessary duplicate call to orbit/device_token endpoint. (#15543)
Fixing fleetd to NOT make unnecessary duplicate call to
orbit/device_token endpoint.
#15539 

# 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.
- [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)).
2023-12-10 17:00:24 -06:00
Mike McNeil
ba52e131c3
Handbook: Program the CEO to do something (#15546) 2023-12-10 15:24:39 -06:00
Mike McNeil
96b8a7d265
Handbook: Update ceo.md: Clear double-bookings (#15544)
https://github.com/fleetdm/confidential/issues/4692
2023-12-10 14:55:50 -06:00
Rachael Shaw
832f7fd8b6
API changes for confidential/#2118 (#15092)
API changes for https://github.com/fleetdm/confidential/issues/2118

---------

Co-authored-by: Victor Lyuboslavsky <victor.lyuboslavsky@gmail.com>
2023-12-08 17:12:24 -06:00
Eric
cda91571b8
2023-12-06 Regenerate osquery_fleet_schema.json (#15474)
Changes:
- Ran the `update-merged-schema` script to regenerate
`schema/osquery_fleet_schema.json`
2023-12-08 17:00:12 -06:00
Roberto Dip
8957078d75
Add backoff functionality for fleetd updates (#15489)
related to #14176, `fleetd` will now retry 3 times and wait 24 hours to
try again for an specific update.
2023-12-08 19:43:56 -03:00
Rachael Shaw
3d14cc841d
REST API docs: Consistent URL parameter formatting (#15535)
Makes parameter formatting in documented REST API paths consistent.
Previously, we were using a mix of `/foo/:parameter/bar` and
`/foo/{parameter}/bar`. This updates all URLs to use `:` instead of
`{…}`.

Also, opportunistically fixed some other inconsistent formatting I
noticed in a couple places.
2023-12-08 16:22:20 -06:00
Roberto Dip
1a526aa19f
update documentation with expected response (#15527)
for  #13251
2023-12-08 18:56:58 -03:00
Mike McNeil
7422aedef5
Handbook: CEO: fix google drive folder link (#15533) 2023-12-08 15:12:24 -06:00
Luke Heath
300d318437
Cleaning up releasing Fleet docs (#15523) 2023-12-08 15:05:07 -06:00
Roberto Dip
e24070b33a
adjust the loadtesting docs (#15526)
minor changes after running a loadtest
2023-12-08 16:15:18 -03:00
Luke Heath
689e4c8237
Clarifying drafting process (#15471)
Co-authored-by: Noah Talerman <47070608+noahtalerman@users.noreply.github.com>
2023-12-08 11:58:17 -06:00
Noah Talerman
5bffc485ad
Update product maintenance ritual (#15517)
- Update section header so that links in stubs section works
- Remove fluffy content
2023-12-08 11:57:11 -06:00
Luke Heath
ff45facd81
Update releasing Fleet documentation (#15506) 2023-12-08 10:29:30 -06:00
Jahziel Villasana-Espinoza
66939494f2
fix: validate agent platform options (#15482)
# 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.
- [x] Added/updated tests
- [x] Manual QA for all new/changed functionality
2023-12-08 10:20:31 -05:00
Marko Lisica
6e1dfca816
Removing duplicated "Command line flags" section (#15514) 2023-12-08 16:10:30 +01:00
Mike Thomas
31e67433fd
style fixes (#15512)
fixed up some spacing issues.
2023-12-08 16:32:47 +09:00
Eric
c5fb96bf57
Website: Update vulnerability management page (#15510)
Closes: #14083

Changes:
- Updated the content and layout of the `/vulnerability-management` page
to match the latest wireframes
2023-12-08 09:47:49 +09:00
Benjamin Edwards
eb7f838125
firehose addon module updates (#15439) 2023-12-07 19:24:03 -05:00
Sarah Gillespie
685353be61
Update UI include MDM IdP device mapping (#15509) 2023-12-07 18:16:15 -06:00
Sarah Gillespie
0e468b4981
Update software titles cron to include browser field (#15491) 2023-12-07 17:43:37 -06:00
Luke Heath
3dc40d667e
Prepare v4.41.1 (#15500) 2023-12-07 16:06:17 -06:00
Mike McNeil
8609ed123d
Handbook: Update org chart description (#15503) 2023-12-07 14:53:16 -06:00
Noah Talerman
d22e5f2bfa
Update password policy configuration profile (#15468)
- Update password policy from 11 characters to 10.
2023-12-07 15:18:20 -05:00
Tim Lee
3ba81e1cf6
15146 filter query results (#15473) 2023-12-07 11:24:56 -08:00
Noah Talerman
f6d8bcc732
Docs for Windows MDM commands (#15371)
- Update "Commands" doc page to cover Windows MDM commands
- Remove more doc content than added
2023-12-07 14:08:04 -05:00
Sarah Gillespie
88e8eee1fe
Add backend capability to look up hosts based on MDM IdP email (#15478)
Issue #13034 

TODO: Frontend requirements will be covered in a separate PR.

# 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/`.
- [x] Added support on fleet's osquery simulator `cmd/osquery-perf` for
new osquery data ingestion features.
- [x] Added/updated tests
- [x] Manual QA for all new/changed functionality
2023-12-07 12:36:32 -06:00
Martin Angers
8b7d1a7e47
Remove Windows MDM feature flag (#15167)
For #14959 

---------

Co-authored-by: Gabriel Hernandez <ghernandez345@gmail.com>
2023-12-07 14:24:32 -03:00
Eric
f4e7789e35
Website: Update how meta tags are parsed in build-static-content script (#15481)
Changes:
- Updated `build-static-content` to parse `<meta>` tags from HTML
generated from a Markdown file, instead of the Markdown file. Parsing
them after the Markdown is converted to HTML will prevent any `<meta>`
tags inside code blocks from being seen as a `<meta>` tag containing
information about the page because angle brackets inside code blocks are
changed into HTML entities (`&lt;` & `&gt;`) when the Markdown is
converted to HTML.
2023-12-07 11:03:29 -06:00
Eric
8992437cd9
Website: Update Vanta integration script to report extension_id if it is included in an API response (#15469)
https://github.com/fleetdm/confidential/issues/2118

Changes:
- Updated the send-data-to-vanta script to report the `extension_id` of
browser extensions installed on a host if the API response from the
Fleet instance includes that value.
2023-12-07 11:02:56 -06:00
Lucas Manuel Rodriguez
fb3d5f85bd
Results for queries in 2017-packs should always log (#15486)
#15168

- [X] Added/updated tests
- [X] Manual QA for all new/changed functionality
2023-12-07 13:05:59 -03:00
Marko Lisica
95a7e7f8fa
Scripts docs typo - broken link (#15485)
# 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.
- [ ] Documented any permissions changes (docs/Using
Fleet/manage-access.md)
- [ ] 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
- [ ] 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)).
2023-12-07 17:05:40 +01:00
Lucas Manuel Rodriguez
608038a1bb
Fix deadlock when deleting software during data ingestion (#15459)
This fixes the deadlock reported in #14779.

We found a deadlock in software ingestion during load tests performed in
October:
```
2023-10-26T17:20:41.719627Z 0 [Note] [MY-012468] [InnoDB] Transactions deadlock detected, dumping detailed information. (lock0lock.cc:6482)
2023-10-26T17:20:41.719661Z 0 [Note] [MY-012469] [InnoDB]  *** (1) TRANSACTION:  (lock0lock.cc:6496)
TRANSACTION 3069866646, ACTIVE 0 sec starting index read
mysql tables in use 2, locked 2
LOCK WAIT 8 lock struct(s), heap size 1136, 18 row lock(s), undo log entries 10
MySQL thread id 95, OS thread handle 70431326097136, query id 340045 10.12.3.105 fleet executing
DELETE FROM software WHERE id IN (165, 79, 344, 47, 212, 21, 60, 127, 173, 145) AND
        NOT EXISTS (
                SELECT 1 FROM host_software hsw WHERE hsw.software_id = software.id
        )
2023-10-26T17:20:41.719700Z 0 [Note] [MY-012469] [InnoDB]  *** (1) HOLDS THE LOCK(S):  (lock0lock.cc:6496)
RECORD LOCKS space id 932 page no 8 n bits 256 index PRIMARY of table `fleet`.`software` trx id 3069866646 lock_mode X locks rec but not gap
Record lock, heap no 22 PHYSICAL RECORD: n_fields 11; compact format; info bits 0
 0: len 8; hex 0000000000000015; asc         ;;
 1: len 6; hex 0000a74c4a7c; asc    LJ|;;
 2: len 7; hex 82000000d00264; asc       d;;
 3: len 26; hex 616e74692d76697275735f666f725f736f70686f735f686f6d65; asc anti-virus_for_sophos_home;;
 4: len 5; hex 322e322e36; asc 2.2.6;;
 5: len 4; hex 61707073; asc apps;;
 6: len 0; hex ; asc ;;
 7: len 0; hex ; asc ;;
 8: len 0; hex ; asc ;;
 9: len 0; hex ; asc ;;
 10: len 0; hex ; asc ;;

Record lock, heap no 48 PHYSICAL RECORD: n_fields 11; compact format; info bits 0
 0: len 8; hex 000000000000002f; asc        /;;
 1: len 6; hex 0000a74c4aad; asc    LJ ;;
 2: len 7; hex 81000000e30220; asc        ;;
 3: len 10; hex 7265616c706c61796572; asc realplayer;;
 4: len 11; hex 31322e302e312e31373338; asc 12.0.1.1738;;
 5: len 4; hex 61707073; asc apps;;
6: len 0; hex ; asc ;;
 7: len 0; hex ; asc ;;
 8: len 0; hex ; asc ;;
 9: len 0; hex ; asc ;;
 10: len 0; hex ; asc ;;

Record lock, heap no 61 PHYSICAL RECORD: n_fields 11; compact format; info bits 0
 0: len 8; hex 000000000000003c; asc        <;;
 1: len 6; hex 0000a74c4afb; asc    LJ ;;
 2: len 7; hex 820000017501ba; asc     u  ;;
 3: len 7; hex 636f6e6e656374; asc connect;;
 4: len 5; hex 332e322e37; asc 3.2.7;;
 5: len 4; hex 61707073; asc apps;;
 6: len 0; hex ; asc ;;
 7: len 0; hex ; asc ;;
 8: len 0; hex ; asc ;;
 9: len 0; hex ; asc ;;
 10: len 0; hex ; asc ;;

Record lock, heap no 80 PHYSICAL RECORD: n_fields 11; compact format; info bits 0
 0: len 8; hex 000000000000004f; asc        O;;
 1: len 6; hex 0000a74c4b32; asc    LK2;;
 2: len 7; hex 820000008a01cb; asc        ;;
 3: len 7; hex 68697063686174; asc hipchat;;
 4: len 4; hex 342e3330; asc 4.30;;
 5: len 4; hex 61707073; asc apps;;
 6: len 0; hex ; asc ;;
 7: len 0; hex ; asc ;;
 8: len 0; hex ; asc ;;
 9: len 0; hex ; asc ;;
 10: len 0; hex ; asc ;;

2023-10-26T17:20:41.720564Z 0 [Note] [MY-012469] [InnoDB]  *** (1) WAITING FOR THIS LOCK TO BE GRANTED:  (lock0lock.cc:6496)
RECORD LOCKS space id 695 page no 5994 n bits 1000 index host_software_software_id_fk of table `fleet`.`host_software` trx id 3069866646 lock mode S waiting
Record lock, heap no 31 PHYSICAL RECORD: n_fields 2; compact format; info bits 32
 0: len 8; hex 000000000000004f; asc        O;;
 1: len 4; hex 0000000c; asc     ;;

2023-10-26T17:20:41.720650Z 0 [Note] [MY-012469] [InnoDB]  *** (2) TRANSACTION:  (lock0lock.cc:6496)
TRANSACTION 3069866680, ACTIVE 0 sec starting index read
mysql tables in use 2, locked 2
LOCK WAIT 7 lock struct(s), heap size 1136, 12 row lock(s), undo log entries 8
MySQL thread id 98, OS thread handle 70375801900784, query id 340524 10.12.3.9 fleet executing
DELETE FROM software WHERE id IN (49, 113, 183, 187, 223, 79, 81, 116) AND
        NOT EXISTS (
                SELECT 1 FROM host_software hsw WHERE hsw.software_id = software.id
        )
2023-10-26T17:20:41.720682Z 0 [Note] [MY-012469] [InnoDB]  *** (2) HOLDS THE LOCK(S):  (lock0lock.cc:6496)
RECORD LOCKS space id 695 page no 5994 n bits 1000 index host_software_software_id_fk of table `fleet`.`host_software` trx id 3069866680 lock_mode X locks rec but not gap
Record lock, heap no 31 PHYSICAL RECORD: n_fields 2; compact format; info bits 32
 0: len 8; hex 000000000000004f; asc        O;;
 1: len 4; hex 0000000c; asc     ;;

2023-10-26T17:20:41.720760Z 0 [Note] [MY-012469] [InnoDB]  *** (2) WAITING FOR THIS LOCK TO BE GRANTED:  (lock0lock.cc:6496)
RECORD LOCKS space id 932 page no 8 n bits 256 index PRIMARY of table `fleet`.`software` trx id 3069866680 lock_mode X locks rec but not gap waiting
Record lock, heap no 80 PHYSICAL RECORD: n_fields 11; compact format; info bits 0
 0: len 8; hex 000000000000004f; asc        O;;
 1: len 6; hex 0000a74c4b32; asc    LK2;;
 2: len 7; hex 820000008a01cb; asc        ;;
 3: len 7; hex 68697063686174; asc hipchat;;
 4: len 4; hex 342e3330; asc 4.30;;
 5: len 4; hex 61707073; asc apps;;
 6: len 0; hex ; asc ;;
 7: len 0; hex ; asc ;;
 8: len 0; hex ; asc ;;
 9: len 0; hex ; asc ;;
 10: len 0; hex ; asc ;;

2023-10-26T17:20:41.720984Z 0 [Note] [MY-012469] [InnoDB] *** WE ROLL BACK TRANSACTION (2)  (lock0lock.cc:6496)
```

I was able to reproduce this issue on `main` with the added test. The
solution is to remove the deletion (cleanup) of `software` to a separate
transaction after the main transaction is done.

- [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
2023-12-07 09:34:53 -03:00
Mike Thomas
ac2bca4c7e
Update vuln managent description on homepage.ejs (#15480)
Updated the vuln management description on homepage.ejs

# Checklist for submitter

- [x] Manual QA for all new/changed functionality
2023-12-07 08:50:43 +09:00
Eric
ce56f1f6bc
Website: Upgrade website dependencies (#15477)
Closes: https://github.com/fleetdm/confidential/issues/4115

Changes:
- Updated three packages used by the Fleet website:
   - sails-hook-organics: ^2.2.0 » ^2.2.2
   - sails-hook-sockets: ^2.0.1 » ^3.0.0
   - @sailshq/socket.io-redis: ^5.2.0 » ^6.1.2
2023-12-06 17:28:06 -06:00
Martin Angers
e3d225ade7
Update fleetctl get software to list titles and versions. (#15444) 2023-12-06 16:07:03 -05:00
Martin Angers
6b128dd455
Allow filtering hosts by software_version_id and software_title_id. (#15433) 2023-12-06 14:59:00 -05:00
Jahziel Villasana-Espinoza
5fd799ff2e
feat: device health endpoint (#15432)
> #14920 

# 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.
- [x] Documented any permissions changes (docs/Using
Fleet/manage-access.md)
- [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
2023-12-06 14:42:29 -05:00
Martin Angers
fb01e30f27
Require a custom Clone for cacheable items, add tooling and CI check to help catch issues (#15458) 2023-12-06 14:34:22 -05:00