Commit Graph
485 Commits
Author SHA1 Message Date
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
Zachary Wasserman 72dd667421 Fix result log struct to support snapshot logs (#866)
Snapshot logs have a different schema, and are now (un)serialized correctly.

Fixes #841
2017-01-10 12:54:35 -08:00
Zachary Wasserman b3213e5921 Fix failing Redis query results test (#864)
Due to the timezone being changed on time.Time's zero value after a roundtrip
serialization, any times being compared in this test must be explicitly set.
2017-01-10 11:56:38 -08:00
Kyle Knight f3f6ff4010 Fixing some styling issues on New Label Query (#849)
* Fixing some styling issues on New Label Query

* Fix lint error:
2017-01-10 13:20:36 -06:00
Kyle Knight 204417b361 Fixed position Flash Message (#859) 2017-01-10 13:10:15 -06:00
Kyle Knight 9ed7c44d0f Updating sidebar content on Manage Packs (#857)
* Updating sidebar content on Manage Packs

* Updating documentation link and some spelling issues
2017-01-10 13:09:55 -06:00
Kyle Knight 73035877b3 Fixing spacing of manage packs header (#848)
* Fixing spacing of header

* Make h1 headers consistent
2017-01-10 10:27:10 -06:00
Victor Vrantchan 1896961cba cli/serve: use server address from config (#853)
Until now, despite having the appropriate config flag, we were using a
hardcoded port for server address. Switch the ListenAndServe methods to use
the config params instead.
2017-01-10 11:07:14 -05:00
Victor Vrantchan 48ca30bffc add the error message to DatabaseError (#846) 2017-01-10 11:01:47 -05:00
Mike Arpaia ee3940e163 Adding the display_text attribute to the hosts API (#842)
* initial scaffolding of a hostResponseForHost helper to consistently get all required values when returning hosts via the api

* Using the hostname as the display text

* remove err: nil

* groob comments

* pre-allocating the hostResponses slice
2017-01-09 22:05:18 -07:00
Zachary Wasserman 60428e01c4 Fix required password reset flow (#833)
Permissions errors were preventing users from completing this flow

- Add separate endpoint for performing required password reset
- Rewrite frontend reset to use this endpoint

Fixes #792
2017-01-09 21:42:50 -07:00
Victor Vrantchan 71def50756 add missing logs to kolide service (#843)
Add logging middleware for more of the kolide Service interfaces. 
This PR was created through code generation, however it's not likely that the logging middleware can all be continuously regenerated - we're likely to want to add method specific key/values to individual methods. Moving forward, logging middleware should be maintained when changes are made to a service interface method.
2017-01-09 23:40:21 -05:00
Mike Arpaia 92f755e0af index into pre-allocated array (#844) 2017-01-09 21:30:51 -07:00
Kyle Knight 0fc4238595 Styling Manage Queries page (#793) 2017-01-09 21:58:18 -05:00
Kyle Knight 2bbad2f05a Getting New Query back in order (#830) 2017-01-09 17:13:52 -06:00
Mike Stone fa5c0c53cd Fix run query bug where query text wasn’t changing (#821) 2017-01-09 15:32:23 -05:00
Zachary Wasserman f11da7b05b Update docker osqueryd flags to use server provided config (#822) 2017-01-09 12:07:19 -08:00
Zachary Wasserman cb23dab4be Clarify label types (#820) 2017-01-09 12:02:21 -08:00
Mike Arpaia ede7f9773d Fixing typo in osquery tools README (#797) 2017-01-09 11:03:28 -07:00
Mike Arpaia a047ef2211 Quick contexts additions (#739)
* Defining a concrete type for session tokens

* More rightish vc.IsLoggedIn()

* using type conversion instead of a method call

* include sessions in test viewer contexts
2017-01-09 08:10:02 -07:00
Mike Stone cc5aa3395d Password fields (#769)
* Sets original password and SMTP config password as HTML password fields
2017-01-09 09:44:52 -05:00
Mike Stone 18ba071a88 Fix logout bug on Safari (#787) 2017-01-06 22:09:31 -07:00
Mike Stone 1831e131a3 Correctly sets the user’s role in user settings page (#786) 2017-01-06 22:07:23 -07:00
Zachary Wasserman 77e4f3d936 Refactor require password reset into separate endpoint (#725)
- Remove require password reset from ModifyUser and
  RequestPasswordReset methods, and UserPayload struct
- Add new RequirePasswordReset method
- Refactor JS for new separate method
2017-01-06 14:38:39 -08:00
Mike Stone 39c9c6b0da Manage queries page (#762)
* renders ManageQueriesPage at /queries/manage

* Renames QueriesList components to ScheduledQueriesList components

* creates QueriesList component

* Adds side panel component to display query details

* Adds KolideAce editor to Query Details side panel

* Handle Edit Query button click

* Change text of the Delete Query button

* Show confirmation modal before deleting queries
2017-01-06 15:57:44 -05:00
Zachary Wasserman 5371647d2c Add builtin labels via migration (#728)
Changing from the existing method of adding built in labels at server startup.
This new method should be friendlier to long term changes, and falls in line
with the new pattern established for osquery options.

Fixes #702
2017-01-06 12:30:43 -08:00
Mike Stone a9cfd5b641 Adds API client to destroy queries (#784) 2017-01-06 15:26:58 -05:00
Kyle Knight 8647d9c669 404 & 500 Error pages (#780)
* Adding in favicons

* Helps if i add the images

* Updating apple icon names

* 404 Page

* 500 Page

* Cleaning up linting issues
2017-01-06 13:25:48 -07:00
Mike Stone e9cc3e3a13 Only re-render the org logo when src is changed (#779) 2017-01-06 13:45:37 -05:00
Kyle Knight 3a6a32a645 Favicons (#778)
* Adding in favicons

* Helps if i add the images

* Updating apple icon names
2017-01-06 10:28:34 -07:00
Kyle Knight eaf0105c6c Some additional stylings to make New Packs a little more bester (#679) 2017-01-06 09:36:51 -06:00
Kyle Knight a8947adf36 min-height on manage pages (#770) 2017-01-06 09:31:14 -06:00
Kyle Knight d6a7fd1e3a Moving buttons to be inline with SMTP Options (#768) 2017-01-06 09:30:31 -06:00
Kyle Knight e5a2f42f4b Fixing Manage User cards (#767) 2017-01-06 09:30:06 -06:00
Mike Arpaia 23c86f6c12 Ensure author name and packs are set in NewQuery response (#774) 2017-01-05 18:48:56 -07:00