You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "csp33 (via GitHub)" <gi...@apache.org> on 2024/01/17 07:46:01 UTC
[I] Webserver redirects to main page when user is not logged in [airflow]
csp33 opened a new issue, #36832:
URL: https://github.com/apache/airflow/issues/36832
### Apache Airflow version
2.8.0
### If "Other Airflow 2 version" selected, which one?
_No response_
### What happened?
When opening the log of a specific Airflow DAG/log/whatever (like `<my airflow host>/log?execution_date=<date>&task_id=<task_id>&dag_id=<dag_id>&map_index=<map_index>`), the user is redirected to the login page if he's not logged in.
However, when the login is performed, the homepage of the webserver is shown, instead of the URL that was initially opened.
### What you think should happen instead?
_No response_
### How to reproduce
1. Enter into Airflow and copy the URL of a specific DAG (i.e `<my host>/dags/<my_dag>/grid`).
2. Log out
3. Paste the URL you copied -> you'll be redirected to the login page.
4. Login
5. See how you'll be redirected to the home page.
### Operating System
Docker image
### Versions of Apache Airflow Providers
_No response_
### Deployment
Official Apache Airflow Helm Chart
### Deployment details
_No response_
### Anything else?
I found out that this logic is implemented in https://github.com/apache/airflow/blob/13b0930bf45faece076ef1b0c4e6fd14f2b17e16/airflow/providers/fab/auth_manager/fab_auth_manager.py#L349
https://github.com/apache/airflow/blob/13b0930bf45faece076ef1b0c4e6fd14f2b17e16/airflow/providers/fab/auth_manager/fab_auth_manager.py#L354
However, we're calling this function using `next`
https://github.com/apache/airflow/blob/13b0930bf45faece076ef1b0c4e6fd14f2b17e16/airflow/www/auth.py#L119
Changing `next` to `next_url` should do the trick 😄
### Are you willing to submit PR?
- [X] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Webserver redirects to main page when user is not logged in [airflow]
Posted by "vincbeck (via GitHub)" <gi...@apache.org>.
vincbeck closed issue #36832: Webserver redirects to main page when user is not logged in
URL: https://github.com/apache/airflow/issues/36832
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Webserver redirects to main page when user is not logged in [airflow]
Posted by "foldvari (via GitHub)" <gi...@apache.org>.
foldvari commented on issue #36832:
URL: https://github.com/apache/airflow/issues/36832#issuecomment-2247115259
> What version of provider are you using? I guess the fixes you are looking for are here: #37225 and #37904
Thanks, it seems #37904 addresses the issue. Which version will have this fix?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Webserver redirects to main page when user is not logged in [airflow]
Posted by "vincbeck (via GitHub)" <gi...@apache.org>.
vincbeck commented on issue #36832:
URL: https://github.com/apache/airflow/issues/36832#issuecomment-2245625947
What version of provider are you using? I guess the fixes you are looking for are here: #37225 and #37904
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Webserver redirects to main page when user is not logged in [airflow]
Posted by "foldvari (via GitHub)" <gi...@apache.org>.
foldvari commented on issue #36832:
URL: https://github.com/apache/airflow/issues/36832#issuecomment-2245575796
I still see the same issue in Airflow 2.8.4
But if I replace 'next_url' by 'next' in the URL then it starts working.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Webserver redirects to main page when user is not logged in [airflow]
Posted by "vincbeck (via GitHub)" <gi...@apache.org>.
vincbeck commented on issue #36832:
URL: https://github.com/apache/airflow/issues/36832#issuecomment-2248072858
#37904 is a provider change so it is not a matter of Airflow version, it is a matter for fab provider version. I cannot see from the PR which version of FAB provider it is in but if you use the last, it should fix your issue. https://pypi.org/project/apache-airflow-providers-fab/
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org