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
- Enter into Airflow and copy the URL of a specific DAG (i.e
<my host>/dags/<my_dag>/grid).
- Log out
- Paste the URL you copied -> you'll be redirected to the login page.
- Login
- 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
|
def get_url_login(self, **kwargs) -> str: |
|
return url_for(f"{self.security_manager.auth_view.endpoint}.login", next=kwargs["next_url"]) |
However, we're calling this function using
next
|
return redirect(get_auth_manager().get_url_login(next=request.url)) |
Changing next to next_url should do the trick 😄
Are you willing to submit PR?
Code of Conduct
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
<my host>/dags/<my_dag>/grid).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
airflow/airflow/providers/fab/auth_manager/fab_auth_manager.py
Line 349 in 13b0930
airflow/airflow/providers/fab/auth_manager/fab_auth_manager.py
Line 354 in 13b0930
However, we're calling this function using
nextairflow/airflow/www/auth.py
Line 119 in 13b0930
Changing
nexttonext_urlshould do the trick 😄Are you willing to submit PR?
Code of Conduct