Commit Graph

518 Commits

Author SHA1 Message Date
Martin Angers
b57b64ccb2
Add total and per platform counts to host summary endpoint (#2845) 2021-11-09 09:35:36 -05: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
Martin Angers
1b5ec19cf5
Add author_email to payload of queries (Get/List) (#2798) 2021-11-08 09:06:56 -05:00
Tomas Touceda
586c2f9ead
Properly parse order direction (#2812) 2021-11-05 13:36:05 -03:00
Tomas Touceda
2902da76ca
Issue 2027 better error visibility (#2069) 2021-11-02 13:35:57 -04: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
Tomas Touceda
1aea7484d4
Forward policy resolution (#2733)
* Pass through the resoution for the policy

* Update tests
2021-10-28 10:10:03 -03:00
dsbaha
51e35e1ba0
Implementation of a Kafka REST Proxy logging plugin (#2534)
This PR implements the status/result logger functions necessary interface with a Kafka REST Proxy service.  

Specifically, this is compatible with the [Confluent KAFKA Rest Proxy Service ](https://docs.confluent.io/1.0/kafka-rest/docs/intro.html).
2021-10-27 21:51:17 -07:00
Tomas Touceda
623a38aa9d
Live queries post merge fixes (#2684)
* Refactor based on PR review comments

* Use deadline instead of duration

* Address review comments

* Only set the timeout once
2021-10-26 16:12:07 -03: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
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
Tomas Touceda
3369436741
Remove policies yaml for now and apply policies in preview (#2644) 2021-10-25 09:17:34 -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
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
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
057d4e8b2e
Add configuration and support for Redis to read from replicas (#2509) 2021-10-18 09:32:17 -04:00
Tomas Touceda
74960d74be
Update calls to new signature (#2536) 2021-10-15 10:48:44 -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
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
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
RachelElysia
981028705e
Sentence Case: Throughout UI, tests, validators, docs (#2455) 2021-10-11 10:58:27 -04:00
Martin Angers
5e1f872ccb
Refactor ListHosts to new endpoint pattern (#2396) 2021-10-11 10:37:48 -04:00
Martin Angers
fce3e42abb
Refactor GetPack to new endpoint pattern (#2409) 2021-10-11 10:17:21 -04: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
Tomas Touceda
9b19e3ace6
Count can happen with only list permissions (#2441) 2021-10-07 14:25:04 -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
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
Tomas Touceda
1b611012df
Allow team maintainers to bulk delete hosts for teams they belong (#2399) 2021-10-06 12:58:01 -03:00
Tomas Touceda
ddc6b300d4
Allow team maintainers to delete hosts from their teams (#2373) 2021-10-05 15:15:05 -03: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
Tomas Touceda
36b4c0df5d
Allow team maintainers to read global policies and schedule (#2282)
* Allow team maintainers to read global policies and schedules

* Update docs
2021-09-29 14:07:10 -03: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
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
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
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
8931163882
Don't check authViewer if there's no bearer token (#2200) 2021-09-23 12:44:04 -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
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
e6368cc57f
Refactor integration tests (#1821)
* Refactor integration tests

* Remove nopCloser and use io.NopCloser

* Address review comments
2021-09-15 16:27:53 -03: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