* No more hard deletes
* scaffolding for password reset endpoint
* Ensure password reset state is accounted for in VC checks
* password reset endpoints and data structures
* ability to change password with reset token
* smtp server connection pool management
* stubbing out the sending of the email
* adding mailhog via docker
* HTML emails with confgurable host name
* fixing typo in the comments
* Fixing merge which undid DatabaseError replacement
* documentation in the readme
* webpack shortcut for components
* removing a sneaky merge line that snuck in
* temporary email content api
* tests for password reset flow
* fixing go vet
* comments and making all db use `&value` rather than `reference`
* more correct usage of the errors library and moving email sending to it's own method
* using the wrong error
* fixing email mock object error
* less incorrect error usage
* rebasing and merging
* http constants for status code
* using ParseAndValidateJSON instead of BindJSON
* validate instead of binding in struct tags
* NewFromError instead of New
* Add sensible React base to the app for frontend
This PR attempts to "reactify" Kolide and provide a sane development environment
that a front-end engineer would probably expect.
This PR accomplishes by doing the following:
1. Reorganizes the app into a `server/` and `client/` folders to keep golang
logic separated from react logic.
2. Adds an "asset pipeline" via webpack which knows how to build a js
and css bundle.
3. Packages up all static assets in a go-bindata file so that the binary
remains portable without external file dependencies.
1. Add a Makefile with several targets that will be common in everyday
development. For example, we have `serve` target which spins up a nodejs
reverse proxy on port 8081 which then watches for changed files, automatically
rebuilds the app, and hot loads the new JS/CSS in.
**Note:** Please use `make` to build the app, not `go build` as there are
now several things that need to be orchestrated beyond the go code to build the app.
* Create build if it doesn't exist, and use `go get`
* Improve README to reflect new dev workflow
* Document css vars and funcs and use alias paths
* makefile and structure modifications
* New function `errors.ReturnError` for writing errors into the HTTP response
* New type `KolideError` that includes additional error context
* Validation and application errors are reported in a consistent JSON format
* Add 404 handler
* Refactored error handling throughout codebase to use new error patterns
* Sessions in MySQL
* Reclaiming some names
* session renewal without new cookies on every request
* comments and docstrings
* light organization in vc generation
* go vet
* endpoints for session management
* Merging @zwass' commit with mine
* Updating salt generation to use crypt/rand
* use getRandomText for session keys
* VC no longer needs a DB or to return an error
* getRandomText docstring
* Only use session via the SessionBackend API
* Set session backend with the request, similar to db
This commit vendors in all of our dependencies using
[GoDep](https://github.com/tools/godep). We are forgoing using a vendor/ folder to avoid checking in deps into the repo.
Note: Never manually modify `Godeps/Godeps.json` this file is dynamically
by the godep CLI
Common Actions:
To add a new package foo/bar, do this:
1. Run `go get foo/bar`
1. Edit your code to import foo/bar.
1. Run `godep save` (or `godep save ./...`).
To update a package from your `$GOPATH`, do this:
1. Run `go get -u foo/bar`
1. Run `godep update foo/bar`. (You can use the `...` wildcard, for example
`godep update foo/...`).
* Eliminate global DB connections. Instead, one connection is established (with the underlying object supporting pooling) and passed through the gin.Context. This allows test/prod to inject the appropriate DB object into the context.
* Refactor tests appropriately for this new style of DB connection
* Fix a bug in the routing caught by refactoring of tests
This commit adds both a Dockerfile and updates the docker-compose.yml with local mounting so that you can standup a consistent dev environment. Please view the project README for more information.
* Add request logging.
* Catch/log panic in request handlers.
* Add `mustGetDB` method that gets a DB connection or panics. This can simplify
boilerplate in handlers.
* Consolidate `file` and `line` in logged fields to `location`.
* Set default log level to `WarnLevel`.
* Log a warning when Kolide is started with the example config.
* Turn on DB logging in debug mode.
* Quick fix where JWTRenewalMiddleware wasn't saving the update session to the client
* integration tests for all user/account management HTTP endpoints
close#15
* Combine checks in CheckUser
* Moving t.Fatals into utility functions
* Simplifying get user by id or username flow
* Fixing incorrect error log message
* Simplifying checkUser compare
Example output:
```bash
$ kolide-ose serve
=> kolide 0.1.0 application starting on https://:8080
=> Run `kolide help serve` for more startup options
Use Ctrl-C to stop
time="2016-08-02T14:25:02-07:00" level=info msg="some info logs!"
file=proc.go func=runtime.main line=188
time="2016-08-02T14:25:02-07:00" level=error msg="some error logs :("
file=proc.go func=runtime.main line=188
```
close#26