Commit Graph

217 Commits

Author SHA1 Message Date
Tomas Touceda
4cb0060070
Prettify and compare strings instead of structs in fleetctl get tests (#3047)
* Prettify and compare strings instead of structs in fleetctl get tests

* Prettify JSON testdata

* Simplify scanner for multi json
2021-11-22 12:20:09 -03:00
Martin Angers
69a4985cac
Use new error handling approach in other packages (#2954) 2021-11-22 09:13:26 -05:00
Lucas Manuel Rodriguez
59e01fbe08
Make fleetctl apply -f fail with unknown kind: config fields (#3026)
* Make fleetctl apply fail with unknown fields

* Add unit test
2021-11-19 12:37:36 -03:00
Lucas Manuel Rodriguez
d1dcc0e78a
Add probability of policy pass flag to osquery-perf (#3014) 2021-11-19 08:50:25 -03:00
Zach Wasserman
b65c61cb12
Change Orbit osquery to Fleet osquery in generated packages (#3034)
Use "Fleet osquery" rather than "Orbit osquery" in packages generated
 by `fleetctl package`.
2021-11-18 17:43:52 -08:00
Zach Wasserman
3811a63daf
Add osquery flagfile support in Orbit (#3006)
- Orbit automatically loads the flagfile when it exists in the orbit
  root.
- Add packaging support to include flagfile with package.
- Fix a panic when osquery fails to start up.
2021-11-18 15:06:33 -08:00
Lucas Manuel Rodriguez
5c1edaf527
Kill existing instances of orbit and osqueryd in fleetctl preview (#2921)
* Kill existing instances of orbit and osqueryd in fleetctl preview

* Add changes file
2021-11-15 18:12:25 -03:00
Martin Angers
3ae57a0242
Create errors with ctxerr, add the call to store them in redis (#2786) 2021-11-15 09:11:38 -05:00
Martin Angers
348841c90b
Add explanation output to fleetctl package (#2864) 2021-11-15 08:40:58 -05:00
Tomas Touceda
b802af6f44
Add host count to software API (#2879)
* Add host count to software API

* Update docs

* Update fleetctl tests to account for host counts

* Update docs to mention host_count special case

* Update func comment
2021-11-11 08:49:17 -03:00
Tomas Touceda
a16b98a4a1
Add logging of interval for webhooks (#2853) 2021-11-09 11:59:16 -03:00
Tomas Touceda
7db6de7278
Serialize hosts writes per instance (#2753)
* Serialize hosts writes per instance

* Write hosts asynchronously

* Dont make the save in a goroutine

* Revert "Dont make the save in a goroutine"

This reverts commit 4a890c5271142755dec69a741582e7eca5c4c62c.

* Make all savehosts async

* Address review comments and make this approach configurable

* Address review comments

* Disable bulk seen time marking for a test

* Move host seen times to a new table

* Remove unused

* Add seen_time to list hosts

* Add some jitter to seen time flushing

* Remove unused

* Add timeout to deferred save host

* Add tests for serialSaveHost

* Update hosts in labels and policy executions in a serial way

* Address review comments and remove fk constraints in host software

* Make errCh buffered

* Add changes file

* Readd key
2021-11-08 11:42:37 -03:00
Tomas Touceda
2902da76ca
Issue 2027 better error visibility (#2069) 2021-11-02 13:35:57 -04:00
Lucas Manuel Rodriguez
43d1a8c9a0
Fix races in go tests and run with -race on CI (#2712)
* Fix races in go tests and run with -race on CI

* Fix race in pubsub

* Increase timeout to 15m for go tests

* CI takes forever, try disabling race

* Remove timeout from go tests
2021-11-01 15:31:01 -03:00
Lucas Manuel Rodriguez
8642bb785e
Add MVP support for software inventory to osquery-perf for load testing (#2751)
* Add MVP support for software inventory to osquery-perf for load testing

* Fix test compile
2021-11-01 15:23:31 -03:00
Martin Angers
a8735d55bb
Implement async processing of hosts for label queries (#2288) 2021-11-01 14:13:16 -04:00
Lucas Manuel Rodriguez
384ce0f13d
Amend WriteTimeout for live queries GET sync API (#2752) 2021-11-01 09:31:56 -03:00
Tomas Touceda
fcb5d5b392
Make vulnerability processing less RAM hungry (#2739)
* Make preview work when run from scratch (no orbit running)

* Make vulnerability processing less RAM hungry

* Add changes file

* Only get the cpe list once

* Remove cache

* Try killing osquery as well as orbit and clear their db dir

Co-authored-by: Lucas Rodriguez <lucas@fleetdm.com>
2021-10-29 11:27:12 -03:00
Zach Wasserman
37e4452274
Open browser in fleetctl preview (#2730)
Attempts to automatically open the browser and log in.
2021-10-27 21:50:32 -07:00
Zach Wasserman
8dc34be3a3
Updates and fixes for packaging (#2682)
- Fix Windows MSI generation by changing permissions (#2655).
- Refactor temp directory initialization.
- Use root user for Wine in WiX Docker container.
- Support .pkg packaging on Linux without dependencies (besides Docker)
2021-10-27 16:17:41 -07:00
Tomas Touceda
21153e9400
Add sleep to give orbit a chance to win the id 1 for the host (#2723)
* Add sleep to give orbit a chance to win the id 1 for the host

* Wait until we have the current host
2021-10-27 17:41:03 -03:00
Tomas Touceda
a37024e3b1
Issue 2699 preview reset stops orbit (#2720)
* Stop orbit when running preview reset as well

* Detect if orbit is already running and dont start it again
2021-10-27 15:57:24 -03:00
Tomas Touceda
3369436741
Remove policies yaml for now and apply policies in preview (#2644) 2021-10-25 09:17:34 -03:00
gillespi314
6c58159fb8
Change default org name for fleet preview (#2642) 2021-10-22 17:35:01 -05: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
Luke Heath
99673eb148
Fix broken links to docs (#2561) 2021-10-22 12:39:20 -05: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
c3f7577bd8
Add query description and resolution to the list of policies in hosts (#2584)
* Add query description and resolution to the list of policies in hosts

* Add docs

* Fix get host tests
2021-10-20 12:07:16 -03:00
Martin Angers
07cf136d03
Add TLS support to Redis connections (#2568) 2021-10-20 10:09:18 -04: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
Zach Wasserman
1de7b8c4ca
Update osquery-perf readme (#2573) 2021-10-19 11:54:45 -07:00
Martin Angers
057d4e8b2e
Add configuration and support for Redis to read from replicas (#2509) 2021-10-18 09:32:17 -04:00
Tomas Touceda
b11c6ffe31
Download and launch orbit for the current device when starting preview (#2437)
* Download and launch orbit for the current device when starting preview

* Add windows kill

* Fix imports

* Fix import

* Disable secure directory checks on windows for now

* Add missing import
2021-10-15 18:23:06 -03: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
Tomas Touceda
825939e3dc
Improve osquery perf (#2503)
* Improve osquery perf

* Update dependencies

* Embed template so this can be run from the root of the repo

* Fix lint

* Address review comments
2021-10-14 10:09:58 -03:00
Martin Angers
e1afb3547e
Update preview tests (#2487) 2021-10-12 11:49:25 -04:00
Martin Angers
dcf701ef2b
Support fleetctl preview from a branch, default to production (#2476) 2021-10-12 10:20:28 -04: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
9b809a2d35
Issue 1890 host details policy (#2410)
* wip

* Add policies to hosts
2021-10-07 08:11:10 -03:00
Tomas Touceda
28c3e64e41
Expose additional queries in fleetctl get hosts (#2349) 2021-10-04 15:18:02 -03: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
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
8600d71d35
Add osquery perf (#2190)
* Add osquery perf

* Update dockerfile and gh action
2021-09-22 17:18:55 -03: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