Replies: 12 comments
-
Hey! I would like to work on this issue! |
Beta Was this translation helpful? Give feedback.
-
(I have already posted a comment under the referenced issue and am posting the same comment here as well.) It took me a while to triage this issue. I went through the main-branch code as well as the last released source code of airflow (2.10.4). I think I may have a way of solving this. Please correct me if I am wrong! TriagingI thoroughly went through the entirety of the auth-related code (to the best of my ability). There is no wrong method being called. But since the FAB requires us to not allow any GET requests at the /logout API endpoint, the HTML can't be rendered when a user manually enters the URL in the browser point. Before moving further though, I wanted to ensure that the /logout endpoint does work for POST requests. There is one instance of a JS code sending a POST request to the /logout endpoint via the
When I then went to the /home page, the expected page showed up: When I clicked on the "logout" button, I was successfully able to log out, indicating no fault at the endpoint itself. SolutionHence my solution is as follows: This way, the GET request doesn't happen on our /logout endpoint itself (thus not violating any FAB requirements) while also enabling a GUI-based logout action. If this is the correct approach, I am willing to open a PR. |
Beta Was this translation helpful? Give feedback.
-
@Spaarsh well analyzed, solution seems solid. |
Beta Was this translation helpful? Give feedback.
-
@shahar1 Sure! I had a question though. Should I add the logout button on some existing html page? Or provide a hyperlink on some existing page? |
Beta Was this translation helpful? Give feedback.
-
Just try to make it as much as trivial to the user, as logging out should be a simple action. If you encounter any limitations, we could discuss them in the PR. |
Beta Was this translation helpful? Give feedback.
-
@punx120 could you please tell us the steps to recreate this error? That will greatly help in fixing it. Thanks! |
Beta Was this translation helpful? Give feedback.
-
I simply click on the logout link. |
Beta Was this translation helpful? Give feedback.
-
On a fresh install, it works - so it must be a config and/or package conflict - will try to dig into it |
Beta Was this translation helpful? Give feedback.
-
Next time the error occurs, inspect the logout button and check the corresponding action that is being taken on clicking it. From what I have discerned, the error should only surface if a GET request is sent at the |
Beta Was this translation helpful? Give feedback.
-
And take a look also at the providers reported by webserver (in the webserver menu). It could be that your webserver had - for whatever reason - different provider installed - or maybe even different airflow+provider installed when you run it. And it this case the error is on the side of provider installed in the webserver. |
Beta Was this translation helpful? Give feedback.
-
I convert it to a discussion as well - as it's something differnt - the issue seems to be solved but we might still discuss what's the problem you encountered with packages. |
Beta Was this translation helpful? Give feedback.
-
Ok i found the issue - it's because I have a custom |
Beta Was this translation helpful? Give feedback.
-
Apache Airflow version
2.10.4
If "Other Airflow 2 version" selected, which one?
No response
What happened?
I still have the same error as described in #40470 even though i'm running 2.10.4 with apache-airflow-providers-fab 1.4.0. It's probably linked to some package - but i did ran
pip install "apache-airflow==2.10.4" --constraint "https://raw.githubusercontent.com/apache/airflow/constraints-2.10.4/constraints-3.8.txt"
What you think should happen instead?
logout process needs to complete correctly
How to reproduce
connected as admin and try to logout
Operating System
Fedora 8.3
Versions of Apache Airflow Providers
apache-airflow-providers-fab==1.4.0
Deployment
Official Apache Airflow Helm Chart
Deployment details
No response
Anything else?
No response
Are you willing to submit PR?
Code of Conduct
Beta Was this translation helpful? Give feedback.
All reactions