Repository navigation
Inconsistent kwargs key in auth.py and the key checked in auth_manager's get_url_login method
#37224
Replies: 3 comments 3 replies
|
cc: @vincbeck - - we are likely going to release a new Airflow Release shortly, so we might have a chance to get this one in if we confirm/fix it |
0 replies
|
Thanks @awdavidson for reporting this bug and sharing all the details, it makes the debugging very easy :) Indeed, there is a bug here and we should make the parameter consistent, we should use |
3 replies
|
Closing the discussion since the fix has been merged. Thanks again for reporting this bug. The fix will be part of Airflow 2.8.2 |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
We have implemented a webserver_config that adds functionality to ensure an unauthenticated request to an endpoint is redirected back to the original location once the user has authenticated. For example navigating to
http://127.0.0.1:8080/dags/example_bash_operator/gridin a browser without logging in will redirect the user to the login pagehttp://127.0.0.1:8080/loginthen redirect back tohttp://127.0.0.1:8080/dags/example_bash_operator/gridonce the user has successfully logged in.After upgrading from
2.6.3to2.7.3this functionality broke; during my investigation I noticed the following change introduced a change to authentication managers: #32697This change, has also introduced inconsistency with kwargs set in
auth.pyand the kwargs checked in the auth managersget_url_loginmethod meaning thenextURL is no longer passed through to the redirected request so a user is no longer redirected back to the original URL.e.g.
get_url_loginchecks kwargs fornext_urlhttps://github.com/aws-mwaa/upstream-to-airflow/blob/333a0527430b3dde7cbedaf407560cebffc20827/airflow/auth/managers/fab/fab_auth_manager.py#L58 butauth.pysetsnexthttps://github.com/aws-mwaa/upstream-to-airflow/blob/333a0527430b3dde7cbedaf407560cebffc20827/airflow/www/auth.py#L64I am under the impression this is a bug? Either the kwargs need to be consistent or the auth manager needs to check both
next_urlandnextkeys?Do others agree?
NB: I am happy to submit a PR with the change if required
All reactions