Commit Graph

14 Commits

Author SHA1 Message Date
Mike Arpaia
ff92f6749a Osqueryd Service (#119)
* host service stuff

* working on the osquery service api

* log status and results logs
2016-09-06 17:28:07 -04:00
Mike Arpaia
b7becf6428 Sessions endpoints (#108)
* renaming auth service to sessions service

* service method implementations

* endpoint and transport and transport tests

* Authenticate tests
2016-09-05 15:50:57 -04:00
Mike Arpaia
53a1fe8d84 queries and packs services via go-kit (#102)
* osquery services via go-kit

* Visual Studio Code configurations

* create query and pack endpoints

* organizing files more scalably

* modify query and pack endpoints

* delete query and pack endpoints

* get query and pack endpoints

* get all queries and packs endpoints

* add and remove queries from packs

* test stubs

* removing some indirection

* query service tests

* service pack tests

* transport tests

* adding config file flag back

* organizing package kolide

* get queries in pack endpoint

* run tests on 1.7?

* no 1.7 image :(

* typo in circle.yml
2016-09-04 01:13:42 -04:00
Victor Vrantchan
9ab09f122a update user service (#101)
- Added all required methods for a UserService
- Added authentication handlers `/api/login` and `/api/logout`
- Added authMiddleware for authentication for `/api/v1/kolide` path
- Added authorization middleware for each endoint
- Added validation middleware for validating API inputs
- Began work on logging middleware
2016-09-01 00:51:38 -04:00
Victor Vrantchan
b08d5cfb54 add more user auth methods 2016-08-29 13:04:07 -04:00
Victor Vrantchan
c04e4f82dd add setpassword to service 2016-08-29 09:07:23 -04:00
Victor Vrantchan
a07e9c7d77 go-kit server layout 2016-08-27 23:59:17 -04:00
Zachary Wasserman
41fe404ef1 HTTP Controller updates for label queries (#96)
Add controller methods for:

* Retrieving label queries
* Storing results of label queries
2016-08-24 16:50:28 -07:00
Mike Arpaia
3f81dda638 Query management backend (#95)
* initial data model modifications

* stubbing out http api endpoints

* becoming more restful

* GetAllQueries

* GetAllPacks

* GetQuery

* GetPack

* fixing datastore tests

* CreateQuery

* CreatePack

* ModifyQuery

* ModifyPack

* DeleteQuery

* DeletePack

* AddQueryToPack

* DeleteQueryFromPack

* todo change route URI

* fixing go vet

* comments

* universal url id parsing api
2016-08-23 19:30:55 -07:00
Zachary Wasserman
202319e83a Add method for recording label query results (#92)
* New datastore method for recording label query results
* Add to label query test
2016-08-22 08:46:18 -07:00
Mike Arpaia
b8d4c78f62 Integration tests (#90)
* tests for auth endpoints

* create user test and fatals instead of panics

* more tests

* remove init viper config setting

* stubbing

* more tests

* more tests

* organizing auth and users files

* rest of auth tests

* password reset tests
2016-08-19 23:56:49 -07:00
Zachary Wasserman
7ec484633a Add GetLabelQueriesForHost (#86)
* Add/update models for label queries
* Write functions to determine which label queries should run for a given host
* Tests
2016-08-19 11:24:59 -07:00
Mike Arpaia
d92992b3dd Session shuffle and rename app to server (#84)
* renaming campaign to email

* moving session management code to the new kolide/datastore pattern

* removing global configuration variables in favor of config

* moving email operations to package kolide

* moving app to server

* using http.ListenAndServeTLS instead of a method on *gin.Engine

* remove the kolide.go dependency on gin
2016-08-18 17:45:39 -07:00
Victor Vrantchan
5d8ca61472 Domain Types (#83)
* create datastore package with New func to create a db connection

* separate creating a user object from saving to db
temporarily pass db around through gin context to compile app
main should create the datastore and pass it in to http handler explicitly instead

* create datastore from config params

* move gorm specific code to gorm.go

* re-export app.NewUser

* test new user

* add User() method for getting a user
temporary, the API will improve once I add filters

refactor test func to use sqlite by default and mysql if available

* add save user

* move some users tests to datastore, temporarily remove user tests from app

* add EnrollHost and test

* move enrollhost to datastore

* all enrollment tests now in datastore

* add datastore_test for re-enroll

* it compiles now...

* move other interfaces to models

* start wrapping errors in database error

* add tests for campaign

* move users to package kolide

* move hosts and passwordrequests

* package kolide

* moving all types to package kolide

* making new osquery endpoints use groob's new pattern
2016-08-18 14:16:44 -07:00