caddy-security icon indicating copy to clipboard operation
caddy-security copied to clipboard

question: How to add ouath2 proxy parameter?

Open artem-zherdiev-ingio opened this issue 1 year ago • 3 comments

Hi, we tried OUATH2 PROXY and had such issue https://github.com/oauth2-proxy/oauth2-proxy/issues/644 which has fix like OAUTH2_PROXY_SESSION_COOKIE_MINIMAL=true.

After switching to caddy security we have same issure now, could we somehow set that session option there? We are using caddy 2.5.1. Thank you!

UPD. The tool we use behind the ouath2 proxy added option to increase the headers limit. So that ticket may be used as FYI, and free to close.

artem-zherdiev-ingio avatar May 29 '23 16:05 artem-zherdiev-ingio

@artem-zherdiev-ingio , could you please elaborate what the issue is? I don't use oauth2-proxy. Please provide as much context as possible.

greenpau avatar May 30 '23 20:05 greenpau

I believe he meant his token is too big, so the application being proxied is giving a "Header is too large" error. You can try adding "enable strip token" on the authorization policy. that will remove the "access_token" cookie from the proxied app.

CruzMarcio avatar Jul 02 '23 15:07 CruzMarcio

@CruzMarcio , thank you! 👍

greenpau avatar Jul 02 '23 21:07 greenpau