Oauth for google redirect_uri error expecting HTTPS but sending HTTP #21850
Replies: 15 comments 4 replies
-
Thanks for opening your first issue here! Be sure to follow the issue template! |
Beta Was this translation helpful? Give feedback.
-
I can confirm this. Spent already a couple of hours or days trying to figure this out. But tbh I think the bug is somewhere upstream. My guess is FAB. I already tried a dozen things. In my case we have Airflow running behind a proxy, but the proxy fix did not solve this specific issue.
then I also piped this to I don't know what is going on there. Appreciate help as well! :) |
Beta Was this translation helpful? Give feedback.
-
Hello!!! |
Beta Was this translation helpful? Give feedback.
-
I believe @feluelle is on the right track with this being a FAB issue. Found this, which looks like it's the same issue: dpgaspar/Flask-AppBuilder#1666 You all should add any helpful context there. This is most likely a "wont-fix" from Airflow's side. |
Beta Was this translation helpful? Give feedback.
-
I am going to collaborate with @dpgaspar soon (maybe even this week) on fixing some other - related - FAB issues, so I will add that to the list. |
Beta Was this translation helpful? Give feedback.
-
Thank you for taking notice of this! In the meantime, I found a workaround that got us up and running: setting |
Beta Was this translation helpful? Give feedback.
-
We solved this by adding @gvillafanetapia's workaround in the airflow.cfg file under the webserver section. This solution also works for Airflow 1.10.15.
|
Beta Was this translation helpful? Give feedback.
-
i hereby confirm the workaround works on also, evil google's documentation is not clear on this part (probably a 🐛 on google's end): In the GCP console, under |
Beta Was this translation helpful? Give feedback.
-
Cool. BTW. Maybe you can submit a change to Google about the docs ? They have a great system (developed by the team I worked at in Cracow years ago) that you can visually mark errors on the page with docs and suggest a change. It will not open PR with the change, but i think there are some people (or bots now) looking at the feedback. I think you can find 'provide feedback for this page' or similar link on each page at the bottom :) |
Beta Was this translation helpful? Give feedback.
-
yeah, i knew that system but Google seems to adopt the Facebook way "move fast and break things" so their documentation is always behind 😿 anyway, i already submitted the feedback to Google 🤞 |
Beta Was this translation helpful? Give feedback.
-
I encountered the same issue for my Gitlab OAUTH :/ (My Airflow service is behind an AWS ALB) |
Beta Was this translation helpful? Give feedback.
-
@nk74 - ask in Flask App Builder forums. Here are docs about authentication in Flask App Builder https://flask-appbuilder.readthedocs.io/en/latest/security.html |
Beta Was this translation helpful? Give feedback.
-
Converting it into discussion - as this is FAB issue not an Airflow one. |
Beta Was this translation helpful? Give feedback.
-
Faced the same issue (http instead of https in redirect url), try setting AIRFLOW__WEBSERVER__ENABLE_PROXY_FIX to True, but still get http, any suggestions? |
Beta Was this translation helpful? Give feedback.
-
Hi, we are running ariflow version: 2.1.4. |
Beta Was this translation helpful? Give feedback.
-
Apache Airflow version:
Version: v2.1.0 (The problem still exists in v2.1.2)
Git Version: .release:2.1.0+304e174674ff6921cb7ed79c0158949b50eff8fe
Apache Airflow Provider versions : apache-airflow-providers-google==4.0.0
Kubernetes version:
Environment:
What happened:
On configuring Google Oauth login, when selecting an account to continue with we get a message from Google saying:
When visiting google cloud console there is no way of configuring a redirect_uri with HTTP (HTTPS is enforced now), and there is no way in Airflow to change the redirect_uri sent in the request.
What you expected to happen:
I expect Airflow to send in the oauth request my configured
BASE_URL
with HTTPS as the redirect_uri, or to use the redirect_uri configured in theOAUTH_PROVIDERS
object variable set in webserver_config.pyHow to reproduce it:
Get oauth credentials from google cloud console. Check that it won't let you set a redirect_uri with HTTP.
Install Airflow v2.1.* with the following webserver_config.py:
and these settings;
Beta Was this translation helpful? Give feedback.
All reactions