airflow-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <>
Subject [jira] [Commented] (AIRFLOW-3089) Google auth doesn't work under http
Date Fri, 12 Oct 2018 08:38:00 GMT


ASF GitHub Bot commented on AIRFLOW-3089:

ashb closed pull request #3919: [AIRFLOW-3089] Drop hard-coded url scheme in google auth redirect.

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/airflow/contrib/auth/backends/ b/airflow/contrib/auth/backends/
index bc7d552f59..ddbcb1222f 100644
--- a/airflow/contrib/auth/backends/
+++ b/airflow/contrib/auth/backends/
@@ -112,8 +112,7 @@ def login(self, request):
         log.debug('Redirecting user to Google login')
         return self.google_oauth.authorize(callback=url_for(
-            _external=True,
-            _scheme='https'),
+            _external=True),
             state=request.args.get('next') or request.referrer or None)
     def get_google_user_profile_info(self, google_token):


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:

> Google auth doesn't work under http
> -----------------------------------
>                 Key: AIRFLOW-3089
>                 URL:
>             Project: Apache Airflow
>          Issue Type: Bug
>          Components: authentication
>    Affects Versions: 1.10.0
>            Reporter: Josh Carp
>            Assignee: Josh Carp
>            Priority: Minor
> The google auth backend hard-codes the https scheme into its redirect urls and so doesn't
work with http. This happens because the redirect url sets the `_scheme` parameter to `https`.
I I see that this change was made to allow google auth to work when airflow is run behind
a proxy, but I think this fix isn't correct. Instead, proxies should be configured to set
`X-Forwarded-Proto` to `https`, and Flask will set the scheme correctly.

This message was sent by Atlassian JIRA

View raw message