Commit Graph

20 Commits

Author SHA1 Message Date
Victor Vrantchan
6fb96d98f7 Adds endpoints to invite new users to the application. (#235)
User service checks that tokens are valid on new user signups.
Closes #230
2016-09-28 22:44:05 -04:00
Victor Vrantchan
24b9baec1f add prometheus endpoint (#236)
generate metrics for Users, Appconfig and Session services
2016-09-28 07:35:15 -04:00
Mike Arpaia
0482f12926 Organizing go code (#241) 2016-09-26 11:48:55 -07:00
Victor Vrantchan
372dac8304 Create context packages (#228)
add token context package
add viewer context package
add host context package
update authenticated middleware to set viewer context or return error
re-organize API handler
2016-09-26 13:14:39 -04:00
Victor Vrantchan
26b1e70ac3 App config api (#223)
Add GET and PATCH endpoints for /kolide/config to get/update current app configuration
2016-09-21 20:45:57 -04:00
Zachary Wasserman
8f16bd8bcc Send configuration + label queries in distributed reads (#215)
This PR is the beginning of distributed query work. For now we are focusing on using the distributed query subsystem to retrieve the basic configuration information (currently just platform), and run the label queries.

A mockable clock interface is also added to the service struct, allowing us to inject a clock as a dependency, and write unit tests that can control the time.
2016-09-20 20:08:11 -07:00
Mike Arpaia
b1a4036145 Table test style creation of dev users (#218) 2016-09-20 20:07:18 -07:00
Victor Vrantchan
973ef9dbd1 User response - job position (#208)
* add job role to user reponses

* add test user job role
2016-09-20 13:03:51 -04:00
Victor Vrantchan
a069ec9acf add devMode MailService to speed up testing (#178)
running with the dev flag will print the content of an email to stdout
2016-09-16 08:55:09 -04:00
Zachary Wasserman
f968ae3f8f Default to MySQL store and add --dev flag (#170)
Switches the default datastore back to MySQL, and adds a --dev flag to the
serve command that will cause the in-memory datastore to be used.

Closes #166
2016-09-15 10:20:36 -07:00
Victor Vrantchan
df19fd4b7c Update users service (#156)
Closes #144 #145 #160 
Implements PATCH method on user and endpoint middleware for authnz
Implements `reset_password` (with token) and `forgot_password` endpoints
Added godoc comments for UserService interface
Shift to using testify/assert in test code
Multiple fixes/changes to the UserService API
2016-09-15 10:52:17 -04:00
Victor Vrantchan
da05e360ac print version info (#164)
add version package and print version commands
make build now sets build info like git branch and revision when creating a binary.
2016-09-14 13:19:11 -04:00
Zachary Wasserman
885db1a597 Refactoring for config patterns (#159)
This PR refactors most of the codebase to use the new config patterns implemented in #149. Now the core service keeps a copy of the KolideConfig struct, and service methods can reference the configuration in that struct when they need it. The most significant refactoring is in the sessions code, separating the business logic from the storage layer.
2016-09-14 09:11:06 -07:00
Zachary Wasserman
6cb05a58e6 Pattern for defining and loading application configuration (#149)
This provides a new pattern for defining and loading configuration for the Kolide server. With this PR, configuration is stored in the `config.KolideConfig` struct, and loaded through `config.Manager`. Refer to the patterns in `config/config.go` and `cli/prepare.go` to see how configuration is defined and used.

A follow-up PR will work on removing further references to `viper` throughout the codebase, instead preferring to access configuration through the strongly typed `KolideConfig`.
2016-09-12 10:26:56 -07:00
Victor Vrantchan
82cad97c04 rename mock datastore to inmem (#150)
* rename mock datastore to inmem

* fix tests
2016-09-09 21:39:38 -04:00
Mike Arpaia
251043970b Header based JWT authentication (#131)
* add a test data subcommand

* updated sessions stuff

* merge and tests
2016-09-07 21:24:11 -04:00
Victor Vrantchan
88e4be20df stdmux api routes should have a slash at the end (#132) 2016-09-07 16:02:55 -04:00
Victor Vrantchan
3ffc1028e4 move serving static assets outside of the API handler (#130) 2016-09-07 15:19:54 -04:00
Mike Arpaia
121af829d0 removing old server implementation (#109) 2016-09-05 16:03:58 -04:00
Mike Arpaia
5b78c0a7cc Organizing cobra commands (#100) 2016-09-03 13:25:16 -04:00