ProxyBouncer
Kenneth Falck kennu@sc5.io 2014
Overview
ProxyBouncer is an authenticating HTTP proxy that requires users to log in
with their Google accounts before passing them through to the upstream
server.
Usage
npm install -g proxybouncer
proxybouncer
Environment variables
ProxyBouncer is configured using environment variables.
PROXY_TARGET needs to to point to the upstream website where requests will
be proxied to.
ALLOWED_EMAILS defines a regexp of who is allowed to access the service.
COOKIE_SECRET is a unique secret which is used to sign and validate session
cookies.
GOOGLE_CLIENT_ID and GOOGLE_CLIENT_SECRET are the OAuth2 identifiers that you
can get from Google.
MY_URL is where ProxyBouncer is running. The OAuth2 callback URL is configured as
"MY_URL/$proxybouncer/oauth2callback". You need to configure it properly in
Google Developer Console when creating the client ID and client secret.
PORT=8080
MY_URL=http://localhost:8080
PROXY_TARGET=http://localhost:9000
GOOGLE_CLIENT_ID=(get from google developer console)
GOOGLE_CLIENT_SECRET=(get from google developer console)
ALLOWED_EMAILS=.*@example.org$
COOKIE_SECRET=1234abcd
Note that you can create a file called .env in the current directory with
environment variables as key=value pairs. ProxyBouncer will automatically
read them and include them in the environment setup.