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.
Often when I'm building, I'll do the following:
```
make generate
make build
./build/kolide.exe serve --dev
```
It would be nicer if I could just use make to run the dev server instead
of having to type out the full path every time:
```
make generate
make build
make run
```
Return well formatted authentication errors to the client
Log the reason for an error serveside but return a masked/generic reason to the client
Assert go errors by behavior rather than type.
* moves login page styles to reusable component
* Redirects successful login to homepage after 3s
* Adds logout form
* Adds logout page
* Adds logout link to homepage
* Adds gravatarURL to logged in user
* Configure API Client to hit /me endpoint
* Fetch user when the app loads
* Configured API Client to make logout requests
* Handle logout flow in redux
* Logout form styles
* Logout user when the logout form is submitted
* wip
* add build step
* remove filter?
* circle does not rebuild on force push
* circle does not rebuild on force push
* add branch filter
* use build flag on builder
* push
* add circle env variable set
* redeploy
* Extracts stacked boxes UI to a re-usable component
* Presence validator
* Equality validator
* Adds ResetPasswordFrom
* PasswordResetPage component and route
* Ex icon on forgot pw page goes to login
* Smooth out the fonts so they match the mocks
* Remove dynamic background and refactor colors
* Authentication middleware
* API client refactor
* Configure API client to make forgot_password requests
* Successfully submit forgot password form
* Display server errors for unknown email address
* i like how I wrote this to never call svc direcly
* rename func
* apparently not everywhere
* add service method for authenticated user
* oops forgot to check this in
If AccessedAt is left in the zero value, MySQL will complain with the following
error: Error 1292: Incorrect datetime value: '0000-00-00' for column 'accessed_at' at row 1. Now we initialize AccessedAt when creating a new
session.
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
Previously, the behavior was to search for the config file in a variety of
locations. Now we only attempt to load a config file if it has been explicitly
specified with `-c` or `--config`.
Fixes#165.
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
* GradientButton components
* Style guide updates
* Display errors and override styles for InputFieldWithIcon
* Envelope Icon
* Login page form submission (#157)
* API client utility
* moves test helpers to the test directory
* Utility to namespace local storage keys
* LoginSuccessfulPage component
* Check icon
* adds auth to redux state
* successful form submission
* Allow tests to load dummy SVG static images & test fixes
* ForgotPassword Page, Form & route
* Email validator
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.
* API client utility
* moves test helpers to the test directory
* Utility to namespace local storage keys
* LoginSuccessfulPage component
* Check icon
* adds auth to redux state
* successful form submission
* Allow tests to load dummy SVG static images & test fixes
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`.