Skip to content
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 

traefik-idc-demo

BackgroundDemo

NOTE: This repository contains a submodule pointing to my fork of lua-resty-openidc. Please run git submodule update --init --recursive after cloning the repository OR use the --recurse-submodules flag when cloning.

In its current state, the provided compose files are for reference only, taking into account a more complicated setup specific to my server that is also hosting the demo, and therefore will not work anywhere else without modification.

The auth.lua script was written to slightly modularise the added authentication bypass functionality (WIP; disabled with examples) where the forward auth server can skip the OIDC authentication based on the client IP and requested domain. Alternatively, the configuration can be inserted directly into default.conf as per the official instructions, with careful adaptation of the HTTP status codes handling required for forward auth servers.

Compose files

docker-compose.yml [Tested] [Active]

  • Expects an external Traefik container that is watching Docker changes; needs network access to OpenResty.
  • Includes its own OpenResty instance as the forward auth server; needs internet access to the identity provider.

docker-compose.nested.yml [Tested]

  • Includes an internal Traefik container that is currently set up to run behind another external Traefik container, where the latter provides ACME/TLS termination. The command gives an idea of the minimal configuration required for Traefik.

docker-compose.minimal.yml

  • In production, both Traefik and the OpenResty auth server would likely be external. This provides an example of solely the configuration required for a protected service and is closest to what I have experimentally deployed.

Live demo

Visit the protected endpoint and login with test:test.

About

Proof of concept for lua-resty-openidc as a Traefik forward auth server

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published