mesosphere / traefik-forward-auth

214 stars 46 forks source link

Traefik Forward Auth

The original thomseddon/traefik-forward-auth is a "minimal forward authentication service that provides Google oauth based login and authentication for the traefik reverse proxy/load balancer."

This is a partial rewrite to support generic OIDC Providers that provide OpenID Provider Issuer Discovery but may not support the UserInfo endpoint.

noelcatt/traefik-forward-auth and funkypenguin/traefik-forward-auth also made thomseddon/traefik-forward-auth apply to generic OIDC, but they are now based on an older version which does not support rules and also require the UserInfo endpoint to be supported.

This version optionally implements RBAC within Kuberbetes by using ClusterRole and ClusterRoleBinding. It extends from the original Kubernetes usage as it also allows specifying full URLs (including a scheme and domain) within nonResourceURLs attribute of ClusterRole. And unlike the original behavior, * wildcard character matches within one path component only. There is a special globstar ** to match within multiple paths (inspired by Bash, Python and JS libraries).

The raw id-token received from OIDC provider can optionally be passed upstream via a custom header.

Differences to the original

The instructions for thomseddon/traefik-forward-auth are useful, keeping in mind that this version:

Upgrading from 2.x version to 3.0 (Breaking Changes):