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
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.
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/