Skip to content

Authentik 2025.10.1 - Outpost Proxy Bad Gateway error when sign_out #17922

@lineumaciel

Description

@lineumaciel

Describe the bug
I get a 502 "Bad gateway" error (and a go stacktrace) when I go on outpost sign_out url

To Reproduce
Steps to reproduce the behavior:

  1. Set up a authentik outpost proxy
  2. Configure your app to login with a traefik forwardAuth
    Login with success
  3. Got to the signout url https://svc.my_domain.tld/outpost.goauthentik.io/sign_out
    See error 502 "Bad Gateway"
    In the log: 2025/11/03 17:23:12 http: panic serving 172.18.0.2:48750: interface conversion: interface {} is map[string]interface {}, not types.Claims

log:

warning error=failed to save session: context canceled event=failed to save session before redirect logger=authentik.outpost.proxyv2.application name=Frigate timestamp=2025-11-03T17:47:00Z

2025/11/03 17:47:09 http: panic serving 172.18.0.2:53944: interface conversion: interface {} is map[string]interface {}, not types.Claims

goroutine 683 [running]:

net/http.(*conn).serve.func1()

	/usr/local/go/src/net/http/server.go:1943 +0xd3

panic({0x1771d80?, 0xc0004ec690?})

	/usr/local/go/src/runtime/panic.go:783 +0x132

goauthentik.io/internal/outpost/proxyv2/application.(*Application).handleSignOut(0xc000523888, {0x1bed560, 0xc000112440}, 0xc0001492c0)

	/go/src/goauthentik.io/internal/outpost/proxyv2/application/application.go:307 +0x52b

net/http.HandlerFunc.ServeHTTP(0x0?, {0x1bed560?, 0xc000112440?}, 0x0?)

	/usr/local/go/src/net/http/server.go:2322 +0x29

goauthentik.io/internal/outpost/proxyv2/application.NewApplication.func3.1({0x1bed560, 0xc000112440}, 0xc0001492c0)

	/go/src/goauthentik.io/internal/outpost/proxyv2/application/application.go:211 +0x1d2

net/http.HandlerFunc.ServeHTTP(0xc00028e5c0?, {0x1bed560?, 0xc000112440?}, 0x0?)

	/usr/local/go/src/net/http/server.go:2322 +0x29

goauthentik.io/internal/outpost/proxyv2/application.NewApplication.func2.1({0x1bed560, 0xc000112440}, 0xc0001492c0)

	/go/src/goauthentik.io/internal/outpost/proxyv2/application/application.go:189 +0x203

net/http.HandlerFunc.ServeHTTP(0xc000052730?, {0x1bed560?, 0xc000112440?}, 0xc000052718?)

	/usr/local/go/src/net/http/server.go:2322 +0x29

goauthentik.io/internal/utils/web.loggingHandler.ServeHTTP({{0x1be3540?, 0xc000112300?}, 0xc0001f3110?, 0xc00030d520?}, {0x1bed590, 0xc000652750}, 0xc0001492c0)

	/go/src/goauthentik.io/internal/utils/web/middleware.go:98 +0x122

github.com/gorilla/mux.(*Router).ServeHTTP(0xc000432b40, {0x1bed590, 0xc000652750}, 0xc000148c80)

	/go/pkg/mod/github.com/gorilla/mux@v1.8.1/mux.go:212 +0x1e2

goauthentik.io/internal/outpost/proxyv2/application.(*Application).ServeHTTP(...)

	/go/src/goauthentik.io/internal/outpost/proxyv2/application/application.go:288

goauthentik.io/internal/outpost/proxyv2.(*ProxyServer).Handle(0xc0004242c0, {0x1bed590, 0xc000652750}, 0xc000148c80)

	/go/src/goauthentik.io/internal/outpost/proxyv2/handlers.go:129 +0x956

net/http.HandlerFunc.ServeHTTP(0x1981c80?, {0x1bed590?, 0xc000652750?}, 0x8dde15?)

	/usr/local/go/src/net/http/server.go:2322 +0x29

goauthentik.io/internal/outpost/proxyv2.NewProxyServer.func1.1({0x1bed590, 0xc000652750}, 0xc0006529f0?)

	/go/src/goauthentik.io/internal/outpost/proxyv2/proxyv2.go:48 +0x36

net/http.HandlerFunc.ServeHTTP(0xc000148b40?, {0x1bed590?, 0xc000652750?}, 0x17cf600?)

	/usr/local/go/src/net/http/server.go:2322 +0x29

github.com/gorilla/mux.(*Router).ServeHTTP(0xc000432600, {0x1bed590, 0xc000652750}, 0xc000148a00)

	/go/pkg/mod/github.com/gorilla/mux@v1.8.1/mux.go:212 +0x1e2

goauthentik.io/internal/outpost/proxyv2.(*ProxyServer).HandleHost(0xc0004242c0, {0x1bed590, 0xc000652750}, 0xc000148a00)

	/go/src/goauthentik.io/internal/outpost/proxyv2/proxyv2.go:92 +0x125

goauthentik.io/internal/web.(*WebServer).configureProxy.func3({0x1bed590, 0xc000652750}, 0xc000148a00)

	/go/src/goauthentik.io/internal/web/proxy.go:74 +0xad

goauthentik.io/internal/web.(*WebServer).configureProxy.SentryNoSample.func5({0x1bed590, 0xc000652750}, 0xc0001488c0)

	/go/src/goauthentik.io/internal/utils/sentry/sentry.go:15 +0x7c

net/http.HandlerFunc.ServeHTTP(0xc000652390?, {0x1bed590?, 0xc000652750?}, 0x10?)

	/usr/local/go/src/net/http/server.go:2322 +0x29

goauthentik.io/internal/utils/web.(*compressHandler).ServeHTTP(0xc000226200, {0x1beea30, 0xc0006cc0c0}, 0xc0001488c0)

	/go/src/goauthentik.io/internal/utils/web/http_compress.go:38 +0xc7

goauthentik.io/internal/utils/web.NewCompressHandler.CompressHandler.CompressHandlerLevel.func1({0x1bed440, 0xc0005882d0}, 0xc0001488c0)

	/go/pkg/mod/github.com/gorilla/handlers@v1.5.2/compress.go:141 +0x565

net/http.HandlerFunc.ServeHTTP(0xc0001488c0?, {0x1bed440?, 0xc0005882d0?}, 0x130?)

	/usr/local/go/src/net/http/server.go:2322 +0x29

goauthentik.io/internal/utils/web.ProxyHeaders.func1.1.ProxyHeaders.1({0x1bed440, 0xc0005882d0}, 0xc0001488c0)

	/go/pkg/mod/github.com/gorilla/handlers@v1.5.2/proxy_headers.go:59 +0x143

net/http.HandlerFunc.ServeHTTP(...)

	/usr/local/go/src/net/http/server.go:2322

goauthentik.io/internal/utils/web.ProxyHeaders.func1.1({0x1bed440, 0xc0005882d0}, 0xc000148780)

	/go/src/goauthentik.io/internal/utils/web/http_forwarded.go:42 +0x51a

net/http.HandlerFunc.ServeHTTP(0xc000148500?, {0x1bed440?, 0xc0005882d0?}, 0x503309?)

	/usr/local/go/src/net/http/server.go:2322 +0x29

github.com/gorilla/mux.(*Router).ServeHTTP(0xc000432180, {0x1bed440, 0xc0005882d0}, 0xc0001483c0)

	/go/pkg/mod/github.com/gorilla/mux@v1.8.1/mux.go:212 +0x1e2

net/http.serverHandler.ServeHTTP({0xc00007f100?}, {0x1bed440?, 0xc0005882d0?}, 0x6?)

	/usr/local/go/src/net/http/server.go:3340 +0x8e

net/http.(*conn).serve(0xc00044a1b0, {0x1bf09b0, 0xc0000003c0})

	/usr/local/go/src/net/http/server.go:2109 +0x665

created by net/http.(*Server).Serve in goroutine 53

	/usr/local/go/src/net/http/server.go:3493 +0x485

Metadata

Metadata

Labels

bugSomething isn't workingbug/confirmedConfirmed bugs

Type

Projects

Status

Done

Relationships

None yet

Development

No branches or pull requests

Issue actions