Commit Graph

23 Commits

Author SHA1 Message Date
Max Schmitt 3ebe9d042f
Refactored project layout (fix: #109) (#111)
* 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
2018-05-25 23:48:23 +02:00
memory 7fd1287493 Clean up redis configuration (#108)
* 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
2018-05-25 21:32:39 +02:00
memory 6dac9a7fcb Add option to disable access logging (#107)
For an internally-facing and/or test/qa deployment, web access logs may
be a waste of stackdriver/cloudwatch quota. :)
2018-05-21 17:31:13 +02:00
memory fbf234407b Add config option to disable log coloration (#103)
* 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.
2018-05-17 18:50:43 +02:00
memory f8086c7492 support using an identity-aware proxy for auth (#101)
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-howto
https://cloud.google.com/beyondcorp/
2018-05-08 20:34:32 +02:00
memory 5e5d6a61f0 Added redis support (#100)
- 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
2018-05-07 22:48:37 +02:00
Max Schmitt 122783a385 Changed maxibanki to new mxschmitt username 2018-02-05 14:04:47 +01:00
Max Schmitt 944f3e491f Removed the bash info generation, now using ldflags 2017-12-25 14:46:22 +01:00
Max Schmitt 70d8ddb5dc Switched from viper to something selfmade: fix #44 2017-11-26 03:10:08 +01:00
Max Schmitt 6a4eb7302f Cleaned up code and integrated deletion handling: fix #10 2017-11-21 21:35:45 +01:00
Max Schmitt 437e314250 Integrated build infos into the binary: fix #37 and cleaned up 2017-11-20 17:54:21 +01:00
Max Schmitt 3a7dde4223 - Added optional config file: fix #40
- Fixed go vet tests
- renamed config keys: fix #39
2017-11-16 20:50:29 +01:00
Max Schmitt e5ac34903d Cleaned up the oAuth stuff #23 2017-11-15 17:55:16 +01:00
Max Schmitt f54e72210e added docs for the example config file 2017-11-13 20:42:12 +01:00
Max Schmitt 9857081695 Fix #36 2017-11-13 19:32:41 +01:00
Max Schmitt dcfdeaa170 - removed overpowered schema generation
- fixed unit test bug
- moved most of the docu to the github wiki
2017-11-10 13:54:14 +01:00
Max Schmitt 930b581d09 Fixed incorrect permissions of the schema.json 2017-11-10 01:04:24 +01:00
Schmitt, Max 51cbfad078 Fix #7 2017-11-09 09:30:15 +01:00
Max Schmitt 678c6184df - Added overriding the existing build files
- Fixed schema generation
2017-11-08 19:05:08 +01:00
Schmitt, Max 31daf5ac45 Added missing .gitignore file 2017-11-08 16:52:58 +01:00
Schmitt, Max 996e3efa26 - Removing sourcemaps bevore we embed it
- removed Service worker
- removed unnecessary run.sh (now we have a Makefile)
- Cleaned up README.md
2017-11-08 16:52:37 +01:00
Schmitt, Max 6e33c8bb09 added missing config.ini file for build 2017-11-08 10:32:05 +01:00
Max Schmitt 3f1f231920 - Added schema generation for the configuration
- added example configuration
- changed ID Length to uint instead of int
- Added ShareX configuration generation in the frontend
2017-11-06 22:02:22 +01:00