an opinionated poor mans identity-aware proxy, easy to use setup for beyondcorp in your homelab.

It allows you to connect one or more identity providers (currently, only google is supported) and grant access to backends based on the identity of the user.


  • Easy to use (single binary with single config file)
  • Secure by default (automatic https with letsencrypt, secure cookies)
  • Sane defaults (No public access unless explicitly added)


  • Extreme security
  • Reliability (web server restarts whenever a route is added / modified / deleted)
  • Customization
  • Pretty

wishlist (not implemented yet)

  • openID connect integration
  • docker integration (use the docker API to determine containers to route traffic into)
  • docker builds
  • full integration test suite that can run every night
  • admin UI that shows all seen users, shows routes and allows you to edit routes
  • metrics

getting started

  • download an appropriate release from the releases page
  • place a tobab.toml file somewhere and set the env var TOBAB_CONFIG var to that location
  • configure the google key and secret by creating a new oauth application
  • make sure port 80 and port 443 are routed to the host you are running it on
  • start tobab with appropriate permissions to bind on port 80 and 443
  • add routes using the CLI or the API
  • ???
  • profit

example config file

hostname = "" #hostname where the login occurs
cookiescope = ""
secret = "some-secret"
salt = ""
certdir = "path to dir with write access"
email = "[email protected]"
googlekey = "google id"
googlesecret = "google secret"
loglevel = "debug" #or info, warning, error
databasepath = "./tobab.db"
adminglobs = [ "*" ] #globs of email addresses that are allowed to use the admin API


Usage: tobab <command>

  -h, --help             Show context-sensitive help.
  -c, --config=STRING    config location

    start tobab server

    validate tobab config

  host list
    list all hosts

  host add --hostname=STRING --backend=STRING --type=STRING
    add a new proxy host

  host delete --hostname=STRING
    delete a host

    print tobab version

  token create --email=STRING --ttl=STRING
    generate a new token

  token validate --token=STRING
    Get fields from a token

Run "tobab <command> --help" for more information on a command.


# add a host to listen on that proxies all requests to
# please be aware, if you add a host that isn't public it should have the same suffix as the cookie scope!
tobab host add --backend= --type=http --public
# list hosts
tobab host list
# delete a host
tobab host delete
# manually create an access token (useful for automation, see automation below)
tobab token create --email=<email> --ttl="800h"
# validate a token (and get information)
tobab token validate --token=<token>

api calls

example api call to add a route that only allows signed in users with an email address

# @name addHost
POST /v1/api/host
User-Agent: curl/7.64.1
Accept: */*
Cookie: X-Tobab-Token=<token>

    "Hostname": "",
    "Backend": "",
    "Type": "http",
    "Globs": [ "*" ]

example api call to add a route that allows any signed in user

# @name addHost
POST /v1/api/host
User-Agent: curl/7.64.1
Accept: */*
Cookie: X-Tobab-Token=<token>

    "Hostname": "",
    "Backend": "",
    "Type": "http",
    "Globs": [ "*" ]

example api call to add a route that allows full access without signing in

# @name addHost
POST /v1/api/host
User-Agent: curl/7.64.1
Accept: */*
Cookie: X-Tobab-Token=<token>

    "Hostname": "",
    "Backend": "",
    "Type": "http",

example api call to delete a route

# @name delHost
DELETE /v1/api/host/
User-Agent: curl/7.64.1
Accept: */*
Cookie: X-Tobab-Token=<token>

automation (stuff like APIs)

If you have an api running behind tobab, it is possible to manually issue tokens and add them to the headers manually. Combine the info in the readme about the example API calls and the example CLI commands to see how to do just that :).


This project could hot have been what it is today without these great libraries:

  • excellent light weight request router
  • library that handles all third party authentication stuffs
  • letsencrypt made very, very easy
  • logging library that is perfect
  • embedded database built upon bolt which makes persistence very easy


  • Combine with a forward auth provider like or
  • Combine with some kind of certificate maintenance service like