Commit Graph

407 Commits

Author SHA1 Message Date
RachelElysia
0f8e3d063b
Manage Host Page: Reintroduce add host modal (#2681)
Reverts #2493 - Generate Installer Modal built within that PR
2021-10-26 16:24:50 -04:00
Martavis Parker
9f804e1858
New card for preview self host policies (#2666) 2021-10-26 14:47:34 -05:00
Tomas Touceda
79f2c7c391
Issue 1798 rest api for live queries (#2675)
* wip

* wip

* Make tests not flaky

* Add changes file

* Make logging and authz thread safe

* Move cancel defer below err check
2021-10-26 11:33:31 -03:00
Luke Heath
b12c7ab925
Add UI for team admin role (#2637) 2021-10-26 09:24:16 -05:00
Lucas Manuel Rodriguez
3136cc105e
Replace into software to update empty bundle_identifier entries (#2676) 2021-10-26 09:48:25 -03:00
Lucas Manuel Rodriguez
fb1e78d039
Make /refetch run labels and policies for the host (#2651)
* Make /refetch run labels and policies for the host

* PR rework changes
2021-10-25 15:46:49 -03:00
gillespi314
cab1099890
Surface query-platform compatibility in FleetUI (#2640)
- Add functionality to parse sql for platform compatibility based on osquery tables
- Surface query-platform compatibility in create/edit query form
- Surface query-platform compatibility as new column in manage queries table
- Add filter-by-platform feature to manage queries table
- Refactor manage queries page to useQuery and useContext patterns
2021-10-25 13:00:32 -05:00
RachelElysia
fdfabf9e32
Packs UI: Create pack navigates to pack's edit page (#2581) 2021-10-25 09:43:52 -04:00
m4wh6k
bb5e5d08f5
Update Orbit README to reflect packaging now done with fleetctl (#2626) 2021-10-24 17:57:08 -07:00
gillespi314
6c58159fb8
Change default org name for fleet preview (#2642) 2021-10-22 17:35:01 -05:00
RachelElysia
36babcc510
UI feature: Frontend of performance impact bubbles (#2589)
Includes backend fixes and test
Co-authored-by: Tomas Touceda <chiiph@gmail.com>
2021-10-22 16:05:49 -04:00
Lucas Manuel Rodriguez
54805b5b72
Perform early session check on fleetctl commands (#2620)
* Perform early session check on fleetctl

* Add fleetctl test for the early session check
2021-10-22 15:41:17 -03:00
Zach Wasserman
03b81245ee
Update files for 4.4.3 release (#2636) 2021-10-22 09:41:50 -07:00
RachelElysia
03d5de364d
Fix subsequent delete checkbox state (#2587) 2021-10-22 11:19:34 -04:00
Lucas Manuel Rodriguez
c84cbb1679
Fix SearchHosts to match for one-char and two-chars queries (#2590)
* Fix SearchHosts to match for one-char and two-chars queries

* Add issue number for future reference
2021-10-21 17:46:21 -03:00
Lucas Manuel Rodriguez
91ae5ba870
By default, force password reset on CreateUser (#2570)
* By default, force password reset on CreateUser

* Use ptr.Bool and add test

* Add changes file

* Simple fix for e2e tests

* Add API changes
2021-10-21 15:00:38 -03:00
Zach Wasserman
35523017c9
Make migrations compatible with GTID replication (#2615)
* Make migrations compatible with GTID replication

Fixes an issue some deployments encountered when migrations used a
statement that is unsupported in GTID replication mode (#2462).

Local dev MySQL now enforces this consistency, so it should be easier to
maintain compatibility going forward.

* Update docker-compose formatting

* if exists
2021-10-21 07:46:02 -03:00
m4wh6k
b856f351b0
Fix broken link on QueriesListWrapper and in docs to std query lib docs (#2614) 2021-10-20 16:53:01 -07:00
Zach Wasserman
42c7933b22
Add WiX Dockerfile and update image name (#2548)
Use a different base image and newer version of Wine to try to mitigate
crashes experienced by users in #2527.
2021-10-20 15:30:46 -07:00
Tomas Touceda
c2696c1261
Issue 1892 query perf everywhere (#2580)
* wip

* wip

* wip

* Add performance stats

* Add docs and other self review fixes

* lint

* Update based on review comments

* Add quick cleanup first and then reset to 1hr

* Reduce the load in the test
2021-10-20 18:35:38 -03:00
Tomas Touceda
cbe931c0e9
Add vulnerable filter for software and also wire up the query search (#2604)
* Add vulnerable filter for software and also wire up the query search

* Add documentation

* Update to use software list options
2021-10-20 18:01:20 -03:00
Tomas Touceda
86b1926d7c
Add missing join condition (#2586) 2021-10-20 13:24:51 -03:00
Martin Angers
07cf136d03
Add TLS support to Redis connections (#2568) 2021-10-20 10:09:18 -04:00
RachelElysia
34510ed144
Host Details Page: Resolve policy issues (#2571) 2021-10-19 19:18:02 -04:00
Martavis Parker
1dfe37accc
Automatically log in preview user (#2578)
* automatically logging in preview user

* fixed url check

* simplified logic
2021-10-19 14:23:40 -07:00
Tomas Touceda
fe5660e006
Reimplement host expiration to not need mysql events (#2552)
* Reimplement host expiration to not need mysql events

* Update mocks
2021-10-19 17:47:37 -03:00
Martin Angers
a7420140ce
Use a redis cluster-friendly store for rate limit (#2577) 2021-10-19 16:24:13 -04:00
RachelElysia
61e0f37cc6
Manage Host Page: Host issues column with tooltip icon (#2554) 2021-10-19 14:15:48 -04:00
Martavis Parker
5be54a72cf
Teams and Software for Homepage (#2567)
* added global teams dropdown

* added teams dropdown

* created tabs wrapper component

* comment out software table for now

* lint fixes

* added changes file

* removed test data

* fixed permissions

* fixed scroll behavior for test with sticky header

* lint fixes
2021-10-19 11:13:18 -07:00
gillespi314
974485e639
Add ability to refresh host vitals without page reload (#2559)
* Implement useQuery refetch for host details
* Disable useQuery auto refetch options
* Change refetch message
* Refactor software table
* Refactor users and software states to useQuery
2021-10-19 11:52:57 -05:00
RachelElysia
ce8a8e371a
Team Settings: Edit team modal can hit enter to save team name (#2555) 2021-10-19 10:38:42 -04:00
RachelElysia
57150fde6c
Host Details Page: Paginate user and software tables (#2464) 2021-10-18 15:14:24 -04:00
Luke Heath
fb6d83ea05
Add policies table to host details page (#2547) 2021-10-18 13:29:48 -05:00
RachelElysia
fda757a700
Dashboard: Fix activity feed verbage (#2540) 2021-10-18 13:44:13 -04:00
RachelElysia
d58d9507b8
Bug Fix: Loading veil (#2538) 2021-10-18 13:42:54 -04:00
gillespi314
8c6ca606c3
Add new UI feature: Filter hosts by software version (#2541)
* Add new UI feature: filter hosts by software version
* Move specific CVE information to appear alongside aggregate hosts filtered by software version
rather than on individual host details page
* Relocate users table to below software inventory on host details page
2021-10-18 10:01:01 -05:00
Martavis Parker
5f4541be30
New layout for home page with cards (#2524)
* renamed spinner

* removed redux

* new layout

* changes; default view until more info is added

* fixed page background

* added activities pagination

* lint fix
2021-10-18 06:36:43 -07:00
Martin Angers
057d4e8b2e
Add configuration and support for Redis to read from replicas (#2509) 2021-10-18 09:32:17 -04:00
RachelElysia
cc40bf132d
Manage Host Page: No host renders generate installer modal (#2493)
* Update Context API to contain enrollSecret
* Update e2e tests with generate installer modal
* Edge case with empty Team showing Generate Installer CTA
2021-10-15 09:40:42 -04:00
Tomas Touceda
89c6d18ed2
Issue 2293 reveal failing policies list host (#2528)
* Add host issues

* Update docs

* Remove comment

* Update tests
2021-10-15 07:34:30 -03:00
Tomas Touceda
d3a0d62902
Issue 2456 policies yaml (#2512)
* wip

* Add policy specs support

* Add documentation

* Make policy apply idempotent

* Fold in code

* Improve tests and simplify auth checks

* Lint and fix test
2021-10-15 07:34:11 -03:00
Zach Wasserman
a6e8f22d83
Update changelog and configs for patch releases (#2531) 2021-10-14 18:17:47 -07:00
RachelElysia
5ba22347ff
App Settings Page: Fix buggy anchor links (#2479) 2021-10-14 16:43:30 -04:00
RachelElysia
67645f327b
Manage Host Page: Add tooltip to search (#2475) 2021-10-14 11:11:53 -04:00
Zach Wasserman
4d6956b6cb
Remove usage of temporary table in migration (#2515)
Temporary tables were causing migration issues under some MySQL
configurations as discussed in #2462.
2021-10-13 16:25:08 -07:00
Luke Heath
6cda48220d
Fix hosts table search and pagination (#2494) 2021-10-13 13:36:17 -05:00
Tomas Touceda
0510075398
Issue 2134 add team admin role (#2499)
* wip

* Add team admin role and tests

* Revert change in invites

* Update permission doc

* Fix lint
2021-10-13 12:34:59 -03:00
RachelElysia
3ca3b1c823
Manage Host Page (Bug fix): Transfer and delete hosts updates total host count (#2501)
* refetchHosts includes retrieveHosts and retrieveHostCount
2021-10-13 11:30:01 -04:00
Luke Heath
b3e492d10b
Fix pixelated border around default avatar (#2482) 2021-10-12 19:56:40 -05:00
Martavis Parker
688a9f01d5
E2E Test fixes (#2491)
* fixed flow for resetting current session

* ignoring downloads for windows because paths

* using correct shell for windows

* using correct shell for windows

* ignoring exception; we can't fake react context

* changes file

* must wait for flash to show

* lint fixes

* re-added secure package
2021-10-12 14:33:56 -07:00
Benjamin Edwards
16c5823692
add support for minio backend file carving (#2448)
* add support for minio backend file carving
* add changes file
Co-authored-by: Zach Wasserman <zach@fleetdm.com>
2021-10-12 15:32:06 -04:00
Tomas Touceda
28be73c410
Add missing software in list hosts response (#2492) 2021-10-12 15:59:01 -03:00
Tomas Touceda
782f276e0b
Issue 2050 add software filter list hosts (#2486)
* Add software_id filter to list hosts

* Add integration test for API endpoint

* Add doc

* Simplify sql query
2021-10-12 11:38:12 -03:00
Martin Angers
dcf701ef2b
Support fleetctl preview from a branch, default to production (#2476) 2021-10-12 10:20:28 -04:00
RachelElysia
ded8feea56
Host Details Page: Relocate host details page header and buttons (#2447) 2021-10-11 14:59:43 -04:00
RachelElysia
2000b1b263
Manage Host Page: Custom host count based on filters, labels, etc (#2377)
* Host count includes label id parameter
* Remove page and pageSize from hostCountAPI call
* Only retrieve hostCount on filter change
2021-10-11 13:27:14 -04:00
gillespi314
39da3fd84d
Fix display value for policy update interval (#2468) 2021-10-11 10:13:10 -05:00
gillespi314
daa8a5d31a
Fix title of manage hosts page UI for free version (#2467) 2021-10-11 10:11:54 -05:00
RachelElysia
981028705e
Sentence Case: Throughout UI, tests, validators, docs (#2455) 2021-10-11 10:58:27 -04:00
Tomas Touceda
0fd569ebaf
Move migrations around and add missing column only if not available (#2461)
* Move migrations around and add missing column only if not available

* Add changes file

* Remove debug print

* Remove wrong import
2021-10-08 15:41:52 -03:00
Tomas Touceda
e08fcb949b
Fix logging of errors in kitlog (#2427)
* Fix logging of errors in kitlog

* Update error messages
2021-10-07 18:15:40 -03:00
Martin Angers
3aef96e15c
Add test for fleetctl preview (#2388)
* Start a fleetctl preview test

* Add tests for fleetctl preview

* Fix setting of fleetctl auth token in test

* Add fleet instance vulnerabilities config to response of GetAppConfig

* Add checks that fleetctl preview enables vulnerability detection

* Adjust doc for get config API response

* Add the include-server-config flag to fleetctl get config

* Update test now that some of the PRs have been merged

Co-authored-by: Tomas Touceda <chiiph@gmail.com>
2021-10-07 10:19:10 -03:00
Martin Angers
9a36fce082
Enable vulnerability detection in fleetctl preview (#2376) 2021-10-07 09:02:49 -03:00
Martin Angers
e4dae5f3d1
Disable anonymous analytics collection for fleetctl preview (#2372)
* Disable anonymous analytics collection for fleetctl preview

* Force run checks
2021-10-07 09:01:51 -03:00
Tomas Touceda
876aa0e366
Add host count API (#2356)
* Add host count API

* Add rest api docs

* Add host count for labels and address review comments

* Add regex for id
2021-10-07 08:25:35 -03:00
Tomas Touceda
9b809a2d35
Issue 1890 host details policy (#2410)
* wip

* Add policies to hosts
2021-10-07 08:11:10 -03:00
Zach Wasserman
e61dc765fd
Prepare for 4.4.0 release (#2423) 2021-10-06 14:14:12 -07:00
RachelElysia
ea3f0f127f
Manage Host Page: Spiffier icons for filter status/policy button/dropdowns (#2379) 2021-10-06 10:54:15 -04:00
Tomas Touceda
1af3803cdb
Load all host values from the db to prevent overwriting columns with empty vals (#2394) 2021-10-06 09:27:53 -03:00
Martavis Parker
d7cbcdfb40
Fixed query editor horizontal scroll (#2378)
* much better solution to backspace problem

* fixed query horiztonal scrolling

* changes file
2021-10-05 12:56:47 -07:00
Tomas Touceda
70cf7aa0a0
Delete policies for hosts in teams before transferring them (#2383)
* Delete policies for hosts in teams before transferring them

* Add missing error check
2021-10-05 15:48:26 -03:00
Tomas Touceda
ddc6b300d4
Allow team maintainers to delete hosts from their teams (#2373) 2021-10-05 15:15:05 -03:00
Zach Wasserman
a2e9b539a1
Optimize policy_updated_at migration (#2362)
- Use `TRUNCATE TABLE` rather than `DELETE FROM` for improved performance.
- Move DDL statement after truncate to avoid issues with retries (due to
  column already being created).

#2360
2021-10-05 09:24:03 -07:00
Martavis Parker
53f82b8e28
Fixed scroll position across the app (#2375)
* fixed scroll across the app

* changes file
2021-10-05 09:04:24 -07:00
Martavis Parker
b1d4b26cfa
Fixed backspace cursor position (#2365)
* fixed backspace cursor position

* changes file

* removed comment
2021-10-04 17:26:21 -07:00
RachelElysia
8fa009a93e
Manage Host Page: Delete multiple hosts (#2327)
* Delete multiple hosts with delete host modal
* Free tier admin/maintainers access to select checkboxes and bulk delete
2021-10-04 16:20:56 -04:00
Tomas Touceda
28c3e64e41
Expose additional queries in fleetctl get hosts (#2349) 2021-10-04 15:18:02 -03:00
Zach Wasserman
55aa8c702e
Use new home dashboard (#2212)
Adapted from @RachelElysia's original #1640.
2021-10-03 11:15:58 -07:00
Tomas Touceda
2df4389aa0
Ignore empty host users or software inventory (#2317)
* Ignore empty host users or software inventory

* Only store additional if it's not nil

* Update label/policy updated at when we record the executions and skip saving host

* Update changes file
2021-10-01 18:27:57 -03:00
Zach Wasserman
980a853e3c
Update changelog for 4.3.2 release (#2276) 2021-09-30 15:23:22 -07:00
Martavis Parker
b6659cfaaa
Refactored Manage Hosts (#2233)
* Add new feature: team policies

* Continue work on team policies

* Continue work on team policies

* Continue team policies

* Revert accidental deletion

* Rename variables

* code refactored; working on runtime errors

* updated front end docs

* Update URLs from team to teams, add tests for policy auth

* Fix test

* Continue work on team policies

* Add permission checks

* mange hosts functional and cleaned up; typing

* improved label logic

* added try catch to awaits

* lint fixes

* frontend unit tests don't work for functional components

* test fix

* revert

* Address errors related to refetch on window focus

* Add loading error check

* Fix typos in loading error checks

* Guard against invariant condition in useEffect

* Update links and routes for team policies

* lint fixes

* Update frontend/pages/hosts/ManageHostsPage/helpers.ts

Co-authored-by: gillespi314 <73313222+gillespi314@users.noreply.github.com>

* Change inherited policies button, tooltip

* lint fixes

Co-authored-by: gillespi314 <73313222+gillespi314@users.noreply.github.com>
Co-authored-by: Tomas Touceda <chiiph@gmail.com>
2021-09-30 12:32:06 -07:00
RachelElysia
f397b77c1a
Schedule Page: Team maintainer can modify their team's schedule (#2243)
* Change permissions to schedule UI to include team maintainers
* Update e2e tests
2021-09-30 10:30:44 -04:00
gillespi314
746d02ebe0
Allow team maintainer to edit, save, or delete queries if they are the author (#2236) 2021-09-29 15:01:30 -05:00
RachelElysia
1b2b926380
Delete Query UX: Better error handling if query is a part of policies (#2278) 2021-09-29 15:19:10 -04:00
Tomas Touceda
d9f34b2c19
Issue 1840 bulk delete hosts (#2268)
* wp

* Add test by ids

* Add changes file

* Update docs and remove unneeded return values

* Address review comments

* Improve integration tests

* Use TearDownTest
2021-09-29 13:13:23 -03:00
gillespi314
81ef5d6a59
Update observer_can_run display value (#2279) 2021-09-29 10:22:39 -05:00
Martavis Parker
29aa6610b6
Fixed empty table showing while retrieving results (#2271)
Relates to #2269
2021-09-28 21:28:39 -07:00
gillespi314
e60f21ea18
Enhance software inventory table (#2105)
Add tooltip to surface bundle_identifier in software inventory table
Add new column to software inventory table to surface "last used" information
Add link from software inventory table to manage hosts page filtered by software id
Replace software vulnerabilities table with info banner directing users to manage hosts page filtered by software id where software-specific vulnerabilities will be displayed
Refactor SoftwareVulnerabilities.jsx using TypeScript
Add utility function for sorting string representations of dates and refactor semantics of existing sort functions
2021-09-28 23:04:58 -05:00
RachelElysia
a0f6768fe2
UI: Replace Contenteditables with Textareas (#2261)
* Replace content editables with textboxes

* Change log

* removed lib

* fixed bugs; no error handling for empty name

* lint fixes

* fixed query test

* lint fixes

* corrected query test

* bug fix; save modal didn't open for new query

Co-authored-by: Martavis Parker <martavis@auraticdevelopment.com>
2021-09-28 20:42:43 -07:00
Tomas Touceda
435178e93c
Add bundle identifier to software when available (#2220)
* Add bundle identifier to software when available

* Update docs

* Delete unneeded test
2021-09-28 18:13:34 -03:00
Martavis Parker
a11282cdee
Host MDM and Munki (#2145)
* refactor host details; TS and hooks

* layout change

* added mdm and munki to details; fixed styles

* changes file

* lint fixes

* using username for key
2021-09-28 14:05:25 -07:00
Martavis Parker
1165e6c172
Create/Edit user error handling (#2173)
* better error handling; fixed styles

* changes file

* lint fixes
2021-09-28 13:30:36 -07:00
Martavis Parker
fba8bcb70b
Added ability to delete selected text for SQL editor (#2265)
* refactored state mgmt for query console

* changes files

* lint fixes

* teams e2e test were flaky

* lint fixes

* fixed bug for observer running query, run again button

* fixed inconsistent query body change

* disabled refetch on window focus

* added ability to delete selected sql text
2021-09-28 12:57:47 -07:00
Martavis Parker
8ab5c27621
Fixed passing query info around Query console (#2247)
* refactored state mgmt for query console

* changes files

* lint fixes

* teams e2e test were flaky

* lint fixes

* fixed bug for observer running query, run again button

* fixed inconsistent query body change

* disabled refetch on window focus
2021-09-28 11:33:51 -07:00
Tomas Touceda
e2caf46d6d
Issue 2133 team maintainer can edit delete queries (#2256)
* wip

* Team maintainers can edit and delete queries they authored

* Update documentation

* Fix test
2021-09-28 14:53:05 -03:00
Tomas Touceda
5695d2a9ae
Issue 2058 team maintainer add queries (#2255)
* Team maintainers can read and write team schedules

* Allow team maintainers to read and write team schedules
2021-09-28 13:34:43 -03:00
Tomas Touceda
685245c2bd
Cache app config in redis (#2205)
* Cache app config in redis

* Add changes files

* Replace string with constant

* Revert some test refactorign and duplicate a bit of test code

* Add test for AppConfig with redis failing

* Fix lint

* Use Doer so it works better in clusters

* Skip unmarshalling if we already did

* Allow to cache hosts if configured

* Omit the setting if empty

* Remove hashing, too much CPU

* Revert caching of host auth... needs a more thought through approach

* Remove config

* Remove old config

* Remove locker interface

* Fix test and address review comments
2021-09-28 10:01:53 -03:00
Tomas Touceda
2033d8208c
Add policy updated at (#2246)
* wip

* Add policy updated at interval and update the UI to use that

* Update rest api

* Fix tests
2021-09-27 16:27:38 -03:00
Tomas Touceda
5653f1e868
Update URLs from team to teams, add tests for policy auth (#2228)
* Update URLs from team to teams, add tests for policy auth

* Fix test

* Address review comments
2021-09-27 14:02:11 -03:00
Tomas Touceda
d81a6317a0
Return host count when modifying a label (#2221) 2021-09-24 15:56:55 -03:00
RachelElysia
7dee7c56ef
Schedules Page: Surface all teams schedule on team schedule page (#2080)
* Render inherited queries table on teams page
* e2e team schedules on e2e premium testing
2021-09-23 13:10:43 -04:00
RachelElysia
fc00940660
Team Settings: Press enter submits to create team (#2195) 2021-09-23 13:09:43 -04:00
RachelElysia
4ace3b4bc5
Fix Bug: Global maintainer can now edit SQL in create new query (#2204) 2021-09-23 13:07:17 -04:00
Tomas Touceda
8931163882
Don't check authViewer if there's no bearer token (#2200) 2021-09-23 12:44:04 -03:00
Zach Wasserman
4d36400fe5
Prepare for 4.3.1 release (#2177) 2021-09-21 18:23:11 -07:00
Zach Wasserman
d9b2f4a6fb
Add --tag flag to fleetctl preview (#2171)
Allows specifying a version of the Fleet image to run.
2021-09-21 17:08:58 -07:00
Tomas Touceda
6497e0ba2e
Improve performance of cascade host software migration (#2163) 2021-09-21 16:37:13 -03:00
Tomas Touceda
1f324339f8
Add jitter to intervals (#2158)
* Add max jitter percent config

* Fix jitter calc

* Remove comment

* Reduce test jitter to make tests less flaky

* Remove jitter entirely

* Document new config

* Fix doc link
2021-09-21 14:21:44 -03:00
Tomas Touceda
4650484960
Remove fk label membership (#2157)
* Remove fk from label membership

* Add changes file

* Fix tests

* No need to IGNORE anymore
2021-09-21 11:48:20 -03:00
Martavis Parker
1d1e0b5f5f
Fixed style for sidebar (#2154)
* fixed style for sidebar

* changes file

* Reduce minimum width of body-wrap to prevent right sidebar from overflowing min app width of 1200px

Co-authored-by: Noah Talerman <noahtal@umich.edu>
2021-09-20 17:20:46 -07:00
Lucas Manuel Rodriguez
eecef148eb
Fail early if process does not have permissions to write to log file (#2138)
* Fail early if process does not have permissions to write to log file

* Open file once on NewFilesystemLogWriter
2021-09-20 14:46:51 -03:00
Tomas Touceda
b32b441c12
Issue 1512 filter observer can run queries (#2110)
* wip

* Filter queries for observers

* Update e2e test now that we filter queries
2021-09-20 13:07:51 -03:00
Tomas Touceda
e286ee387e
Allow team maintainers to run new queries in the team hosts (#2076)
* Allow team maintainers to run new queries in the team hosts

* Add policies for other roles
2021-09-20 11:09:51 -03:00
Tomas Touceda
baa42d367e
Add team policies (#2103)
* Add team policies

* Add team policy documentation

* Add changes file

* Update titles

* Fix lint

* Rewrite TeamAuthorize for more clarify

* Explicitly use two slices for clarity

* Simplify switch
2021-09-20 11:00:57 -03:00
Tomas Touceda
bdae8d04a2
Skip saving host users and inventory if disabled (#2127) 2021-09-18 11:33:36 -03:00
Martavis Parker
8c7155aba1
Flaky ManageHosts page for observers (#2116)
* fixed blank hosts screen; 403 for enroll secret

* lint fix

* added changes log
2021-09-16 16:36:25 -07:00
Martin Angers
1fa5ce16b8
Add configurable Redis connection retries and following of cluster redirections (#2045)
Closes #1969
2021-09-15 08:50:32 -04:00
Tomas Touceda
15cf91dcc0
Add limit 1 to disk space queries (#2063) 2021-09-14 18:17:52 -03:00
Tomas Touceda
176037cad2
Implement fleetctl get software and the underlying API (#1999)
* Implement fleetctl get software and the underlying API

* Add documentation

* Simplify list software implementation

* Lint fixes

* Make team name unique

* Address review comments

* Fix lint

* Fix tests
2021-09-14 10:58:48 -03:00
Tomas Touceda
429af72b69
Issue 1963 vulnerabilities no sync (#1976)
* wip

* Add tests for skip sync

* Add changes file

* Fix lint
2021-09-14 10:58:35 -03:00
Zach Wasserman
86044eb036
Prepare for v4.3.0 release (#2040) 2021-09-13 15:03:42 -07:00
Benjamin Edwards
42014c02e3
Fix migration that isn't compatible with some mysql8 settings (#1992)
Fixes #1991

Co-authored-by: Zach Wasserman <zach@fleetdm.com>
2021-09-13 10:20:31 -07:00
Martavis Parker
5d647025f9
1497 improved query experience (#1998)
* Step 1 for improving query experience (#1591)

* fake change to create draft PR

* temp routes to work and not modify old query page

* created new API abstraction for query

* refactored App.jsx to prepare react-query

* fixed flow of redirects after page refresh; functional component added

* setup for getting data on edit

* implementing functions for query page

* Old form showing on new setup

* improving and breaking up query form

* no need for the helpers anymore; clean up

* added type for button component variant

* step toward new save modal; have to switch gears to #1619

* creating new query works

* clean up

* linting cleanup

* added default value for new query

* will address dynamic save disabled in edit step

* Step 2 for improving query experience (select targets) (#1732)

* fake change to create draft PR

* temp routes to work and not modify old query page

* created new API abstraction for query

* refactored App.jsx to prepare react-query

* fixed flow of redirects after page refresh; functional component added

* setup for getting data on edit

* implementing functions for query page

* Old form showing on new setup

* improving and breaking up query form

* no need for the helpers anymore; clean up

* added type for button component variant

* step toward new save modal; have to switch gears to #1619

* creating new query works

* clean up

* linting cleanup

* added default value for new query

* split steps into separate files for readability

* components laid out

* new targets picker

* function clean up

* styling tables

* fixing logic

* fixed logic to keep getting related hosts

* formatting targets for API

* fixed default query

* clean up

* styled target selectors; fixed target input styles

* began total count

* forgot to remove debugging code

* lint fixes

* added target count from API

* clean up

* able to remove selected host targets from table

* lint fixes

* Improving query experience - Step 3 (query results) (#1766)

* fake change to create draft PR

* temp routes to work and not modify old query page

* created new API abstraction for query

* refactored App.jsx to prepare react-query

* fixed flow of redirects after page refresh; functional component added

* setup for getting data on edit

* implementing functions for query page

* Old form showing on new setup

* improving and breaking up query form

* no need for the helpers anymore; clean up

* added type for button component variant

* step toward new save modal; have to switch gears to #1619

* creating new query works

* clean up

* linting cleanup

* added default value for new query

* split steps into separate files for readability

* components laid out

* new targets picker

* function clean up

* styling tables

* fixing logic

* fixed logic to keep getting related hosts

* formatting targets for API

* fixed default query

* clean up

* styled target selectors; fixed target input styles

* began total count

* forgot to remove debugging code

* lint fixes

* added target count from API

* clean up

* able to remove selected host targets from table

* lint fixes

* connected run query with modern React/JS; clean up

* linting fixes

* fixed logic to retrieve results from live query

* linting fixes

* created new, simpler query progress

* populating results and errors tables as expected

* syntax fixes

* fixing styles for query results

* more styling for query results

* manual merge from main

* Rename core->free and basic->premium

* Fix lint js

* Comment out portion of test that seems to timeout

* Rename tier  to premium if basic is still loaded

* go sum

* Query Experience Cleanup Tasks (#1807)

* fixes to get merged main branch to build and work

* moved screens for query pages; clean up

* updated and typed react ace for query form; clean up

* using console error instead

* added real types instead of `any` except for errors

* query side panel ts and functional. prep for close task.

* ability to hide, show query table sidebar

* improved live query status warning

* added loading and error state for targets search

* error screen for targets; improved loading display

* now using API-created label for all linux

* missed some files on previous commit

* able to edit query

* clean up

* lint fixes

* query results showing as they come

* remove unused code

* removed old query page. major file cleanup.

* removed selectedTargets redux implementation

* removed unused redux actions and reducers

* removed unused keys in initial state

* selectedOsqueryTable is now using context API

* removed all querypages redux code

* set up context for app and user

* fixed auth with temp fix for wrapper

* completed redux removal from query page

* fixed var names coming from main branch

* fixed var name changes coming from issue 1501

* fixed save popup bug; clean up

* added permissions

* fixed login redirect

* removed unused props

* linting fix

* clean up

* removed unused component, refactor, and clean up

* fixed styles for step 1 as admin

* fixed styles for step 1 as observer

* fixed percentage of online hosts

* added loading progress to query stop button

* reset query status on run again

* added download icon to export button text

* fixed error reset on name input; fixed styles

* fixed bug where query value wasn't saving

* fixed query value when blank

* fixed bug - default query was running every time

* auto adding host from url to targets

* fixed flows for repeating run and save steps

* fleet ace is now TS and functional

* fixed a couple of tests

* fixed issues with query value text inconsistencies

* fixed query side panel not showing

* hiding error count if not > 0

* fixed showing editor for different roles

* using integer for targets

* go sum

* fixed targets param

* catching all errors while running query

* fixed hover state for title and description

* ignore unit test for now; lint fixes

* locking react-ace version

* ignoring tests breaking in github actions

* brought tests back

* fixing file name

* fixing file name again

* fixed e2e test

* have to ignore tests for now

* ignore certain premium tests for now

* one last test to revamp

* another test

* fixed teamflow test

* fixed observer query 403

* lint fixes

* fixed maintainer test

* added changes file

Co-authored-by: Tomas Touceda <chiiph@gmail.com>
2021-09-10 12:06:37 -07:00
RachelElysia
d32479622c
App Settings Page: Host status webhook UI (#1899)
* Skeleton UI

* Rebase to main

* Work towards config API request modification

* Nest and unnest when formatting for server and frontend

* Changelog

* Add validation to UI, fix ? vertical spacing

* Rebase e2e

* 1 of 2 passing unit tests for config

* Update REST-API.md to include webhook_settings

* Destructure / flatten config webhook in unit test

* Merge advance options e2e conflict

* x and y example not x and x

* Fix observer e2e

* Add new data to read only example request

Co-authored-by: Noah Talerman <noahtal@umich.edu>
Co-authored-by: Martavis Parker <martavis@auraticdevelopment.com>
2021-09-10 10:49:11 -07:00
Tomas Touceda
13e5e6a6db
Debug log per host (#1978)
* Add extra debug logging for hosts

* Add changes file

* Ignore if appconfig is nil

* Use slice of uints instead of a string

* Debug response request for enabled hosts

* Add host-id to request/response

* Lint fixes

* Add missing AppConfigFuncs
2021-09-10 14:48:33 -03:00
RachelElysia
d807c0b227
Host Details Page, Manage Host Table: Fix CPU rendering bug (#1912)
* Fix host_cpu to cpu_type

* Same bug in host table, helpers, and unit tests

* Update target's unit test

* Changelog

* Remove duplicate property
2021-09-09 09:42:35 -07:00
Benjamin Edwards
823775844e
added package command from orbit as fleetctl command (#1802)
* added package command from orbit as fleetctl command

* update deployment docs

* add changes file

* added tests for package command, run go mod tidy & go mod verify

* validate that package files exist

* comment out msi packaging test until we can investigate github runner permission issues
2021-09-09 01:34:12 -04:00
Tomas Touceda
b2efc9f51c
Make redis conn timeout and keep alive configurable (#1968)
* Make redis conn timeout and keep alive configurable

* Document new configs

* Correct config name
2021-09-08 17:55:12 -03:00
Tomas Touceda
69e06476a7
Ignore nonexistent label query executions (#1953) 2021-09-07 15:51:49 -03:00
Tomas Touceda
a6acb1cd1a
Allow users to be readded if they were ever removed (#1945)
* Allow users to be readded if they were ever removed

* Address review comment

* lint
2021-09-07 13:33:40 -03:00
Tomas Touceda
99e9e846f4
Remove id column from host_users to allow for bulk insert (#1931)
* Remove id column from host_users to allow for bulk insert

* Update documentation
2021-09-07 11:02:35 -03:00
Tomas Touceda
cb687f6e2d
Increase timeout to check for smpt availability (#1942) 2021-09-06 14:29:52 -03:00
gillespi314
4a307f1274
Update email template image links (#1938)
* Update email image links; move pngs to fleetdm.com
2021-09-03 17:00:30 -05:00
gillespi314
56157617c6
Allow users to schedule queries to run every 15 minutes (#1928)
* Add new 15-min interval option to schedule
2021-09-03 11:26:30 -05:00
Tomas Touceda
6d2ae02efd
Rename core->free and basic->premium (#1870)
* Rename core->free and basic->premium

* Fix lint js

* Comment out portion of test that seems to timeout

* Rename tier  to premium if basic is still loaded
2021-09-03 13:05:23 -03:00
gillespi314
5c707ae21f
Conform usage of query names for scheduled queries (#1924) 2021-09-03 10:57:25 -05:00
Tomas Touceda
db2e04a7c3
Update new sched query stats if there's already some (#1918)
* Update new sched query stats if there's already some

* IGNORE if the sched query is not present

* Make tests less flaky
2021-09-02 17:39:08 -03:00
Tomas Touceda
df135f57a9
Update changelog and versions to 4.2.4 (#1921)
* Update changelog and versions to 4.2.4

* Update CHANGELOG.md

Co-authored-by: noahtalerman <47070608+noahtalerman@users.noreply.github.com>

* Update CHANGELOG.md

Co-authored-by: noahtalerman <47070608+noahtalerman@users.noreply.github.com>

* Update CHANGELOG.md

Co-authored-by: noahtalerman <47070608+noahtalerman@users.noreply.github.com>

Co-authored-by: noahtalerman <47070608+noahtalerman@users.noreply.github.com>
2021-09-02 16:50:11 -03:00
Tomas Touceda
681e7f18a0
Add default for agent options (#1917) 2021-09-02 15:59:48 -03:00
gillespi314
a8c4e10fad
FleetUI: Update Avatar component (#1880)
* Replace default avatar; update components

* Add permanent images folder to website; update paths

* Disable flaky e2e tests
2021-09-02 12:12:42 -05:00
RachelElysia
66597ced71
App wide UI: Error and empty states for tables (#1875) 2021-09-02 08:16:19 -04:00
Tomas Touceda
15ce06263d
Dont fail config if agent opts is nil (#1898)
* Handle agentopts nil better

* Add changes file
2021-09-01 19:17:41 -03:00
RachelElysia
36971b4cb8
Host Details Page: Query performance column (#1867) 2021-09-01 18:08:20 -04:00
Martin Angers
9a0871a2f1
Address issues related to Redis Cluster support (#1885)
Closes #1847 .
2021-09-01 16:32:57 -04:00
Martin Angers
3755a58070
Add support for MySQL read replicas (#1786)
Adds configuration options to use a read-only MySQL replica,
and uses it instead of the primary for reads.
2021-09-01 15:50:52 -04:00
Tomas Touceda
2116217b6e
Add forgotten changes file for issue 1829 (#1886) 2021-09-01 14:57:54 -03:00
RachelElysia
da2a3aa1f0
App Settings Page: New advance options UI (#1832) 2021-09-01 10:57:25 -04:00
gillespi314
84615afbb3
Fix display of platform labels (#1866)
* Add policies UI components

* Add policy filter to hosts page
2021-08-31 20:02:23 -05:00
Benjamin Edwards
047dc5ac62
fix get hosts command to properly output json/yaml (#1774)
* fix get hosts command to properly output json/yaml based on command line flag

* add changes file

* added tests for get hosts when specifiying host

* added additional hosts to be returned in test cases

* go fmt
2021-08-31 11:37:03 -04:00
RachelElysia
6b437b8526
404 500 Pages: 2 CTA buttons (#1846) 2021-08-31 09:51:29 -04:00
gillespi314
452392f5d2
Add new feature: Policies (#1772) 2021-08-30 18:02:53 -05:00
RachelElysia
36b69c7a68
UI: License expiration warning banner (#1825) 2021-08-30 15:52:13 -04:00
Tomas Touceda
22267d8e0a
Group concat limit (#1860)
* wiup

* Decouple software select in two

* Add changes file

* Add missing error check
2021-08-30 16:07:24 -03:00
Tomas Touceda
2a17f9fe56
Remove hardcoded limits to the labels (#1857)
* Remove hardcoded limits to the labels

* Add changes file

* Remove test that doens't apply anymore
2021-08-30 14:56:15 -03:00
Tomas Touceda
15b7f5dd80
Create vuln path if dynamic (#1830)
* Create vuln path if possible

* Make sure we skip creation if static instance is selected

* Document behavior

* Fix return in crons and test without sleeps
2021-08-30 12:29:05 -03:00
RachelElysia
e66cb536ab
Host Details Page: Query button for observers (#1799) 2021-08-27 11:13:28 -07:00
Tomas Touceda
8b908f6506
Issue 1599 offline webhook (#1777)
* wip

* Add tests and finish implementation

* Add proper default for periodicity, changes file, and documentation

* Fix tests and add defaults also to new installs

* EnableHostUsers should be true if undefined as well

* In some cases, periodicity can be zero because of the migrations

* Apply defaults when migrating appconfig

* Fix lint

* lint

* Address review comments
2021-08-27 11:15:36 -03:00
gillespi314
aa588bc1ae
Manage hosts page improvements (#1690)
* Improve loading states, query param validation

* Refactor getNextLocationUrl; persist url params

* Update next location routing for certain UI actions
2021-08-26 14:49:30 -05:00
Tomas Touceda
d6d53acda5
Issue 1600 fleetctl license expiration (#1800)
* Show banner in fleet and fleetctl if license expired

* Ignore if license is nil or tier is core

* Address review comments
2021-08-26 10:28:53 -03:00
Zach Wasserman
801f44da86
Update changelog for Fleet 4.2.3 (#1811) 2021-08-25 20:11:45 -07:00
Zach Wasserman
5993018214
Fix live query timeout handling (#1759)
Correct cleanup of the connections was verified with the pprof goroutine
tool.

Fixes #1751
2021-08-25 15:28:04 -07:00
RachelElysia
3947838b65
Manage Hosts Page: Enroll secret secondary action (#1787) 2021-08-25 13:06:35 -07:00
RachelElysia
f10636f8d1
Host Details Page: Render disk space (#1770) 2021-08-25 13:05:54 -07:00
Tomas Touceda
a8642493ad
Add global policies (#1750)
* Add global policies

* Update documentation and add extra parameter to config

* Fix failing tests

* Store historic policy records

* Address review comments

And also remove other inmem references I saw by chance

* Add documentation for get by id request

* Add parameter doc

* Move schema generation to a cmd instead of a test

Otherwise it messes up running all tests sometimes depending on how parallel it does

* Remove brain dump for another task

* Make migration tests a separate beast

* Make schema generation idempotent and move dbutils cmd to tools

* Allow all filters and add counts to Policy

* Add test for Policy
2021-08-24 17:24:52 -03:00
Martin Angers
a3714d2ed9
Add fleetctl debug connection command (#1706)
Adds the `fleetctl debug connection` command to investigate
connection issues to the fleet server.

Closes #1579 .
2021-08-24 08:50:03 -04:00
Tomas Touceda
612fa05dd3
Log errors when osquery endpoints have issues (#1764) 2021-08-23 19:40:00 -03:00
gillespi314
40b0888416
Refresh host details after team transfer (#1746)
* Add API call to refresh host in local state

* Add API call to refresh host in local state

* Add host details tests to Cypress
2021-08-23 14:11:37 -05:00
Tomas Touceda
a1ceebf267
Make team schedule names more user friendly and hide them from host pack stats (#1737)
* Make team schedule names more user friendly and hide them from host pack stats

* Delete test for a different bug and add migration

* Update name template
2021-08-23 14:23:47 -03:00
Tomas Touceda
66d864cc84
Remove extra logIPs from host auth mw (#1762)
* Remove extra logIPs from host auth mw

* Fix test
2021-08-23 14:23:27 -03:00
Tomas Touceda
26a08096fb
Use GROUP_CONCAT instead of JSON_ARRAYAGG (#1752)
* Use GROUP_CONCAT instead of JSON_ARRAYAGG

* Update server/datastore/mysql/software.go

Co-authored-by: Martin Angers <martin.n.angers@gmail.com>

Co-authored-by: Martin Angers <martin.n.angers@gmail.com>
2021-08-23 14:12:30 -03:00
gillespi314
8b4c6a1dd7
Add host modal: Select team dropdown (#1740)
* Fix Add host modal dropdown for team maintainer

* Update Cypress tests

* Set default values for add host team dropdown
2021-08-20 23:00:44 -05:00
gillespi314
bd38cc1fe9
Fix UI for activity feed initial empty state (#1742) 2021-08-20 22:13:45 -05:00
Tomas Touceda
ad18728ac3
Issue 1601 disk space (#1735)
* wip

* Add tests

* Add migration

* Fix tests and set platform for windows correctly
2021-08-20 14:57:37 -03:00
Tomas Touceda
605970c441
Add cascade deletes for host software (#1739)
* Add cascade deletes for host software

* Add changes file

* The drop doesn't work on certain mysql

* Fix error message
2021-08-20 14:29:00 -03:00
Zach Wasserman
de98d7fb9c
Prepare for 4.2.2 release (#1729) 2021-08-18 18:46:36 -07:00
Zach Wasserman
39cef4c43f
Revert "Fleet UI: Reroute homepage (#1640)" (#1724)
Reverts #1640 so that the homepage does not change during the patch release.

This commit will be re-applied after the release is cut.
2021-08-18 18:06:03 -07:00
RachelElysia
b85fbcbc83
Table Checkboxes: Checkboxes uncheck only on success notification (#1707)
- Uses Context API to track state
- resetSelectedRows default to false and only momentarily becomes true upon successful notification

Several other ideas were explored and ruled out including: asyncDebounce (impossible approach), applying state throughout the app (not concise nor maintainable), modifications directly to DataTable only (react-table did not have the right key combinations to reset selected rows manually when we needed).

Closes #1540 

Co-authored by: @martavis
2021-08-18 16:58:56 -07:00
Tomas Touceda
33791dbee8
Remove fk in scheduled_query_stats table and clean up orphan rows for it (#1720)
* Remove fk in scheduled_query_stats table and clean up orphan rows for it

* Improve test and fix bug with the cleanup
2021-08-18 18:30:48 -03:00
Tomas Touceda
70f728fe84
Make vulnerability processing more configurable (#1718)
* Make vulnerability processing more configurable

* Simplify leader selection
2021-08-18 17:25:14 -03:00
Tomas Touceda
402303bc5d
Add All Linux label (#1582)
* Add All Linux label

* Change name to Linux instead of All Linux to see if e2e likes it better

* Revert "Change name to Linux instead of All Linux to see if e2e likes it better"

This reverts commit 26b79f214e3b744e73270c544f89bb698575f6ea.

* Fix all linux label insert
2021-08-18 15:55:48 -03:00
gillespi314
8c38b587f4
Fix query table sorting (#1708) 2021-08-18 09:00:02 -05:00
Martin Angers
3c9d7fd4bb
Add explicit sync to disk for critical file writes (#1686)
For Orbit operations, make an explicit *os.File.Sync() call and check the 
error, to make sure the writes are fully flushed to disk.

Closes #1679 .
2021-08-17 08:41:56 -04:00
gillespi314
1e11f0f669
FleetUI: Update column sort options (#1680)
* Disable sort remove on react-table

* Update hosts tests
2021-08-16 16:02:00 -05:00
Tomas Touceda
8d1a3409dc
Add netgo tag to prevent crashes on linux when making external requests (#1681)
* Add netgo tag to prevent crashes on linux when making external requests

* Remove unused step
2021-08-16 15:48:45 -03:00
RachelElysia
f6091509f4
Fleet UI: Side bar restyled, update UI for Team/Roles to match Figma (#1659)
* Style all settings side panels
* Add builtin label icons
* Update tests aligning jest userStub and adminUserStub
* Update tests adding cypress checks for user teams/roles
2021-08-16 12:25:51 -04:00
Martavis Parker
4a4c3c4949
fixed table column wrapping for manage queries page (#1638) 2021-08-16 09:19:27 -07:00
Zach Wasserman
64145c5633
Prepare for 4.2.1 release (#1675) 2021-08-14 09:26:47 -07:00
Benjamin Edwards
2d5c7ed683
issue 1313 -- add file destination for convert command (#1672)
* add file destination flag for convert command, add tests
* add changes file
* remove leftover debugging code, add comment explaing why sorting was necessary
* update docs for fleetctl convert
* Update cmd/fleetctl/convert_test.go
Co-authored-by: Zach Wasserman <zach@fleetdm.com>
2021-08-13 20:42:58 -04:00
RachelElysia
e8aae0dd25
Spiffier UI: Label pills (#1660) 2021-08-13 17:34:04 -04:00
Tomas Touceda
512f5defce
Detect centos as a host platform more accurately (#1664)
* Detect centos as a host platform more accurately

* Add test for centos host labels
2021-08-13 13:22:09 -03:00
RachelElysia
dc77974ef6
Fleet UI: Reroute homepage (#1640)
* Reroute homepage
* Update e2e tests brittle URLs
2021-08-13 10:41:53 -04:00
Tomas Touceda
5b8a607a81
Add support for MariaDB 10.5.4 and later (#1658)
* Add support for MariaDB 10.5.4 and later

* Fix tests

* Add changes file

* Use require.JSONEq instead of our own version of it
2021-08-13 11:16:19 -03:00
Tomas Touceda
96c0244c04
Fix redis locking receive (#1655)
* Receive redis data with timeout to not hold the connection

* Address review comments
2021-08-13 11:16:11 -03:00
noahtalerman
2df7c71749
Prepare for Fleet 4.2.0 (#1645) 2021-08-11 17:14:32 -07:00
Tomas Touceda
e8def4af00
Allow to refetch hosts if you are an observer/maintainer for the team for that host (#1649) 2021-08-11 19:01:37 -03:00
gillespi314
790d169e14
Display updated team name after edit (#1621) 2021-08-11 15:37:24 -05:00
Tomas Touceda
3d8a766ca1
Make receive calls to redis conn thread safe (#1641)
* Make receive calls to redis conn thread safe

Also removes REDIS_TEST env var. Redis is lightweight and fast, no need
to skip these tests.

* No need to increase the wait
2021-08-11 17:34:35 -03:00
gillespi314
601ffb4fcd
Disable edit label page select platform dropdown (#1635)
* Disable edit label page select platform dropdown

* Update label flow test
2021-08-11 15:27:52 -05:00
Tomas Touceda
ae2bd137b1
Issue 1632 software inventory config (#1636)
* Add config option for software inventory

* Add documentation for the new config
2021-08-11 15:57:53 -03:00
Tomas Touceda
11dff7ca92
Issue 1588 allow disabling host users (#1611)
* Allow users to disable host_users

* Add missing files

* Address review comments

* Fix tests

* Check additional queries for nil, not the whole hostsettings

* Finally fix tests
2021-08-11 14:56:11 -03:00