Commit Graph

678 Commits

Author SHA1 Message Date
RachelElysia
91474d89a3
Schedule page bug: Fix missing carat/bounciness (#4442) 2022-03-03 18:21:24 -05:00
Luke Heath
fbd63c6210
Fix masthead avatar so that gravatar image displays (#4443) 2022-03-03 16:05:54 -06:00
RachelElysia
7d60be4c15
Remove validation for webhook and metadata urls (#4432) 2022-03-03 12:20:49 -05:00
RachelElysia
fa3df0347b
Debounce, onchange, changelog (#4413) 2022-03-03 08:26:03 -05:00
Benjamin Edwards
b053684712
append newline char to raw log bytes for nice NDJSON format (#4425)
* append newline char to raw log bytes for nice NDJSON format
* add changes file
2022-03-02 17:23:23 -05:00
RachelElysia
8af5fa7a5a
Fix duplicate (team name, label name, user email) error handling (#4352) 2022-03-01 13:28:51 -05:00
Tomas Touceda
6cffd5438f
Only send test email when changing smtp values (#4394)
* Only send test email when changing smtp values

* Update comment
2022-02-28 18:28:51 -03:00
Martin Angers
4930ca2d0e
Support listing software hosts count filtered by team (#4388) 2022-02-28 13:55:14 -05:00
Tomas Touceda
1fdcb1bfc2
Error early if email already exists (#4363)
* Error early if email already exists

* Update changes/issue-4361-mail-change-should-error

Co-authored-by: Michal Nicpon <39177923+michalnicp@users.noreply.github.com>

* Fix test

* Lint fixes

* Fix another test

* Also check for invites

* Improve error checks

* Update comment

* Update tests

* Fix test

Co-authored-by: Michal Nicpon <39177923+michalnicp@users.noreply.github.com>
2022-02-28 09:34:44 -03:00
RachelElysia
ecf15adc33
Fleet UI: Enter submits for Remove and Delete modals (#4336) 2022-02-24 09:15:50 -05:00
RachelElysia
57697e4cd4
Loading/error state for Fleet certificate match Figma (#4317) 2022-02-22 17:45:46 -05:00
Martin Angers
84ac0f05a9
Grant write to policies to global maintainer (#4321) 2022-02-22 16:57:36 -05:00
Martin Angers
ad5146c491
Allow updating the policy platform (part 1 of the ticket) (#4311) 2022-02-22 13:42:03 -05:00
Tomas Touceda
4034a7ab59
Make SearchHosts behave the same as the filtering in ListHosts (#4295) 2022-02-22 10:19:51 -03:00
Martin Angers
2ab1b9ec85
Remove expiration of API-only user tokens (#4314) 2022-02-22 08:12:03 -05:00
RachelElysia
7cdc7bbec2
E2e Test: Team admin flow (#4301) 2022-02-21 21:09:36 -05:00
Michal Nicpon
4ce23c7d1b
Add team targets to pack spec (#4272)
* skip flaky tests
2022-02-21 09:18:58 -07:00
Tomas Touceda
6d582cffa0
Don't depend on last inserted id to get the id for the new software (#4298)
* Don't depend on last inserted id to get the id for the new software

* Correct typo
2022-02-18 16:30:24 -03:00
Lucas Manuel Rodriguez
c641e39ef4
Allow disabling auto updates in fleetctl package and orbit (#4296)
* Add disable-updates flag to fleetctl and orbit

* Fix ruleguard execution error on make lint-go

* Introduce dev-mode for ease of development of orbit

* Add changes file
2022-02-18 15:42:39 -03:00
gillespi314
3734cbd3a4
Remove new hosts count from homepage (#4283) 2022-02-17 17:27:29 -06:00
RachelElysia
f345446125
Edit Query Page: Fix UX for "Save as new" CTA (#4235) 2022-02-17 14:58:47 -05:00
RachelElysia
689de41878
Settings Page: Render SMTP port error (#4239) 2022-02-17 12:58:25 -05:00
RachelElysia
6f1c61bc86
UI Revamp: Add hosts modal (#4217) 2022-02-16 16:21:42 -05:00
gillespi314
089f49cc5d
Add new activity types for policy-related activities (#4043)
* Add new activities for policy create, delete, and modify, and apply policy spec
* Add PoliciesByID ds method; refactor delete svcs
2022-02-16 09:33:56 -06:00
Nate Felton
bb0b56acb7
Update postinstall to use more modern launchctl commands (#4179)
* Update postinstall to use more modern launchctl comamnds

Fixes #3995

* Switching to service-target specifier

* Removing unnecessary kill flag
2022-02-16 08:31:16 -03:00
Tomas Touceda
a49f2a06ed
Allow removal of munki versions (#4189)
* Skip any versions that are empty in munki

* Return not found if munki is uninstalled

* Fix lint

* wip

* Add deleted at for host_munki_version
2022-02-15 16:29:14 -03:00
Michal Nicpon
9009857022
Add get team by name to fleetctl (#4202) 2022-02-15 11:48:09 -07:00
Martin Angers
290b5d90e5
Add team target filters to rego authorization checks for running queries (#4194) 2022-02-15 13:41:48 -05:00
Zachary Winnerman
c5c72ed713
Add apm for testing apm (#4053)
* Add apm for testing apm

* Testing opentracing

* testing

* Testing

* go fmt

* Add config switch for tracing.

* fixup

* Update cmd/fleet/serve.go

Co-authored-by: Tomas Touceda <chiiph@gmail.com>

* Add support for both elasticapm and opentelemetry

* Fix driver stuff and config options

* Fixup

* fixup

* Add changes file

* Add config for sql driver

* fixup

* Add doc to exported field

* testing

* fixup

* fixup

* Testing again

* fixup

* testing

* Undo

Co-authored-by: Tomas Touceda <chiiph@gmail.com>
2022-02-15 12:42:22 -05:00
RachelElysia
0ffca38f77
Queries and Scheduled Queries UI: Performance impact tooltips (#4201) 2022-02-15 11:19:01 -05:00
Lucas Manuel Rodriguez
be72dc356c
Add CentOS parsing+post-processing to reduce false positives in vulnerability processing (#4037)
* Add CentOS parsing and post-processing in fleet

* Add tests and amend SyncCPEDatabase

* Add test for centosPostProcessing

* Changes from PR comments

* Amend software test

* Fix sync test

* Add index to source and vendor

* Use os.MkdirTemp

* Rearrange migrations

* Regenerate test schema

* Add support for testing migrations (#4112)

* Add support for testing migrations

* Rename migration in tests

* Changes suggested in PR

* Go mod tidy
2022-02-14 15:13:44 -03:00
Zachary Winnerman
3babf53cf4
Fix OSVersion to work properly when distribution does not follow symver (#3968)
* Fix OSVersion to work properly when distribution does not follow symver

Certain distros such as ClearLinux or ArchLinux do not use symver or any
dotted versioning scheme for their releases. Archlinux uses the static
string "Rolling" and ClearLinux uses a single build number such as 35550
for their versions.

In Fleet console, this shows up as a string like "Archlinux 0.0.0.0"
which makes very little sense to the user. This change makes it so that
if OSQuery cannot generate a dotted version number, we should instead
use the build id as an opaque string.

* Add /changes

* Add tests for os_version

* fixup

* fixup
2022-02-14 12:55:23 -05:00
Michal Nicpon
075702113a
Print version warning when using fleetctl (#4139)
* Remove deprecated call in fleetctl
* Remove duplicate error returned by app.Run in tests
2022-02-14 09:43:34 -07:00
dayld
c32a225104
users table to cached_users to improve performance (#4170)
* users table to cached_users to improve performance

* add changes file

Co-authored-by: dayld <>
2022-02-14 09:48:17 -03:00
Zach Wasserman
1e843f3b89
Allow short IdP name in server validation (#4077)
A customer encountered an error when setting the value to "SSO" which
seems quite reasonable.
2022-02-13 19:35:59 -08:00
Noah Talerman
67827474c2
Prepare for Fleet 4.10.0 (#4161)
Co-authored-by: Zach Wasserman <zach@fleetdm.com>
2022-02-13 18:13:06 -08:00
Zach Wasserman
e20a9b4508
Add platform filters for MDM/Munki/Chrome queries (#4144)
* Add platform filters for MDM/Munki/Chrome queries

This should help quiet warnings that users/customers have reported when
these queries try to run on platforms without the macadmins extension
tables.

For #4123

* Improve documentation

* add changes file

* revert doc formatting

* Update tests

* Yet another test fix

Co-authored-by: Tomas Touceda <chiiph@gmail.com>
2022-02-11 14:10:26 -03:00
Tomas Touceda
c45115a915
Properly handle path in CVE URL prefix (#4174) 2022-02-11 14:10:13 -03:00
Noah Talerman
9c24c7d92c
Add policy templates to standard query library (#3956)
* Add remaining policy templates

* Removeempty resolution field

* Update naming for standard policies

* Add enabled word to SIP policy

* Use full SIP

* Also change in constants

* Update windows disk encryption

* Add changes file

* Tweak windows disk encryption policy

* Address lint errors

* Make requested changes

* Reflect changes in policy tempaltes

* Make sure that standard policies and policy templates are the same

* Edit automatic login disabled description

* Also edit in constants
2022-02-10 12:34:30 -05:00
RachelElysia
7bca25a803
Show observer query's OS compatibility (#4140) 2022-02-10 10:40:04 -06:00
Zach Wasserman
600549d8a4
Prepare for 4.9.1 release (#3996) (#4005)
Merging back to `main` from patch branch.
2022-02-10 10:46:21 -05:00
Luke Heath
0d36b39059
Fix label search crashing app on special character input (#4124) 2022-02-09 16:02:49 -06:00
RachelElysia
535acb67a4
Add details to software automation modal (#4122) 2022-02-09 13:37:56 -06:00
RachelElysia
778ee22147
/logout route automatically logs out user (#4057)
Co-authored-by: Luke Heath <luke@fleetdm.com>
2022-02-09 11:36:24 -06:00
Tomas Touceda
11887f87f7
Add enable scheduled query stats to fleet config (#4066)
* Add enable scheduled query stats to fleet config as well

* Add documentation

* Revert "Allow disabling scheduled query stats via app config (#4049)"

This reverts commit f98fd4d331.

* Add changes file

* Update ref

* Add missing docs
2022-02-09 08:20:29 -03:00
Luke Heath
5866d68f13
Set max length for name inputs (#4063) 2022-02-08 19:40:38 -06:00
Michal Nicpon
578a9780f2
apply queries spec endpoint missing authorization check (#4068)
* do authorization check when updating existing query
2022-02-08 09:47:48 -07:00
Martavis Parker
260d8c6910
Homepage refactor - MDM/Munki (#4038) 2022-02-07 23:03:01 -06:00
Lucas Manuel Rodriguez
f82c01833b
Change webhooks db lock duration to one hour (#3589)
* Change webhooks db lock duration to one hour

* Reload interval and check time left

* Change interval to one hour to match the db lock

* Add missing continue in case of failure

* Fix lint-go
2022-02-07 17:14:23 -03:00
RachelElysia
b9e2ca6790
Bug fix: Get failing policies webhook on load (#3997) 2022-02-07 12:45:49 -06:00
RachelElysia
cb43400932
In label error state for duplicate query/policy name (#4052) 2022-02-07 12:28:33 -06:00
Tomas Touceda
f98fd4d331
Allow disabling scheduled query stats via app config (#4049)
* Allow disabling scheduled query stats via app config

* Update tests

* Fix test

* Moar test fixes

* Remove redundant set

* Add documentation

* Fix typo in docs
2022-02-07 13:37:54 -03:00
RachelElysia
6e5aee3cdf
Software vulnerability automation modal (#3920) 2022-02-04 18:48:35 -06:00
Luke Heath
14d36d8e4d
Refine and improve policy and query editing interface (#4004) 2022-02-04 15:30:27 -06:00
Tharun Rajendran
2084b7d310
feat(api): add endpoint to get team by id (#4018)
* feat(api): add endpoint to get team by id

* fix review feedbacks

* add integration test in enterprise suite
2022-02-04 14:33:22 -03:00
Tomas Touceda
656ef07df1
Move ApplyTeamSpec to ee (#4011)
* Move ApplyTeamSpec to ee

* Update test now that apply team specs is behind premium

* Check all auth first

* Change auth call for team creation
2022-02-03 16:24:03 -03:00
Tomas Touceda
cf529e70cf
Issue 3173 debug status processlist (#4009)
* Add innodb status and process list

* Make json output a bit prettier

* Add changes file

* fix lint issues
2022-02-03 14:56:22 -03:00
Tomas Touceda
53ba8f07ea
Issue 3882 clean team packs (#4002)
* Cleanup team schedules when deleting teams

* Add changes file

* Improve code readability

* Reuse func instead of formatting twice
2022-02-03 14:55:48 -03:00
Tomas Touceda
b2d0a8c79f
Merge pull request from GHSA-ch68-7cf4-35vr
* Validate audience restrictions when validating SAML auth reqs

* EntityID is usually the audience

* Add coverage for failures on audience conditions
2022-02-02 15:50:09 -08:00
Martin Angers
6e2ba62744
Trigger webhooks for recently published vulnerabilities (#3941) 2022-02-02 16:34:37 -05:00
Tomas Touceda
b90e2e2e3d
Issue 3901 match target sw (#3982)
* Allow to search with target_sw with a period

* Remove tests for a different thign

* Add a test for programs as a source as well

* Use MATCH again and add proper tests
2022-02-02 17:17:41 -03:00
RachelElysia
7c87dad4e1
New navigation bar (#3962) 2022-02-02 11:27:14 -06:00
Zach Wasserman
12fc8dc681
Add changes file for #3959 (#3964) 2022-02-01 10:04:57 -08:00
Zach Wasserman
80960e47f8
Allow reinstallation of MSI packages (#3958)
Make the necessary changes to the WiX XML to allow the generated MSI
installers to be reinstalled.
2022-01-31 16:09:59 -08:00
gillespi314
d101ec7c18
Add ability to filter software by "Vulnerable" on the Host details page (#3875)
- Add new "Software" tab to host details page
- Add dropdown to filter vulnerable software
- Extend DataTable client-side filtering to accommodate filter inputs that are controlled by parent components
- Refactor host details software into separate component
2022-01-31 16:41:54 -06:00
gillespi314
4d5e3277ef
Add new feature: Software page (#3923)
* Add new software page
* Add hosts counts and last updated to software card on homepage
* Extend InfoCard component to all children to set dynamic title information and hyperlinks
* Add new TeamsDropdownHeader component
* Refactor TableContainer to move server-side pagination buttons to DataTable
* Extend DataTable to include footer element
2022-01-31 16:24:20 -06:00
Tomas Touceda
bf8eaa8431
Apply whole yaml not just queries in preview (#3919)
* Apply whole yaml not just queries in preview

* Remove dev stuff
2022-01-28 16:28:07 -03:00
Tomas Touceda
e956b0ba04
Add filter software by CVE and make osquery-perf also push vulnerable software (#3902)
* Add filter software by CVE and make osquery-perf also push vulnerable software

* Update based on review comments
2022-01-28 10:05:11 -03:00
RachelElysia
9706e3d36b
Schedules Page: Remove redux, fix buggy API calls (#3883) 2022-01-27 18:00:31 -05:00
Tomas Touceda
1667fdcf22
Add vulnerabilities webhook config (#3897)
* Add vulnerabilities webhook config

* Fix tests

* Update documentation

* Update docs
2022-01-27 10:48:46 -03:00
Tomas Touceda
ffabf803a3
Aggregate munki and mdm data (#3886)
* Aggregate munki and mdm data

* Update doc

* Use reader to read

* Reader to read

* Address review comments
2022-01-26 17:55:07 -03:00
Noah Talerman
433843ae94
"Releasing Fleet" docs: Add instructions for "Performance" section (#3857)
- Add instructions for performance section
- Remove changes files that were included in the 4.9.0 release
2022-01-26 14:33:39 -05:00
Martin Angers
a6f3f02a85
Cleanup unused software after calculating the count of hosts (#3887) 2022-01-26 11:32:42 -05:00
Martin Angers
9a0f749641
Add hosts_count field to "list software" endpoint (#3873) 2022-01-26 09:47:56 -05:00
RachelElysia
66b3f97b37
Teams Details Page: Add generate installer and manage enroll secret CTA buttons (#3864) 2022-01-25 13:20:24 -05:00
RachelElysia
ffe024be23
Frontend Validators: Form URLs and email addresses (#3511) 2022-01-25 11:06:47 -05:00
RachelElysia
a655e04b57
User Management Page: Flash messages for reseting password and session (#3851) 2022-01-24 21:03:56 -05:00
Tomas Touceda
35f806f7d1
Merge Release candidate 4.9.0 into main (#3844)
* Better jitter (#3716) (#3744)

* Better jitter (#3716)

* Better jitter

* Fix lint

* Use milliseconds

* Make duration milliseconds

* Update based on Lucas' suggestion

* Add changes file

* Panic on error

* Fix compilation error

* Use time.after instead of time.tick to not leak

* Include browser extensions in software inventory (#3733) (#3757)

Use appropriate JOINs against users table to include all results.

For #3557

* Build Docker images on push to any branch (#3756) (#3758)

Allows for testing release branches and any others.

* Optimize users detail query (#3754) (#3770)

@Smjert reported instances of Windows Domain Controllers having massive
resource utilization and being killed by the watchdog when running this
query. In his test environment, this new query performs much better.

* Refactor async host processing to avoid redis SCAN keys (for policies) (#3657) (#3755)

* Issue 3707 clean targets on delete (#3739) (#3776)

* wip

* Delete targets when deleting teams, hosts, and labels

* Add changes file

* Fix error message

* Remove unused teamsTable

* Cleanup new pack

* Clean new packs at end of test

* Update operating system policy (#3779)

- Update policy's query to check for operating system versions greater than or equal to

* Improve loading of manage policies page (#3695) (#3781)

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

* Fix logo (#3765)

* fixed duplicate query modal not closing (#3787)

* fixed style for connection line on activity feed (#3789)

* Improve loading state for query platform compatibility (#3752) (#3783)

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

* Disable pagination for teams page (#3794)

* Shorten "simple" query API period to 25s (#3775) (#3804)

This helps the period stay under the default request timeouts for most
load balancers.

Some default timeouts:
* AWS ALB - 60s
* Nginx - 60s
* GCP LB - 30s

* Clear user checkbox selections after successfully removing selected row from table UI #3798 (#3801)

* Alias fleetctl sandbox to fleetctl preview (#3803) (#3806)

Preparing for some work the product team is planning to rebrand preview
to sandbox.

* Remove flash of spinner to no spinner (#3799)

* Revert "Better jitter (#3716) (#3744)" (#3807)

This reverts commit c857b52d2b373ed9e302d643e6d2212af7353408.

* Fix teams dropdown sizing (#3759) (#3810)

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

* fixed link for expiration message (#3788)

* Fixed empty string for compatible platforms (#3812)

* fixed empty string for compatible platforms

* default checked for platforms on policy query

* Block autocomplete for username and password in SMTP settings (#3732) (#3816)

* No hosts for software/policy renders better message (#3701) (#3821)

Co-authored-by: Martavis Parker <47053705+martavis@users.noreply.github.com>

* Get failing policies webhook data on page load (#3824)

* Fix reset password flow (#3826)

* Prepare for 4.9.0 (#3820)

- Add CHANGELOG
- Bump versioning
- Remove changes files
- Spelling fix for operating system policy's description

* Remove merge artifact

Co-authored-by: Zach Wasserman <zach@fleetdm.com>
Co-authored-by: Martin Angers <martin.n.angers@gmail.com>
Co-authored-by: Noah Talerman <47070608+noahtalerman@users.noreply.github.com>
Co-authored-by: Luke Heath <luke@fleetdm.com>
Co-authored-by: gillespi314 <73313222+gillespi314@users.noreply.github.com>
Co-authored-by: RachelElysia <71795832+RachelElysia@users.noreply.github.com>
Co-authored-by: Martavis Parker <47053705+martavis@users.noreply.github.com>
2022-01-24 15:32:25 -03:00
Tomas Touceda
f02bef6f2c
Add platform filter to host_summary (#3845)
* Add platform filter to host_summary

* Add documentation

* Actually forward the platform param down the chain

* Update mock

* Update mock
2022-01-24 14:49:21 -03:00
RachelElysia
85487eb5b2
Settings > Organization Settings: Code revamp (#3580) 2022-01-21 12:06:58 -05:00
Tomas Touceda
9d572309ae
Add sentry (#3669)
* Add sentry

* Fix gosum

* More gosum fixes

* Add missing def for config

* Enrich sentry scope a bit

* Add changes file

* Add goroutine safe scope to errors

* Encapsulate sentry logic

* Add documentation for new flag

* Add sentry capturing to crons and other background tasks

* Only send to sentry when enabled
2022-01-20 16:41:02 -03:00
Luke Heath
67326e16cc
Block autocomplete for username and password in SMTP settings (#3732) 2022-01-20 11:39:55 -06:00
Zach Wasserman
4a70cd69fa
Shorten "simple" query API period to 25s (#3775)
This helps the period stay under the default request timeouts for most
load balancers.

Some default timeouts:
* AWS ALB - 60s
* Nginx - 60s
* GCP LB - 30s
2022-01-19 17:48:57 -08:00
Lucas Manuel Rodriguez
e5cb68cee9
Return 404 when listing policies for a team that does not exist (#3793)
* Return 404 when listing policies for a team that does not exist

* Set mock for auth test
2022-01-19 18:17:42 -03:00
Martavis Parker
4a83201092
No hosts for software/policy renders better message (#3701)
* Allow sort by more than one key

* more accurate message for no hosts on filter

* added changes file

* lint fix

* more accurate message for no hosts on filter

* added changes file

* lint fix

* small logical change

Co-authored-by: Tomas Touceda <chiiph@gmail.com>
2022-01-19 12:49:14 -08:00
Lucas Manuel Rodriguez
47df5e83fe
Return 400 when trying to create packs, queries and policies with empty names (#3761)
* Return 400 when trying to create packs, queries and policies with empty names

* Amend sql query test
2022-01-19 16:07:58 -03:00
Tomas Touceda
eee539cccc
Issue 3707 clean targets on delete (#3739)
* wip

* Delete targets when deleting teams, hosts, and labels

* Add changes file

* Fix error message

* Remove unused teamsTable

* Cleanup new pack

* Clean new packs at end of test
2022-01-19 10:28:08 -03:00
Zach Wasserman
a79d5fbfcc
Optimize users detail query (#3754)
@Smjert reported instances of Windows Domain Controllers having massive
resource utilization and being killed by the watchdog when running this
query. In his test environment, this new query performs much better.
2022-01-18 16:39:32 -08:00
Zach Wasserman
6232bfa1d6
Include browser extensions in software inventory (#3733)
Use appropriate JOINs against users table to include all results.

For #3557
2022-01-18 12:46:04 -08:00
Lucas Manuel Rodriguez
d4243d0a72
Team observers can browse global policies (#3737)
* Allow team observers to browse global policies

* Add integration core test for team observer

* Fix integration tests
2022-01-18 13:18:40 -03:00
gillespi314
ba64dc0003
Improve loading of manage policies page (#3695) 2022-01-18 09:17:44 -06:00
Tomas Touceda
b47cf3d2d4
Better jitter (#3716)
* Better jitter

* Fix lint

* Use milliseconds

* Make duration milliseconds

* Update based on Lucas' suggestion

* Add changes file

* Panic on error

* Fix compilation error
2022-01-18 11:29:57 -03:00
gillespi314
dea23356de
Improve accuracy of query platform compatibility check when WITH expressions used (#3731) 2022-01-17 20:01:29 -06:00
Lucas Manuel Rodriguez
371c533bfc
Improved Datastore usage of osquery hosts requests (#3601)
* WIP

* Amend tests

* Do not load aggregated stats for packs

* Add option to host lite

* Fix remaining TODOs

* Fix osquery_utils tests

* Fix SQL

* Fix SQL (bis)

* Restore AuthenticateHost to load once

* Code improvements and re-add deferred host save

* More fixes to the PR

* Wrap users table update on tx

* Add caching to ListPacksForHost and ListScheduledQueriesInPack

* Remove SaveHostSoftware (replaced by UpdateHostSoftware)

* Add unit tests for new functionality

* Add changes file

* Fix scheduled queries test
2022-01-17 22:52:09 -03:00
Martin Angers
1f185a7a8b
Refactor async host processing to avoid redis SCAN keys (for labels only) (#3639) 2022-01-17 14:53:59 -05:00
Luke Heath
afaecee662
Close flash message when a modal is opened (#3711) 2022-01-16 20:46:20 -06:00
Lucas Manuel Rodriguez
61b21df79e
Add flags to fleetctl preview to set custom orbit and osqueryd update channels (#3683)
* Add channel options for orbit update on fleetctl preview

* Add changes

* Also set channels on orbit execution in preview
2022-01-14 18:25:26 -03:00
Lucas Manuel Rodriguez
d7e2e33e01
Disable orbit osquery extensions on Windows (#3705)
* Disable orbit osquery extensions on Windows

* Add the same to shell.go
2022-01-14 17:42:38 -03:00
RachelElysia
1041c6dd46
Settings Pages Refactor: User management page & Teams > members page (#3625) 2022-01-13 18:11:45 -05:00
Zach Wasserman
1dc6ef6226
Orbit 0.0.6 changelog (#3682) 2022-01-13 14:31:58 -08:00
gillespi314
dc8eacc95c
Add AvailableTeams to loginResponse and getUserResponse (#3585) 2022-01-13 13:57:44 -06:00
RachelElysia
a85e47b28b
Spiffier UI: Dashboard and Manage Host Page loading states (#3638) 2022-01-13 12:12:54 -05:00
gillespi314
6952653e1b
Fix usage stats to send missing numLabels field (#3606) 2022-01-13 11:11:13 -06:00
gillespi314
39b7c7d9f9
Add pagination and multi-column sort to live query results table UI (#3647)
* Refactor live query results to react-table
2022-01-13 11:06:32 -06:00
Luke Heath
e64f1a63ba
Correct instances of multiple requests for same resource (#3631) 2022-01-12 18:16:50 -06:00
RachelElysia
09efce8ea8
Bug fix: No matching hosts message (#3652) 2022-01-12 15:01:47 -05:00
Tomas Touceda
4bed4757fb
Remove cleanups and fk for host ids (#3607)
* Remove cleanups and fk for host ids

* Readd missing things to the schema

* Remove unused

* Add changes file and fix some error messages

* Fix test

* Use tx instead of plain writer

* Other fixes

* More not found test fixes

* Go back to getcontext
2022-01-12 14:07:51 -03:00
Tomas Touceda
312bd840a2
Detect not found errors for queries and policies (#3595)
* Detect not found errors for queries and policies

* Fix test
2022-01-12 10:04:16 -03:00
Lucas Manuel Rodriguez
49ceee59aa
Add fixes for running tests with mysql:8 and add mysql to test-go job matrix (#3627)
* Add fixes for running tests with mysql:8

* Add getServer function

* Test github matrix

* Add changes file for the user facing fix

* Remove unused mysql8 docker-compose
2022-01-11 22:44:37 -03:00
Martin Angers
f14f97156c
Add read and write timeout options for redis (#3624) 2022-01-11 17:08:39 -05:00
Luke Heath
cc73f2d5a4
Handle response.body if it is not JSON (#3599) 2022-01-11 13:52:28 -06:00
Tomas Touceda
c662cd2b53
Add policies yaml (#3464)
* Add policies yaml

* Add documentation and address review comments

* Amend documentation
2022-01-11 11:04:29 -03:00
RachelElysia
a5bef8a990
Spiffier: Center logo in nav bar (#3605) 2022-01-10 14:07:47 -05:00
Lucas Manuel Rodriguez
7823bbbaba
Fix orbit and osqueryd logging on Windows (#3521)
* Fix orbit and osqueryd logging on Windows

* Add functionality to test the change and use systemprofile app data

* Add centos syslog to README.md

* Add wait on orbit for osquery extension socket to exist (#3571)

* Wait for osquery extension socket to exist

* Amend changes

* Fix lint

* Restore timeout
2022-01-07 19:32:31 -03:00
RachelElysia
bb2b8fa70f
Spiffier UI: Allow opening nav items in new tab (#3514) 2022-01-07 11:18:21 -05:00
Luke Heath
7161160a9f
Audit UI logic and remove redundant initializations (#3574) 2022-01-05 21:41:52 -06:00
RachelElysia
4a382d8b4f
Spiffier UI: Checkbox and radio button styling (#3560) 2022-01-04 12:49:42 -05:00
RachelElysia
7ae666a274
User Settings Page: Link to privacy policy (#3561) 2022-01-04 12:48:20 -05:00
Noah Talerman
09654d77ee
Prepare for Fleet 4.8.0 (#3536) 2021-12-31 09:58:08 -08:00
Lucas Manuel Rodriguez
2f4ecb1b6b
fleetctl package command to check for PEM file (#3375)
#3374
2021-12-29 17:32:55 -08:00
Lucas Manuel Rodriguez
aaa5b7ec3c
Allow hosts to check in even if Redis is down (#3506) 2021-12-29 17:06:23 -08:00
gillespi314
fec450ab5a
Fix pagination for homepage software UI (#3501) 2021-12-29 16:22:18 -06:00
Luke Heath
8f606ffccd
Refactor manage hosts search (#3475) 2021-12-29 12:10:54 -06:00
gillespi314
6d2d28d5a8
Add mobile device management and device-user mapping information to host details to UI (#3499)
* Add mdm, munki and device-user mapping to UI
2021-12-27 17:57:15 -06:00
gillespi314
dde8bd88ca
Fix bug in live query results UI (#3462) 2021-12-27 12:29:52 -06:00
gillespi314
b54b5722d8
Handle certificate errors in generate installer UI (#3435)
* Handle errors in generate installer UI

* Add pem validation
2021-12-23 18:12:08 -06:00
gillespi314
013f425b0b
Add form validation to create/edit user modal (#3479) 2021-12-23 18:09:48 -06:00
Lucas Manuel Rodriguez
787944482b
Global policies automation webhooks (#3378)
* Add webhook to app config

* Add redis failing policies set and webhook

* Add basic webhook test

* Store hostname in redis

* Global policy deletion to remove policy ID from set and config

* Also process new passing policies

* Fix unit test

* Sort hosts

* Add more tests

* Add ListSets to the failing policies interface

* Fix server URL and garbage collect on the triggering side

* Do not use Redis SCAN

* Fix Redis operation order

* Add API changes to doc

* Add comments

* Add more tests

* Fix tests

* Add tests for config update upon deletion of policies

* Run make dump-test-schema

* Ignore policies that failed to run

* Add proper unit tests to trigger logic

* Fix comments

* WIP

* Add tests to service_osquerty_test.go

* Use SSCAN for listing hosts instead of SMEMBERS

* Add failing policies to docs/01-Using-Fleet/configuration-files/README.md

* Remove skip

* Fix PR comments
2021-12-23 18:26:55 -03:00
Tomas Touceda
06a64cdd2c
Use id instead of seen time/created_at to sort hosts (#3482)
* Use id instead of seen time/created_at to sort hosts

* Add test for ordering by id
2021-12-23 15:45:50 -03:00
Luke Heath
1d891cd343
Fix incorrect load state when selecting all hosts from the hosts filter (#3426) 2021-12-22 20:56:52 -06:00
RachelElysia
d3b2bd362d
E2e policy flow (#3322) 2021-12-22 13:06:52 -05:00
Luke Heath
e75c5dbdaf
Clear selected hosts on transfer (#3430) 2021-12-22 11:07:12 -06:00
Martin Angers
1e2059585a
Add support for google chrome profiles (#3423) 2021-12-21 15:36:19 -05:00
Lucas Manuel Rodriguez
93f4577c7d
Fix policy membership migration for MariaDB (#3418)
* Fix policy membership migration for MariaDB

* Use constraintsForTable to get the proper foreign key names
2021-12-21 14:39:46 -03:00
Tomas Touceda
fe67b0486b
Finish first draft of API versions (#3216)
* Finish first draft of API versions

* wip

* Finalize tests

* Revert change in handler

* Remove made up version

* Update versioning with aliases

* Add changes file

* Address review comments

* Revert overupdated routes

* Expand life time of deprecated APIs

* Fix test

* Comment out problematic part of test

* Revert bad path changes
2021-12-21 12:23:12 -03:00
Tomas Touceda
5a9e207fbf
Update documentation and add changes file (#3437) 2021-12-21 10:47:02 -03:00
gillespi314
c9e8f4aab0
Fix bug in target selector UI (#3419) 2021-12-20 12:24:52 -06:00
Luke Heath
1c4bc0954c
Fix loading indicator on select targets pages (#3408) 2021-12-20 11:36:17 -06:00
Martin Angers
e988d16eb3
Update the prometheus go client library (#3140) 2021-12-20 09:20:58 -05:00
Luke Heath
5b64985ece
Refine manage hosts page to better handle timing and loading issues (#3402) 2021-12-17 15:40:57 -06:00
RachelElysia
dc3143b437
Pack flow: Refactor ManagePacksPage (#3376) 2021-12-16 15:35:19 -08:00
Luke Heath
f6a74f69c9
Refine create policy UI flow (#3379) 2021-12-16 12:09:10 -06:00
RachelElysia
e60332b8b0
Policy Details/Query Details: No hover state if policy/query is not editable by RBAC (#3368) 2021-12-16 09:54:53 -08:00
Lucas Manuel Rodriguez
5aeb418945
Exclude old data migration from the migrations check (#3373) 2021-12-16 10:52:42 -03:00
Martin Angers
4143a37056
Fix redis scan keys issue for live queries (#3107) 2021-12-14 16:30:26 -05:00
Noah Talerman
8957f00d86
Prepare for Fleet 4.7.0 (#3355) 2021-12-14 11:25:13 -08:00
Zach Wasserman
33797ddfc1
Optimize requests on packs page (#3327)
Improves #3259
2021-12-13 21:50:24 -08:00
Lucas Manuel Rodriguez
25fd04ea18
Fix team packs rego policy rules (#3356) 2021-12-13 20:53:29 -08:00
Zach Wasserman
ac3d8ddf02
Increase default login session length to 24 hours (#3340) 2021-12-13 20:42:30 -08:00
Luke Heath
0d52460c27
Allow platform selection on policy query creation (#3338) 2021-12-13 18:21:36 -06:00
RachelElysia
c64627caa4
Manage Queries Page: No queries does not show create new query cta for observers (#3358) 2021-12-13 15:57:56 -08:00
RachelElysia
c491616eb5
Manage Host Page Bug: Update observers to not see generate installer CTA (#3352) 2021-12-13 13:44:28 -08:00
Zach Wasserman
3a5037f798
Update query for users listing (#3324)
- Filter undesired entries.
- LEFT JOIN to include users missing groups.

#2488
2021-12-11 16:25:08 -08:00
RachelElysia
e05562ef09
Spiffier: Fix grammar and sentence casing (#3316) 2021-12-10 11:57:06 -08:00
Luke Heath
84d36d9e22
Policies own their queries flow QA fixes (#3323) 2021-12-10 13:17:36 -06:00
Lucas Manuel Rodriguez
8bbc52bbff
Fix policy rego bug with fleet policies (#3331)
* Fix policy rego bug with fleet policies

* Simplify rego policy fix
2021-12-10 11:47:41 -03:00
RachelElysia
9e905f8e10
Query Empty Search: Fix count and empty state (#3314)
* Display count is now correct, bug with 0 being falsy
* Empty component renders for client side search even if data table 'disappears'
* Hide display count if display count is 0 includes for client side search
* Hide search and dropdown if no queries have been created
2021-12-09 14:43:34 -08:00
Tomas Touceda
66f4fc46c0
Only join big tables when absolutely needed (#3308)
* Only join big tables when absolutely needed

* Fix test

* Revert unintended change in test
2021-12-09 17:36:12 -03:00
Luke Heath
2abae381e9
Add ability to run live queries on new and existing policies (#3230) 2021-12-09 10:38:51 -06:00
RachelElysia
b397b3a68e
Dashboard: Show software count in dashboard's software modal (#3228) 2021-12-08 22:30:28 -08:00
RachelElysia
37ffb88ec8
Default policy renders on refresh of new policy page, changelog (#3243) 2021-12-08 22:16:34 -08:00
Luke Heath
7f8cb264f8
Return spinner when loading live query results (#3261) 2021-12-08 16:07:43 -06:00
Zach Wasserman
3a973af164
Fix Windows Orbit packaging with non-stable channel (#3210) 2021-12-07 19:49:57 -08:00
Luke Heath
fde1da714b
Add team filtering to software card and improve load states (#3188) 2021-12-07 14:42:21 -06:00
Tomas Touceda
8686c1520b
Add index software (#3241)
* Add index to software over name/id

* Update schema

* Remove double semi colon
2021-12-07 16:36:13 -03:00
Lucas Manuel Rodriguez
8cea7f480a
Add HostLinuxOSs (#3217)
* Add HostLinuxOSs

* Add test for PlatformFromHost

* Add sles, gentoo and kali on linux host OSs
2021-12-07 15:37:00 -03:00
RachelElysia
04fe0a42b5
App wide: Better errors for duplicate query, policy, and team names (#3121) 2021-12-07 11:12:36 -06:00
Lucas Manuel Rodriguez
a47c605bdd
Log request errors in non-debug mode (take 2) (#3215)
* Log request errors in non-debug mode

* Amend test for debug

* Add check for error log
2021-12-07 12:52:43 -03:00
Lucas Manuel Rodriguez
6b8a2cb61a
Fix mysql8 compatibility with zero dates (#3231)
* Fix mysql8 compatibility with zero dates

* Amend date
2021-12-07 12:51:53 -03:00
Tomas Touceda
dc9686024b
Remove tx from SaveHost (#3232)
* Remove tx from SaveHost

Also change REPLACE for software for an insert.

* Remove bundle identifier from the get since it's not part of the key

* Revert unneeded change
2021-12-07 12:39:07 -03:00
Luke Heath
78d5e13a97
Show all teams for global users and save team selection between pages (#3204) 2021-12-06 20:04:40 -06:00
Luke Heath
b3a69680e7
Fix duplicate hosts on render when host_id URL params are present (#3189) 2021-12-06 20:02:52 -06:00
RachelElysia
10dbfaad86
Query UI Bug: Query checkbox now reset on delete (#3203) 2021-12-06 11:25:02 -06:00
Lucas Manuel Rodriguez
c5375263b6
Change policy platforms name to platform singular (for consistency) (#3221)
* Change policy platforms name to platform singular

* Fix fleetctl tests
2021-12-06 13:56:28 -03:00
Martin Angers
b84ef79bf4
Add the fleetctl debug {errors,db-locks} sub-commands (#3168) 2021-12-06 09:26:01 -05:00
RachelElysia
eba5d1b1b6
Manage Policies Page: New policy modal (#3108) 2021-12-05 17:12:55 -06:00
Lucas Manuel Rodriguez
b9a408704e
Add platforms field to policies (#3181)
* Add platforms field to policies

* Fix fleetctl tests

* PR review changes

* Add missing tests

* Add changes for ListPoliciesForHost
2021-12-03 15:33:33 -03:00
Tomas Touceda
142006cbdd
Issue 2099 enable vulnerability processing new installs (#3104)
* Enable vulnerability processing by default

* Add changes file

* Remove wrong env var

* Fix import

* Fix tests

* Update log line

* Remove unneeded import
2021-12-03 14:44:57 -03:00
Luke Heath
4c19c9c8b1
Update policy back link to return to selected team (#3190) 2021-12-03 10:13:40 -06:00
Tomas Touceda
17bd4d5110
Remove policy membership history and only store the latest value (#3178)
* Remove policy membership history and only store the latest value

* Address review comments

* Correct error msg wrap
2021-12-03 13:10:11 -03:00
Tomas Touceda
5cff07f332
Issue 3184 drop event host expiry (#3185)
* Drop event host_expiry if it exists

* Add changes file
2021-12-03 12:34:58 -03:00
Tomas Touceda
a0404b6736
Add software count API (#3105)
* Add software count API

* Fix makefile

* Fine no mock generating at this point

* Actually, one last try

* Use go install instead

* Fix go sum/mod

* Improve documentation

* Try setting node to 14
2021-12-03 10:54:17 -03:00
Tomas Touceda
052e41851b
Prepare for Fleet 4.6.2 (#3146) (#3179)
Co-authored-by: Noah Talerman <47070608+noahtalerman@users.noreply.github.com>
2021-12-02 16:56:56 -03:00
RachelElysia
1253020678
New Policy UI: Add policy resolution to create and edit policy (#3125) 2021-12-02 10:03:56 -05:00
Luke Heath
e750eb9745
Standardize TeamsDropdown component usage (#3135) 2021-12-01 17:37:33 -06:00
Luke Heath
79e046182a
Add client side pagination to queries table (#3165) 2021-12-01 13:05:04 -06:00
Luke Heath
6624a9dfef
Add redirects to page paths (#3161) 2021-12-01 11:42:31 -06:00
RachelElysia
cb4707cef0
Query and Policy Flow: SQL error in realtime (#3158) 2021-12-01 12:18:58 -05:00
Lucas Manuel Rodriguez
e64a88d8b1
Add COALESCEs on all host_seen_times JOINs (#3147)
* Add COALESCEs on all host_seen_times JOINs

* Use tx instead of d.writer

* Add unit tests

* Fix compile test
2021-12-01 09:05:23 -03:00
Tomas Touceda
4ef9cfdf63
Increase grace period of status for hosts (#3151)
* Increase grace period of status for hosts

* Update tests

* Update more tests
2021-11-30 18:37:27 -03:00
RachelElysia
3b0a454fb5
App wide UI: Fix policies keys (#3145) 2021-11-30 13:24:30 -05:00
RachelElysia
b3b107512e
Host Details Page: OS policy creator (#3109) 2021-11-30 12:12:53 -05:00
Tomas Touceda
919a3b5b01
Add forgotten changes file (#3144) 2021-11-30 13:12:09 -03:00
RachelElysia
185441adc9
Manage Schedule Page: Create/Edit schedule preview modal (#3102) 2021-11-29 18:29:41 -05:00
Tomas Touceda
036093874d
Add cursor pagination to list hosts (#3120)
* Add cursor pagination to list hosts

* Update docs

* Update based on review comments
2021-11-29 15:06:00 -03:00
Tomas Touceda
a36e029d95
App config caching per instance (#3071)
* Do caching of app config per instance instead of across all of them in redis

* Add changes file

* Simplify code based on review comment

* Use go-cache instead of creating our own

* Dont export consts

* Copy app config before returning it

* Fix lint

* Update go sum

* Update go sum
2021-11-29 12:51:57 -03:00
Martin Angers
c997f853e5
Make creation of http.Client uniform across the codebase (#3097) 2021-11-24 15:56:54 -05:00
Lucas Manuel Rodriguez
964f85b174
Amend policy creation and spec (for proprietary query), and add update APIs (#2890)
* Amend policy creation (proprietary query), add update APIs

* Fix Datastore.SavePolicy bug (and add tests)

* Add integration tests for new policy APIs

* Add author email

* Add activities

* Push breaking changes for return policy fields

* WIP

* Add integration test for host policies

* Make more improvements to policy representation

* Improve upgrade code (from PR review comments)

* PR changes

* Revert activities for policies

* Use *uint instead of uint for queryID, use fleet.PolicyPayload

* Filter out other schemas

* New policy flow (#2922)

* created new policy flow -- no API connection

* added api props

* fixed prop name

* lint fixes

* removed unused modal; fixed style

* name, desc icons; created global components

* lint fixes

* ignoring certain files and lines for prettier

* Update frontend/pages/policies/PolicyPage/PolicyPage.tsx

* Make policy names unique across deployment

* Amend upgrade script

* Fix migration for unique names

* Do not deduplicate but instead rename policies

Co-authored-by: Martavis Parker <47053705+martavis@users.noreply.github.com>
2021-11-24 14:16:42 -03:00
Tomas Touceda
c65f8507fe
Remove host counts from software (#3082)
* Remove host counts from software

* Actually remove the host count from the struct

* Fix get test
2021-11-23 15:50:51 -03:00
Luke Heath
f510dcf936
Page position jumps when loading homepage software table (#3092) 2021-11-23 12:18:35 -06:00