Guard is an open-source simple and lightweight SSO authentication handler for reverse proxies, written in Go.
Guard aims to make an easily configurable SSO handler, which works with various reverse proxies.
Guard will stay simple, without 2FA, LDAP support, etc.
If you want these features, have a look at Authelia ;)
Currently supported reverse proxies:
- Traefik
- Every reverse proxies which forward authentication via X-Forwarded-* headers
- Coming soon if you want to contribute :)
You can have a try using the example.
- First, edit /etc/hosts and add the following lines:
127.0.0.1 guard.local
127.0.0.1 auth.guard.local
127.0.0.1 public.guard.local
-
Then, simply go to
example
folder and rundocker-compose up
-
Open a browser and navigate to
http://guard.local
: you should be redirected tohttps://auth.guard.local
. -
Use the default credentials
admin
/admin
so that you are redirected to the app. You're now logged in! -
If you logout, you should be able to access to
http://public.guard.local
which is publicly allowed.
The configuration is minimalist. Simply provide your domain, the subdomain used for Guard and possible public URLs.
domain: guard.local
guard: auth.guard.local
allowed:
- public.guard.local
Note: URL can be more precise (e.g. xyz.guard.local/public
)
Guard provides an basic and easy-to-use admin interface, in which you can add or remove users.
- xyproto/permissionbolt
- lmorel3/guard-php : Guard was initially written in PHP, but I decided to use Go for better performances!