GoDoxy
Advanced TopicsMiddlewaresAuthentication and Security

Forward Auth

Forward authentication to another service

Configuration

OptionDescriptionDefault
routeAuth server routetinyauth
auth_endpointAuth endpoint path/api/auth/traefik
headersHeaders to forward["Remote-User", "Remote-Name", "Remote-Email", "Remote-Groups"]

Behavior

Examples

Entrypoint

entrypoint:
  middlewares:
    - use: forward_auth
      route: tinyauth
      auth_endpoint: /api/auth/traefik
      headers: Remote-User, Remote-Name, Remote-Email, Remote-Groups
      bypass:
        - route tinyauth

Docker Labels

proxy.myapp.middlewares.forward_auth: |
  route: tinyauth
  auth_endpoint: /api/auth/traefik
  headers: Remote-User, Remote-Name, Remote-Email, Remote-Groups

Route Files

myapp:
  middlewares:
    forward_auth:
      route: tinyauth
      auth_endpoint: /api/auth/traefik
      headers: Remote-User, Remote-Name, Remote-Email, Remote-Groups

On this page