Commit Graph

519 Commits

Author SHA1 Message Date
Victor Vrantchan
6135f90f57 change recordlabelexecutions to use map[uint]bool instead of map[string]bool (#965)
Closes #345
2017-01-17 01:03:51 -05:00
John Murphy
a2fded1b2c Added hosts for each label (#963) 2017-01-17 06:57:05 +08:00
Mike Stone
da27a44493 Filter hosts for “All Hosts”, platform hosts, and status hosts (#971) 2017-01-17 06:55:31 +08:00
Mike Arpaia
5cc5220e5b Enforce uniqueness on query name (#915)
* Enforce uniqueness on query name

close #914

* catching the already exists error in MySQL
2017-01-16 15:20:15 -07:00
Mike Stone
630ba45448 756 status labels (#967)
* API client to get status label summary

* Handle status label counts in state

* Display status counts in hosts side panel
2017-01-16 15:59:01 -05:00
Mike Arpaia
066ec298b5 Don't return an error if statistics are requested and no hosts are available (#970)
close #966
2017-01-16 12:52:03 -07:00
John Murphy
f9fa65bfaa Changed query columns to TEXT type (#969) 2017-01-17 03:20:11 +08:00
Victor Vrantchan
f74216761a remove binaryFilesystem wrapper from bindata files (#964) 2017-01-16 10:16:50 -05:00
Victor Vrantchan
52a932bc6b Validate password requirements (#962)
Add validation for user password creation/reset
 - at least 7 chars
 - 1 number
 - 1 symbol 

consolidated service errors to a single file.
2017-01-15 18:23:09 -05:00
Victor Vrantchan
3802f3098e remove deprecated errors package (#961) 2017-01-14 15:00:09 -05:00
Kyle Knight
501f2c74c7 Fix rendering issues with Firefox ForgotPassword (#958) 2017-01-13 18:32:21 -05:00
Mike Stone
639bdb4e11 Scaffold import config page (#927) 2017-01-13 18:27:58 -05:00
Kyle Knight
0c18b5161a Load higher quality gravatar (#957) 2017-01-13 18:10:43 -05:00
Kyle Knight
3113ae4651 Add a timer component to new query screen (#944) 2017-01-13 17:15:03 -05:00
Kyle Knight
ed1fa22729 Add caret back into the user menu dropdown (#950) 2017-01-13 15:23:11 -05:00
Mike Arpaia
581000bb64 Revert "Add some basic decorators to the osquery config (#875)" (#953)
This reverts commit 1d029073e5.
2017-01-13 13:21:54 -07:00
John Murphy
6f4dcdd082 Import Config - /config/import #366 (#764) 2017-01-13 12:35:25 -06:00
Victor Vrantchan
de3794b17b remove SMTP CLI flags. SMTP is now handles as app config in db (#949) 2017-01-13 08:54:16 -05:00
Kyle Knight
a8b8e0fd50 Sort hosts cards alphabetically and by status (#941) 2017-01-12 20:18:23 -05:00
Kyle Knight
048938de0b Add spinner for running Query (#926)
* Add spinner for running query

* fixing lint

* Adding in check for this.socket

* Full height results area with centered spinner

* Don't hide table if query is stopped

* Remove results container if no results yet

* No more console.log
2017-01-12 12:28:46 -06:00
Kyle Knight
0a9f0cccb4 Alphabetize New Query sidebar table dropdown (#939) 2017-01-12 13:23:17 -05:00
Kyle Knight
7108a816b7 Manage Query row highlighted when selected (#935) 2017-01-12 11:45:55 -05:00
Kyle Knight
427235b837 Select Targets disabled adding padding to right side (#925) 2017-01-12 11:32:41 -05:00
Kyle Knight
a8824678a3 Removing fixed header from New Query results table (#912) 2017-01-12 10:09:04 -06:00
Victor Vrantchan
36dfad37ea allow osqueryd endpoints to enroll before app setup is complete (#931)
Closes #929
2017-01-11 19:40:58 -05:00
Kyle Knight
6f0fb864d7 Styling packs list in Manage Query sidebar (#856) 2017-01-11 19:31:23 -05:00
Mike Arpaia
dcfbe1b2d3 Ensure that manually attached hosts get packs (#922)
Previously, when determining which packs a host should get when it checked in, we were iterating each pack and only checking whether or not the host was apart of a label which was a target of the pack, but we were never checking whether or not the host had been added as a specific target of that pack. This PR makes the necessary modification to `svc.ListPacksForHost`.
2017-01-11 15:24:32 -07:00
Kyle Knight
38120b9fca Sidebar, titles, and descriptions should now force wrap or ellipsis (#905)
* Sidebar, titles, and descriptions should now force wrap or ellipsis

* Fixing lint issue
2017-01-11 14:35:45 -06:00
Mike Arpaia
cf805aa66c Only return hosts which have been explicitly scheduled from packs API (#909)
* Only return hosts which have been explicitly scheduled from packs API

close #903

* better error handling

* documentation
2017-01-11 13:33:30 -07:00
Kyle Knight
d6964d058f Remove descriptions from custom labels (#870) 2017-01-11 12:27:46 -07:00
Kyle Knight
1a011dadbd Removing requirement for org avatar & fixing "Enter" key on /setup (#871)
* Removing requirment for org avatar

* Convert /setup to multiple forms

* Getting kinks worked out of Enter key

* Fixing typescript nonesense linting issues
2017-01-11 12:27:33 -07:00
Kyle Knight
7a44c269a9 Prevent default queries from rendering (#862)
* Prevent default queries from rendering

* Small styling tweaks
2017-01-11 13:08:27 -06:00
Victor Vrantchan
1551e46fed add middleware to redirect setup to login if the app has an admin (#900)
user.
2017-01-11 14:05:07 -05:00
Zachary Wasserman
671255b105 Fix bug in saving host detail update time (#888)
Saving a new detail update time when the host details were not actually updated
caused detail updates to be missed. This PR fixes the existing test to catch
the bug, and fixes the bug.
2017-01-11 11:48:24 -07:00
Mike Stone
d1a18bcb89 Add targets to packs (#831)
* Allow form field values to be an array

* Send the server host and label ids on create

* Get and display the targets in a pack

* Adds target_type to labels and hosts

* Allow updating a pack’s targets as well as name and description

* Adds select targets dropdown to edit pack page

* Adds targets to dropdown when pack is edited
2017-01-11 12:10:14 -05:00
Mike Arpaia
c2084026d1 Call MarkHostSeen from authenticate host (#881) 2017-01-11 09:30:13 -07:00
Kyle Knight
242ee30531 Render username if no name is present (#854)
* Render username if no name is present

* Adding in unspecified job title
2017-01-11 08:40:58 -06:00
Mike Arpaia
9987983cb9 Simplifying SMTP Logic (#892)
* Simplifying SMTP Logic

This commit breaks the test email sending into it's own service method
(thus removing the capability from the API- if we want it back, we can
wire up another endpoint for just that). Additionally, error wrapping is
used through the new ModifyAppConfig service method to ensure that an
error or failed email will always result in an error while ensuring that
the submitted record always get committed (unless a serious error
happens).

* never wrap a nil error

* use err instead of individual errors
2017-01-11 01:27:09 -07:00
Victor Vrantchan
393e4c7db4 add system roots to alpine container. (#890)
Fixes #889
2017-01-11 01:39:14 -05:00
Mike Arpaia
2b73444e6e Added the debug flag to the osquery flagfile (#872) 2017-01-10 22:21:10 -07:00
Victor Vrantchan
f276ff3d90 Wrap email errs (#884)
* wrap errors returned by SMTP client

* remove client hello
2017-01-10 23:56:32 -05:00
Mike Arpaia
efca0947ec SMTP API changes (#883)
* SMTP API changes

* remove smtp buttons

* remove password from api response

* no fields are required in the patch request
2017-01-10 21:41:58 -07:00
Zachary Wasserman
971eca9b2b Push distributed query errors over results websocket (#878)
As of recently, osquery will report when a distributed query fails. We now
expose errors over the results websocket. When a query errored on the host, the
`error` key in the result will be non-null. Note that osquery currently doesn't
provide any details so the error string will always be "failed". I anticipate
that we will fix this and the string is included for future-proofing.

Successful result:

```
{
  "type": "result",
  "data": {
    "distributed_query_execution_id": 15,
    "host": {
    ... omitted ...
    },
    "rows": [
      {
        "hour": "1"
      }
    ],
    "error": null
  }
}
```
Failed result:

```
{
  "type": "result",
  "data": {
    "distributed_query_execution_id": 14,
    "host": {
    ... omitted ...
    },
    "rows": [
    ],
    "error": "failed"
  }
}
```
2017-01-10 19:34:32 -08:00
Mike Arpaia
2371f58705 Remember to enable SMTP after configuring it (#882) 2017-01-10 19:51:40 -07:00
Mike Arpaia
5eb926c891 Make SMTP configuration work (#877)
* add a js validator that makes smtp server port required

* specifying that the InputField should be a number. this doesn't work, but i think that it should.

* casting the port as an int as a stop-gap fix

* email doesn't already have to be enabled to be enabled

* don't return the smtp password from the API

* show a fake placeholder password if the username is also set

* error type for @groob
2017-01-10 19:00:46 -07:00
Mike Arpaia
eea116836f Extra comma in SQL string (#876) 2017-01-10 16:25:26 -07:00
Mike Arpaia
1d029073e5 Add some basic decorators to the osquery config (#875)
close #874
2017-01-10 16:02:42 -07:00
Mike Arpaia
84aaec0d71 Fix a few osquery config bugs (#869) 2017-01-10 15:27:52 -07:00
Victor Vrantchan
9789543f8f add mock package and use in invite tests (#603)
* add mock package and use in invite tests

* mock expired invite test
2017-01-10 16:49:14 -05:00
Victor Vrantchan
1ba5559ae3 Fix race condition and remove outdated assertions from test (#850)
Fixes #751
For #760
Race conditions were caused by running the test in parallel.

Also remove assertions which were no longer true. The RequestPasswordReset
method was refactored in #725, but because of the racy test, the assertions
which should've failed did not.
2017-01-10 16:41:50 -05:00