* support for custom github endpoints
* implementing requested changes
* using redis for session store if it is configured
* using non-deprecated sessions lib
* hard-coding redis session store private key for multiple instances
* re-working GetPrivateKey to return stastic key only when redis is used
* making config entries for redis sesion db and shared key
Herein, we do two things:
1- implement a custom handler for the virtual filesystem that,
rather than returning a simple (and ugly) 404 page, redirects
the client back to the root URL with the `customUrl` query
parameter filled out with the value of the request path.
2- In home.js, if the `customUrl` param is filled out, automatically
select the `custom` state setting, and pre-fill out the CustomID
input field with the value of that param.
In short, the server will never again return a 404 error, but instead
will gracefully prompt the user to fill in the missing link.
* Reworked project layout
* adjusted Makefile for new folder structure
* fixed path errors
* Fixed test import paths
* fixes
* only pushing image to the docker hub if the branch is master
* Clean up redis configuration
- put redis configs into their own struct
- put a redisConf struct into the default config so that envstruct
will populate it
- allow tweaking of retry, db index and read/write timeout settings
- update example config.yaml
This is potentially a breaking change for anyone who's been using
the redis backend already, but maybe that's just me? :)
* fix struct tags and s/Db/DB/
* remove unnecessary declarations
Add a special path -- `/ok` that can be used as a healthcheck for e.g.
kubernetes or amazon ECS.
When not in debug mode, do not generate logs for the healthcheck path.
This requires implementing our own version of ginrus.Ginrus, as the
upstream one does not support the `notlogged` argument(s) that
gin.LoggerWithWriter has.
* Add config option to disable log coloration
Color logs are great in person, but not so awesome when you're trying
to view them in a log aggregation services e.g. splunk, stackdriver,
ELK, etc.
* dump running config to log on startup
* init config before testing
...and use a temporary directory for config_test, lest the presence
of a local one cause confusing test results.
Sadly, `date --iso8601` is a GNU coreutils-ism, and returns an
error on platforms that still ship a more generically posix-esque
`/bin/date`: notably FreeBSD and macOS do not support the flag.
Replace with a standard date formatstring that should be portable
to both Linux macOS. (And probably Solaris/OpenSolaris/SmartOS
as well?)
Rather than directly fetching and verifying OAuth assertions, assume
that the app is running behind an authenticating proxy, and trust
headers that are set by the proxy.
- add config support for an "authbackend" directive, supporting either
"oauth" or "proxy" as values; the "proxy" setting selects our new codepath
- add initProxyAuth and proxyAuthMiddleware methods to the Handler struct
- rename authMiddleWare to oAuthMiddleware in the Handler struct
- construct a faked auth.JWTClaims object when in proxy mode
- update Handler.handleAuthCheck() to return useful info in proxy mode
- add a fallback user icon for proxy mode
- implement check for proxy mode in index.js
See for example and reference:
https://cloud.google.com/iap/docs/identity-howtohttps://cloud.google.com/beyondcorp/
- add a redis store implementing stores.Storage
- add config file support to pick a storage backend
- add config file support to set redis host:port and password
- add docker_releases to .gitignore
- update README to mention redis support
- update example config.yaml