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]: Google OAuth on a Helm deployment redirects to URL with :8080 as the port, where it shouldn't have a port at all #12201

Open
1 task done
sharat87 opened this issue Mar 24, 2022 · 6 comments
Assignees
Labels
Bug Something isn't working Community Reported issues reported by community members DevOps Pod Issues related to devops High This issue blocks a user from building or impacts a lot of users K8s Kubernetes related issues Needs Triaging Needs attention from maintainers to triage Production

Comments

@sharat87
Copy link
Member

Is there an existing issue for this?

  • I have searched the existing issues

Description

When Appsmith is deployed on a Kubernetes cluster using Helm charts, and Google OAuth is configured, the redirect URL after authentication adds the :8080 port and so fails to work.

For example, if this Appsmith is accessible on http://myappsmith.com, then Google OAuth redirects to http://myappsmith.com:8080/..., which would obviously fail. The URL actually works fine when the :8080 part is removed.

Steps To Reproduce

Deploy Appsmith with Helm charts on a new cluster, with ingress enabled, configure Google OAuth using the Helm values, and try to login with Google. The redirect URL should have the :8080 in it, when it shouldn't.

Check if this issue is present with GitHub OAuth as well.

Public Sample App

No response

Version

Self Hosted

@sharat87 sharat87 added Bug Something isn't working Needs Triaging Needs attention from maintainers to triage labels Mar 24, 2022
@sharat87 sharat87 added the Epic A zenhub epic that describes a project label Mar 24, 2022
@sharat87 sharat87 added Deployment Community Reported issues reported by community members K8s Kubernetes related issues and removed Epic A zenhub epic that describes a project labels Mar 24, 2022
@github-actions github-actions bot added IDE Pod Issues that new developers face while exploring the IDE Platform Pod labels Mar 24, 2022
@sum35h sum35h self-assigned this Mar 25, 2022
@pquadri
Copy link

pquadri commented Mar 30, 2022

I think I found a fix, you need to force the proxy_set_header X-Forwarded-Port 80; in the nginx configuration within the image. Do you want me to submit a PR?

@sum35h
Copy link
Contributor

sum35h commented Mar 31, 2022

Hi @pquadri ,thanks for looking into it.
Currently it seems to be working fine when I set it up on aws eks, and I'm not able to re-create the issue. It would be really helpful if you could share the setup details, where the issue occurs.

@pquadri
Copy link

pquadri commented Mar 31, 2022

I just used the default helm chart and didn't provide any configuration besides changing the ingress, but the issue apparently is the nginx configuration within the image (that is reset on every pod restart, I have to change it by hand). If you want to hop in a discord session or something I could show you

@Nikhil-Nandagopal Nikhil-Nandagopal added DevOps Pod Issues related to devops and removed IDE Pod Issues that new developers face while exploring the IDE Platform Pod labels Apr 4, 2022
@sharat87 sharat87 removed this from DevOps Pod Aug 19, 2022
@sharat87 sharat87 moved this to 📋 Backlog in DevOps Pod Sep 16, 2022
@sharat87
Copy link
Member Author

@pquadri, can you share if you still see this problem? We've tried several times, but are unable to see this. If you see this problem, please feel free to start a conv. on Discord with you configuration to investigate. My username is same on Discord as here. Thanks!

@sharat87 sharat87 moved this from 📋 Backlog to 🆕 Icebox in DevOps Pod Sep 16, 2022
@sum35h sum35h moved this from 🆕 Icebox to 🏗 In progress in DevOps Pod Oct 3, 2022
@sum35h sum35h moved this from 🏗 In progress to 📋 Backlog in DevOps Pod Nov 25, 2022
@pquadri
Copy link

pquadri commented Feb 14, 2023

The issue disappeared when we changed ingress type. Not really sure how.

@sharat87
Copy link
Member Author

I think this problem shows up when Appsmith is running with a Network Load Balancer (NLB). Since that operates at Layer-4, the same problem as in #14290 (comment) manifests here as well. The solution there should help here, but we need to first try to reproduce with an NLB.

@Nikhil-Nandagopal Nikhil-Nandagopal added the High This issue blocks a user from building or impacts a lot of users label Nov 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working Community Reported issues reported by community members DevOps Pod Issues related to devops High This issue blocks a user from building or impacts a lot of users K8s Kubernetes related issues Needs Triaging Needs attention from maintainers to triage Production
Projects
No open projects
Status: 📋 Backlog
Development

No branches or pull requests

5 participants