airflow-commits mailing list archives

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

    [ https://issues.apache.org/jira/browse/AIRFLOW-3089?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16647656#comment-16647656
] 

ASF GitHub Bot commented on AIRFLOW-3089:
-----------------------------------------

ashb closed pull request #3919: [AIRFLOW-3089] Drop hard-coded url scheme in google auth redirect.
URL: https://github.com/apache/incubator-airflow/pull/3919
 
 
   

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/google_auth.py b/airflow/contrib/auth/backends/google_auth.py
index bc7d552f59..ddbcb1222f 100644
--- a/airflow/contrib/auth/backends/google_auth.py
+++ b/airflow/contrib/auth/backends/google_auth.py
@@ -112,8 +112,7 @@ def login(self, request):
         log.debug('Redirecting user to Google login')
         return self.google_oauth.authorize(callback=url_for(
             'google_oauth_callback',
-            _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:
users@infra.apache.org


> Google auth doesn't work under http
> -----------------------------------
>
>                 Key: AIRFLOW-3089
>                 URL: https://issues.apache.org/jira/browse/AIRFLOW-3089
>             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
(v7.6.3#76005)

Mime
View raw message