Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Setting proxy-prefix in helm seems to break login #2643

Open
adam-long opened this issue May 14, 2024 · 0 comments
Open

[Bug]: Setting proxy-prefix in helm seems to break login #2643

adam-long opened this issue May 14, 2024 · 0 comments

Comments

@adam-long
Copy link

adam-long commented May 14, 2024

OAuth2-Proxy Version

7.6

Provider

keycloak-oidc

Expected Behaviour

Same behavior as using default oauth2 proxy-prefix.

Current Behaviour

Attempting to login to an ingress using oauth2proxy as a defined prefix results in a 403 error page from nginx.

Steps To Reproduce

  1. Set oauth2-proxy.extraArgs.proxy-prefix: "oauth2proxy"
  2. Set the oauth2-proxy Ingress path to "/oauth2proxy"
  3. Set Ingress for protected resource (I used a basic nginx deployment with the stock Hello World HTML for testing) to use "/oauth2proxy" instead of default "/oauth2"
  4. Deploy resources
  5. Visit resource defined in step 3 in web browser
  6. Receive 403 Forbidden from the Ingress NGINX without attempt to login.

Possible Solutions

No response

Configuration details or additional information

I'm attempting to deploy oauth2-proxy using Helm on the same hostname that has another application already using /oauth2, so I'm attempting to change the prefix used by oauth2-proxy. My setup is pretty simple for Kubernetes - I have a basic Keycloak (23.0.6), NGINIX Ingress, oauth2-proxy, and a basic nginx deployment displaying the stock welcome message.

I'm attempting to protect the basic nginx deployment using oauth2-proxy. I have it working using the default proxy-prefix of /oauth2, but if I make the modifications in the "step to reproduce", I end up with a 403 error message and no attempt to login to send to Keycloak for authentication.

I've removed the conflicting application in an attempt to get this to work and reduced it down to only ingress, keycloak, oauth2-proxy, and the basic nginx deployment.

Looking at the logs for the ingress pod as well as oauth2-proxy, they register the 403 result, but that's it. It's not clear to me what else I need to configure in order to change the prefix for oauth2-proxy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant