Redirection for oauth2-proxy should return 307 instead of 302 #12636
Labels
kind/bug
Categorizes issue or PR as related to a bug.
needs-priority
needs-triage
Indicates an issue or PR lacks a `triage/foo` label and requires one.
What happened:
Hi,
I have the following Oauth2 setup. Custom WebService, ingress-nginx, Oauth2-Proxy, KeyCloak as OIDC.
When opening a page with a POST method, the following happens if we are still logged in:
The problem here is that the original method is lost due to the return code which are 302 instead of 307. For the browser to respect the method, the 307 response code is required otherwise, the method is lost.
As of the documentation here:
It seems to me that if
ingress-nginx
,oauth2-proxy
andkeycloak
were returning 307 response code, then the method would be conserved and the valid api would be reached.Could it be feasible to change the return code to 307 instead of 302 ?
An issue already exist in oauth2-proxy and I will open a new one in keycloak.
If we were able to change this response code in both keycloak, oauth2-proxy and ingress-nginx then we would get the working following process:
There is no error message but an invalid behavior.
What you expected to happen:
I would expect the server to return a 307 redirection code instead of a 302.
NGINX Ingress controller version (exec into the pod and run
/nginx-ingress-controller --version
):Not required
Kubernetes version (use
kubectl version
):Not required
Environment:
Not required
How to reproduce this issue:
Basic config and add an ingress with the 2 annotations for OAuth2-proxy
Anything else we need to know:
There is potentially 2 ways to fix this.
The text was updated successfully, but these errors were encountered: