authelia-basic-2fa icon indicating copy to clipboard operation
authelia-basic-2fa copied to clipboard

Example configuration for Traefik v2

Open samip5 opened this issue 3 years ago • 1 comments

Could you please add a example configuration for it?

What's the proper way to use it in Traefik v2?

The logs show this:

{"level":"error","ts":1612719909.455098,"caller":"src/main.go:42","msg":"User 172.20.0.1 not authenticated","stacktrace":"main.handleAuthentication\n\t/src/main.go:42\ngithub.com/labstack/echo/v4.(*Echo).add.func1\n\t/go/pkg/mod/github.com/labstack/echo/[email protected]/echo.go:522\ngithub.com/labstack/echo/v4.(*Echo).ServeHTTP\n\t/go/pkg/mod/github.com/labstack/echo/[email protected]/echo.go:633\nnet/http.serverHandler.ServeHTTP\n\t/usr/local/go/src/net/http/server.go:2843\nnet/http.(*conn).serve\n\t/usr/local/go/src/net/http/server.go:1925"}
{"level":"error","ts":1612719909.455329,"caller":"src/main.go:43","msg":"unrecognized auth header format","stacktrace":"main.handleAuthentication\n\t/src/main.go:43\ngithub.com/labstack/echo/v4.(*Echo).add.func1\n\t/go/pkg/mod/github.com/labstack/echo/[email protected]/echo.go:522\ngithub.com/labstack/echo/v4.(*Echo).ServeHTTP\n\t/go/pkg/mod/github.com/labstack/echo/[email protected]/echo.go:633\nnet/http.serverHandler.ServeHTTP\n\t/usr/local/go/src/net/http/server.go:2843\nnet/http.(*conn).serve\n\t/usr/local/go/src/net/http/server.go:1925"}
[http.middlewares]
  [http.middlewares.authelia-basic.forwardAuth]
    address = "http://authelia-basic:8081"
    trustForwardHeader = true
    authResponseHeaders = ["Remote-User", "Remote-Groups"]

samip5 avatar Feb 07 '21 17:02 samip5

I'm afraid that I've never used Traefik, so I can't help with this. If you end up getting it to work, please post the configuration here to help others.

ViRb3 avatar Feb 08 '21 18:02 ViRb3