Anonymous users are no longer able to add DAG run notes, even with the ADMIN role #36206
Closed
2 tasks done
Labels
area:core
duplicate
Issue that is duplicated
kind:bug
This is a clearly a bug
needs-triage
label for new issues that we didn't triage yet
Apache Airflow version
2.7.3
What happened
We have Airflow configured with
AUTH_ROLE_PUBLIC = 'Admin'
since our access control is currently provided by an external mechanism. Users therefore do not log into the web interface at the moment and we have no users configured in fab.Since deploying version 2.7.3 we have noticed a regression in that the anonymous user is unable to add DAG notes.
This used to work up to and including version 2.6.3.
Clicking on Save Note generates the following error in the UI.
![image](https://private-user-images.githubusercontent.com/2117946/290186437-aaa686c1-2e65-4676-a4c6-fae4df36a88b.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkzMjE3MjgsIm5iZiI6MTczOTMyMTQyOCwicGF0aCI6Ii8yMTE3OTQ2LzI5MDE4NjQzNy1hYWE2ODZjMS0yZTY1LTQ2NzYtYTRjNi1mYWU0ZGYzNmE4OGIucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIxMiUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMTJUMDA1MDI4WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9YmVjMDA4MmFjM2YyMDk3YWQ5YTY2MjM5Njg5YTI2ZTY2MmY2Y2IxMjMyYWQ3YTBhNTY2ODJjZWM1YzA0ODU3YiZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.slZZOKQL0mr0OkrDVGfADMip9vwVh2qJ-G-nrglzPE4)
The following error is logged:
It doesn't like the fact that our
user_id
value isNone
, rather than an integer value.What you think should happen instead
It should add the note to the database, as it did up to version 2.6.3. Attributed to an unauthenticated user.
How to reproduce
AUTH_ROLE_PUBLIC = 'Admin'
.Operating System
Debian GNU/Linux 10
Versions of Apache Airflow Providers
Deployment
Other
Deployment details
We deploy airflow in a conda environment to certain hosts and use SSH based authentication to restrict access to it.
This allows us to make use of the feature that unauthenticated users may perform administrative tasks.
Anything else
The problem was originally reported in this upstream bug tracker: https://phabricator.wikimedia.org/T352534
Are you willing to submit PR?
Code of Conduct
The text was updated successfully, but these errors were encountered: