git.iko.soy/typeable/oauth2-proxy
on master help sign in
clarify the nginx auth_request_set/set problem with proxy_pass (#454)

* clarify the nginx auth_request_set/set problem with proxy_pass * reworded/extended as result of review

commiteb31850470f66906fc5955da7983bfcee8fcdc2f authorChristopher J. Ruwe <cruwe@users.noreply.github.com> dateWed 1 Apr 2020, 19:06 (7 years ago) parentc02d560
1 file changed+4−1
docs/configuration/configuration.md+4−1
docs/configuration/configuration.md+4−1
@@ -317,7 +317,9 @@ server {
317317}
318318```
319319
320−If you use ingress-nginx in Kubernetes (which includes the Lua module), you also can use the following configuration snippet for your Ingress:
320+When you use ingress-nginx in Kubernetes , you MUST use `kubernetes/ingress-nginx` (which includes the Lua module) and the following configuration snippet for your `Ingress`.
321+Variables set with `auth_request_set` are not `set`-able in plain nginx config when the location is processed via `proxy_pass` and then may only be processed by Lua.
322+Note that `nginxinc/kubernetes-ingress` does not include the Lua module.
321323
322324```yaml
323325nginx.ingress.kubernetes.io/auth-response-headers: Authorization
@@ -332,6 +334,7 @@ nginx.ingress.kubernetes.io/configuration-snippet: |
332334 end
333335 }
334336```
337+It is recommended to use `-session-store-type=redis` when expecting large sessions/OIDC tokens (_e.g._ with MS Azure).
335338
336339You have to substitute *name* with the actual cookie name you configured via --cookie-name parameter. If you don't set a custom cookie name the variable should be "$upstream_cookie__oauth2_proxy_1" instead of "$upstream_cookie_name_1" and the new cookie-name should be "_oauth2_proxy_1=" instead of "name_1=".
337340