traefik-forward-auth: a 2020 proxy in the quickstart, a 2024 release, a 2026 branch
Minimal forward authentication service that provides Google/OpenID oauth based login and authentication for the traefik reverse proxy
At a glance
- What is it?
- thomseddon/traefik-forward-auth is a single-purpose forward-auth middleware for the Traefik proxy, with Google, OpenID Connect and generic OAuth2 providers. The readme, the module file and the example disagree about how old the software is.
- Who is it for?
- This middleware is still the shortest way to put a single sign-on in front of everything behind one Traefik instance, and the parts that matter are documented properly: multiple domains through dynamically generated redirect targets, a central authentication host for many services, selective bypass per request, and session lifetimes longer than the provider's own token. Two things to check.
- Can I use it commercially?
- Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
- Is it still maintained?
- Activity is slowing. The repository last received commits 7 months ago.
- What is it written in?
- Mainly Go, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on November 25, 2026, and from our analysis. They are not legal advice.
Star history
- thomseddon/traefik-forward-auth2,396 ★ · +5
| Repository | 2026-09-29 | 2026-11-25 |
|---|---|---|
| thomseddon/traefik-forward-auth | 2.4k | 2.4k |
5 Stars in the last 57 days, measured from the daily GitHub snapshot. Compare with other projects
Editorial analysis
The quickstart runs a proxy image from 2020
The simple example is the one most people copy, and it is a compose file with two services:
version: '3'
services:
traefik:
image: traefik:v2.2
command: --providers.docker
ports:
- "8085:80"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
traefik-forward-auth:
image: thomseddon/traefik-forward-auth:2
environment:
- PROVIDERS_GOOGLE_CLIENT_ID=your-client-id
- PROVIDERS_GOOGLE_CLIENT_SECRET=your-client-secret
- SECRET=something-random
- INSECURE_COOKIE=true # Example assumes no https, do not use in productionThe proxy is pinned to a two-point-two tag, its port mapped from 8085, and the host socket mounted so the proxy can read labels. The auth service is pinned to the major-version tag the readme recommends, with a literal placeholder for the signing secret and the insecure-cookie flag switched on with an inline comment saying the example assumes no encrypted transport and should not be used in production. The module file, meanwhile, requires a proxy library two years newer than the image the example runs, so the block demonstrates the wiring and not the version pairing. And the last line of it, the middleware address label, is cut off partway through, so even the shape needs repairing before it works.
A security component whose last release is two years behind its branch
Three releases are visible. The newest is 2.3.0 from May 2024, before it 2.2.0 in June 2020 and 2.1.0 in February 2020. The last recorded commit on the default branch, which is master, is 2026-04-03. So there is a two-year gap between the newest tag and the newest commit, and a six-year gap between the two 2.x releases below it. For a component whose job is to decide who gets in, that gap is the first thing to check rather than the last. The readme does not comment on it, and its upgrade guidance is still written for the two-point release from June 2019, describing it as fully backwards compatible while noting in the same breath that a number of configuration options were modified.
Four replaced modules and a flags library from 2019
The module file carries a block of replacements under a comment naming a set of forks, redirecting four dependencies to maintained copies. Two of those redirects date from 2017 and 2019, one from 2020, and the most recent from May 2025. That is the honest way to keep a small project buildable when an upstream has gone quiet, and it also means the project is tracking four forks it does not control. Two more direct dependencies are worth naming. The OpenID Connect library is on its second major version and is marked incompatible with later ones, and the command-line flag parser is pinned to a commit from May 2019, so the two libraries most likely to need updating are the two that have not been.
A token in a query string is a documented option
The generic provider section documents two ways of presenting the access token when the service fetches user information: in an authorization header, which is the default, or in a query string parameter. The description of the second option is explicit that the token is provided in the access token parameter of the query. That is a supported, documented configuration, and it is worth understanding what it means. A token in a URL is a token that lands in proxy access logs, in the query string of anything that logs the full request, and in any history that keeps it. The default is the safer of the two, and the readme gives no warning about the alternative. It does, correctly, treat the generic provider as the fallback for providers that do not speak OpenID Connect at all.
Two makefile targets and a builder on a pre-modules path
The build file has two targets. One formats three source trees in place with the simplify flag set. The other runs the test suite verbosely. There is no build target, no lint target and no release target, which is consistent with a component that is distributed as a container image and a release asset rather than as a package. The container build is more interesting. A first stage on a Go toolchain image adds the version-control client, copies the source into a directory laid out as if this were a pre-modules project, and compiles a static binary with the cgo compiler switched off for one platform. A second stage starts from nothing at all and copies in the compiled binary plus the certificate bundle by hand, which is the correct way to make a static binary able to verify TLS.
The contents promise a dozen sections and the text shows one
The table of contents is a good map of what the software does. Under concepts it lists forwarded headers, user restriction, and four ways of applying authentication: globally, selectively on ingress in Kubernetes, selectively per container in a swarm, and by rules. Then operation modes, with an overlay mode and a central-host mode, and a section on logging out. The visible text gets as far as the start of the configuration reference and stops at the sentence introducing the options list. So the concepts that would tell you how a session is established, which headers are trusted, and how the two operation modes differ between them are all named but not present in the readme, and the readme's own help path is a wiki rather than this file.
Examples for a proxy generation the module no longer uses
The examples directory is split by proxy version, with one tree for the older one-point-seven generation and one for the current two series. The module file requires only the two series, at a recent version, so the one-point-seven tree is kept for people still running a proxy that this middleware's own dependency graph no longer names. That is a reasonable thing to keep, and it is also a compatibility statement the readme does not make: if the middleware is built against a two-series API, an example for a one-series proxy may not reflect what the code does. The rest of the example set is a set of complete configurations rather than fragments, covering a complete compose file, a central authentication host, and both a simple and an advanced Kubernetes layout in separate pods.
Editorial conclusion
This middleware is still the shortest way to put a single sign-on in front of everything behind one Traefik instance, and the parts that matter are documented properly: multiple domains through dynamically generated redirect targets, a central authentication host for many services, selective bypass per request, and session lifetimes longer than the provider's own token. Two things to check. The quickstart you are most likely to copy pins a proxy image from 2020 and tells you in a comment not to use its cookie setting in production, so treat it as a shape to copy rather than a configuration to run. And the last release predates the last commit by two years, which for a security component is the number to look at before you put it in front of anything.
Frequently asked questions
What does thomseddon/traefik-forward-auth do?
It is a forward authentication middleware for the Traefik reverse proxy: a single endpoint that logs a user in through Google, OpenID Connect or a generic OAuth2 provider and lets Traefik consult before serving. It can overlay any HTTP service, handle several domains, centralise the auth host, and apply or bypass authentication per request.
Which OAuth providers does traefik-forward-auth support?
Google, any provider speaking OpenID Connect 1.0, and a generic OAuth2 provider for those that do not, where the authorisation, token and user-information endpoints are configured statically. The generic provider also takes a scope list, defaulting to profile and email, and a token presentation style.
How do I configure traefik-forward-auth?
As environment variables in a compose file, with a provider prefix per provider: the Google and OpenID Connect options need a client identifier and secret, the OpenID Connect one also needs an issuer URL, and the generic provider needs the authorisation, token and user URLs plus the client credentials. The readme's configuration section names the options but does not list them.
Does traefik-forward-auth support ARM?
Yes. The readme says ARM images are on the container registry and that you append an architecture suffix to a release tag. The repository also carries separate build files for two ARM targets alongside the default one, and the container build compiles a static binary with the cgo compiler disabled.
How does traefik-forward-auth compare with a standalone OAuth2 proxy?
The repository does not compare itself with anything. Its readme covers its own providers, configuration, two operation modes and the four ways authentication can be applied, and defers provider examples to a wiki page. Its pitch is minimalism: one endpoint, one service, and the proxy stays the thing that does the routing.
Official sources
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/thomseddon-traefik-forward-auth)Star history chart for your README
[](https://hysenlabs.com/projects/thomseddon-traefik-forward-auth)Was this useful?