mesosphere / traefik-forward-auth

214 stars 46 forks source link

Which claims can be X-Forwarded via FORWARD_TOKEN_HEADER_NAME? #65

Closed tgerakitis closed 1 year ago

tgerakitis commented 2 years ago

I am trying to figure out, which possible values I can set in FORWARD_TOKEN_HEADER_NAME env.

Looking through the code I wasn't able to understand which forward token I can parse.

bennesp commented 2 years ago

FORWARD_TOKEN_HEADER_NAME is described as:

Header name to forward the raw ID token in (won't forward token if empty)

https://github.com/mesosphere/traefik-forward-auth/blob/057c6d41a7126080c08f011a7fbaa0f12c16d10a/internal/configuration/config.go#L55-L57

So, to answer you question, if you set FORWARD_TOKEN_HEADER_NAME=X-Forwarded-Jwt then your backends will receive the raw JWT token in the X-Forwarded-Jwt header (remember to add authResponseHeaders or authResponseHeadersRegex to your middleware of course)