Skip to content
Snippets Groups Projects
user avatar
Nicolas Pernoud authored
af474ce4
History

Vestibule

Alternate URL (on the Grand Lyon software forge) : https://forge.grandlyon.com/NPERNOUD/vestibule .

Vestibule is an HTTP server, reverse proxy and webdav server, with OIDC/OAuth2 and local users file authentication, and a Single Page Application GUI to configure everything.

Maintainability Rating Security Rating Reliability Rating Quality Gate Status Bugs Vulnerabilities Code Smells Technical Debt Lines of Code Duplicated Lines (%)

Features

  • Reverse proxy any website (internal or external), with GUI configuration
  • Authenticate users against OIDC/OAuth2 server and fetch user roles based on /userinfo endpoint
  • Expose any file system directory as webdav server with web explorer
  • Allow opening and saving of documents with onlyoffice integration
  • Automatic let's encrypt https

Screenshots

Login screen Application configuration Applications list Opened application Dav configuration Davs list Opened dav File preview Users management

How does it works ?

Vestibules authenticates the users against a local user.json file or an OIDC/OAuth2 provider (with Open Id Connect userinfo endpoint). It issues an encrypted cookie for the global domain (say vestibule.io) containing the user roles gotten from the local user database or the "memberOf" claim of the OIDC/OAuth2 user gotten from the userinfo endpoint.

After, for every access to a proxied application or a webdav service (say myapp.vestibule.io), it checks the cookie to allow users based on their roles.

Applications and davs can be opened to everyone as well (no authentication).

Vestibule creates a subdomain for every services (apps and davs) and provide Let's encrypt certificates automatically.

Installation

Locally

Clone the repository. Alter the .env file with your configuration. Launch start.sh.

With docker

Alter .env and docker-compose.yml according to your needs. Launch with COMPOSE_DOCKER_CLI_BUILD=1 DOCKER_BUILDKIT=1 docker-compose up.

Usage

OIDC/OAuth2 configuration

The OIDC/OAuth2 provider is configured with environment variables. The user is recovered with the /userinfo endpoint (part of the Open Id Connect standard) with a standard OAuth2 dance. Vestibule is compatible with most OpenIdConnect providers (including Keycloak), or OAuth2 providers with the /userinfo endpoint.

The users roles must be recovered in an "memberOf" claim array obtained when accessing the /userinfo endpoint. It can be configured to map any group/role configuration on most IdPs.

Mounting webdav share on your OS

Vestibule allow using the authentication token in an basic auth header to allow mounting webdavs. Here is an example of a script login in the user and using the token from the cookie to mount webdav on Ubuntu Linux :

#/bin/bash
LOGIN_URL=https://vestibule.127.0.0.1.nip.io:1443/Login
DAV_URL=davs://userdav.vestibule.127.0.0.1.nip.io:1443
LOGIN=admin
PASSWORD=password
SENT_BODY="{\"login\":\"${LOGIN}\",\"password\":\"${PASSWORD}\"}"
HTTP_RESPONSE=$(curl -k --header "Content-Type: application/json" --request POST --data ${SENT_BODY} --silent --output /dev/null --cookie-jar - $LOGIN_URL)
TOKEN=$(echo $HTTP_RESPONSE | awk '{ print $NF }')
printf "1\n${LOGIN}\n${TOKEN}\n" | gio mount $DAV_URL

Override branding

Every branding asset is in web/assets/brand directory. They can be altered according to your needs.

Development

Update dependencies

go get -u
go mod tidy

Register both remotes

git remote add forge https://forge.grandlyon.com/NPERNOUD/vestibule.git
git remote set-url --add --push origin https://forge.grandlyon.com/NPERNOUD/vestibule.git
git remote set-url --add --push origin https://github.com/nicolaspernoud/Vestibule.git

Get all branches

git fetch --all

Credits

Loosely based on Webfront (https://github.com/nf/webfront), by Andrew Gerrand, Google (Apache License, Version 2.0).

Uses :

Licence

The product is licenced under GNU AFFERO GENERAL PUBLIC LICENSE Version 3, it is made primarily by Nicolas Pernoud, a member of Métropole de Lyon, on professional time (some), and personal time (most). It is used on Métropole de Lyon "alpha" lab to allow quick prototyping and proof of concepts.

alpha logo

Beeing part of the project

Contributions of any kind welcome!