Commit Graph

131 Commits

Author SHA1 Message Date
Mike Arpaia
225afb750f Clean and organize mocha test configurations (#202) 2016-09-20 09:42:46 -04:00
Mike Arpaia
4b425eb524 ESLint fixes and cleaning (#203) 2016-09-20 09:42:08 -04:00
Mike Arpaia
aacd1d6b9c Removing underscored import of config from main (#200)
This should no longer be necessary.
2016-09-20 06:48:45 -04:00
Mike Arpaia
ff94c091bd Removing keep files (#201) 2016-09-20 06:47:57 -04:00
Mike Arpaia
52dee0e379 Removing old gitignore lines (#204) 2016-09-20 06:47:23 -04:00
Mike Arpaia
942df18a63 Updates to Makefile (#197) 2016-09-19 19:37:47 -07:00
Mike Stone
dd1565936b Logout (#195)
* 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
2016-09-19 16:43:35 -07:00
Mike Arpaia
428351d3a8 Serializable config types (#141) 2016-09-19 16:11:39 -07:00
Victor Vrantchan
2f8db0d184 render react template from binaryfs (#196)
Closes #194 
* render react template from binaryfs
2016-09-19 19:06:41 -04:00
Victor Vrantchan
e296098131 Docker Push of new builds (#192)
* 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
2016-09-19 15:54:57 -07:00
Victor Vrantchan
2ba72e2786 add authentication/nil check for /me endpoint to prevent panic (#193)
* add authentication/nil check for /me endpoint to prevent panic

* update function call
2016-09-19 13:50:31 -07:00
Mike Stone
6581b10b89 Debounce utility to only allow 1 click per second (#190) 2016-09-19 11:41:47 -07:00
Mike Stone
09178a9ee8 Autofocus first field on forms (#191) 2016-09-19 14:33:43 -04:00
Mike Stone
0e08a6e698 Reset password page submit (#184)
* API client sends reset password requests

* ResetPasswordPage actions and reducer

* Reset password happy path
2016-09-19 11:35:38 -04:00
Mike Stone
482d025d05 Reset password page (#181)
* 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
2016-09-16 17:19:37 -04:00
Mike Stone
cfdd665673 Fixes multiple logos on login successful page (#173) 2016-09-16 10:32:54 -07:00
Victor Vrantchan
1de9f6bd89 nicer validation errors (#180) 2016-09-16 11:23:48 -04:00
Mike Stone
5ea9115a95 Forgot password submit (#168)
* 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
2016-09-16 09:55:46 -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
Victor Vrantchan
f46a951da3 Add /me route (#177)
* 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
2016-09-15 21:35:52 -07:00
Zachary Wasserman
fab4759926 Fix bug creating session with 0 timestamp (#171)
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.
2016-09-15 15:53:47 -07:00
Victor Vrantchan
0ac63c9963 Allow with Logins with email address (#174)
The Auth service now accepts emails in the username field
The UserService now rejects user creation if the user has @ in the username.
2016-09-15 15:27:55 -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
Zachary Wasserman
0702dccb7f Only attempt to parse config file if it is specified by flag (#169)
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.
2016-09-15 08:44:05 -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
Mike Stone
40af0d29ef Forgot password (#162)
* 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
2016-09-14 16:31:54 -04:00
Zachary Wasserman
713c248f2e Simplify test error check (#167) 2016-09-14 12:15:14 -07:00
Mike Arpaia
e8384a7655 assertifying the tests (#163) 2016-09-14 11:40:51 -07: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
Mike Stone
b638ae186d 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
2016-09-13 22:43:26 -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
Mike Arpaia
370cc4efa8 rm .vscode 2016-09-12 09:29:30 -07:00
Jason Meller
5e9f93d08a Add assets folder so we can serve images (#155) 2016-09-12 12:11:18 -04:00
Victor Vrantchan
a27752fd2c jwtKey should be []byte but string is returned (#154) 2016-09-12 11:31:58 -04:00
Mike Stone
ac9a38c207 Login page scaffolding (#142)
* LoginPage component and route

* animated SVG background image utility

* Kolide text, User, Lock, & Kolide logo SVG icons

* styleguide

* Adds global footer

* Adds InputFieldWithIcon component

* Adds LoginForm component

* Render LoginForm from the LoginPage
2016-09-12 11:14:07 -04: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
Victor Vrantchan
300b7ac2db pretty-print JSON response. (#147)
NOTE: SetIndent() was introduce in 1.7
2016-09-09 08:34:53 -04:00
Victor Vrantchan
05b1afd635 Update user properties (#143)
* renamed NeedsPasswordReset field for clarity
This field was not obvious when it should be set or checked. This makes it a bit more obious.
The property should only be set if the password request was requested by an admin.
Having this property checked should
- invalidate current user auth token
- force user to reset password on their next login
- NOT send a password reset email

* add GravatarURL property
we considered uploading and storing an image url in the future as well

* Add a user property to save the user's job role/position
2016-09-08 18:57:05 -04:00
Mike Stone
a0a035f2c4 Icon component setup & bg image (#133) 2016-09-08 08:50:44 -04:00
Mike Arpaia
8bf2b7ee7b Forgot to specify that logout is post (#136) 2016-09-07 22:58:25 -04:00
Mike Arpaia
e7cabd0b73 Removing npm install --dev flag (#137) 2016-09-07 22:57:05 -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
Mike Stone
906bf79526 Changes CSS styles to JS using Radium (#129) 2016-09-07 16:07:45 -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
8436e3ea17 Removing unused mock package (#128) 2016-09-06 23:26:44 -04:00
Mike Stone
47e28d29aa Redux configuration (#122) 2016-09-06 20:04:02 -04:00
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
bad0d62452 Remove eslint config from package.json (#126) 2016-09-06 17:22:57 -04:00