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

Add support for Google OAuth Scheme Override #7178

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

konstde00
Copy link

@konstde00 konstde00 commented Sep 26, 2024

What type of PR is this?

  • Refactor
  • Feature
  • Bug Fix
  • New Query Runner (Data Source)
  • New Alert Destination
  • Other

Description

This pull request introduces a new configuration setting, GOOGLE_OAUTH_SCHEME_OVERRIDE, which allows overriding the URL scheme used in Google OAuth redirects. This change ensures that the correct scheme (https) is used in environments where SSL termination occurs at a load balancer or proxy, and the connection to Redash is over HTTP

Problem Addressed

In deployments where Redash is behind a load balancer or reverse proxy that handles SSL termination (e.g., AWS Network Load Balancer), the application may generate URLs with the http scheme. This happens because Flask constructs URLs based on the incoming request, which is over HTTP from the proxy to the application server.

This behavior causes issues with Google OAuth authentication, as Google requires the redirect URIs to match exactly with the ones registered in the Google API Console. If the application generates a redirect URI with http, but Google expects https, the authentication flow fails.

Same changes were introduced for SAML in #3614

Link to PR which updates documentation: getredash/website#775

How is this tested?

  • Unit tests (pytest, jest)
  • E2E Tests (Cypress)
  • Manually
  • N/A

Seems to work fine in my local development environment.

Related Tickets & Documents

Resolves #6074

Mobile & Desktop Screenshots/Recordings (if there are UI changes)

@konstde00 konstde00 changed the title Added support for Google OAuth Scheme Override Add support for Google OAuth Scheme Override Sep 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Force Google oauth scheme https
2 participants