-
Notifications
You must be signed in to change notification settings - Fork 14.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
check whether AUTH_ROLE_PUBLIC is set in check_authentication #38924
Conversation
5c61e1a
to
e3a56de
Compare
e3a56de
to
2b15226
Compare
Please update the tests but otherwise, LGTM |
2b15226
to
2fe90f3
Compare
Sure. I updated the conftest.py to ensure AUTH_ROLE_PUBLIC is None |
Could you add a test to cover this new branch? |
Yes, already working on it locally. I will add one more test case for this on each of the cases that failed previously: https://github.com/apache/airflow/actions/runs/8646082917/job/23704766901 and will wrap it up tomorrow. Let me change it to draft to avoid accidental merging |
166ba40
to
636354c
Compare
Added an AUTH_ROLE_PUBLIC test case for the following test cases
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Feel free to put it in review mode |
|
636354c
to
7306112
Compare
…apache#38924)" This reverts commit 7b60825.
Follow up after apache#38924 which was not triggered when API changed
Follow up after #38924 which was not triggered when API changed
apache#38924)" (apache#39009) This reverts commit 7fc2169.
Closes: #38900
Why
Currently, some of the web UI uses API endpoint to grep data. e.g., the following ones
This is because
check_authentication
blocks users without authentication. But whenAUTH_ROLE_PUBLIC
is set, it's possible that the public user have permission to do certain operation (including viewing those pages).What
This PR check whether
AUTH_ROLE_PUBLIC
is set. If so, it assumes it as a valid user. If theAUTH_ROLE_PUBLIC
role does not have proper permission, the authorization step will still blocks the request.