Commit Graph
98 Commits
Author SHA1 Message Date
Mike Arpaia eb3f3cd765 removing some dependencies from glide (#493) 2016-11-16 10:38:31 -08:00
Mike Arpaia 587d5c9a09 removing gorm struct tags (#491) 2016-11-16 09:48:43 -08:00
John Murphy 6a825c11e3 Datastore refactor (#439)
Removed Gorm, replaced it with Sqlx

* Added SQL bundling command to Makfile

* Using go-kit logger

* Added soft delete capability

* Changed SearchLabel to accept a variadic param for optional omit list
instead of array

* Gorm removed

* Refactor table structures to use CURRENT_TIMESTAMP mysql function

* Moved Inmem datastore into it's own package

* Updated README

* Implemented code review suggestions from @zwass

* Removed reference to Gorm from glide.yaml
2016-11-16 21:47:49 +08:00
Mike Arpaia 752710ccf1 Return count of hosts in targets search for each label (#480) 2016-11-14 12:10:28 -08:00
Zachary Wasserman 9c38d6d19e Update osquery service methods for distributed queries (#476) 2016-11-14 10:22:54 -08:00
Victor Vrantchan 2a9e27e426 add mysql and redis services (#471)
enable redis and mysql tests in CircleCI environment
switch redis test to use UTC time - https://github.com/golang/go/issues/17885
2016-11-10 21:04:26 -05:00
Zachary Wasserman 0b6df0cd73 Fix changed ID column name in DistributedQueriesForHost query (#473) 2016-11-10 17:01:39 -08:00
Zachary Wasserman 5d8a42a959 Fix page in RequireSetup check (#465)
The previous value would require setup unless there were at least 2 users. Now
one user is sufficient to proceed past setup.
2016-11-09 16:35:49 -08:00
Zachary Wasserman af6a5ee1b6 Add datastore methods for distributed queries (#458)
New datastore methods are introduced for creating/updating
distributed query campaigns, as well as determining the active
distributed queries for a given host.
2016-11-09 15:33:16 -08:00
Zachary Wasserman c8b9b15ef2 Fix failing MySQL tests for packs (#457) 2016-11-09 15:31:47 -08:00
Victor Vrantchan ac14215e21 create first time setup endpoint (#436)
The endpoint is only active if there are no users in the datastore.
While the endpoint is active, it also disables all the other API endpoints, and /config returns `{"require_setup":true}`
for #378
2016-11-09 12:19:07 -05:00
Zachary Wasserman 0388297fd8 Fix missing primary key designation in DistributedQueryExecutions (#450) 2016-11-09 09:09:29 -08:00
Zachary Wasserman 675c40ea15 Cleanup in service_users_test (#460)
- Use subtests where appropriate
- Attempt to fix #445
2016-11-09 08:52:25 -08:00
Zachary Wasserman 991fd6c146 Ensure tables are dropped after panic in test (#456)
Prior to this, a panic in the test function would leave data in the database.
Now we ensure that tables are dropped even after a panic.
2016-11-08 13:46:36 -08:00
Victor Vrantchan def24499b5 store WebAddress config in datastore (#421)
moves web address config to datastore so that it can be configured by a user
in the Web UI.
rename OrgInfo struct to AppConfig.

For #363
For #378
2016-11-04 16:44:38 -04:00
Victor Vrantchan b518447b31 correctly save user properties during ModifyUser call. (#395)
fixes #351

because RequestPasswordReset does it's own db query/save,
call it at the end, after all properties have already been saved.
2016-11-03 12:50:32 -04:00
Mike Arpaia 97de2bc5aa Label API Updates (#413)
close #403
close #404
close #412
2016-11-02 21:17:23 -04:00
Mike Arpaia 7ebebbb7b1 Target search endpoint (#339) 2016-11-02 10:59:53 -04:00
Zachary Wasserman 262a48f8eb Datastores for buffering distributed query results (#346)
A new datastore interface is needed for buffering incoming distributed query results to be sent to the client. This PR attempts to define and implement that interface.

It is intended that the ReadChannel() method be used by the goroutine that will push query results down a websocket to the client. Passing the results through this channel will allow that goroutine to perform a select on both the channel and the websocket, in order to properly handle IO.
2016-10-31 15:51:19 -07:00
Zachary Wasserman 0faa3a55fb Make context imports consistent (#359) 2016-10-31 15:18:05 -07:00
Mike Arpaia c5339ddb76 Fixing bug where non-updated query object is returned (#361) 2016-10-31 18:00:04 -04:00
Mike Arpaia 4f83220870 Add description field to Query (#358) 2016-10-31 17:05:02 -04:00
Victor Vrantchan 950586c100 update datastore logger (#344)
remove dependency on logrus
adapt go-kit/log interface to gorm logger
allow debug logging flag
2016-10-25 11:30:14 -04:00
Victor Vrantchan efffe50a55 update mysql test setup (#343)
reuse a single conneciton pool
close connection gracefully at the end of tests
setup and teardown tables in between each test
2016-10-25 11:01:14 -04:00
Zachary Wasserman d2e31146c6 Fix bugs with password resets (#330)
- Permissions error with admin forced password reset
- Redirecting on successful admin forced password reset
- URL fix for forgot password reset
- Use JWT key for password reset request
2016-10-20 15:09:51 -04:00
Mike Arpaia bdee0516e6 Removing sqlite from the codebase (#324) 2016-10-19 10:46:33 -04:00
Mike Arpaia 98ca32b783 Complete, working inmem datastore implementation (#319) 2016-10-17 15:30:47 -04:00
Zachary Wasserman 05cb15d63c Fix pointer handling in inmem nextID (#323) 2016-10-17 13:11:23 -04:00
Zachary Wasserman f9bb9de665 Add ordering options for List* methods (#318) 2016-10-17 10:01:14 -04:00
Zachary Wasserman 1597ad23a4 Fix NewHost bug introduced in #312 (#317) 2016-10-16 07:56:20 -04:00
Mike Stone beda051de2 Show invited users (#297)
* Adds loadAll action to redux entity config

* API Client get invites

* Add invites to the user management page

* Updates user block styles on user management page

* Submit modal form on enter

* Modify details form styles

* Enter submits edit user form

* Removes unused admin dashboard page

* API Client - revoke invites

* Delete invite entities in redux

* Revoke invites from admin manage users page

* Show success flash message after user invite is revoked
2016-10-14 17:08:57 -04:00
Zachary Wasserman daeecfb244 Fix bug in inmem ID generation (#312)
Fixes #308
2016-10-14 09:15:04 -07:00
Zachary Wasserman d9b98b22d6 Minor cleanup in service_invites_test (#313) 2016-10-14 09:01:26 -07:00
Zachary Wasserman 4b88ae6e2c Apply consistent naming conventions across server files (#310) 2016-10-14 08:59:27 -07:00
Zachary Wasserman 7f636aef4f Add pagination to List* endpoints (#309)
- Introduce kolide.ListOptions to store pagination params (in the future it can
  also store ordering/filtering params)
- Refactor service/datastore methods to take kolide.ListOptions
- Implement pagination
2016-10-13 11:21:47 -07:00
Zachary Wasserman f9fa3e289f Return host 'status' with host endpoints (#307) 2016-10-12 14:41:35 -07:00
Victor Vrantchan 93eaae7454 Lowercase strings which should be case insensitive, like email and username. (#302)
Fixes #299
Closes #300
2016-10-12 12:35:34 -04:00
Zachary Wasserman 5d0cac882a Move API responses under top-level keys (#292) 2016-10-11 09:22:11 -07:00
Zachary Wasserman 24bb68b910 Rename GetAll* methods to List* (#291) 2016-10-07 10:26:48 -07:00
Zachary Wasserman 1cce02cf86 Fix bug causing empty lists to return as null in GetAll/List endpoints (#286)
Fixes #285
2016-10-06 09:24:12 -07:00
Victor Vrantchan 7221aac50f only set AdminForcedPasswordReset if payload value is true (#289)
Fixes #287
2016-10-06 08:43:09 -04:00
Zachary Wasserman d0dcfefd25 Fix incorrect decode function in GetAllQueries (#284) 2016-10-05 17:35:07 -07:00
Zachary Wasserman 85a8e92b96 Implement endpoints for host service methods (#280)
- Remove service methods for modifying hosts
2016-10-05 17:10:44 -07:00
Zachary Wasserman a1e18abb04 Update host labels in distributed query ingestion (#278) 2016-10-05 08:56:29 -07:00
Zachary Wasserman 19f6eddfeb Update host details in distributed query ingestion (#274)
- Introduce a new pattern for defining/ingesting detail queries
- Add many relevant host details:
  - Platform
  - osquery Version
  - Memory
  - Hostname
  - UUID
  - OS Version
  - Uptime
  - Primary interface MAC
  - Primary interface IP
- Fix parsing for inconsistent JSON schema returned from osquery
- Tests
2016-10-04 17:17:55 -07:00
Mike Arpaia 12f8c0b671 Datastore cleaning (#262)
This PR reorganizes a bunch of the files in datastore such that all datastore implementations are consistently broken up into multiple files. Additionally, the datastore tests follow a similar pattern and can easily be applied to any complete datastore implementation.
2016-10-04 16:34:36 -04:00
Zachary Wasserman 0a1ca0c4fb Enable serve over HTTPS (#263) 2016-10-03 14:47:31 -07:00
Mike Arpaia a03347489c Osquery Configuration Control (#244)
Label management APIs and an osquery config endpoint based on active pack and label state.
2016-10-02 20:14:35 -07:00
Zachary Wasserman 6d1c963bfa Flesh out log ingestion endpoint/service methods (#258) 2016-09-30 19:18:27 -07:00
Zachary Wasserman 74aaa14dde Implement osquery datastore methods for inmem datastore (#255)
- Implement osquery datastore methods
- Update tests for compatibility with inmem

Closes #255
2016-09-29 18:19:51 -07:00